ALICE_2010_S8624100.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ChargedFinalState.hh" 00004 00005 namespace Rivet { 00006 00007 00008 class ALICE_2010_S8624100 : public Analysis { 00009 public: 00010 00011 /// @name Constructors etc. 00012 //@{ 00013 00014 /// Constructor 00015 ALICE_2010_S8624100() 00016 : Analysis("ALICE_2010_S8624100") 00017 { } 00018 00019 //@} 00020 00021 00022 public: 00023 00024 /// @name Analysis methods 00025 //@{ 00026 00027 /// Book histograms and initialise projections before the run 00028 void init() { 00029 00030 ChargedFinalState cfs05(-0.5, 0.5); 00031 ChargedFinalState cfs10(-1.0, 1.0); 00032 ChargedFinalState cfs13(-1.3, 1.3); 00033 addProjection(cfs05, "CFS05"); 00034 addProjection(cfs10, "CFS10"); 00035 addProjection(cfs13, "CFS13"); 00036 00037 if (fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) { 00038 _h_dN_dNch_05 = bookHisto1D(11, 1, 1); 00039 _h_dN_dNch_10 = bookHisto1D(12, 1, 1); 00040 _h_dN_dNch_13 = bookHisto1D(13, 1, 1); 00041 } else if (fuzzyEquals(sqrtS()/GeV, 2360, 1E-3)) { 00042 _h_dN_dNch_05 = bookHisto1D(17, 1, 1); 00043 _h_dN_dNch_10 = bookHisto1D(18, 1, 1); 00044 _h_dN_dNch_13 = bookHisto1D(19, 1, 1); 00045 } 00046 00047 } 00048 00049 00050 /// Perform the per-event analysis 00051 void analyze(const Event& event) { 00052 const double weight = event.weight(); 00053 00054 const ChargedFinalState& charged_05 = applyProjection<ChargedFinalState>(event, "CFS05"); 00055 const ChargedFinalState& charged_10 = applyProjection<ChargedFinalState>(event, "CFS10"); 00056 const ChargedFinalState& charged_13 = applyProjection<ChargedFinalState>(event, "CFS13"); 00057 00058 _h_dN_dNch_05->fill(charged_05.size(), weight); 00059 _h_dN_dNch_10->fill(charged_10.size(), weight); 00060 _h_dN_dNch_13->fill(charged_13.size(), weight); 00061 } 00062 00063 00064 /// Normalise histograms etc., after the run 00065 void finalize() { 00066 00067 normalize(_h_dN_dNch_05); 00068 normalize(_h_dN_dNch_10); 00069 normalize(_h_dN_dNch_13); 00070 00071 } 00072 00073 //@} 00074 00075 00076 private: 00077 00078 /// @name Histograms 00079 //@{ 00080 00081 Histo1DPtr _h_dN_dNch_05; 00082 Histo1DPtr _h_dN_dNch_10; 00083 Histo1DPtr _h_dN_dNch_13; 00084 //@} 00085 00086 00087 }; 00088 00089 00090 00091 // The hook for the plugin system 00092 DECLARE_RIVET_PLUGIN(ALICE_2010_S8624100); 00093 00094 } Generated on Tue Mar 24 2015 17:35:23 for The Rivet MC analysis system by ![]() |