ATLAS_2012_I1095236.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 00011 namespace Rivet { 00012 00013 using namespace Cuts; 00014 00015 /// @author Peter Richardson 00016 class ATLAS_2012_I1095236 : public Analysis { 00017 public: 00018 00019 /// @name Constructors etc. 00020 //@{ 00021 00022 /// Constructor 00023 ATLAS_2012_I1095236() 00024 : Analysis("ATLAS_2012_I1095236") 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 00059 addProjection(VisibleFinalState(-4.9,4.9),"vfs"); 00060 00061 // Book histograms 00062 _count_SR0_A1 = bookHisto1D("count_SR0_A1", 1, 0., 1.); 00063 _count_SR0_B1 = bookHisto1D("count_SR0_B1", 1, 0., 1.); 00064 _count_SR0_C1 = bookHisto1D("count_SR0_C1", 1, 0., 1.); 00065 _count_SR0_A2 = bookHisto1D("count_SR0_A2", 1, 0., 1.); 00066 _count_SR0_B2 = bookHisto1D("count_SR0_B2", 1, 0., 1.); 00067 _count_SR0_C2 = bookHisto1D("count_SR0_C2", 1, 0., 1.); 00068 _count_SR1_D = bookHisto1D("count_SR1_D" , 1, 0., 1.); 00069 _count_SR1_E = bookHisto1D("count_SR1_E" , 1, 0., 1.); 00070 00071 _hist_meff_SR0_A1 = bookHisto1D("hist_m_eff_SR0_A1", 14, 400., 1800.); 00072 _hist_meff_SR0_A2 = bookHisto1D("hist_m_eff_SR0_A2", 14, 400., 1800.); 00073 _hist_meff_SR1_D_e = bookHisto1D("hist_meff_SR1_D_e" , 16, 600., 2200.); 00074 _hist_meff_SR1_D_mu = bookHisto1D("hist_meff_SR1_D_mu", 16, 600., 2200.); 00075 00076 _hist_met_SR0_A1 = bookHisto1D("hist_met_SR0_A1", 14, 0., 700.); 00077 _hist_met_SR0_A2 = bookHisto1D("hist_met_SR0_A2", 14, 0., 700.); 00078 _hist_met_SR0_D_e = bookHisto1D("hist_met_SR1_D_e" , 15, 0., 600.); 00079 _hist_met_SR0_D_mu = bookHisto1D("hist_met_SR1_D_mu", 15, 0., 600.); 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() ) < 2.8 ) { 00092 cand_jets.push_back(jet); 00093 } 00094 } 00095 00096 const Particles cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00097 00098 const Particles cand_mu = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt(); 00099 // Resolve jet-lepton overlap for jets with |eta| < 2.8 00100 Jets recon_jets; 00101 foreach ( const Jet& jet, cand_jets ) { 00102 if ( fabs( jet.eta() ) >= 2.8 ) continue; 00103 bool away_from_e = true; 00104 foreach ( const Particle & e, cand_e ) { 00105 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00106 away_from_e = false; 00107 break; 00108 } 00109 } 00110 if ( away_from_e ) recon_jets.push_back( jet ); 00111 } 00112 00113 // get the loose leptons used to define the 0 lepton channel 00114 Particles loose_e, loose_mu; 00115 foreach ( const Particle & e, cand_e ) { 00116 bool away = true; 00117 foreach ( const Jet& jet, recon_jets ) { 00118 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00119 away = false; 00120 break; 00121 } 00122 } 00123 if ( away ) loose_e.push_back( e ); 00124 } 00125 foreach ( const Particle & mu, cand_mu ) { 00126 bool away = true; 00127 foreach ( const Jet& jet, recon_jets ) { 00128 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00129 away = false; 00130 break; 00131 } 00132 } 00133 if ( away ) loose_mu.push_back( mu ); 00134 } 00135 // tight leptons for the 1-lepton channel 00136 Particles tight_mu; 00137 Particles chg_tracks = 00138 applyProjection<ChargedFinalState>(event, "cfs").particles(); 00139 foreach ( const Particle & mu, loose_mu) { 00140 if(mu.perp()<20.) continue; 00141 double pTinCone = -mu.pT(); 00142 foreach ( const Particle & track, chg_tracks ) { 00143 if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 ) 00144 pTinCone += track.pT(); 00145 } 00146 if ( pTinCone < 1.8*GeV ) 00147 tight_mu.push_back(mu); 00148 } 00149 Particles tight_e; 00150 foreach ( const Particle & e, loose_e ) { 00151 if(e.perp()<25.) continue; 00152 double pTinCone = -e.perp(); 00153 foreach ( const Particle & track, chg_tracks ) { 00154 if ( deltaR(e.momentum(),track.momentum()) <= 0.2 ) 00155 pTinCone += track.pT(); 00156 } 00157 if (pTinCone/e.perp()<0.1) { 00158 tight_e.push_back(e); 00159 } 00160 } 00161 00162 // pTmiss 00163 Particles vfs_particles = 00164 applyProjection<VisibleFinalState>(event, "vfs").particles(); 00165 FourMomentum pTmiss; 00166 foreach ( const Particle & p, vfs_particles ) { 00167 pTmiss -= p.momentum(); 00168 } 00169 double eTmiss = pTmiss.pT(); 00170 00171 // get the number of b-tagged jets 00172 unsigned int ntagged=0; 00173 foreach (const Jet & jet, recon_jets ) { 00174 if(jet.perp()>50. && abs(jet.eta())<2.5 && 00175 jet.bTagged() && rand()/static_cast<double>(RAND_MAX)<=0.60) 00176 ++ntagged; 00177 } 00178 00179 // ATLAS calo problem 00180 if(rand()/static_cast<double>(RAND_MAX)<=0.42) { 00181 foreach ( const Jet & jet, recon_jets ) { 00182 double eta = jet.rapidity(); 00183 double phi = jet.azimuthalAngle(MINUSPI_PLUSPI); 00184 if(jet.perp()>50 && eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5) 00185 vetoEvent; 00186 } 00187 } 00188 00189 // at least 1 b tag 00190 if(ntagged==0) vetoEvent; 00191 00192 // minumum Et miss 00193 if(eTmiss<80.) vetoEvent; 00194 00195 // at least 3 jets pT > 50 00196 if(recon_jets.size()<3 || recon_jets[2].perp()<50.) 00197 vetoEvent; 00198 00199 // m_eff 00200 double m_eff = eTmiss; 00201 for(unsigned int ix=0;ix<3;++ix) 00202 m_eff += recon_jets[ix].perp(); 00203 00204 // delta Phi 00205 double min_dPhi = 999.999; 00206 double pTmiss_phi = pTmiss.phi(); 00207 for(unsigned int ix=0;ix<3;++ix) { 00208 min_dPhi = min( min_dPhi, deltaPhi( pTmiss_phi, recon_jets[ix].phi() ) ); 00209 } 00210 00211 // 0-lepton channels 00212 if(loose_e.empty() && loose_mu.empty() && 00213 recon_jets[0].perp()>130. && eTmiss>130. && 00214 eTmiss/m_eff>0.25 && min_dPhi>0.4) { 00215 // jet charge cut 00216 bool jetCharge = true; 00217 for(unsigned int ix=0;ix<3;++ix) { 00218 if(fabs(recon_jets[ix].eta())>2.) continue; 00219 double trackpT=0; 00220 foreach(const Particle & p, recon_jets[ix].particles()) { 00221 if(PID::threeCharge(p.pid())==0) continue; 00222 trackpT += p.perp(); 00223 } 00224 if(trackpT/recon_jets[ix].perp()<0.05) 00225 jetCharge = false; 00226 } 00227 if(jetCharge) { 00228 // SR0-A region 00229 if(m_eff>500.) { 00230 _count_SR0_A1->fill(0.5,weight); 00231 _hist_meff_SR0_A1->fill(m_eff,weight); 00232 _hist_met_SR0_A1 ->fill(eTmiss,weight); 00233 if(ntagged>=2) { 00234 _count_SR0_A2->fill(0.5,weight); 00235 _hist_meff_SR0_A2->fill(m_eff,weight); 00236 _hist_met_SR0_A2 ->fill(eTmiss,weight); 00237 } 00238 } 00239 // SR0-B 00240 if(m_eff>700.) { 00241 _count_SR0_B1->fill(0.5,weight); 00242 if(ntagged>=2) _count_SR0_B2->fill(0.5,weight); 00243 } 00244 // SR0-C 00245 if(m_eff>900.) { 00246 _count_SR0_C1->fill(0.5,weight); 00247 if(ntagged>=2) _count_SR0_C2->fill(0.5,weight); 00248 } 00249 } 00250 } 00251 00252 // 1-lepton channels 00253 if(tight_e.size() + tight_mu.size() == 1 && 00254 recon_jets.size()>=4 && recon_jets[3].perp()>50.&& 00255 recon_jets[0].perp()>60.) { 00256 Particle lepton = tight_e.empty() ? tight_mu[0] : tight_e[0]; 00257 m_eff += lepton.perp() + recon_jets[3].perp(); 00258 // transverse mass cut 00259 double mT = 2.*(lepton.perp()*eTmiss- 00260 lepton.px()*pTmiss.px()- 00261 lepton.py()*pTmiss.py()); 00262 mT = sqrt(mT); 00263 if(mT>100.&&m_eff>700.) { 00264 // D region 00265 _count_SR1_D->fill(0.5,weight); 00266 if(lepton.abspid()==PID::ELECTRON) { 00267 _hist_meff_SR1_D_e->fill(m_eff,weight); 00268 _hist_met_SR0_D_e->fill(eTmiss,weight); 00269 } 00270 else { 00271 _hist_meff_SR1_D_mu->fill(m_eff,weight); 00272 _hist_met_SR0_D_mu->fill(eTmiss,weight); 00273 } 00274 // E region 00275 if(eTmiss>200.) { 00276 _count_SR1_E->fill(0.5,weight); 00277 } 00278 } 00279 } 00280 } 00281 00282 00283 void finalize() { 00284 00285 double norm = crossSection()/femtobarn*2.05/sumOfWeights(); 00286 // these are number of events at 2.05fb^-1 per 100 GeV 00287 scale( _hist_meff_SR0_A1 , 100. * norm ); 00288 scale( _hist_meff_SR0_A2 , 100. * norm ); 00289 scale( _hist_meff_SR1_D_e , 100. * norm ); 00290 scale( _hist_meff_SR1_D_mu , 100. * norm ); 00291 // these are number of events at 2.05fb^-1 per 50 GeV 00292 scale( _hist_met_SR0_A1, 50. * norm ); 00293 scale( _hist_met_SR0_A2, 40. * norm ); 00294 // these are number of events at 2.05fb^-1 per 40 GeV 00295 scale( _hist_met_SR0_D_e , 40. * norm ); 00296 scale( _hist_met_SR0_D_mu, 40. * norm ); 00297 // these are number of events at 2.05fb^-1 00298 scale(_count_SR0_A1,norm); 00299 scale(_count_SR0_B1,norm); 00300 scale(_count_SR0_C1,norm); 00301 scale(_count_SR0_A2,norm); 00302 scale(_count_SR0_B2,norm); 00303 scale(_count_SR0_C2,norm); 00304 scale(_count_SR1_D ,norm); 00305 scale(_count_SR1_E ,norm); 00306 } 00307 00308 //@} 00309 00310 00311 private: 00312 00313 Histo1DPtr _count_SR0_A1; 00314 Histo1DPtr _count_SR0_B1; 00315 Histo1DPtr _count_SR0_C1; 00316 Histo1DPtr _count_SR0_A2; 00317 Histo1DPtr _count_SR0_B2; 00318 Histo1DPtr _count_SR0_C2; 00319 Histo1DPtr _count_SR1_D; 00320 Histo1DPtr _count_SR1_E; 00321 00322 Histo1DPtr _hist_meff_SR0_A1; 00323 Histo1DPtr _hist_meff_SR0_A2; 00324 Histo1DPtr _hist_meff_SR1_D_e; 00325 Histo1DPtr _hist_meff_SR1_D_mu; 00326 Histo1DPtr _hist_met_SR0_A1; 00327 Histo1DPtr _hist_met_SR0_A2; 00328 Histo1DPtr _hist_met_SR0_D_e; 00329 Histo1DPtr _hist_met_SR0_D_mu; 00330 00331 }; 00332 00333 00334 // This global object acts as a hook for the plugin system 00335 DECLARE_RIVET_PLUGIN(ATLAS_2012_I1095236); 00336 00337 } Generated on Tue Sep 30 2014 19:45:42 for The Rivet MC analysis system by ![]() |