ATLAS_2012_I1117704.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/VetoedFinalState.hh" 00008 #include "Rivet/Projections/IdentifiedFinalState.hh" 00009 #include "Rivet/Projections/FastJets.hh" 00010 #include "Rivet/Tools/RivetMT2.hh" 00011 00012 namespace Rivet { 00013 00014 00015 class ATLAS_2012_I1117704 : public Analysis { 00016 public: 00017 00018 /// @name Constructors etc. 00019 //@{ 00020 00021 /// Constructor 00022 ATLAS_2012_I1117704() 00023 : Analysis("ATLAS_2012_I1117704") 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 // projection to find the muons 00043 IdentifiedFinalState muons(Cuts::abseta < 2.4 && Cuts::pT > 10*GeV); 00044 muons.acceptIdPair(PID::MUON); 00045 addProjection(muons, "muons"); 00046 00047 // for pTmiss 00048 addProjection(VisibleFinalState(Cuts::abseta < 4.9), "vfs"); 00049 00050 VetoedFinalState vfs; 00051 vfs.addVetoPairId(PID::MUON); 00052 00053 /// Jet finder 00054 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04"); 00055 00056 // all tracks (to do deltaR with leptons) 00057 addProjection(ChargedFinalState(Cuts::abseta < 3),"cfs"); 00058 00059 /// Book histograms 00060 _etmiss_HT_7j55 = bookHisto1D("etmiss_HT_7j55", 8, 0., 16.); 00061 _etmiss_HT_8j55 = bookHisto1D("etmiss_HT_8j55", 8, 0., 16.); 00062 _etmiss_HT_9j55 = bookHisto1D("etmiss_HT_9j55", 8, 0., 16.); 00063 _etmiss_HT_6j80 = bookHisto1D("etmiss_HT_6j80", 8, 0., 16.); 00064 _etmiss_HT_7j80 = bookHisto1D("etmiss_HT_7j80", 8, 0., 16.); 00065 _etmiss_HT_8j80 = bookHisto1D("etmiss_HT_8j80", 8, 0., 16.); 00066 00067 _hist_njet55 = bookHisto1D("hist_njet55", 11, 2.5, 13.5); 00068 _hist_njet80 = bookHisto1D("hist_njet80", 11, 2.5, 13.5); 00069 00070 _count_7j55 = bookHisto1D("count_7j55", 1, 0., 1.); 00071 _count_8j55 = bookHisto1D("count_8j55", 1, 0., 1.); 00072 _count_9j55 = bookHisto1D("count_9j55", 1, 0., 1.); 00073 _count_6j80 = bookHisto1D("count_6j80", 1, 0., 1.); 00074 _count_7j80 = bookHisto1D("count_7j80", 1, 0., 1.); 00075 _count_8j80 = bookHisto1D("count_8j80", 1, 0., 1.); 00076 00077 } 00078 00079 00080 /// Perform the per-event analysis 00081 void analyze(const Event& event) { 00082 const double weight = event.weight(); 00083 00084 // get the jet candidates 00085 Jets cand_jets; 00086 foreach (const Jet& jet, 00087 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00088 if ( fabs( jet.eta() ) < 2.8 ) { 00089 cand_jets.push_back(jet); 00090 } 00091 } 00092 00093 // candidate muons 00094 Particles cand_mu; 00095 Particles chg_tracks = 00096 applyProjection<ChargedFinalState>(event, "cfs").particles(); 00097 foreach ( const Particle& mu, 00098 applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) { 00099 double pTinCone = -mu.pT(); 00100 foreach ( const Particle& track, chg_tracks ) { 00101 if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) 00102 pTinCone += track.pT(); 00103 } 00104 if ( pTinCone < 1.8*GeV ) 00105 cand_mu.push_back(mu); 00106 } 00107 00108 // candidate electrons 00109 Particles cand_e = 00110 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00111 00112 // resolve jet/lepton ambiguity 00113 Jets recon_jets; 00114 foreach ( const Jet& jet, cand_jets ) { 00115 // candidates after |eta| < 2.8 00116 if ( fabs( jet.eta() ) >= 2.8 ) continue; 00117 bool away_from_e = true; 00118 foreach ( const Particle& e, cand_e ) { 00119 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00120 away_from_e = false; 00121 break; 00122 } 00123 } 00124 if ( away_from_e ) recon_jets.push_back( jet ); 00125 } 00126 00127 // only keep electrons more than R=0.4 from jets 00128 Particles recon_e; 00129 foreach ( const Particle& e, cand_e ) { 00130 bool away = true; 00131 foreach ( const Jet& jet, recon_jets ) { 00132 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00133 away = false; 00134 break; 00135 } 00136 } 00137 if ( away ) 00138 recon_e.push_back( e ); 00139 } 00140 00141 // only keep muons more than R=0.4 from jets 00142 Particles recon_mu; 00143 foreach ( const Particle& mu, cand_mu ) { 00144 bool away = true; 00145 foreach ( const Jet& jet, recon_jets ) { 00146 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00147 away = false; 00148 break; 00149 } 00150 } 00151 if ( away ) 00152 recon_mu.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 // now only use recon_jets, recon_mu, recon_e 00165 00166 // reject events with electrons and muons 00167 if ( ! ( recon_mu.empty() && recon_e.empty() ) ) { 00168 MSG_DEBUG("Charged leptons left after selection"); 00169 vetoEvent; 00170 } 00171 00172 // calculate H_T 00173 double HT=0; 00174 foreach ( const Jet& jet, recon_jets ) { 00175 if ( jet.pT() > 40 * GeV ) 00176 HT += jet.pT() ; 00177 } 00178 00179 // number of jets 00180 unsigned int njet55=0, njet80=0; 00181 for (unsigned int ix=0;ix<recon_jets.size();++ix) { 00182 if(recon_jets[ix].pT()>80.*GeV) ++njet80; 00183 if(recon_jets[ix].pT()>55.*GeV) ++njet55; 00184 } 00185 00186 if(njet55==0) vetoEvent; 00187 00188 double ratio = eTmiss/sqrt(HT); 00189 00190 if(ratio>4.) { 00191 _hist_njet55->fill(njet55,weight); 00192 _hist_njet80->fill(njet80,weight); 00193 // 7j55 00194 if(njet55>=7) 00195 _count_7j55->fill( 0.5, weight); 00196 // 8j55 00197 if(njet55>=8) 00198 _count_8j55->fill( 0.5, weight) ; 00199 // 8j55 00200 if(njet55>=9) 00201 _count_9j55->fill( 0.5, weight) ; 00202 // 6j80 00203 if(njet80>=6) 00204 _count_6j80->fill( 0.5, weight) ; 00205 // 7j80 00206 if(njet80>=7) 00207 _count_7j80->fill( 0.5, weight) ; 00208 // 8j80 00209 if(njet80>=8) 00210 _count_8j80->fill( 0.5, weight) ; 00211 } 00212 00213 if(njet55>=7) 00214 _etmiss_HT_7j55->fill( ratio, weight); 00215 // 8j55 00216 if(njet55>=8) 00217 _etmiss_HT_8j55->fill( ratio, weight) ; 00218 // 8j55 00219 if(njet55>=9) 00220 _etmiss_HT_9j55->fill( ratio, weight) ; 00221 // 6j80 00222 if(njet80>=6) 00223 _etmiss_HT_6j80->fill( ratio, weight) ; 00224 // 7j80 00225 if(njet80>=7) 00226 _etmiss_HT_7j80->fill( ratio, weight) ; 00227 // 8j80 00228 if(njet80>=8) 00229 _etmiss_HT_8j80->fill( ratio, weight) ; 00230 00231 } 00232 00233 //@} 00234 00235 void finalize() { 00236 double norm = crossSection()/femtobarn*4.7/sumOfWeights(); 00237 00238 scale(_etmiss_HT_7j55,2.*norm); 00239 scale(_etmiss_HT_8j55,2.*norm); 00240 scale(_etmiss_HT_9j55,2.*norm); 00241 scale(_etmiss_HT_6j80,2.*norm); 00242 scale(_etmiss_HT_7j80,2.*norm); 00243 scale(_etmiss_HT_8j80,2.*norm); 00244 00245 scale(_hist_njet55,norm); 00246 scale(_hist_njet80,norm); 00247 00248 scale(_count_7j55,norm); 00249 scale(_count_8j55,norm); 00250 scale(_count_9j55,norm); 00251 scale(_count_6j80,norm); 00252 scale(_count_7j80,norm); 00253 scale(_count_8j80,norm); 00254 } 00255 00256 private: 00257 00258 /// @name Histograms 00259 //@{ 00260 Histo1DPtr _etmiss_HT_7j55; 00261 Histo1DPtr _etmiss_HT_8j55; 00262 Histo1DPtr _etmiss_HT_9j55; 00263 Histo1DPtr _etmiss_HT_6j80; 00264 Histo1DPtr _etmiss_HT_7j80; 00265 Histo1DPtr _etmiss_HT_8j80; 00266 00267 Histo1DPtr _hist_njet55; 00268 Histo1DPtr _hist_njet80; 00269 00270 Histo1DPtr _count_7j55; 00271 Histo1DPtr _count_8j55; 00272 Histo1DPtr _count_9j55; 00273 Histo1DPtr _count_6j80; 00274 Histo1DPtr _count_7j80; 00275 Histo1DPtr _count_8j80; 00276 //@} 00277 00278 }; 00279 00280 // The hook for the plugin system 00281 DECLARE_RIVET_PLUGIN(ATLAS_2012_I1117704); 00282 00283 } Generated on Thu Mar 10 2016 08:29:47 for The Rivet MC analysis system by ![]() |