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 #include "Rivet/Projections/TriggerCDFRun2.hh" 00007 00008 namespace Rivet { 00009 00010 00011 class CDF_2009_NOTE_9936 : public Analysis { 00012 public: 00013 00014 /// @name Constructors etc. 00015 //@{ 00016 00017 /// Constructor 00018 CDF_2009_NOTE_9936() 00019 : Analysis("CDF_2009_NOTE_9936") 00020 { } 00021 00022 //@} 00023 00024 00025 public: 00026 00027 /// @name Analysis methods 00028 //@{ 00029 00030 /// Book histograms and initialise projections before the run 00031 void init() { 00032 00033 addProjection(TriggerCDFRun2(), "Trigger"); 00034 00035 addProjection(ChargedFinalState(-1.0, 1.0, 0.4*GeV), "CFS"); 00036 00037 _hist_nch = bookHistogram1D(1, 1, 1); 00038 } 00039 00040 00041 /// Perform the per-event analysis 00042 void analyze(const Event& event) { 00043 // MinBias Trigger 00044 const bool trigger = applyProjection<TriggerCDFRun2>(event, "Trigger").minBiasDecision(); 00045 if (!trigger) vetoEvent; 00046 //_sumWPassed += event.weight(); 00047 const double weight = event.weight(); 00048 00049 // Get events charged multiplicity and fill histogram 00050 const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); 00051 _hist_nch->fill(cfs.size(), weight); 00052 00053 } 00054 00055 00056 /// Normalise histograms etc., after the run 00057 void finalize() { 00058 normalize(_hist_nch); 00059 } 00060 00061 //@} 00062 00063 private: 00064 00065 AIDA::IHistogram1D *_hist_nch; 00066 00067 }; 00068 00069 00070 00071 // The hook for the plugin system 00072 DECLARE_RIVET_PLUGIN(CDF_2009_NOTE_9936); 00073 00074 }