ATLAS_2011_S9019561.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_2011_S9019561 : public Analysis { 00015 public: 00016 00017 /// @name Constructors etc. 00018 //@{ 00019 00020 /// Constructor 00021 00022 ATLAS_2011_S9019561() 00023 : Analysis("ATLAS_2011_S9019561") 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(Cuts::abseta < 2.47 && Cuts::pT > 20*GeV); 00039 elecs.acceptIdPair(PID::ELECTRON); 00040 addProjection(elecs, "elecs"); 00041 00042 00043 // veto region electrons 00044 Cut vetocut = Cuts::absetaIn(1.37, 1.52); 00045 IdentifiedFinalState veto_elecs(vetocut && Cuts::pT > 10*GeV); 00046 veto_elecs.acceptIdPair(PID::ELECTRON); 00047 addProjection(veto_elecs, "veto_elecs"); 00048 00049 00050 // projection to find the muons 00051 IdentifiedFinalState muons(Cuts::abseta < 2.4 && Cuts::pT > 20*GeV); 00052 muons.acceptIdPair(PID::MUON); 00053 addProjection(muons, "muons"); 00054 00055 00056 // jet finder 00057 VetoedFinalState vfs; 00058 vfs.addVetoPairId(PID::MUON); 00059 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04"); 00060 00061 00062 // all tracks (to do deltaR with leptons) 00063 addProjection(ChargedFinalState(Cuts::abseta < 3 && Cuts::pT > 0.5*GeV), "cfs"); 00064 00065 00066 // for pTmiss 00067 addProjection(VisibleFinalState(Cuts::abseta < 4.9),"vfs"); 00068 00069 00070 /// book histograms 00071 _count_OS_e_mu = bookHisto1D("count_OS_e+-mu-+", 1, 0., 1.); 00072 _count_OS_e_e = bookHisto1D("count_OS_e+e-", 1, 0., 1.); 00073 _count_OS_mu_mu = bookHisto1D("count_OS_mu+mu-", 1, 0., 1.); 00074 _count_SS_e_mu = bookHisto1D("count_SS_e+-mu+-", 1, 0., 1.); 00075 _count_SS_e_e = bookHisto1D("count_SS_e+-e+-", 1, 0., 1.); 00076 _count_SS_mu_mu = bookHisto1D("count_SS_mu+-mu+-", 1, 0., 1.); 00077 00078 _hist_eTmiss_OS = bookHisto1D("Et_miss_OS", 20, 0., 400.); 00079 _hist_eTmiss_SS = bookHisto1D("Et_miss_SS", 20, 0., 400.); 00080 00081 } 00082 00083 00084 00085 00086 /// Perform the per-event analysis 00087 void analyze(const Event& event) { 00088 00089 const double weight = event.weight(); 00090 00091 Particles veto_e 00092 = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles(); 00093 if ( ! veto_e.empty() ) { 00094 MSG_DEBUG("electrons in veto region"); 00095 vetoEvent; 00096 } 00097 00098 Jets cand_jets; 00099 foreach (const Jet& jet, 00100 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00101 if ( fabs( jet.eta() ) < 2.5 ) { 00102 cand_jets.push_back(jet); 00103 } 00104 } 00105 00106 Particles cand_e = 00107 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00108 00109 // charged particle for isolation 00110 Particles chg_tracks = 00111 applyProjection<ChargedFinalState>(event, "cfs").particles(); 00112 00113 // apply muon isolation 00114 Particles cand_mu; 00115 // pTcone around muon track 00116 foreach ( const Particle & mu, 00117 applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt() ) { 00118 double pTinCone = -mu.pT(); 00119 foreach ( const Particle & track, chg_tracks ) { 00120 if ( deltaR(mu.momentum(),track.momentum()) < 0.2 ) 00121 pTinCone += track.pT(); 00122 } 00123 if ( pTinCone < 1.8*GeV ) 00124 cand_mu.push_back(mu); 00125 } 00126 00127 // Discard jets that overlap with electrons 00128 Jets recon_jets; 00129 foreach ( const Jet& jet, cand_jets ) { 00130 bool away_from_e = true; 00131 foreach ( const Particle & e, cand_e ) { 00132 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00133 away_from_e = false; 00134 break; 00135 } 00136 } 00137 if ( away_from_e ) 00138 recon_jets.push_back( jet ); 00139 } 00140 00141 // Leptons far from jet 00142 Particles recon_e; 00143 foreach ( const Particle & e, cand_e ) { 00144 bool e_near_jet = false; 00145 foreach ( const Jet& jet, recon_jets ) { 00146 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00147 e_near_jet = true; 00148 break; 00149 } 00150 } 00151 // Electron isolation criterion 00152 if ( ! e_near_jet ) { 00153 double EtinCone = -e.Et(); 00154 foreach ( const Particle & track, chg_tracks) { 00155 if ( deltaR(e.momentum(),track.momentum()) <= 0.2 ) 00156 EtinCone += track.Et(); 00157 } 00158 if ( EtinCone/e.pT() <= 0.15 ) 00159 recon_e.push_back( e ); 00160 } 00161 } 00162 00163 Particles recon_mu; 00164 foreach ( const Particle & mu, cand_mu ) { 00165 bool mu_near_jet = false; 00166 foreach ( const Jet& jet, recon_jets ) { 00167 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00168 mu_near_jet = true; 00169 break; 00170 } 00171 } 00172 if ( ! mu_near_jet ) 00173 recon_mu.push_back( mu ); 00174 } 00175 00176 00177 // pTmiss 00178 Particles vfs_particles 00179 = applyProjection<VisibleFinalState>(event, "vfs").particles(); 00180 FourMomentum pTmiss; 00181 foreach ( const Particle & p, vfs_particles ) { 00182 pTmiss -= p.momentum(); 00183 } 00184 double eTmiss = pTmiss.pT(); 00185 00186 // Exactly two leptons for each event 00187 if ( recon_mu.size() + recon_e.size() != 2) 00188 vetoEvent; 00189 00190 // Lepton pair mass 00191 FourMomentum p_leptons; 00192 foreach ( Particle e, recon_e ) { 00193 p_leptons += e.momentum(); 00194 } 00195 foreach ( Particle mu, recon_mu) { 00196 p_leptons += mu.momentum(); 00197 } 00198 00199 if ( p_leptons.mass() <= 5.0 * GeV) 00200 vetoEvent; 00201 00202 // ==================== FILL ==================== 00203 00204 00205 // electron, electron 00206 if (recon_e.size() == 2 ) { 00207 00208 // SS ee 00209 if ( recon_e[0].pid() * recon_e[1].pid() > 0 ) { 00210 _hist_eTmiss_SS->fill(eTmiss, weight); 00211 if ( eTmiss > 100 ) { 00212 MSG_DEBUG("Hits SS e+/-e+/-"); 00213 _count_SS_e_e->fill(0.5, weight); 00214 } 00215 } 00216 00217 // OS ee 00218 else if ( recon_e[0].pid() * recon_e[1].pid() < 0) { 00219 _hist_eTmiss_OS->fill(eTmiss, weight); 00220 if ( eTmiss > 150 ) { 00221 MSG_DEBUG("Hits OS e+e-"); 00222 _count_OS_e_e->fill(0.5, weight); 00223 } 00224 } 00225 } 00226 00227 00228 // muon, electron 00229 else if ( recon_e.size() == 1 ) { 00230 00231 // SS mu_e 00232 if ( recon_e[0].pid() * recon_mu[0].pid() > 0 ) { 00233 _hist_eTmiss_SS->fill(eTmiss, weight); 00234 if ( eTmiss > 100 ) { 00235 MSG_DEBUG("Hits SS e+/-mu+/-"); 00236 _count_SS_e_mu->fill(0.5, weight); 00237 } 00238 } 00239 00240 // OS mu_e 00241 else if ( recon_e[0].pid() * recon_mu[0].pid() < 0) { 00242 _hist_eTmiss_OS->fill(eTmiss, weight); 00243 if ( eTmiss > 150 ) { 00244 MSG_DEBUG("Hits OS e+mu-"); 00245 _count_OS_e_mu->fill(0.5, weight); 00246 } 00247 } 00248 } 00249 00250 00251 // muon, muon 00252 else if ( recon_mu.size() == 2 ) { 00253 00254 // SS mu_mu 00255 if ( recon_mu[0].pid() * recon_mu[1].pid() > 0 ) { 00256 _hist_eTmiss_SS->fill(eTmiss, weight); 00257 if ( eTmiss > 100 ) { 00258 MSG_DEBUG("Hits SS mu+/-mu+/-"); 00259 _count_SS_mu_mu->fill(0.5, weight); 00260 } 00261 } 00262 00263 // OS mu_mu 00264 else if ( recon_mu[0].pid() * recon_mu[1].pid() < 0) { 00265 _hist_eTmiss_OS->fill(eTmiss, weight); 00266 if ( eTmiss > 150 ) { 00267 MSG_DEBUG("Hits OS mu+mu-"); 00268 _count_OS_mu_mu->fill(0.5, weight); 00269 } 00270 } 00271 } 00272 00273 00274 } 00275 00276 //@} 00277 00278 00279 void finalize() { 00280 double norm = crossSection()/picobarn*35./sumOfWeights(); 00281 // event counts 00282 scale(_count_OS_e_mu ,norm); 00283 scale(_count_OS_e_e ,norm); 00284 scale(_count_OS_mu_mu,norm); 00285 scale(_count_SS_e_mu ,norm); 00286 scale(_count_SS_e_e ,norm); 00287 scale(_count_SS_mu_mu,norm); 00288 scale(_hist_eTmiss_OS,10.*norm); 00289 scale(_hist_eTmiss_SS,10.*norm); 00290 } 00291 00292 00293 private: 00294 00295 /// @name Histograms 00296 //@{ 00297 Histo1DPtr _count_OS_e_mu; 00298 Histo1DPtr _count_OS_e_e; 00299 Histo1DPtr _count_OS_mu_mu; 00300 Histo1DPtr _count_SS_e_mu; 00301 Histo1DPtr _count_SS_e_e; 00302 Histo1DPtr _count_SS_mu_mu; 00303 Histo1DPtr _hist_eTmiss_OS; 00304 Histo1DPtr _hist_eTmiss_SS; 00305 00306 //@} 00307 00308 00309 }; 00310 00311 00312 00313 // The hook for the plugin system 00314 DECLARE_RIVET_PLUGIN(ATLAS_2011_S9019561); 00315 00316 } Generated on Wed Oct 7 2015 12:09:10 for The Rivet MC analysis system by ![]() |