ATLAS_2012_I1125961.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 using namespace Cuts; 00014 00015 /// @author Peter Richardson 00016 class ATLAS_2012_I1125961 : public Analysis { 00017 public: 00018 00019 /// @name Constructors etc. 00020 //@{ 00021 00022 /// Constructor 00023 ATLAS_2012_I1125961() 00024 : Analysis("ATLAS_2012_I1125961") 00025 { } 00026 00027 //@} 00028 00029 00030 public: 00031 00032 /// @name Analysis methods 00033 //@{ 00034 00035 /// Book histograms and initialise projections before the run 00036 void init() { 00037 00038 // Projection to find the electrons 00039 IdentifiedFinalState elecs(etaIn(-2.47, 2.47) 00040 & (pT >= 20.0*GeV)); 00041 elecs.acceptIdPair(PID::ELECTRON); 00042 addProjection(elecs, "elecs"); 00043 00044 // Projection to find the muons 00045 IdentifiedFinalState muons(etaIn(-2.4, 2.4) 00046 & (pT >= 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_Ap_medium = bookHisto1D("count_Ap_medium" , 1, 0., 1.); 00065 _count_B_tight = bookHisto1D("count_B_tight" , 1, 0., 1.); 00066 _count_C_tight = bookHisto1D("count_C_tight" , 1, 0., 1.); 00067 _count_C_medium = bookHisto1D("count_C_medium" , 1, 0., 1.); 00068 _count_C_loose = bookHisto1D("count_C_loose" , 1, 0., 1.); 00069 _count_D_tight = bookHisto1D("count_D_tight" , 1, 0., 1.); 00070 _count_E_tight = bookHisto1D("count_E_tight" , 1, 0., 1.); 00071 _count_E_medium = bookHisto1D("count_E_medium" , 1, 0., 1.); 00072 _count_E_loose = bookHisto1D("count_E_loose" , 1, 0., 1.); 00073 00074 _hist_meff_A = bookHisto1D("hist_m_eff_A" , 30, 0., 3000.); 00075 _hist_meff_Ap = bookHisto1D("hist_m_eff_Ap", 30, 0., 3000.); 00076 _hist_meff_B = bookHisto1D("hist_m_eff_B" , 30, 0., 3000.); 00077 _hist_meff_C = bookHisto1D("hist_m_eff_C" , 30, 0., 3000.); 00078 _hist_meff_D = bookHisto1D("hist_m_eff_D" , 30, 0., 3000.); 00079 _hist_meff_E = bookHisto1D("hist_m_eff_E" , 30, 0., 3000.); 00080 00081 } 00082 00083 00084 /// Perform the per-event analysis 00085 void analyze(const Event& event) { 00086 const double weight = event.weight(); 00087 00088 Jets cand_jets; 00089 const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV); 00090 foreach (const Jet& jet, jets) { 00091 if ( fabs( jet.eta() ) < 4.9 ) { 00092 cand_jets.push_back(jet); 00093 } 00094 } 00095 00096 const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00097 00098 // Muon isolation not mentioned in hep-exp 1109.6572 but assumed to still be applicable 00099 Particles cand_mu; 00100 const Particles chg_tracks = applyProjection<ChargedFinalState>(event, "cfs").particles(); 00101 const Particles muons = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt(); 00102 foreach (const Particle& mu, muons) { 00103 double pTinCone = -mu.pT(); 00104 foreach (const Particle& track, chg_tracks) { 00105 if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) { 00106 pTinCone += track.pT(); 00107 } 00108 } 00109 if ( pTinCone < 1.8*GeV ) cand_mu.push_back(mu); 00110 } 00111 00112 // Resolve jet-lepton overlap for jets with |eta| < 2.8 00113 Jets recon_jets; 00114 foreach ( const Jet& jet, cand_jets ) { 00115 if ( fabs( jet.eta() ) >= 2.8 ) continue; 00116 bool away_from_e = true; 00117 foreach ( const Particle & e, cand_e ) { 00118 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00119 away_from_e = false; 00120 break; 00121 } 00122 } 00123 if ( away_from_e ) recon_jets.push_back( jet ); 00124 } 00125 00126 Particles recon_e, recon_mu; 00127 00128 foreach ( const Particle & e, cand_e ) { 00129 bool away = true; 00130 foreach ( const Jet& jet, recon_jets ) { 00131 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00132 away = false; 00133 break; 00134 } 00135 } 00136 if ( away ) recon_e.push_back( e ); 00137 } 00138 00139 foreach ( const Particle & mu, cand_mu ) { 00140 bool away = true; 00141 foreach ( const Jet& jet, recon_jets ) { 00142 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00143 away = false; 00144 break; 00145 } 00146 } 00147 if ( away ) recon_mu.push_back( mu ); 00148 } 00149 00150 // pTmiss 00151 // Based on all candidate electrons, muons and jets, plus everything else with |eta| < 4.5 00152 // i.e. everything in our projection "vfs" plus the jets with |eta| > 4.5 00153 Particles vfs_particles = applyProjection<VisibleFinalState>(event, "vfs").particles(); 00154 FourMomentum pTmiss; 00155 foreach ( const Particle & p, vfs_particles ) { 00156 pTmiss -= p.momentum(); 00157 } 00158 foreach ( const Jet& jet, cand_jets ) { 00159 if ( fabs( jet.eta() ) > 4.5 ) pTmiss -= jet.momentum(); 00160 } 00161 double eTmiss = pTmiss.pT(); 00162 00163 // no electron pT> 20 or muons pT>10 00164 if ( !recon_mu.empty() || !recon_e.empty() ) { 00165 MSG_DEBUG("Charged leptons left after selection"); 00166 vetoEvent; 00167 } 00168 00169 if ( eTmiss <= 160 * GeV ) { 00170 MSG_DEBUG("Not enough eTmiss: " << eTmiss << " < 130"); 00171 vetoEvent; 00172 } 00173 00174 if ( recon_jets.size()<2 || 00175 recon_jets[0].pT() <= 130.0 * GeV || 00176 recon_jets[0].pT() <= 60.0 * GeV ) { 00177 MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets"); 00178 vetoEvent; 00179 } 00180 00181 // ==================== observables ==================== 00182 00183 int Njets = 0; 00184 double min_dPhi_All = 999.999; 00185 double min_dPhi_2 = 999.999; 00186 double min_dPhi_3 = 999.999; 00187 double pTmiss_phi = pTmiss.phi(); 00188 foreach ( const Jet& jet, recon_jets ) { 00189 if ( jet.pT() < 40 * GeV ) continue; 00190 if ( Njets < 2 ) { 00191 min_dPhi_2 = min( min_dPhi_2, deltaPhi( pTmiss_phi, jet.phi() ) ); 00192 } 00193 if( Njets < 3) { 00194 min_dPhi_3 = min( min_dPhi_3, deltaPhi( pTmiss_phi, jet.phi() ) ); 00195 } 00196 min_dPhi_All = min( min_dPhi_All, deltaPhi( pTmiss_phi, jet.phi() ) ); 00197 ++Njets; 00198 } 00199 00200 // inclusive meff 00201 double m_eff_inc = eTmiss; 00202 foreach ( const Jet& jet, recon_jets ) { 00203 double perp = jet.pT(); 00204 if(perp>40.) m_eff_inc += perp; 00205 } 00206 00207 // region A 00208 double m_eff_Nj = eTmiss + recon_jets[0].pT() + recon_jets[1].pT(); 00209 if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.3 ) { 00210 _hist_meff_A->fill(m_eff_inc,weight); 00211 if(m_eff_inc>1900.) _count_A_tight ->fill(0.5,weight); 00212 if(m_eff_inc>1400.) _count_A_medium->fill(0.5,weight); 00213 } 00214 00215 // region A' 00216 if( min_dPhi_2 > 0.4 && eTmiss/m_eff_Nj > 0.4 ) { 00217 _hist_meff_Ap->fill(m_eff_inc,weight); 00218 if(m_eff_inc>1200.) _count_Ap_medium->fill(0.5,weight); 00219 } 00220 00221 // for rest of regions 3 jets pT> 60 needed 00222 if(recon_jets.size()<3 || recon_jets[2].perp()<60.) 00223 vetoEvent; 00224 00225 // region B 00226 m_eff_Nj += recon_jets[2].perp(); 00227 if( min_dPhi_3 > 0.4 && eTmiss/m_eff_Nj > 0.25 ) { 00228 _hist_meff_B->fill(m_eff_inc,weight); 00229 if(m_eff_inc>1900.) _count_B_tight ->fill(0.5,weight); 00230 } 00231 00232 // for rest of regions 4 jets pT> 60 needed 00233 if(recon_jets.size()<4 || recon_jets[3].perp()<60.) 00234 vetoEvent; 00235 00236 // region C 00237 m_eff_Nj += recon_jets[3].perp(); 00238 if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.25 ) { 00239 _hist_meff_C->fill(m_eff_inc,weight); 00240 if(m_eff_inc>1500.) _count_C_tight ->fill(0.5,weight); 00241 if(m_eff_inc>1200.) _count_C_medium->fill(0.5,weight); 00242 if(m_eff_inc> 900.) _count_C_loose ->fill(0.5,weight); 00243 } 00244 00245 // for rest of regions 5 jets pT> 40 needed 00246 if(recon_jets.size()<5 || recon_jets[4].perp()<40.) 00247 vetoEvent; 00248 00249 // region D 00250 m_eff_Nj += recon_jets[4].perp(); 00251 if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.2 ) { 00252 _hist_meff_D->fill(m_eff_inc,weight); 00253 if(m_eff_inc>1500.) _count_D_tight ->fill(0.5,weight); 00254 } 00255 00256 // for rest of regions 6 jets pT> 40 needed 00257 if(recon_jets.size()<6 || recon_jets[5].perp()<40.) 00258 vetoEvent; 00259 00260 // region E 00261 m_eff_Nj += recon_jets[5].perp(); 00262 if( min_dPhi_3 > 0.4 && min_dPhi_All > 0.2 && eTmiss/m_eff_Nj > 0.15 ) { 00263 _hist_meff_E->fill(m_eff_inc,weight); 00264 if(m_eff_inc>1400.) _count_E_tight ->fill(0.5,weight); 00265 if(m_eff_inc>1200.) _count_E_medium->fill(0.5,weight); 00266 if(m_eff_inc> 900.) _count_E_loose ->fill(0.5,weight); 00267 } 00268 } 00269 00270 00271 void finalize() { 00272 00273 double norm = crossSection()/femtobarn*4.7/sumOfWeights(); 00274 // these are number of events at 4.7fb^-1 per 100 GeV 00275 scale( _hist_meff_A , 100. * norm ); 00276 scale( _hist_meff_Ap, 100. * norm ); 00277 scale( _hist_meff_B , 100. * norm ); 00278 scale( _hist_meff_C , 100. * norm ); 00279 scale( _hist_meff_D , 100. * norm ); 00280 scale( _hist_meff_E , 100. * norm ); 00281 // these are number of events at 4.7fb^-1 00282 scale(_count_A_tight ,norm); 00283 scale(_count_A_medium ,norm); 00284 scale(_count_Ap_medium,norm); 00285 scale(_count_B_tight ,norm); 00286 scale(_count_C_tight ,norm); 00287 scale(_count_C_medium ,norm); 00288 scale(_count_C_loose ,norm); 00289 scale(_count_D_tight ,norm); 00290 scale(_count_E_tight ,norm); 00291 scale(_count_E_medium ,norm); 00292 scale(_count_E_loose ,norm); 00293 } 00294 00295 //@} 00296 00297 00298 private: 00299 00300 Histo1DPtr _count_A_tight; 00301 Histo1DPtr _count_A_medium; 00302 Histo1DPtr _count_Ap_medium; 00303 Histo1DPtr _count_B_tight; 00304 Histo1DPtr _count_C_tight; 00305 Histo1DPtr _count_C_medium; 00306 Histo1DPtr _count_C_loose; 00307 Histo1DPtr _count_D_tight; 00308 Histo1DPtr _count_E_tight; 00309 Histo1DPtr _count_E_medium; 00310 Histo1DPtr _count_E_loose; 00311 00312 Histo1DPtr _hist_meff_A ; 00313 Histo1DPtr _hist_meff_Ap; 00314 Histo1DPtr _hist_meff_B ; 00315 Histo1DPtr _hist_meff_C ; 00316 Histo1DPtr _hist_meff_D ; 00317 Histo1DPtr _hist_meff_E ; 00318 00319 }; 00320 00321 00322 // This global object acts as a hook for the plugin system 00323 DECLARE_RIVET_PLUGIN(ATLAS_2012_I1125961); 00324 00325 } Generated on Tue Sep 30 2014 19:45:42 for The Rivet MC analysis system by ![]() |