ATLAS_2013_I1217863_Z.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/ZFinder.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_Z : public Analysis { 00013 public: 00014 00015 /// Constructor 00016 ATLAS_2013_I1217863_Z(string name="ATLAS_2013_I1217863_Z") 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 // Z finder 00036 ZFinder zf(fs, cuts, _mode==3? PID::MUON : PID::ELECTRON, 40.0*GeV, 1000.0*GeV, 0.1, ZFinder::CLUSTERNODECAY, ZFinder::NOTRACK); 00037 addProjection(zf, "ZF"); 00038 00039 // leading photon 00040 LeadingParticlesFinalState photonfs(FinalState(Cuts::abseta < 2.37 && Cuts::pT > 15*GeV)); 00041 photonfs.addParticleId(PID::PHOTON); 00042 addProjection(photonfs, "LeadingPhoton"); 00043 00044 // jets 00045 VetoedFinalState jet_fs(fs); 00046 jet_fs.addVetoOnThisFinalState(getProjection<ZFinder>("ZF")); 00047 jet_fs.addVetoOnThisFinalState(getProjection<LeadingParticlesFinalState>("LeadingPhoton")); 00048 FastJets jets(jet_fs, FastJets::ANTIKT, 0.4); 00049 jets.useInvisibles(true); 00050 addProjection(jets, "Jets"); 00051 00052 // FS excluding the leading photon 00053 VetoedFinalState vfs(fs); 00054 vfs.addVetoOnThisFinalState(photonfs); 00055 addProjection(vfs, "isolatedFS"); 00056 00057 00058 // Book histograms 00059 _hist_EgammaT_incl = bookHisto1D(11, 1, _mode); // dSigma / dE^gamma_T for Njet >= 0 00060 _hist_EgammaT_excl = bookHisto1D(12, 1, _mode); // dSigma / dE^gamma_T for Njet = 0 00061 _hist_Njet_EgammaT15 = bookHisto1D(17, 1, _mode); // dSigma / dNjet for E^gamma_T >= 15 00062 _hist_Njet_EgammaT60 = bookHisto1D(18, 1, _mode); // dSigma / dNjet for E^gamma_T >= 60 00063 _hist_mZgamma = bookHisto1D(20, 1, _mode); // dSigma / dm^{Zgamma} 00064 00065 } 00066 00067 00068 /// Perform the per-event analysis 00069 void analyze(const Event& event) { 00070 00071 const double weight = event.weight(); 00072 00073 // retrieve leading photon 00074 Particles photons = applyProjection<LeadingParticlesFinalState>(event, "LeadingPhoton").particles(); 00075 if (photons.size() != 1) vetoEvent; 00076 const Particle& leadingPhoton = photons[0]; 00077 if (leadingPhoton.Et() < 15.0*GeV) vetoEvent; 00078 if (leadingPhoton.abseta() > 2.37) vetoEvent; 00079 00080 // check photon isolation 00081 double coneEnergy(0.0); 00082 Particles fs = applyProjection<VetoedFinalState>(event, "isolatedFS").particles(); 00083 foreach(const Particle& p, fs) { 00084 if ( deltaR(leadingPhoton, p) < 0.4 ) coneEnergy += p.E(); 00085 } 00086 if (coneEnergy / leadingPhoton.E() >= 0.5 ) vetoEvent; 00087 00088 // retrieve Z boson candidate 00089 const ZFinder& zf = applyProjection<ZFinder>(event, "ZF"); 00090 if ( zf.bosons().size() != 1 ) vetoEvent; // only one Z boson candidate 00091 const Particle& Zboson = zf.boson(); 00092 if ( !(Zboson.mass() > 40.0*GeV) ) vetoEvent; 00093 00094 // check charge of constituent leptons 00095 const ParticleVector& leptons = zf.constituents(); 00096 if (leptons.size() != 2 || leptons[0].charge() * leptons[1].charge() > 0.) vetoEvent; 00097 00098 // check photon-lepton overlap 00099 foreach(const Particle& p, leptons) { 00100 if ( !(p.pT() > 25.0*GeV && p.abseta() < 2.47 && deltaR(leadingPhoton, p) > 0.7) ) vetoEvent; 00101 } 00102 00103 // count jets 00104 const FastJets& jetfs = applyProjection<FastJets>(event, "Jets"); 00105 Jets jets = jetfs.jets(cmpMomByEt); 00106 int goodJets = 0; 00107 foreach (const Jet& j, jets) { 00108 if ( !(j.Et() > 30.0*GeV) ) break; 00109 if ( (j.abseta() < 4.4) && \ 00110 (deltaR(leadingPhoton, j) > 0.3) && \ 00111 (deltaR(leptons[0], j) > 0.3) && \ 00112 (deltaR(leptons[1], j) > 0.3) ) ++goodJets; 00113 } 00114 00115 double Njets = double(goodJets) + 0.5; 00116 double photonEt = leadingPhoton.Et()*GeV; 00117 double mZgamma = (Zboson.momentum() + leadingPhoton.momentum()).mass() * GeV; 00118 00119 _hist_EgammaT_incl->fill(photonEt, weight); 00120 00121 _hist_Njet_EgammaT15->fill(Njets, weight); 00122 00123 if ( !goodJets ) _hist_EgammaT_excl->fill(photonEt, weight); 00124 00125 if (photonEt >= 40.0*GeV) { 00126 _hist_mZgamma->fill(mZgamma, weight); 00127 if (photonEt >= 60.0*GeV) _hist_Njet_EgammaT60->fill(Njets, weight); 00128 } 00129 00130 } 00131 00132 00133 /// Normalise histograms etc., after the run 00134 void finalize() { 00135 00136 /// Print summary info 00137 const double xs_pb(crossSection() / picobarn); 00138 const double sumw(sumOfWeights()); 00139 MSG_INFO("Cross-Section/pb: " << xs_pb ); 00140 MSG_INFO("Sum of weights : " << sumw ); 00141 MSG_INFO("nEvents : " << numEvents()); 00142 00143 const double sf(xs_pb / 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_mZgamma); 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_mZgamma; 00170 00171 //@} 00172 00173 }; 00174 00175 00176 class ATLAS_2013_I1217863_Z_EL : public ATLAS_2013_I1217863_Z { 00177 public: 00178 ATLAS_2013_I1217863_Z_EL() 00179 : ATLAS_2013_I1217863_Z("ATLAS_2013_I1217863_Z_EL") 00180 { 00181 _mode = 2; 00182 } 00183 }; 00184 00185 class ATLAS_2013_I1217863_Z_MU : public ATLAS_2013_I1217863_Z { 00186 public: 00187 ATLAS_2013_I1217863_Z_MU() 00188 : ATLAS_2013_I1217863_Z("ATLAS_2013_I1217863_Z_MU") 00189 { 00190 _mode = 3; 00191 } 00192 }; 00193 00194 00195 // The hook for the plugin system 00196 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_Z); 00197 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_Z_EL); 00198 DECLARE_RIVET_PLUGIN(ATLAS_2013_I1217863_Z_MU); 00199 } Generated on Thu Mar 10 2016 08:29:47 for The Rivet MC analysis system by ![]() |