ATLAS_2013_I1217863_W.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/WFinder.hh" 00005 #include "Rivet/Projections/LeadingParticlesFinalState.hh" 00006 #include "Rivet/Projections/FastJets.hh" 00007 #include "Rivet/Projections/VetoedFinalState.hh" 00008 00009 namespace Rivet { 00010 00011 00012 class ATLAS_2013_I1217863_W : public Analysis { 00013 public: 00014 00015 /// Constructor 00016 ATLAS_2013_I1217863_W(string name="ATLAS_2013_I1217863_W") 00017 : Analysis(name) 00018 { 00019 // the electron mode is used by default 00020 _mode = 1; 00021 } 00022 00023 00024 /// @name Analysis methods 00025 //@{ 00026 00027 /// Book histograms and initialise projections before the run 00028 void init() { 00029 00030 FinalState fs; 00031 addProjection(fs, "FS"); 00032 00033 Cut cuts = Cuts::abseta < 2.47 && Cuts::pT > 25*GeV; 00034 00035 // W finder for electrons and muons 00036 WFinder wf(fs, cuts, _mode==3? PID::MUON : PID::ELECTRON, 0.0*GeV, 1000.0*GeV, 35.0*GeV, 0.1, 00037 WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); 00038 addProjection(wf, "WF"); 00039 00040 // leading photon 00041 LeadingParticlesFinalState photonfs(FinalState(Cuts::abseta < 2.37 && Cuts::pT > 15*GeV)); 00042 photonfs.addParticleId(PID::PHOTON); 00043 addProjection(photonfs, "LeadingPhoton"); 00044 00045 // jets 00046 VetoedFinalState jet_fs(fs); 00047 jet_fs.addVetoOnThisFinalState(getProjection<WFinder>("WF")); 00048 jet_fs.addVetoOnThisFinalState(getProjection<LeadingParticlesFinalState>("LeadingPhoton")); 00049 FastJets jets(jet_fs, FastJets::ANTIKT, 0.4); 00050 jets.useInvisibles(true); 00051 addProjection(jets, "Jets"); 00052 00053 // FS excluding the leading photon 00054 VetoedFinalState vfs(fs); 00055 vfs.addVetoOnThisFinalState(photonfs); 00056 addProjection(vfs, "isolatedFS"); 00057 00058 00059 // Book histograms 00060 _hist_EgammaT_incl = bookHisto1D( 7, 1, _mode); // dSigma / dE^gamma_T for Njet >= 0 00061 _hist_EgammaT_excl = bookHisto1D( 8, 1, _mode); // dSigma / dE^gamma_T for Njet = 0 00062 _hist_Njet_EgammaT15 = bookHisto1D(15, 1, _mode); // dSigma / dNjet for E^gamma_T > 15 00063 _hist_Njet_EgammaT60 = bookHisto1D(16, 1, _mode); // dSigma / dNjet for E^gamma_T > 60 00064 _hist_mWgammaT = bookHisto1D(19, 1, _mode); // dSigma / dm^{Wgamma}_T 00065 00066 } 00067 00068 00069 /// Perform the per-event analysis 00070 void analyze(const Event& event) { 00071 00072 const double weight = event.weight(); 00073 00074 // retrieve leading photon 00075 Particles photons = applyProjection<LeadingParticlesFinalState>(event, "LeadingPhoton").particles(); 00076 if (photons.size() != 1) vetoEvent; 00077 const Particle& leadingPhoton = photons[0]; 00078 if (leadingPhoton.Et() < 15.0*GeV) vetoEvent; 00079 if (leadingPhoton.abseta() > 2.37) vetoEvent; 00080 00081 // check photon isolation 00082 double coneEnergy(0.0); 00083 Particles fs = applyProjection<VetoedFinalState>(event, "isolatedFS").particles(); 00084 foreach(const Particle& p, fs) { 00085 if ( deltaR(leadingPhoton, p) < 0.4 ) coneEnergy += p.E(); 00086 } 00087 if ( coneEnergy / leadingPhoton.E() >= 0.5 ) vetoEvent; 00088 00089 // retrieve W boson candidate 00090 const WFinder& wf = applyProjection<WFinder>(event, "WF"); 00091 if ( wf.bosons().size() != 1 ) vetoEvent; // only one W boson candidate 00092 //const Particle& Wboson = wf.boson(); 00093 00094 // retrieve constituent neutrino 00095 const Particle& neutrino = wf.constituentNeutrino(); 00096 if ( !(neutrino.pT() > 35.0*GeV) ) vetoEvent; 00097 00098 // retrieve constituent lepton 00099 const Particle& lepton = wf.constituentLepton(); 00100 if ( !(lepton.pT() > 25.0*GeV && lepton.abseta() < 2.47) ) vetoEvent; 00101 00102 // check photon-lepton overlap 00103 if ( !(deltaR(leadingPhoton, lepton) > 0.7) ) vetoEvent; 00104 00105 // count jets 00106 const FastJets& jetfs = applyProjection<FastJets>(event, "Jets"); 00107 Jets jets = jetfs.jets(cmpMomByEt); 00108 int goodJets = 0; 00109 foreach (const Jet& j, jets) { 00110 if ( !(j.Et() > 30.0*GeV) ) break; 00111 if ( (j.abseta() < 4.4) && \ 00112 (deltaR(leadingPhoton, j) > 0.3) && \ 00113 (deltaR(lepton, j) > 0.3) ) ++goodJets; 00114 } 00115 00116 double Njets = double(goodJets) + 0.5; 00117 double photonEt = leadingPhoton.Et()*GeV; 00118 00119 const FourMomentum& lep_gamma = lepton.momentum() + leadingPhoton.momentum(); 00120 double term1 = sqrt(lep_gamma.mass2() + lep_gamma.pT2()) + neutrino.Et(); 00121 double term2 = (lep_gamma + neutrino.momentum()).pT2(); 00122 double mWgammaT = sqrt(term1 * term1 - term2) * GeV; 00123 00124 _hist_EgammaT_incl->fill(photonEt, weight); 00125 00126 _hist_Njet_EgammaT15->fill(Njets, weight); 00127 00128 if ( !goodJets ) _hist_EgammaT_excl->fill(photonEt, weight); 00129 00130 if (photonEt > 40.0*GeV) { 00131 _hist_mWgammaT->fill(mWgammaT, weight); 00132 if (photonEt > 60.0*GeV) _hist_Njet_EgammaT60->fill(Njets, weight); 00133 } 00134 00135 } 00136 00137 00138 /// Normalise histograms etc., after the run 00139 void finalize() { 00140 00141 /// Print summary info 00142 const double xs_pb(crossSection() / picobarn); 00143 const double sumw(sumOfWeights()); 00144 MSG_INFO("Cross-Section/pb: " << xs_pb ); 00145 MSG_INFO("Sum of weights : " << sumw ); 00146 MSG_INFO("nEvents : " << numEvents()); 00147 00148 const double sf(xs_pb / sumw); 00149 00150 scale(_hist_EgammaT_excl, sf); 00151 scale(_hist_EgammaT_incl, sf); 00152 00153 normalize(_hist_Njet_EgammaT15); 00154 normalize(_hist_Njet_EgammaT60); 00155 normalize(_hist_mWgammaT); 00156 00157 } 00158 00159 //@} 00160 00161 protected: 00162 00163 size_t _mode; 00164 00165 private: 00166 00167 /// @name Histograms 00168 //@{ 00169 00170 Histo1DPtr _hist_EgammaT_incl; 00171 Histo1DPtr _hist_EgammaT_excl; 00172 Histo1DPtr _hist_Njet_EgammaT15; 00173 Histo1DPtr _hist_Njet_EgammaT60; 00174 Histo1DPtr _hist_mWgammaT; 00175 00176 //@} 00177 00178 }; 00179 00180 class ATLAS_2013_I1217863_W_EL : public ATLAS_2013_I1217863_W { 00181 public: 00182 ATLAS_2013_I1217863_W_EL() 00183 : ATLAS_2013_I1217863_W("ATLAS_2013_I1217863_W_EL") 00184 { 00185 _mode = 2; 00186 } 00187 }; 00188 00189 class ATLAS_2013_I1217863_W_MU : public ATLAS_2013_I1217863_W { 00190 public: 00191 ATLAS_2013_I1217863_W_MU() 00192 : ATLAS_2013_I1217863_W("ATLAS_2013_I1217863_W_MU") 00193 { 00194 _mode = 3; 00195 } 00196 }; 00197 00198 // The hook for the plugin system 00199 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_W); 00200 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_W_EL); 00201 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_W_MU); 00202 } Generated on Wed Oct 7 2015 12:09:11 for The Rivet MC analysis system by ![]() |