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