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