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