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 declare(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 declare(wf, "WF"); 00039 00040 // leading photon 00041 LeadingParticlesFinalState photonfs(FinalState(Cuts::abseta < 2.37 && Cuts::pT > 15*GeV)); 00042 photonfs.addParticleId(PID::PHOTON); 00043 declare(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 declare(jets, "Jets"); 00052 00053 // FS excluding the leading photon 00054 VetoedFinalState vfs(fs); 00055 vfs.addVetoOnThisFinalState(photonfs); 00056 declare(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 = apply<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 = apply<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 = apply<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 = apply<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 const double xs_fb = crossSection()/femtobarn; 00142 const double sumw = sumOfWeights(); 00143 const double sf = xs_fb / sumw; 00144 00145 scale(_hist_EgammaT_excl, sf); 00146 scale(_hist_EgammaT_incl, sf); 00147 00148 normalize(_hist_Njet_EgammaT15); 00149 normalize(_hist_Njet_EgammaT60); 00150 normalize(_hist_mWgammaT); 00151 00152 } 00153 00154 //@} 00155 00156 protected: 00157 00158 size_t _mode; 00159 00160 private: 00161 00162 /// @name Histograms 00163 //@{ 00164 00165 Histo1DPtr _hist_EgammaT_incl; 00166 Histo1DPtr _hist_EgammaT_excl; 00167 Histo1DPtr _hist_Njet_EgammaT15; 00168 Histo1DPtr _hist_Njet_EgammaT60; 00169 Histo1DPtr _hist_mWgammaT; 00170 00171 //@} 00172 00173 }; 00174 00175 00176 class ATLAS_2013_I1217863_W_EL : public ATLAS_2013_I1217863_W { 00177 public: 00178 ATLAS_2013_I1217863_W_EL() 00179 : ATLAS_2013_I1217863_W("ATLAS_2013_I1217863_W_EL") 00180 { 00181 _mode = 2; 00182 } 00183 }; 00184 00185 00186 class ATLAS_2013_I1217863_W_MU : public ATLAS_2013_I1217863_W { 00187 public: 00188 ATLAS_2013_I1217863_W_MU() 00189 : ATLAS_2013_I1217863_W("ATLAS_2013_I1217863_W_MU") 00190 { 00191 _mode = 3; 00192 } 00193 }; 00194 00195 00196 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_W); 00197 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_W_EL); 00198 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_W_MU); 00199 00200 } Generated on Tue Dec 13 2016 16:32:35 for The Rivet MC analysis system by ![]() |