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