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