ATLAS_2012_CONF_2012_105.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/BinnedHistogram.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/ChargedFinalState.hh" 00006 #include "Rivet/Projections/VisibleFinalState.hh" 00007 #include "Rivet/Projections/IdentifiedFinalState.hh" 00008 #include "Rivet/Projections/FastJets.hh" 00009 #include "Rivet/Projections/VetoedFinalState.hh" 00010 00011 namespace Rivet { 00012 00013 00014 class ATLAS_2012_CONF_2012_105 : public Analysis { 00015 public: 00016 00017 /// @name Constructors etc. 00018 //@{ 00019 00020 /// Constructor 00021 00022 ATLAS_2012_CONF_2012_105() 00023 : Analysis("ATLAS_2012_CONF_2012_105") 00024 { } 00025 00026 //@} 00027 00028 00029 public: 00030 00031 /// @name Analysis methods 00032 //@{ 00033 00034 /// Book histograms and initialise projections before the run 00035 void init() { 00036 00037 // projection to find the electrons 00038 IdentifiedFinalState elecs(EtaIn(-2.47, 2.47) 00039 & (Cuts::pT >= 20.0*GeV)); 00040 elecs.acceptIdPair(PID::ELECTRON); 00041 addProjection(elecs, "elecs"); 00042 00043 // projection to find the muons 00044 IdentifiedFinalState muons(EtaIn(-2.4, 2.4) 00045 & (Cuts::pT >= 20.0*GeV)); 00046 muons.acceptIdPair(PID::MUON); 00047 addProjection(muons, "muons"); 00048 00049 // jet finder 00050 VetoedFinalState vfs; 00051 vfs.addVetoPairId(PID::MUON); 00052 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), 00053 "AntiKtJets04"); 00054 00055 // all tracks (to do deltaR with leptons) 00056 addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs"); 00057 00058 // for pTmiss 00059 addProjection(VisibleFinalState(-4.5,4.5),"vfs"); 00060 00061 // book histograms 00062 00063 // counts in signal regions 00064 _count_ee = bookHisto1D("count_ee" , 1, 0., 1.); 00065 _count_emu = bookHisto1D("count_emu" , 1, 0., 1.); 00066 _count_mumu = bookHisto1D("count_mumu", 1, 0., 1.); 00067 _count_ll = bookHisto1D("count_ll" , 1, 0., 1.); 00068 00069 // histograms from paper 00070 _hist_eTmiss_ee = bookHisto1D("eTmiss_ee" , 8, 0., 400.); 00071 _hist_eTmiss_emu = bookHisto1D("eTmiss_emu" , 8, 0., 400.); 00072 _hist_eTmiss_mumu = bookHisto1D("eTmiss_mumu", 8, 0., 400.); 00073 _hist_eTmiss_ll = bookHisto1D("eTmiss_ll" , 8, 0., 400.); 00074 } 00075 00076 /// Perform the event analysis 00077 void analyze(const Event& event) { 00078 // event weight 00079 const double weight = event.weight(); 00080 00081 // get the jet candidates 00082 Jets cand_jets; 00083 foreach (const Jet& jet, 00084 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00085 if ( fabs( jet.eta() ) < 2.8 ) { 00086 cand_jets.push_back(jet); 00087 } 00088 } 00089 00090 // electron candidates 00091 Particles cand_e = 00092 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00093 00094 // Discard jets that overlap with electrons 00095 Jets recon_jets; 00096 foreach ( const Jet& jet, cand_jets ) { 00097 bool away_from_e = true; 00098 foreach ( const Particle & e, cand_e ) { 00099 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00100 away_from_e = false; 00101 break; 00102 } 00103 } 00104 if ( away_from_e ) recon_jets.push_back( jet ); 00105 } 00106 // get the charged tracks for isolation 00107 Particles chg_tracks = 00108 applyProjection<ChargedFinalState>(event, "cfs").particles(); 00109 00110 // Reconstructed electrons 00111 Particles recon_leptons; 00112 foreach ( const Particle & e, cand_e ) { 00113 // check not near a jet 00114 bool e_near_jet = false; 00115 foreach ( const Jet& jet, recon_jets ) { 00116 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00117 e_near_jet = true; 00118 break; 00119 } 00120 } 00121 if ( e_near_jet ) continue; 00122 // check the isolation 00123 double pTinCone = -e.pT(); 00124 foreach ( const Particle & track, chg_tracks ) { 00125 if ( deltaR(e.momentum(),track.momentum()) < 0.2 ) 00126 pTinCone += track.pT(); 00127 } 00128 if ( pTinCone < 0.1*e.momentum().perp() ) 00129 recon_leptons.push_back(e); 00130 } 00131 00132 // Reconstructed Muons 00133 Particles cand_mu = 00134 applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt(); 00135 foreach ( const Particle & mu, cand_mu ) { 00136 // check not near a jet 00137 bool mu_near_jet = false; 00138 foreach ( const Jet& jet, recon_jets ) { 00139 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00140 mu_near_jet = true; 00141 break; 00142 } 00143 } 00144 if ( mu_near_jet ) continue; 00145 // isolation 00146 double pTinCone = -mu.pT(); 00147 foreach ( const Particle & track, chg_tracks ) { 00148 if ( deltaR(mu.momentum(),track.momentum()) < 0.2 ) 00149 pTinCone += track.pT(); 00150 } 00151 if ( pTinCone < 1.8*GeV ) 00152 recon_leptons.push_back(mu); 00153 } 00154 00155 // pTmiss 00156 Particles vfs_particles 00157 = applyProjection<VisibleFinalState>(event, "vfs").particles(); 00158 FourMomentum pTmiss; 00159 foreach ( const Particle & p, vfs_particles ) { 00160 pTmiss -= p.momentum(); 00161 } 00162 double eTmiss = pTmiss.pT(); 00163 00164 // Exactly two leptons for each event 00165 if ( recon_leptons.size() != 2) vetoEvent; 00166 // ensure 1st hardest 00167 if(recon_leptons[0].momentum().perp()<recon_leptons[1].momentum().perp()) 00168 std::swap(recon_leptons[0],recon_leptons[1]); 00169 // only keep same sign 00170 if(recon_leptons[0].pdgId()*recon_leptons[1].pdgId()<0) 00171 vetoEvent; 00172 // at least 4 jets pt>50 00173 if(recon_jets.size()<4||recon_jets[3].momentum().perp()<50.) 00174 vetoEvent; 00175 00176 if(recon_leptons[0].pdgId()!=recon_leptons[1].pdgId()) 00177 _hist_eTmiss_emu ->fill(eTmiss,weight); 00178 else if(abs(recon_leptons[0].pdgId())==PID::ELECTRON) 00179 _hist_eTmiss_ee ->fill(eTmiss,weight); 00180 else if(abs(recon_leptons[0].pdgId())==PID::MUON) 00181 _hist_eTmiss_mumu->fill(eTmiss,weight); 00182 _hist_eTmiss_ll->fill(eTmiss,weight); 00183 00184 if(eTmiss>150.) { 00185 if(recon_leptons[0].pdgId()!=recon_leptons[1].pdgId()) 00186 _count_emu ->fill(0.5,weight); 00187 else if(abs(recon_leptons[0].pdgId())==PID::ELECTRON) 00188 _count_ee ->fill(0.5,weight); 00189 else if(abs(recon_leptons[0].pdgId())==PID::MUON) 00190 _count_mumu->fill(0.5,weight); 00191 _count_ll->fill(0.5,weight); 00192 } 00193 00194 } 00195 00196 //@} 00197 00198 00199 void finalize() { 00200 00201 double norm = crossSection()/femtobarn*5.8/sumOfWeights(); 00202 // event counts 00203 scale(_count_ee ,norm); 00204 scale(_count_emu ,norm); 00205 scale(_count_mumu,norm); 00206 scale(_count_ll ,norm); 00207 // histograms 00208 scale(_hist_eTmiss_ee ,norm*50.); 00209 scale(_hist_eTmiss_emu ,norm*50.); 00210 scale(_hist_eTmiss_mumu,norm*50.); 00211 scale(_hist_eTmiss_ll ,norm*50.); 00212 00213 } 00214 00215 private: 00216 00217 /// @name Histograms 00218 //@{ 00219 Histo1DPtr _count_ee ; 00220 Histo1DPtr _count_emu ; 00221 Histo1DPtr _count_mumu; 00222 Histo1DPtr _count_ll ; 00223 00224 Histo1DPtr _hist_eTmiss_ee; 00225 Histo1DPtr _hist_eTmiss_emu; 00226 Histo1DPtr _hist_eTmiss_mumu; 00227 Histo1DPtr _hist_eTmiss_ll; 00228 //@} 00229 }; 00230 00231 // The hook for the plugin system 00232 DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_105); 00233 00234 } Generated on Thu Feb 6 2014 17:38:41 for The Rivet MC analysis system by ![]() |