00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetAIDA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Projections/ChargedFinalState.hh" 00006 00007 #include "Rivet/Projections/TriggerCDFRun0Run1.hh" 00008 #include "Rivet/Projections/TriggerUA5.hh" 00009 00010 namespace Rivet { 00011 00012 00013 /// @brief E735 charged multiplicity in NSD-triggered events 00014 class E735_1998_S3905616 : public Analysis { 00015 public: 00016 00017 /// Constructor 00018 E735_1998_S3905616() : Analysis("E735_1998_S3905616") { 00019 setBeams(PROTON, ANTIPROTON); 00020 _sumWTrig = 0; 00021 } 00022 00023 00024 /// @name Analysis methods 00025 //@{ 00026 00027 void init() { 00028 // Projections 00029 /// @todo E735 trigger? 00030 //addProjection(TriggerCDFRun0Run1(), "Trigger"); 00031 addProjection(TriggerUA5(), "Trigger"); 00032 addProjection(ChargedFinalState(), "FS"); 00033 00034 // Histo 00035 _hist_multiplicity = bookHistogram1D(1, 1, 1); 00036 } 00037 00038 00039 void analyze(const Event& event) { 00040 //const bool trigger = applyProjection<TriggerCDFRun0Run1>(event, "Trigger").minBiasDecision(); 00041 const bool trigger = applyProjection<TriggerUA5>(event, "Trigger").nsdDecision(); 00042 if (!trigger) vetoEvent; 00043 const double weight = event.weight(); 00044 _sumWTrig += weight; 00045 00046 const ChargedFinalState& fs = applyProjection<ChargedFinalState>(event, "FS"); 00047 const size_t numParticles = fs.particles().size(); 00048 _hist_multiplicity->fill(numParticles, weight); 00049 } 00050 00051 00052 void finalize() { 00053 scale(_hist_multiplicity, 1/_sumWTrig); 00054 } 00055 00056 //@} 00057 00058 00059 private: 00060 00061 /// @name Weight counter 00062 //@{ 00063 double _sumWTrig; 00064 //@} 00065 00066 /// @name Histograms 00067 //@{ 00068 AIDA::IHistogram1D* _hist_multiplicity; 00069 //@} 00070 00071 }; 00072 00073 00074 00075 // This global object acts as a hook for the plugin system 00076 AnalysisBuilder<E735_1998_S3905616> plugin_E735_1998_S3905616; 00077 00078 }