D0_2015_I1324946.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 #include "Rivet/Tools/BinnedHistogram.hh" 00005 #include "Rivet/Projections/ZFinder.hh" 00006 00007 namespace Rivet { 00008 00009 using namespace Cuts; 00010 00011 class D0_2015_I1324946 : public Analysis { 00012 public: 00013 00014 /// Constructor 00015 D0_2015_I1324946() 00016 : Analysis("D0_2015_I1324946") 00017 { } 00018 00019 00020 /// @name Analysis methods 00021 //@{ 00022 00023 /// Book histograms and initialise projections before the run 00024 void init() { 00025 FinalState fs; 00026 ZFinder zfinder_mm(fs, Cuts::abseta < 2 && Cuts::pT > 15*GeV, PID::MUON, 30*GeV, 500*GeV, 0.0, ZFinder::NOCLUSTER, ZFinder::NOTRACK); 00027 addProjection(zfinder_mm, "zfinder_mm"); 00028 00029 _h_phistar_mm_peak_central = bookHisto1D(1, 1, 1); 00030 _h_phistar_mm_peak_forward = bookHisto1D(1, 1, 2); 00031 _h_phistar_mm_low_central = bookHisto1D(2, 1, 1); 00032 _h_phistar_mm_low_forward = bookHisto1D(2, 1, 2); 00033 _h_phistar_mm_high1 = bookHisto1D(3, 1, 1); 00034 _h_phistar_mm_high2 = bookHisto1D(4, 1, 1); 00035 } 00036 00037 00038 /// Perform the per-event analysis 00039 void analyze(const Event& event) { 00040 const double weight = event.weight(); 00041 00042 00043 //70<Mmm<105 00044 const ZFinder& zfinder_mm = applyProjection<ZFinder>(event, "zfinder_mm"); 00045 if (zfinder_mm.bosons().size() == 1) { 00046 Particles mm = zfinder_mm.constituents(); 00047 std::sort(mm.begin(), mm.end(), cmpMomByPt); 00048 const FourMomentum& mminus = PID::threeCharge(mm[0].pid()) < 0 ? mm[0].momentum() : mm[1].momentum(); 00049 const FourMomentum& mplus = PID::threeCharge(mm[0].pid()) < 0 ? mm[1].momentum() : mm[0].momentum(); 00050 double phi_acop = M_PI - mapAngle0ToPi(mminus.phi() - mplus.phi()); 00051 double costhetastar = tanh((mminus.eta() - mplus.eta())/2); 00052 double sin2thetastar = 1 - sqr(costhetastar); 00053 if (sin2thetastar < 0) sin2thetastar = 0; 00054 const double phistar = tan(phi_acop/2) * sqrt(sin2thetastar); 00055 const FourMomentum& zmom = zfinder_mm.bosons()[0].momentum(); 00056 if (zmom.mass()<30*GeV || zmom.mass() >500*GeV) vetoEvent; 00057 00058 if( zmom.mass()>70 && zmom.mass()<100 && zmom.absrap()<1.0) _h_phistar_mm_peak_central->fill(phistar, weight); 00059 if( zmom.mass()>70 && zmom.mass()<100 && zmom.absrap()>1.0 && zmom.absrap()<2.0) _h_phistar_mm_peak_forward->fill(phistar, weight); 00060 if( zmom.mass()>30 && zmom.mass()<60 && zmom.absrap()<1.0) _h_phistar_mm_low_central->fill(phistar, weight); 00061 if( zmom.mass()>30 && zmom.mass()<60 && zmom.absrap()>1.0 && zmom.absrap()<2.0) _h_phistar_mm_low_forward->fill(phistar, weight); 00062 if( zmom.mass()>160 && zmom.mass()<300) _h_phistar_mm_high1->fill(phistar, weight); 00063 if( zmom.mass()>300 && zmom.mass()<500) _h_phistar_mm_high2->fill(phistar, weight); 00064 00065 } 00066 } 00067 00068 /// Normalise histograms etc., after the run 00069 void finalize() { 00070 00071 normalize(_h_phistar_mm_low_central); 00072 normalize(_h_phistar_mm_low_forward); 00073 normalize(_h_phistar_mm_peak_central); 00074 normalize(_h_phistar_mm_peak_forward); 00075 normalize(_h_phistar_mm_high1); 00076 normalize(_h_phistar_mm_high2); 00077 00078 } 00079 00080 00081 //} 00082 00083 //@} 00084 00085 00086 private: 00087 /// @name Histograms 00088 //@{ 00089 00090 Histo1DPtr _h_phistar_mm_low_central; 00091 Histo1DPtr _h_phistar_mm_low_forward; 00092 Histo1DPtr _h_phistar_mm_peak_central; 00093 Histo1DPtr _h_phistar_mm_peak_forward; 00094 Histo1DPtr _h_phistar_mm_high1; 00095 Histo1DPtr _h_phistar_mm_high2; 00096 //@} 00097 }; 00098 00099 00100 00101 // The hook for the plugin system 00102 DECLARE_RIVET_PLUGIN(D0_2015_I1324946); 00103 00104 } Generated on Thu Mar 10 2016 08:29:49 for The Rivet MC analysis system by ![]() |