ATLAS_2012_CONF_2012_109.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 /// @author Peter Richardson 00014 class ATLAS_2012_CONF_2012_109 : public Analysis { 00015 public: 00016 00017 /// @name Constructors etc. 00018 //@{ 00019 00020 /// Constructor 00021 ATLAS_2012_CONF_2012_109() 00022 : Analysis("ATLAS_2012_CONF_2012_109") 00023 { } 00024 00025 //@} 00026 00027 00028 public: 00029 00030 /// @name Analysis methods 00031 //@{ 00032 00033 /// Book histograms and initialise projections before the run 00034 void init() { 00035 00036 // Projection to find the electrons 00037 std::vector<std::pair<double, double> > eta_e; 00038 eta_e.push_back(make_pair(-2.47,2.47)); 00039 IdentifiedFinalState elecs(eta_e, 20.0*GeV); 00040 elecs.acceptIdPair(PID::ELECTRON); 00041 addProjection(elecs, "elecs"); 00042 00043 // Projection to find the muons 00044 std::vector<std::pair<double, double> > eta_m; 00045 eta_m.push_back(make_pair(-2.4,2.4)); 00046 IdentifiedFinalState muons(eta_m, 10.0*GeV); 00047 muons.acceptIdPair(PID::MUON); 00048 addProjection(muons, "muons"); 00049 00050 // Jet finder 00051 VetoedFinalState vfs; 00052 vfs.addVetoPairId(PID::MUON); 00053 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04"); 00054 00055 // All tracks (to do deltaR with leptons) 00056 addProjection(ChargedFinalState(-3.0,3.0),"cfs"); 00057 00058 // Used for pTmiss (N.B. the real 'vfs' extends beyond 4.5 to |eta| = 4.9) 00059 addProjection(VisibleFinalState(-4.5,4.5),"vfs"); 00060 00061 // Book histograms 00062 _count_A_tight = bookHisto1D("count_A_tight" , 1, 0., 1.); 00063 _count_A_medium = bookHisto1D("count_A_medium" , 1, 0., 1.); 00064 _count_A_loose = bookHisto1D("count_A_loose" , 1, 0., 1.); 00065 _count_B_tight = bookHisto1D("count_B_tight" , 1, 0., 1.); 00066 _count_B_medium = bookHisto1D("count_B_medium" , 1, 0., 1.); 00067 _count_C_tight = bookHisto1D("count_C_tight" , 1, 0., 1.); 00068 _count_C_medium = bookHisto1D("count_C_medium" , 1, 0., 1.); 00069 _count_C_loose = bookHisto1D("count_C_loose" , 1, 0., 1.); 00070 _count_D_tight = bookHisto1D("count_D_tight" , 1, 0., 1.); 00071 _count_E_tight = bookHisto1D("count_E_tight" , 1, 0., 1.); 00072 _count_E_medium = bookHisto1D("count_E_medium" , 1, 0., 1.); 00073 _count_E_loose = bookHisto1D("count_E_loose" , 1, 0., 1.); 00074 00075 _hist_meff_A_medium = bookHisto1D("meff_A_medium" , 40, 0., 4000.); 00076 _hist_meff_A_tight = bookHisto1D("meff_A_tight" , 40, 0., 4000.); 00077 _hist_meff_B_medium = bookHisto1D("meff_B_medium" , 40, 0., 4000.); 00078 _hist_meff_B_tight = bookHisto1D("meff_B_tight" , 40, 0., 4000.); 00079 _hist_meff_C_medium = bookHisto1D("meff_C_medium" , 40, 0., 4000.); 00080 _hist_meff_C_tight = bookHisto1D("meff_C_tight" , 40, 0., 4000.); 00081 _hist_meff_D = bookHisto1D("meff_D" , 40, 0., 4000.); 00082 _hist_meff_E_loose = bookHisto1D("meff_E_loose" , 40, 0., 4000.); 00083 _hist_meff_E_medium = bookHisto1D("meff_E_medium" , 40, 0., 4000.); 00084 _hist_meff_E_tight = bookHisto1D("meff_E_tight" , 40, 0., 4000.); 00085 00086 } 00087 00088 00089 /// Perform the per-event analysis 00090 void analyze(const Event& event) { 00091 const double weight = event.weight(); 00092 00093 Jets cand_jets; 00094 const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV); 00095 foreach (const Jet& jet, jets) { 00096 if ( fabs( jet.eta() ) < 4.9 ) { 00097 cand_jets.push_back(jet); 00098 } 00099 } 00100 00101 const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00102 00103 // Muon isolation not mentioned in hep-exp 1109.6572 but assumed to still be applicable 00104 Particles cand_mu; 00105 const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles(); 00106 const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt(); 00107 foreach (const Particle& mu, muons) { 00108 double pTinCone = -mu.pT(); 00109 foreach (const Particle& track, chg_tracks) { 00110 if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) { 00111 pTinCone += track.pT(); 00112 } 00113 } 00114 if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu); 00115 } 00116 00117 // Resolve jet-lepton overlap for jets with |eta| < 2.8 00118 Jets recon_jets; 00119 foreach ( const Jet& jet, cand_jets ) { 00120 if ( fabs( jet.eta() ) >= 2.8 ) continue; 00121 bool away_from_e = true; 00122 foreach ( const Particle & e, cand_e ) { 00123 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00124 away_from_e = false; 00125 break; 00126 } 00127 } 00128 if ( away_from_e ) recon_jets.push_back( jet ); 00129 } 00130 00131 Particles recon_e, recon_mu; 00132 00133 foreach ( const Particle & e, cand_e ) { 00134 bool away = true; 00135 foreach ( const Jet& jet, recon_jets ) { 00136 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00137 away = false; 00138 break; 00139 } 00140 } 00141 if ( away ) recon_e.push_back( e ); 00142 } 00143 00144 foreach ( const Particle & mu, cand_mu ) { 00145 bool away = true; 00146 foreach ( const Jet& jet, recon_jets ) { 00147 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00148 away = false; 00149 break; 00150 } 00151 } 00152 if ( away ) recon_mu.push_back( mu ); 00153 } 00154 00155 // pTmiss 00156 // Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5 00157 // i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5 00158 Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles(); 00159 FourMomentum pTmiss; 00160 foreach ( const Particle & p, vfs_particles ) { 00161 pTmiss -= p.momentum(); 00162 } 00163 foreach ( const Jet& jet, cand_jets ) { 00164 if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum(); 00165 } 00166 double eTmiss = pTmiss.pT(); 00167 00168 // no electron pT> 20 or muons pT>10 00169 if ( !recon_mu.empty() || !recon_e.empty() ) { 00170 MSG_DEBUG("Charged leptons left after selection"); 00171 vetoEvent; 00172 } 00173 00174 if ( eTmiss <= 160 * GeV ) { 00175 MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130"); 00176 vetoEvent; 00177 } 00178 00179 // check the hardest two jets 00180 if ( recon_jets.size()<2 || 00181 recon_jets[0].pT() <= 130.0 * GeV || 00182 recon_jets[0].pT() <= 60.0 * GeV ) { 00183 MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets"); 00184 vetoEvent; 00185 } 00186 00187 // check the charged and EM fractions of the hard jets to avoid photons 00188 for (unsigned int ix = 0; ix < 2; ++ix) { 00189 // jets over 100 GeV 00190 if (recon_jets[ix].pT() < 100*GeV || 00191 recon_jets[ix].eta() > 2.) continue; //< @todo Should be |eta|? 00192 double fch(0.), fem(0.), eTotal(0.); 00193 foreach(const Particle & part, recon_jets[ix].particles()) { 00194 long id = abs(part.pdgId()); 00195 if(PID::threeCharge(id)!=0) 00196 fch += part.momentum().E(); 00197 if (id == PID::PHOTON || id == PID::ELECTRON || id == PID::PI0) 00198 fem += part.momentum().E(); 00199 } 00200 fch /= eTotal; 00201 fem /= eTotal; 00202 // remove events with hard photon 00203 if (fch < 0.02 || (fch < 0.05 && fem > 0.09)) vetoEvent; 00204 } 00205 00206 // ==================== observables ==================== 00207 00208 int Njets = 0; 00209 double min_dPhi_All = 999.999; //< @todo Use std::numeric_limits! 00210 double min_dPhi_2 = 999.999; //< @todo Use std::numeric_limits! 00211 double min_dPhi_3 = 999.999; //< @todo Use std::numeric_limits! 00212 double pTmiss_phi = pTmiss.phi(); 00213 00214 foreach ( const Jet& jet, recon_jets ) { 00215 if ( jet.pT() < 40*GeV ) continue; 00216 double dPhi = deltaPhi( pTmiss_phi, jet.momentum().phi()); 00217 if ( Njets < 2 ) min_dPhi_2 = min( min_dPhi_2, dPhi ); 00218 if ( Njets < 3 ) min_dPhi_3 = min( min_dPhi_3, dPhi ); 00219 min_dPhi_All = min( min_dPhi_All, dPhi ); 00220 ++Njets; 00221 } 00222 00223 // inclusive meff 00224 double m_eff_inc = eTmiss; 00225 foreach ( const Jet& jet, recon_jets ) { 00226 double perp = jet.pT(); 00227 if(perp>40.) m_eff_inc += perp; 00228 } 00229 00230 // region A 00231 double m_eff_Nj = eTmiss + recon_jets[0].pT() + recon_jets[1].pT(); 00232 if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.3 ) { 00233 _hist_meff_A_tight ->fill(m_eff_inc,weight); 00234 if(eTmiss/m_eff_Nj > 0.4) 00235 _hist_meff_A_medium->fill(m_eff_inc,weight); 00236 if(m_eff_inc>1900.) 00237 _count_A_tight ->fill(0.5,weight); 00238 if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.4) 00239 _count_A_medium->fill(0.5,weight); 00240 if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.4) 00241 _count_A_loose ->fill(0.5,weight); 00242 } 00243 00244 // for rest of regions 3 jets pT> 60 needed 00245 if(recon_jets.size()<3 || recon_jets[2].momentum().perp()<60.) 00246 vetoEvent; 00247 00248 // region B 00249 m_eff_Nj += recon_jets[2].momentum().perp(); 00250 if( min_dPhi_3 > 0.4 && eTmiss/m_eff_Nj > 0.25 ) { 00251 _hist_meff_B_tight->fill(m_eff_inc,weight); 00252 if(eTmiss/m_eff_Nj > 0.3) 00253 _hist_meff_B_medium->fill(m_eff_inc,weight); 00254 if(m_eff_inc>1900.) 00255 _count_B_tight ->fill(0.5,weight); 00256 if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.3) 00257 _count_B_medium->fill(0.5,weight); 00258 } 00259 00260 // for rest of regions 4 jets pT> 60 needed 00261 if(recon_jets.size()<4 || recon_jets[3].momentum().perp()<60.) 00262 vetoEvent; 00263 00264 // region C 00265 m_eff_Nj += recon_jets[3].momentum().perp(); 00266 if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.25 ) { 00267 _hist_meff_C_tight->fill(m_eff_inc,weight); 00268 if( eTmiss/m_eff_Nj > 0.3 ) 00269 _hist_meff_C_medium->fill(m_eff_inc,weight); 00270 if(m_eff_inc>1900.) 00271 _count_C_tight ->fill(0.5,weight); 00272 if(m_eff_inc>1300. && eTmiss/m_eff_Nj > 0.3) 00273 _count_C_medium->fill(0.5,weight); 00274 if(m_eff_inc>1000. && eTmiss/m_eff_Nj > 0.3) 00275 _count_C_loose ->fill(0.5,weight); 00276 } 00277 00278 // for rest of regions 5 jets pT> 40 needed 00279 if(recon_jets.size()<5 || recon_jets[4].momentum().perp()<40.) 00280 vetoEvent; 00281 00282 // region D 00283 m_eff_Nj += recon_jets[4].momentum().perp(); 00284 if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) { 00285 _hist_meff_D->fill(m_eff_inc,weight); 00286 if(m_eff_inc>1700.) _count_D_tight ->fill(0.5,weight); 00287 } 00288 00289 // for rest of regions 6 jets pT> 40 needed 00290 if(recon_jets.size()<6 || recon_jets[5].momentum().perp()<40.) 00291 vetoEvent; 00292 00293 // region E 00294 m_eff_Nj += recon_jets[5].momentum().perp(); 00295 if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) { 00296 _hist_meff_E_tight->fill(m_eff_inc,weight); 00297 if( eTmiss/m_eff_Nj > 0.25 ) 00298 _hist_meff_E_medium->fill(m_eff_inc,weight); 00299 if( eTmiss/m_eff_Nj > 0.3 ) 00300 _hist_meff_E_loose->fill(m_eff_inc,weight); 00301 if(m_eff_inc>1400.) _count_E_tight ->fill(0.5,weight); 00302 if(m_eff_inc>1300.&& eTmiss/m_eff_Nj > 0.25 ) 00303 _count_E_medium->fill(0.5,weight); 00304 if(m_eff_inc>1000.&& eTmiss/m_eff_Nj > 0.3 ) 00305 _count_E_loose ->fill(0.5,weight); 00306 } 00307 } 00308 00309 00310 void finalize() { 00311 00312 double norm = crossSection()/femtobarn*5.8/sumOfWeights(); 00313 // these are number of events at 5.8fb^-1 per 100 GeV 00314 scale( _hist_meff_A_medium , 100. * norm ); 00315 scale( _hist_meff_A_tight , 100. * norm ); 00316 scale( _hist_meff_B_medium , 100. * norm ); 00317 scale( _hist_meff_B_tight , 100. * norm ); 00318 scale( _hist_meff_C_medium , 100. * norm ); 00319 scale( _hist_meff_C_tight , 100. * norm ); 00320 scale( _hist_meff_D , 100. * norm ); 00321 scale( _hist_meff_E_loose , 100. * norm ); 00322 scale( _hist_meff_E_medium , 100. * norm ); 00323 scale( _hist_meff_E_tight , 100. * norm ); 00324 // these are number of events at 5.8fb^-1 00325 scale(_count_A_tight ,norm); 00326 scale(_count_A_medium ,norm); 00327 scale(_count_A_loose ,norm); 00328 scale(_count_B_tight ,norm); 00329 scale(_count_B_medium ,norm); 00330 scale(_count_C_tight ,norm); 00331 scale(_count_C_medium ,norm); 00332 scale(_count_C_loose ,norm); 00333 scale(_count_D_tight ,norm); 00334 scale(_count_E_tight ,norm); 00335 scale(_count_E_medium ,norm); 00336 scale(_count_E_loose ,norm); 00337 } 00338 00339 //@} 00340 00341 private: 00342 00343 Histo1DPtr _count_A_tight; 00344 Histo1DPtr _count_A_medium; 00345 Histo1DPtr _count_A_loose; 00346 Histo1DPtr _count_B_tight; 00347 Histo1DPtr _count_B_medium; 00348 Histo1DPtr _count_C_tight; 00349 Histo1DPtr _count_C_medium; 00350 Histo1DPtr _count_C_loose; 00351 Histo1DPtr _count_D_tight; 00352 Histo1DPtr _count_E_tight; 00353 Histo1DPtr _count_E_medium; 00354 Histo1DPtr _count_E_loose; 00355 00356 Histo1DPtr _hist_meff_A_medium; 00357 Histo1DPtr _hist_meff_A_tight; 00358 Histo1DPtr _hist_meff_B_medium; 00359 Histo1DPtr _hist_meff_B_tight; 00360 Histo1DPtr _hist_meff_C_medium; 00361 Histo1DPtr _hist_meff_C_tight; 00362 Histo1DPtr _hist_meff_D; 00363 Histo1DPtr _hist_meff_E_loose; 00364 Histo1DPtr _hist_meff_E_medium; 00365 Histo1DPtr _hist_meff_E_tight; 00366 00367 }; 00368 00369 00370 // This global object acts as a hook for the plugin system 00371 DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_109); 00372 00373 } Generated on Fri Oct 25 2013 12:41:43 for The Rivet MC analysis system by ![]() |