CMS_2015_I1346843.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/ChargedLeptons.hh" 00005 #include "Rivet/Projections/NeutralFinalState.hh" 00006 #include "Rivet/Projections/IdentifiedFinalState.hh" 00007 00008 00009 namespace Rivet { 00010 00011 class CMS_2015_I1346843 : public Analysis { 00012 public: 00013 // Constructor 00014 CMS_2015_I1346843() : Analysis("CMS_2015_I1346843") { 00015 } 00016 00017 public: 00018 // Book histograms and initialise projections before the run 00019 void init() { 00020 00021 Cut c_photons = (Cuts::pT >= 5.0*GeV) & (Cuts::etaIn(-2.5, 1.4) || Cuts::etaIn(1.6, 2.5)); 00022 00023 Cut c_muons = (Cuts::pT>9*GeV) & (Cuts::abseta<2.4); 00024 00025 00026 IdentifiedFinalState photons(c_photons); 00027 photons.acceptId(PID::PHOTON); 00028 addProjection(photons, "PHOTFS"); 00029 00030 IdentifiedFinalState muons(c_muons); 00031 muons.acceptIdPair(PID::MUON); 00032 addProjection(muons, "MUFS"); 00033 00034 00035 _hist_pho_et = bookHisto1D(1, 1, 1); // photon transverse energy 00036 _hist_pho_et_wide = bookHisto1D(1, 2, 1); // photon transverse energy (0.5 < dr < 3.0) 00037 _hist_pho_et_close = bookHisto1D(1, 3, 1); // photon transverse energy (0.05 < dr < 0.5) 00038 _hist_pho_et_lqt = bookHisto1D(1, 4, 1); // photon transverse energy (q_T < 10) 00039 _hist_pho_et_hqt = bookHisto1D(1, 5, 1); // photon transverse energy (q_T > 50) 00040 _hist_pho_dr = bookHisto1D(2, 1, 1); // delta_R 00041 _hist_pho_dr_lqt = bookHisto1D(2, 2, 1); // delta_R (q_T < 10) 00042 _hist_pho_dr_hqt = bookHisto1D(2, 3, 1); // delta_R (q_T > 50) 00043 } 00044 00045 00046 // Perform the per-event analysis 00047 void analyze(const Event& event) { 00048 00049 Particles muons = applyProjection<IdentifiedFinalState>(event, "MUFS").particlesByPt(); 00050 00051 if (muons.size()<2) vetoEvent; 00052 if (muons[0].pT()/GeV < 31) vetoEvent; 00053 if (muons[0].charge()*muons[1].charge()>0) vetoEvent; 00054 double M = (muons[0].momentum() + muons[1].momentum()).mass()/GeV; 00055 if (M<30 || M >87) vetoEvent; 00056 00057 const double weight = event.weight(); 00058 00059 00060 Particles photons = applyProjection<IdentifiedFinalState>(event, "PHOTFS").particlesByPt(); 00061 // We want the photon with the highest pT that does not come from a decay 00062 foreach(const Particle& p, photons) { 00063 if (!p.fromDecay() && p.isStable()) { 00064 double dR = std::min(deltaR(p, muons[0]) , deltaR(p, muons[1]) ); 00065 if (dR > 0.05 && dR <= 3.0) { 00066 // Calculate the three-body (mu,mu,gamma) transverse momentum 00067 double qT = (muons[0].mom() + muons[1].mom() + p.mom()).pT(); 00068 // Fill the analysis histograms 00069 _hist_pho_et->fill(p.pT() / GeV, weight); 00070 _hist_pho_dr->fill(dR, weight); 00071 00072 if (dR <= 0.5) { 00073 _hist_pho_et_close->fill(p.pT() / GeV, weight); 00074 } 00075 else { 00076 _hist_pho_et_wide ->fill(p.pT() / GeV, weight); 00077 } 00078 00079 if (qT / GeV < 10.) { 00080 _hist_pho_et_lqt->fill(p.pT() / GeV, weight); 00081 _hist_pho_dr_lqt->fill(dR, weight); 00082 } 00083 if (qT / GeV > 50.) { 00084 _hist_pho_et_hqt->fill(p.pT() / GeV, weight); 00085 _hist_pho_dr_hqt->fill(dR, weight); 00086 } 00087 break; // Exit the loop since we found the highest pT lepton already 00088 } 00089 } 00090 } 00091 } 00092 00093 00094 /// Normalise histograms etc., after the run 00095 void finalize() { 00096 scale(_hist_pho_et, crossSection() / sumOfWeights()); 00097 scale(_hist_pho_et_wide, crossSection() / sumOfWeights()); 00098 scale(_hist_pho_et_close, crossSection() / sumOfWeights()); 00099 scale(_hist_pho_et_lqt, crossSection() / sumOfWeights()); 00100 scale(_hist_pho_et_hqt, crossSection() / sumOfWeights()); 00101 scale(_hist_pho_dr, crossSection() / sumOfWeights()); 00102 scale(_hist_pho_dr_lqt, crossSection() / sumOfWeights()); 00103 scale(_hist_pho_dr_hqt, crossSection() / sumOfWeights()); 00104 } 00105 00106 private: 00107 Histo1DPtr _hist_pho_et; 00108 Histo1DPtr _hist_pho_et_wide; 00109 Histo1DPtr _hist_pho_et_close; 00110 Histo1DPtr _hist_pho_et_lqt; 00111 Histo1DPtr _hist_pho_et_hqt; 00112 Histo1DPtr _hist_pho_dr; 00113 Histo1DPtr _hist_pho_dr_lqt; 00114 Histo1DPtr _hist_pho_dr_hqt; 00115 }; 00116 00117 DECLARE_RIVET_PLUGIN(CMS_2015_I1346843); 00118 } Generated on Thu Mar 10 2016 08:29:49 for The Rivet MC analysis system by ![]() |