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