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