STAR_2008_S7993412.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/Logging.hh" 00004 #include "Rivet/Projections/ChargedFinalState.hh" 00005 #include "Rivet/RivetYODA.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief STAR di-hadron correlations in d-Au at 200 GeV 00011 class STAR_2008_S7993412 : public Analysis { 00012 public: 00013 00014 STAR_2008_S7993412() : Analysis("STAR_2008_S7993412") 00015 { 00016 } 00017 00018 00019 /// @name Analysis methods 00020 //@{ 00021 00022 /// Book projections and histograms 00023 void init() { 00024 ChargedFinalState fs(-1.0, 1.0, 1.0*GeV); 00025 addProjection(fs, "FS"); 00026 00027 _h_Y_jet_trigger = bookProfile1D(1, 1, 1); 00028 _h_Y_jet_associated = bookProfile1D(2, 1, 1); 00029 } 00030 00031 00032 /// Do the analysis 00033 void analyze(const Event& event) { 00034 // Skip if the event is empty 00035 const FinalState& fs = applyProjection<FinalState>(event, "FS"); 00036 if (fs.empty()) { 00037 MSG_DEBUG("Skipping event " << event.genEvent().event_number() 00038 << " because no final state found "); 00039 vetoEvent; 00040 } 00041 00042 const double weight = event.weight(); 00043 00044 foreach (const Particle& tp, fs.particles()) { 00045 const double triggerpT = tp.momentum().pT(); 00046 if (triggerpT >= 2.0 && triggerpT < 5.0) { 00047 int n_associated = 0; 00048 foreach (const Particle& ap, fs.particles()) { 00049 if (!inRange(ap.momentum().pT()/GeV, 1.5, triggerpT)) continue; 00050 if (deltaPhi(tp.momentum().phi(), ap.momentum().phi()) > 1) continue; 00051 if (fabs(tp.momentum().eta() - ap.momentum().eta()) > 1.75) continue; 00052 n_associated += 1; 00053 } 00054 //const double dPhidEta = 2 * 2*1.75; 00055 //_h_Y_jet_trigger->fill(triggerpT, n_associated/dPhidEta, weight); 00056 _h_Y_jet_trigger->fill(triggerpT, n_associated, weight); 00057 } 00058 } 00059 } 00060 00061 00062 /// Finalize 00063 void finalize() { 00064 } 00065 00066 //@} 00067 00068 00069 private: 00070 00071 /// @name Histograms 00072 //@{ 00073 Profile1DPtr _h_Y_jet_trigger; 00074 Profile1DPtr _h_Y_jet_associated; 00075 //@} 00076 00077 }; 00078 00079 00080 00081 // The hook for the plugin system 00082 DECLARE_RIVET_PLUGIN(STAR_2008_S7993412); 00083 00084 } Generated on Fri Dec 21 2012 15:03:42 for The Rivet MC analysis system by ![]() |