ATLAS_2011_S8983313.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 using namespace Cuts; 00015 00016 00017 class ATLAS_2011_S8983313 : public Analysis { 00018 public: 00019 00020 /// @name Constructors etc. 00021 //@{ 00022 00023 /// Constructor 00024 ATLAS_2011_S8983313() 00025 : Analysis("ATLAS_2011_S8983313") 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 Cut pt10 = pT > 10.0*GeV; 00041 00042 IdentifiedFinalState elecs( etaIn(-2.47, 2.47) & pt10 ); 00043 elecs.acceptIdPair(PID::ELECTRON); 00044 addProjection(elecs, "elecs"); 00045 00046 00047 00048 // veto region electrons 00049 Cut vetocut = etaIn(-1.52, -1.37) | etaIn( 1.37, 1.52); 00050 IdentifiedFinalState veto_elecs(vetocut & pt10); 00051 veto_elecs.acceptIdPair(PID::ELECTRON); 00052 addProjection(veto_elecs, "veto_elecs"); 00053 00054 00055 00056 // projection to find the muons 00057 IdentifiedFinalState muons( etaIn(-2.4, 2.4) & pt10 ); 00058 muons.acceptIdPair(PID::MUON); 00059 addProjection(muons, "muons"); 00060 00061 00062 VetoedFinalState vfs; 00063 vfs.addVetoPairId(PID::MUON); 00064 00065 00066 /// Jet finder 00067 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), 00068 "AntiKtJets04"); 00069 00070 // all tracks (to do deltaR with leptons) 00071 addProjection(ChargedFinalState(-3.0,3.0),"cfs"); 00072 00073 // for pTmiss 00074 addProjection(VisibleFinalState(-4.9,4.9),"vfs"); 00075 00076 00077 /// Book histograms 00078 _count_A = bookHisto1D("count_A", 1, 0., 1.); 00079 _count_B = bookHisto1D("count_B", 1, 0., 1.); 00080 _count_C = bookHisto1D("count_C", 1, 0., 1.); 00081 _count_D = bookHisto1D("count_D", 1, 0., 1.); 00082 00083 _hist_meff_A = bookHisto1D("m_eff_A", 30, 0., 3000.); 00084 _hist_mT2_B = bookHisto1D("m_T2", 25, 0., 1000.); 00085 _hist_meff_CD = bookHisto1D("m_eff_C_D", 30, 0., 3000.); 00086 _hist_eTmiss = bookHisto1D("Et_miss", 20, 0., 1000.); 00087 } 00088 00089 00090 /// Perform the per-event analysis 00091 void analyze(const Event& event) { 00092 const double weight = event.weight(); 00093 00094 Particles veto_e 00095 = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles(); 00096 if ( ! veto_e.empty() ) { 00097 MSG_DEBUG("electrons in veto region"); 00098 vetoEvent; 00099 } 00100 00101 00102 Jets cand_jets; 00103 foreach (const Jet& jet, 00104 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00105 if ( fabs( jet.eta() ) < 4.9 ) { 00106 cand_jets.push_back(jet); 00107 } 00108 } 00109 00110 Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00111 00112 00113 Particles cand_mu; 00114 Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles(); 00115 foreach ( const Particle & mu, 00116 applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt() ) { 00117 double pTinCone = -mu.pT(); 00118 foreach ( const Particle & track, chg_tracks ) { 00119 if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) 00120 pTinCone += track.pT(); 00121 } 00122 if ( pTinCone < 1.8*GeV ) 00123 cand_mu.push_back(mu); 00124 } 00125 00126 Jets cand_jets_2; 00127 foreach ( const Jet& jet, cand_jets ) { 00128 if ( fabs( jet.eta() ) >= 2.5 ) 00129 cand_jets_2.push_back( jet ); 00130 else { 00131 bool away_from_e = true; 00132 foreach ( const Particle & e, cand_e ) { 00133 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00134 away_from_e = false; 00135 break; 00136 } 00137 } 00138 if ( away_from_e ) 00139 cand_jets_2.push_back( jet ); 00140 } 00141 } 00142 00143 Particles recon_e, recon_mu; 00144 00145 foreach ( const Particle & e, cand_e ) { 00146 bool away = true; 00147 foreach ( const Jet& jet, cand_jets_2 ) { 00148 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00149 away = false; 00150 break; 00151 } 00152 } 00153 if ( away ) 00154 recon_e.push_back( e ); 00155 } 00156 00157 foreach ( const Particle & mu, cand_mu ) { 00158 bool away = true; 00159 foreach ( const Jet& jet, cand_jets_2 ) { 00160 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00161 away = false; 00162 break; 00163 } 00164 } 00165 if ( away ) 00166 recon_mu.push_back( mu ); 00167 } 00168 00169 00170 // pTmiss 00171 Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles(); 00172 FourMomentum pTmiss; 00173 foreach ( const Particle & p, vfs_particles ) { 00174 pTmiss -= p.momentum(); 00175 } 00176 double eTmiss = pTmiss.pT(); 00177 00178 00179 // final jet filter 00180 Jets recon_jets; 00181 foreach ( const Jet& jet, cand_jets_2 ) { 00182 if ( fabs( jet.eta() ) <= 2.5 ) 00183 recon_jets.push_back( jet ); 00184 } 00185 00186 00187 // now only use recon_jets, recon_mu, recon_e 00188 00189 if ( ! ( recon_mu.empty() && recon_e.empty() ) ) { 00190 MSG_DEBUG("Charged leptons left after selection"); 00191 vetoEvent; 00192 } 00193 00194 if ( eTmiss <= 100 * GeV ) { 00195 MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 100"); 00196 vetoEvent; 00197 } 00198 00199 00200 if ( recon_jets.empty() || recon_jets[0].pT() <= 120.0 * GeV ) { 00201 MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets"); 00202 vetoEvent; 00203 } 00204 00205 // ==================== observables ==================== 00206 00207 // Njets, min_dPhi 00208 00209 int Njets = 0; 00210 double min_dPhi = 999.999; 00211 double pTmiss_phi = pTmiss.phi(); 00212 foreach ( const Jet& jet, recon_jets ) { 00213 if ( jet.pT() > 40 * GeV ) { 00214 if ( Njets < 3 ) 00215 min_dPhi = min( min_dPhi, 00216 deltaPhi( pTmiss_phi, jet.phi() ) ); 00217 ++Njets; 00218 } 00219 } 00220 00221 if ( Njets < 2 ) { 00222 MSG_DEBUG("Only " << Njets << " >40 GeV jets left"); 00223 vetoEvent; 00224 } 00225 00226 if ( min_dPhi <= 0.4 ) { 00227 MSG_DEBUG("dPhi too small"); 00228 vetoEvent; 00229 } 00230 00231 // m_eff 00232 00233 double m_eff_2j = eTmiss 00234 + recon_jets[0].pT() 00235 + recon_jets[1].pT(); 00236 00237 double m_eff_3j = recon_jets.size() < 3 ? -999.0 : m_eff_2j + recon_jets[2].pT(); 00238 00239 // etmiss / m_eff 00240 00241 double et_meff_2j = eTmiss / m_eff_2j; 00242 double et_meff_3j = eTmiss / m_eff_3j; 00243 00244 FourMomentum a = recon_jets[0].momentum(); 00245 FourMomentum b = recon_jets[1].momentum(); 00246 00247 double m_T2 = mT2::mT2( a, 00248 b, 00249 pTmiss, 00250 0.0 ); // zero mass invisibles 00251 00252 00253 // ==================== FILL ==================== 00254 00255 MSG_DEBUG( "Trying to fill " 00256 << Njets << ' ' 00257 << m_eff_2j << ' ' 00258 << et_meff_2j << ' ' 00259 << m_eff_3j << ' ' 00260 << et_meff_3j << ' ' 00261 << m_T2 ); 00262 00263 _hist_eTmiss->fill(eTmiss, weight); 00264 00265 // AAAAAAAAAA 00266 if ( et_meff_2j > 0.3 ) { 00267 _hist_meff_A->fill(m_eff_2j, weight); 00268 if ( m_eff_2j > 500 * GeV ) { 00269 MSG_DEBUG("Hits A"); 00270 _count_A->fill(0.5, weight); 00271 } 00272 } 00273 00274 // BBBBBBBBBB 00275 _hist_mT2_B->fill(m_T2, weight); 00276 if ( m_T2 > 300 * GeV ) { 00277 MSG_DEBUG("Hits B"); 00278 _count_B->fill(0.5, weight); 00279 } 00280 00281 // need 3 jets for C and D 00282 if ( Njets >= 3 && et_meff_3j > 0.25 ) { 00283 00284 _hist_meff_CD->fill(m_eff_3j, weight); 00285 00286 // CCCCCCCCCC 00287 if ( m_eff_3j > 500 * GeV ) { 00288 MSG_DEBUG("Hits C"); 00289 _count_C->fill(0.5, weight); 00290 } 00291 00292 // DDDDDDDDDD 00293 if ( m_eff_3j > 1000 * GeV ) { 00294 MSG_DEBUG("Hits D"); 00295 _count_D->fill(0.5, weight); 00296 } 00297 } 00298 00299 } 00300 00301 //@} 00302 00303 void finalize() { 00304 00305 double norm = crossSection()/picobarn*35.0/sumOfWeights(); 00306 scale(_hist_meff_A ,100.*norm); 00307 scale(_hist_mT2_B ,100.*norm); 00308 scale(_hist_meff_CD, 40.*norm); 00309 scale(_hist_eTmiss , 50.*norm); 00310 } 00311 00312 00313 private: 00314 00315 /// @name Histograms 00316 //@{ 00317 Histo1DPtr _count_A; 00318 Histo1DPtr _count_B; 00319 Histo1DPtr _count_C; 00320 Histo1DPtr _count_D; 00321 Histo1DPtr _hist_meff_A; 00322 Histo1DPtr _hist_mT2_B; 00323 Histo1DPtr _hist_meff_CD; 00324 Histo1DPtr _hist_eTmiss; 00325 //@} 00326 00327 }; 00328 00329 00330 00331 // The hook for the plugin system 00332 DECLARE_RIVET_PLUGIN(ATLAS_2011_S8983313); 00333 00334 } Generated on Tue Sep 30 2014 19:45:41 for The Rivet MC analysis system by ![]() |