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