CDF_1990_S2089246.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/Logging.hh" 00004 #include "Rivet/RivetYODA.hh" 00005 #include "Rivet/Projections/ChargedFinalState.hh" 00006 #include "Rivet/Projections/TriggerCDFRun0Run1.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief CDF pseudorapidity analysis at 630 and 1800 GeV 00012 /// @author Andy Buckley 00013 class CDF_1990_S2089246 : public Analysis { 00014 public: 00015 00016 /// Constructor 00017 CDF_1990_S2089246() 00018 : Analysis("CDF_1990_S2089246") 00019 { 00020 _sumWTrig = 0; 00021 } 00022 00023 00024 /// @name Analysis methods 00025 //@{ 00026 00027 void init() { 00028 // Setup projections 00029 addProjection(TriggerCDFRun0Run1(), "Trigger"); 00030 addProjection(ChargedFinalState(-3.5, 3.5), "CFS"); 00031 00032 // Book histo 00033 if (fuzzyEquals(sqrtS()/GeV, 1800, 1E-3)) { 00034 _hist_eta = bookHisto1D(3, 1, 1); 00035 } else if (fuzzyEquals(sqrtS()/GeV, 630, 1E-3)) { 00036 _hist_eta = bookHisto1D(4, 1, 1); 00037 } 00038 } 00039 00040 00041 /// Do the analysis 00042 void analyze(const Event& event) { 00043 // Trigger 00044 const bool trigger = applyProjection<TriggerCDFRun0Run1>(event, "Trigger").minBiasDecision(); 00045 if (!trigger) vetoEvent; 00046 const double weight = event.weight(); 00047 _sumWTrig += weight; 00048 00049 // Loop over final state charged particles to fill eta histos 00050 const FinalState& fs = applyProjection<FinalState>(event, "CFS"); 00051 foreach (const Particle& p, fs.particles()) { 00052 const double eta = p.momentum().pseudorapidity(); 00053 _hist_eta->fill(fabs(eta), weight); 00054 } 00055 } 00056 00057 00058 /// Finalize 00059 void finalize() { 00060 // Divide through by num events to get d<N>/d(eta) in bins 00061 // Factor of 1/2 for |eta| -> eta 00062 scale(_hist_eta, 0.5/_sumWTrig); 00063 } 00064 00065 //@} 00066 00067 00068 private: 00069 00070 /// @name Weight counter 00071 //@{ 00072 double _sumWTrig; 00073 //@} 00074 00075 /// @name Histogram collections 00076 //@{ 00077 Histo1DPtr _hist_eta; 00078 //@} 00079 00080 }; 00081 00082 00083 00084 // The hook for the plugin system 00085 DECLARE_RIVET_PLUGIN(CDF_1990_S2089246); 00086 00087 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |