LHCB_2011_I919315.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/BinnedHistogram.hh" 00005 #include "Rivet/Projections/UnstableFinalState.hh" 00006 #include "Rivet/Tools/ParticleIdUtils.hh" 00007 00008 namespace Rivet { 00009 00010 00011 class LHCB_2011_I919315 : public Analysis { 00012 public: 00013 /// @name Constructors etc. 00014 //@{ 00015 00016 /// Constructor 00017 LHCB_2011_I919315() 00018 : Analysis("LHCB_2011_I919315") 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(UnstableFinalState(), "UFS"); 00032 00033 _h_Phi_pT_y.addHistogram( 2.44, 2.62, bookHisto1D(2, 1, 1)); 00034 _h_Phi_pT_y.addHistogram( 2.62, 2.80, bookHisto1D(2, 1, 2)); 00035 _h_Phi_pT_y.addHistogram( 2.80, 2.98, bookHisto1D(3, 1, 1)); 00036 _h_Phi_pT_y.addHistogram( 2.98, 3.16, bookHisto1D(3, 1, 2)); 00037 _h_Phi_pT_y.addHistogram( 3.16, 3.34, bookHisto1D(4, 1, 1)); 00038 _h_Phi_pT_y.addHistogram( 3.34, 3.52, bookHisto1D(4, 1, 2)); 00039 _h_Phi_pT_y.addHistogram( 3.52, 3.70, bookHisto1D(5, 1, 1)); 00040 _h_Phi_pT_y.addHistogram( 3.70, 3.88, bookHisto1D(5, 1, 2)); 00041 _h_Phi_pT_y.addHistogram( 3.88, 4.06, bookHisto1D(6, 1, 1)); 00042 _h_Phi_pT = bookHisto1D(7, 1, 1); 00043 _h_Phi_y = bookHisto1D(8, 1, 1); 00044 } 00045 00046 00047 /// Perform the per-event analysis 00048 void analyze (const Event& event) { 00049 const double weight = event.weight(); 00050 const UnstableFinalState& ufs = applyProjection<UnstableFinalState> (event, "UFS"); 00051 00052 foreach (const Particle& p, ufs.particles()) { 00053 const PdgId id = abs(p.pdgId()); 00054 00055 if (id == 333) { // id 333 = phi-meson 00056 double y = p.momentum().rapidity(); 00057 double pT = p.momentum().perp(); 00058 00059 if (pT < 0.6*GeV || pT > 5.0*GeV || y < 2.44 || y > 4.06) { 00060 continue; 00061 } 00062 00063 _h_Phi_y->fill (y, weight); 00064 _h_Phi_pT->fill (pT/MeV, weight); 00065 _h_Phi_pT_y.fill(y, pT/GeV, weight); 00066 } 00067 } 00068 } 00069 00070 /// Normalise histograms etc., after the run 00071 void finalize() { 00072 00073 double scale_factor = crossSectionPerEvent()/microbarn; 00074 scale (_h_Phi_y, scale_factor); 00075 scale (_h_Phi_pT, scale_factor); 00076 _h_Phi_pT_y.scale(scale_factor/1000., this); 00077 } 00078 00079 //@} 00080 00081 private: 00082 00083 /// @name Histograms 00084 //@{ 00085 Histo1DPtr _h_Phi_y; 00086 Histo1DPtr _h_Phi_pT; 00087 BinnedHistogram<double> _h_Phi_pT_y; 00088 //@} 00089 00090 }; 00091 00092 00093 // The hook for the plugin system 00094 DECLARE_RIVET_PLUGIN(LHCB_2011_I919315); 00095 00096 } 00097 00098 //@} Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |