MC_ZJETS.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analyses/MC_JetAnalysis.hh" 00003 #include "Rivet/Projections/ZFinder.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 00006 namespace Rivet { 00007 00008 00009 /// @brief MC validation analysis for Z + jets events 00010 class MC_ZJETS : public MC_JetAnalysis { 00011 public: 00012 00013 /// Default constructor 00014 MC_ZJETS(string name = "MC_ZJETS") 00015 : MC_JetAnalysis(name, 4, "Jets") 00016 { 00017 _dR=0.2; 00018 _lepton=PID::ELECTRON; 00019 } 00020 00021 00022 /// @name Analysis methods 00023 //@{ 00024 00025 /// Initialize 00026 void init() { 00027 FinalState fs; 00028 Cut cut = Cuts::abseta < 3.5 && Cuts::pT > 25*GeV; 00029 ZFinder zfinder(fs, cut, _lepton, 65*GeV, 115*GeV, _dR, ZFinder::CLUSTERNODECAY, ZFinder::TRACK); 00030 addProjection(zfinder, "ZFinder"); 00031 FastJets jetpro(zfinder.remainingFinalState(), FastJets::ANTIKT, 0.4); 00032 addProjection(jetpro, "Jets"); 00033 00034 _h_Z_jet1_deta = bookHisto1D("Z_jet1_deta", 50, -5, 5); 00035 _h_Z_jet1_dR = bookHisto1D("Z_jet1_dR", 25, 0.5, 7.0); 00036 00037 MC_JetAnalysis::init(); 00038 } 00039 00040 00041 00042 /// Do the analysis 00043 void analyze(const Event & e) { 00044 const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder"); 00045 if (zfinder.bosons().size() != 1) vetoEvent; 00046 const FourMomentum& zmom = zfinder.bosons()[0].momentum(); 00047 00048 const Jets& jets = applyProjection<FastJets>(e, "Jets").jetsByPt(_jetptcut); 00049 if (jets.size() > 0) { 00050 const double weight = e.weight(); 00051 _h_Z_jet1_deta->fill(zmom.eta()-jets[0].eta(), weight); 00052 _h_Z_jet1_dR->fill(deltaR(zmom, jets[0].momentum()), weight); 00053 } 00054 00055 MC_JetAnalysis::analyze(e); 00056 } 00057 00058 00059 /// Finalize 00060 void finalize() { 00061 scale(_h_Z_jet1_deta, crossSection()/picobarn/sumOfWeights()); 00062 scale(_h_Z_jet1_dR, crossSection()/picobarn/sumOfWeights()); 00063 MC_JetAnalysis::finalize(); 00064 } 00065 00066 //@} 00067 00068 00069 protected: 00070 00071 /// @name Parameters for specialised e/mu and dressed/bare subclassing 00072 //@{ 00073 double _dR; 00074 PdgId _lepton; 00075 //@} 00076 00077 00078 private: 00079 00080 /// @name Histograms 00081 //@{ 00082 Histo1DPtr _h_Z_jet1_deta; 00083 Histo1DPtr _h_Z_jet1_dR; 00084 //@} 00085 00086 }; 00087 00088 00089 00090 struct MC_ZJETS_EL : public MC_ZJETS { 00091 MC_ZJETS_EL() : MC_ZJETS("MC_ZJETS_EL") { 00092 _dR = 0.2; 00093 _lepton = PID::ELECTRON; 00094 } 00095 }; 00096 00097 struct MC_ZJETS_EL_BARE : public MC_ZJETS { 00098 MC_ZJETS_EL_BARE() : MC_ZJETS("MC_ZJETS_EL_BARE") { 00099 _dR = 0; 00100 _lepton = PID::ELECTRON; 00101 } 00102 }; 00103 00104 struct MC_ZJETS_MU : public MC_ZJETS { 00105 MC_ZJETS_MU() : MC_ZJETS("MC_ZJETS_MU") { 00106 _dR = 0.2; 00107 _lepton = PID::MUON; 00108 } 00109 }; 00110 00111 struct MC_ZJETS_MU_BARE : public MC_ZJETS { 00112 MC_ZJETS_MU_BARE() : MC_ZJETS("MC_ZJETS_MU_BARE") { 00113 _dR = 0; 00114 _lepton = PID::MUON; 00115 } 00116 }; 00117 00118 00119 00120 // The hooks for the plugin system 00121 DECLARE_RIVET_PLUGIN(MC_ZJETS); 00122 DECLARE_RIVET_PLUGIN(MC_ZJETS_EL); 00123 DECLARE_RIVET_PLUGIN(MC_ZJETS_EL_BARE); 00124 DECLARE_RIVET_PLUGIN(MC_ZJETS_MU); 00125 DECLARE_RIVET_PLUGIN(MC_ZJETS_MU_BARE); 00126 00127 } Generated on Wed Oct 7 2015 12:09:14 for The Rivet MC analysis system by ![]() |