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