STAR_2006_S6870392.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 00006 namespace Rivet { 00007 00008 00009 /// @brief STAR inclusive jet cross-section in pp at 200 GeV 00010 class STAR_2006_S6870392 : public Analysis { 00011 public: 00012 00013 /// Constructor 00014 STAR_2006_S6870392() 00015 : Analysis("STAR_2006_S6870392") 00016 { } 00017 00018 00019 /// @name Analysis methods 00020 //@{ 00021 00022 /// Book projections and histograms 00023 void init() { 00024 FinalState fs(-2.0, 2.0); 00025 addProjection(fs, "FS"); 00026 // R=0.4, pTmin=0, seed_threshold=0.5: 00027 addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.4, 0.5), "MidpointJets"); 00028 00029 _h_jet_pT_MB = bookHisto1D(1, 1, 1); 00030 _h_jet_pT_HT = bookHisto1D(2, 1, 1); 00031 } 00032 00033 00034 /// Do the analysis 00035 void analyze(const Event& event) { 00036 const double weight = event.weight(); 00037 00038 // Skip if the event is empty 00039 const FinalState& fs = applyProjection<FinalState>(event, "FS"); 00040 if (fs.empty()) { 00041 MSG_DEBUG("Skipping event " << numEvents() << " because no final state found "); 00042 vetoEvent; 00043 } 00044 00045 // Find jets 00046 const FastJets& jetpro = applyProjection<FastJets>(event, "MidpointJets"); 00047 const Jets& jets = jetpro.jetsByPt(); 00048 if (!jets.empty()) { 00049 const Jet& j1 = jets.front(); 00050 if (inRange(fabs(j1.eta()), 0.2, 0.8)) { 00051 foreach (const Jet& j, jets) { 00052 const FourMomentum pj = j.momentum(); 00053 _h_jet_pT_MB->fill(pj.pT(), weight); 00054 _h_jet_pT_HT->fill(pj.pT(), weight); 00055 } 00056 } 00057 } 00058 } 00059 00060 00061 00062 /// Finalize 00063 void finalize() { 00064 double normalisation = crossSection()/picobarn/sumOfWeights()/(2*0.6*2*M_PI); 00065 scale(_h_jet_pT_MB, normalisation); 00066 scale(_h_jet_pT_HT, normalisation); 00067 } 00068 00069 //@} 00070 00071 00072 private: 00073 00074 /// @name Histograms 00075 //@{ 00076 Histo1DPtr _h_jet_pT_MB; 00077 Histo1DPtr _h_jet_pT_HT; 00078 //@} 00079 00080 }; 00081 00082 00083 00084 // The hook for the plugin system 00085 DECLARE_RIVET_PLUGIN(STAR_2006_S6870392); 00086 00087 } Generated on Tue Sep 30 2014 19:45:47 for The Rivet MC analysis system by ![]() |