UA5_1989_S1926373.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ChargedFinalState.hh" 00004 #include "Rivet/Projections/TriggerUA5.hh" 00005 00006 namespace Rivet { 00007 00008 00009 /// @brief UA5 min bias charged multiplicities in central \f$ \eta \f$ ranges 00010 class UA5_1989_S1926373 : public Analysis { 00011 public: 00012 00013 /// Constructor 00014 UA5_1989_S1926373() : Analysis("UA5_1989_S1926373") { 00015 _sumWPassed = 0; 00016 } 00017 00018 00019 /// @name Analysis methods 00020 //@{ 00021 00022 /// Book histograms and projections 00023 void init() { 00024 addProjection(TriggerUA5(), "Trigger"); 00025 addProjection(ChargedFinalState(-0.5, 0.5), "CFS05"); 00026 addProjection(ChargedFinalState(-1.5, 1.5), "CFS15"); 00027 addProjection(ChargedFinalState(-3.0, 3.0), "CFS30"); 00028 addProjection(ChargedFinalState(-5.0, 5.0), "CFS50"); 00029 00030 // NB. _hist_nch and _hist_ncheta50 use the same data but different binning 00031 if (fuzzyEquals(sqrtS()/GeV, 200, 1E-3)) { 00032 _hist_nch = bookHisto1D(1, 1, 1); 00033 _hist_nch_eta05 = bookHisto1D(3, 1, 1); 00034 _hist_nch_eta15 = bookHisto1D(4, 1, 1); 00035 _hist_nch_eta30 = bookHisto1D(5, 1, 1); 00036 _hist_nch_eta50 = bookHisto1D(6, 1, 1); 00037 _hist_mean_nch = bookHisto1D(11, 1, 1); 00038 } else if (fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) { 00039 _hist_nch = bookHisto1D(2, 1, 1); 00040 _hist_nch_eta05 = bookHisto1D(7, 1, 1); 00041 _hist_nch_eta15 = bookHisto1D(8, 1, 1); 00042 _hist_nch_eta30 = bookHisto1D(9, 1, 1); 00043 _hist_nch_eta50 = bookHisto1D(10, 1, 1); 00044 _hist_mean_nch = bookHisto1D(12, 1, 1); 00045 } 00046 00047 /// @todo Moments of distributions 00048 } 00049 00050 00051 /// Do the analysis 00052 void analyze(const Event& event) { 00053 // Trigger 00054 const TriggerUA5& trigger = applyProjection<TriggerUA5>(event, "Trigger"); 00055 if (!trigger.nsdDecision()) vetoEvent; 00056 00057 const double weight = event.weight(); 00058 _sumWPassed += weight; 00059 00060 // Count final state particles in several eta regions 00061 const int numP05 = applyProjection<ChargedFinalState>(event, "CFS05").size(); 00062 const int numP15 = applyProjection<ChargedFinalState>(event, "CFS15").size(); 00063 const int numP30 = applyProjection<ChargedFinalState>(event, "CFS30").size(); 00064 const int numP50 = applyProjection<ChargedFinalState>(event, "CFS50").size(); 00065 00066 // Fill histograms 00067 _hist_nch->fill(numP50, weight); 00068 _hist_nch_eta05->fill(numP05, weight); 00069 _hist_nch_eta15->fill(numP15, weight); 00070 _hist_nch_eta30->fill(numP30, weight); 00071 _hist_nch_eta50->fill(numP50, weight); 00072 _hist_mean_nch->fill(_hist_mean_nch->bin(0).xMid(), numP50*weight); 00073 } 00074 00075 00076 void finalize() { 00077 scale(_hist_nch, 1.0/_sumWPassed); 00078 scale(_hist_nch_eta05, 1.0/_sumWPassed); 00079 scale(_hist_nch_eta15, 1.0/_sumWPassed); 00080 scale(_hist_nch_eta30, 1.0/_sumWPassed); 00081 scale(_hist_nch_eta50, 1.0/_sumWPassed); 00082 scale(_hist_mean_nch, 1.0/_sumWPassed); 00083 } 00084 00085 //@} 00086 00087 00088 private: 00089 00090 /// @name Counters 00091 //@{ 00092 double _sumWPassed; 00093 //@} 00094 00095 /// @name Histograms 00096 //@{ 00097 Histo1DPtr _hist_nch; 00098 Histo1DPtr _hist_nch_eta05; 00099 Histo1DPtr _hist_nch_eta15; 00100 Histo1DPtr _hist_nch_eta30; 00101 Histo1DPtr _hist_nch_eta50; 00102 Histo1DPtr _hist_mean_nch; 00103 //@} 00104 00105 }; 00106 00107 00108 00109 // The hook for the plugin system 00110 DECLARE_RIVET_PLUGIN(UA5_1989_S1926373); 00111 00112 } Generated on Wed Oct 7 2015 12:09:15 for The Rivet MC analysis system by ![]() |