CMS_2013_I1272853.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/IdentifiedFinalState.hh" 00004 #include "Rivet/Projections/VetoedFinalState.hh" 00005 #include "Rivet/Projections/MissingMomentum.hh" 00006 #include "Rivet/Projections/FastJets.hh" 00007 #include "Rivet/Projections/DressedLeptons.hh" 00008 #include "Rivet/Projections/LeadingParticlesFinalState.hh" 00009 #include "Rivet/Projections/InvMassFinalState.hh" 00010 00011 namespace Rivet { 00012 00013 00014 /// CMS W + 2 jet double parton scattering analysis 00015 class CMS_2013_I1272853 : public Analysis { 00016 public: 00017 00018 /// Constructor 00019 CMS_2013_I1272853() 00020 : Analysis("CMS_2013_I1272853") { } 00021 00022 00023 /// Book histograms and initialise projections before the run 00024 void init() { 00025 00026 const FinalState fs; 00027 addProjection(fs, "FS"); 00028 00029 /// @todo Use C++11 initialisation syntax 00030 vector<PdgIdPair> vidsW; 00031 vidsW += make_pair(PID::MUON, PID::NU_MUBAR), make_pair(PID::ANTIMUON, PID::NU_MU); 00032 InvMassFinalState invfsW(fs, vidsW, 20*GeV, 1e6*GeV); 00033 addProjection(invfsW, "INVFSW"); 00034 00035 VetoedFinalState vfs(fs); 00036 vfs.addVetoOnThisFinalState(invfsW); 00037 addProjection(vfs, "VFS"); 00038 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.5), "Jets"); 00039 00040 _h_deltaS_eq2jet_Norm = bookHisto1D(1,1,1); 00041 _h_rel_deltaPt_eq2jet_Norm = bookHisto1D(2,1,1); 00042 } 00043 00044 00045 /// Perform the per-event analysis 00046 void analyze(const Event& event) { 00047 00048 // Find Ws 00049 const InvMassFinalState& invMassFinalStateW = applyProjection<InvMassFinalState>(event, "INVFSW"); 00050 if (invMassFinalStateW.empty()) vetoEvent; 00051 const Particles& WDecayProducts = invMassFinalStateW.particles(); 00052 if (WDecayProducts.size() < 2) vetoEvent; 00053 00054 // Cuts on W decay properties 00055 const int iNU_MU = (WDecayProducts[1].abspid() == PID::NU_MU) ? 1 : 0; 00056 const int iAN_MU = 1 - iNU_MU; 00057 const double pt1 = WDecayProducts[iAN_MU].pT(); 00058 const double pt2 = WDecayProducts[iNU_MU].Et(); 00059 const double eta1 = WDecayProducts[iAN_MU].abseta(); 00060 const double phi1 = WDecayProducts[iAN_MU].phi(); 00061 const double phi2 = WDecayProducts[iNU_MU].phi(); 00062 const double mt = sqrt(2 * pt1 * pt2 * (1 - cos(phi1-phi2))); 00063 if (mt < 50*GeV || pt1 < 35*GeV || eta1 > 2.1 || pt2 < 30*GeV) vetoEvent; 00064 00065 // Get jets and make sure there are at least two of them in |y| < 2 00066 const FastJets& jetpro = applyProjection<FastJets>(event, "Jets"); 00067 /// @todo Collapse this into jetpro.jetsByPt(ptGtr(20*GeV) & rapIn(2.0)) 00068 vector<FourMomentum> jets; 00069 foreach (const Jet& jet, jetpro.jetsByPt(20*GeV)) 00070 if (jet.absrap() < 2.0) jets.push_back(jet.momentum()); 00071 if (jets.size() != 2) vetoEvent; 00072 00073 const double mupx = pt1 * cos(phi1); 00074 const double mupy = pt1 * sin(phi1); 00075 const double met_x = pt2 * cos(phi2); 00076 const double met_y = pt2 * sin(phi2); 00077 const double dpt = add_quad(jets[0].px() + jets[1].px(), jets[0].py() + jets[1].py()); 00078 const double rel_dpt = dpt / (jets[0].pT() + jets[1].pT()); 00079 const double pT2 = sqr(mupx + met_x) + sqr(mupy + met_y); 00080 const double Px = (mupx + met_x)*(jets[0].px() + jets[1].px()); 00081 const double Py = (mupy + met_y)*(jets[0].py() + jets[1].py()); 00082 const double p1p2_mag = dpt * sqrt(pT2); 00083 const double dS = acos((Px+Py) / p1p2_mag); 00084 00085 const double weight = event.weight(); 00086 _h_rel_deltaPt_eq2jet_Norm->fill(rel_dpt, weight); 00087 _h_deltaS_eq2jet_Norm->fill(dS, weight); 00088 } 00089 00090 00091 /// Normalise histograms etc., after the run 00092 void finalize() { 00093 const double rel_dpt_bw = 1.0002 / 30.0; 00094 const double dphi_bw = 3.14160 / 30.0; 00095 normalize(_h_rel_deltaPt_eq2jet_Norm, rel_dpt_bw); 00096 normalize(_h_deltaS_eq2jet_Norm, dphi_bw); 00097 } 00098 00099 00100 private: 00101 00102 Histo1DPtr _h_rel_deltaPt_eq2jet_Norm; 00103 Histo1DPtr _h_deltaS_eq2jet_Norm; 00104 00105 }; 00106 00107 00108 00109 DECLARE_RIVET_PLUGIN(CMS_2013_I1272853); 00110 00111 } Generated on Wed Oct 7 2015 12:09:12 for The Rivet MC analysis system by ![]() |