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