ATLAS_2012_I1126136.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/VetoedFinalState.hh" 00009 #include "Rivet/Projections/FastJets.hh" 00010 #include "Rivet/Tools/RivetMT2.hh" 00011 00012 namespace Rivet { 00013 00014 00015 class ATLAS_2012_I1126136 : public Analysis { 00016 public: 00017 00018 /// @name Constructors etc. 00019 //@{ 00020 00021 /// Constructor 00022 00023 ATLAS_2012_I1126136() 00024 : Analysis("ATLAS_2012_I1126136") 00025 { } 00026 00027 //@} 00028 00029 00030 public: 00031 00032 /// @name Analysis methods 00033 //@{ 00034 00035 /// Book histograms and initialize projections before the run 00036 void init() { 00037 00038 // projection to find the electrons 00039 IdentifiedFinalState elecs(EtaIn(-2.47, 2.47) 00040 & (Cuts::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 & (Cuts::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), 00054 "AntiKtJets04"); 00055 00056 // for pTmiss 00057 addProjection(VisibleFinalState(-4.9,4.9),"vfs"); 00058 00059 // Book histograms 00060 _count_SR_A = bookHisto1D("count_SR_A" , 1, 0., 1.); 00061 _count_SR_B = bookHisto1D("count_SR_B" , 1, 0., 1.); 00062 00063 _hist_mjjj1 = bookHisto1D("hist_mjjj1" , 30 , 0. , 600. ); 00064 _hist_mjjj2 = bookHisto1D("hist_mjjj2" , 30 , 0. , 600. ); 00065 _hist_ETmiss = bookHisto1D("hist_ETmiss", 20 , 100. , 600. ); 00066 _hist_mT2 = bookHisto1D("hist_mT2" , 200, 0. , 1000. ); 00067 00068 } 00069 00070 /// Perform the per-event analysis 00071 void analyze(const Event& event) { 00072 const double weight = event.weight(); 00073 00074 // pTmiss 00075 FourMomentum pTmiss; 00076 foreach ( const Particle & p, 00077 applyProjection<VisibleFinalState>(event, "vfs").particles() ) { 00078 pTmiss -= p.momentum(); 00079 } 00080 double ETmiss = pTmiss.perp(); 00081 00082 // require eTmiss > 150 00083 if(ETmiss<150.) vetoEvent; 00084 00085 // get the candiate jets 00086 Jets cand_jets; 00087 foreach ( const Jet& jet, 00088 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00089 if ( fabs( jet.eta() ) < 4.5 ) { 00090 cand_jets.push_back(jet); 00091 } 00092 } 00093 00094 // find the electrons 00095 Particles cand_e; 00096 foreach( const Particle & e, 00097 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt()) { 00098 // remove any leptons within 0.4 of any candidate jets 00099 bool e_near_jet = false; 00100 foreach ( const Jet& jet, cand_jets ) { 00101 double dR = deltaR(e.momentum(),jet.momentum()); 00102 if ( dR < 0.4 && dR > 0.2 ) { 00103 e_near_jet = true; 00104 break; 00105 } 00106 } 00107 if ( e_near_jet ) continue; 00108 cand_e.push_back(e); 00109 } 00110 00111 // find the muons 00112 Particles cand_mu; 00113 foreach( const Particle & mu, 00114 applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt()) { 00115 // remove any leptons within 0.4 of any candidate jets 00116 bool mu_near_jet = false; 00117 foreach ( const Jet& jet, cand_jets ) { 00118 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00119 mu_near_jet = true; 00120 break; 00121 } 00122 } 00123 if ( mu_near_jet ) continue; 00124 cand_mu.push_back(mu); 00125 } 00126 00127 // veto events with leptons 00128 if( ! cand_e.empty() || ! cand_mu.empty() ) 00129 vetoEvent; 00130 00131 // discard jets that overlap with electrons 00132 Jets recon_jets; 00133 foreach ( const Jet& jet, cand_jets ) { 00134 if(fabs(jet.eta())>2.8 || 00135 jet.momentum().perp()<30.) continue; 00136 bool away_from_e = true; 00137 foreach ( const Particle & e, cand_e ) { 00138 if ( deltaR(e.momentum(),jet.momentum()) < 0.2 ) { 00139 away_from_e = false; 00140 break; 00141 } 00142 } 00143 if ( away_from_e ) recon_jets.push_back( jet ); 00144 } 00145 00146 // find b jets 00147 Jets tight_bjets,loose_bjets; 00148 foreach(const Jet & jet, recon_jets) { 00149 if(!jet.containsBottom() && jet.eta()>2.5) continue; 00150 double prob = rand()/static_cast<double>(RAND_MAX); 00151 if(prob <= 0.60) tight_bjets.push_back(jet); 00152 if(prob <= 0.75) loose_bjets.push_back(jet); 00153 } 00154 00155 // require >=1 tight or >=2 loose b-jets 00156 if( ! ( !tight_bjets.empty() || loose_bjets.size()>=2) ) 00157 vetoEvent; 00158 00159 // must be at least 6 jets with pT>30 00160 if(recon_jets.size()<6 ) vetoEvent; 00161 00162 // hardest > 130 00163 if(recon_jets[0].momentum().perp() < 130. ) vetoEvent; 00164 00165 // three hardest jets must be separated from etmiss 00166 for(unsigned int ix=0;ix<3;++ix) { 00167 if(deltaPhi(recon_jets[ix].momentum(),pTmiss)<0.2*PI) 00168 vetoEvent; 00169 } 00170 00171 // remove events with tau like jets 00172 for(unsigned int ix=3;ix<recon_jets.size();++ix) { 00173 // skip jets seperated from eTmiss 00174 if(deltaPhi(recon_jets[ix].momentum(),pTmiss)>=0.2*PI) 00175 continue; 00176 // check the number of tracks between 1 and 4 00177 unsigned int ncharged=0; 00178 foreach ( const Particle & particle, recon_jets[ix].particles()) { 00179 if(PID::threeCharge(particle.pdgId())!=0) ++ncharged; 00180 } 00181 if(ncharged==0 || ncharged>4) continue; 00182 // calculate transverse mass and reject if < 100 00183 double mT = 2.*recon_jets[ix].momentum().perp()*ETmiss 00184 -recon_jets[ix].momentum().x()*pTmiss.x() 00185 -recon_jets[ix].momentum().y()*pTmiss.y(); 00186 if(mT<100.) vetoEvent; 00187 } 00188 00189 // if 2 loose b-jets apply mT cut 00190 if(loose_bjets.size()>=2) { 00191 // find b-jet closest to eTmiss 00192 double minR(1e30); 00193 unsigned int ijet(0); 00194 for(unsigned int ix=0;ix<loose_bjets.size();++ix) { 00195 double dR = deltaR(loose_bjets[ix].momentum(),pTmiss); 00196 if(dR<minR) { 00197 minR=dR; 00198 ijet = ix; 00199 } 00200 } 00201 double mT = 2.*loose_bjets[ijet].momentum().perp()*ETmiss 00202 -loose_bjets[ijet].momentum().x()*pTmiss.x() 00203 -loose_bjets[ijet].momentum().y()*pTmiss.y(); 00204 if(mT<170.) vetoEvent; 00205 } 00206 00207 // 1 tight b-jet apply mT cut 00208 if(tight_bjets.size()==1) { 00209 for(unsigned int ix=0;ix<4;++ix) { 00210 double mT = 2.*recon_jets[ix].momentum().perp()*ETmiss 00211 -recon_jets[ix].momentum().x()*pTmiss.x() 00212 -recon_jets[ix].momentum().y()*pTmiss.y(); 00213 if(mT<175.) vetoEvent; 00214 } 00215 } 00216 00217 // find the closest triplet of jets in (eta,phi) 00218 unsigned int j1(0),j2(0),j3(0); 00219 double minR2(1e30); 00220 for(unsigned int i1=0;i1<recon_jets.size();++i1) { 00221 for(unsigned int i2=i1+1;i2<recon_jets.size();++i2) { 00222 for(unsigned int i3=i2+1;i3<recon_jets.size();++i3) { 00223 double delR2 = 00224 sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i2].momentum())) + 00225 sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i3].momentum())) + 00226 sqr(deltaR(recon_jets[i2].momentum(),recon_jets[i3].momentum())); 00227 if(delR2<minR2) { 00228 minR2=delR2; 00229 j1=i1; 00230 j2=i2; 00231 j3=i3; 00232 } 00233 } 00234 } 00235 } 00236 // 4-momentum and mass of first triplet 00237 FourMomentum pjjj1 = recon_jets[j1].momentum() + 00238 recon_jets[j2].momentum()+ recon_jets[j3].momentum(); 00239 double mjjj1 = pjjj1.mass(); 00240 00241 // find the second triplet 00242 unsigned int j4(0),j5(0),j6(0); 00243 minR2=0.; 00244 for(unsigned int i1=0;i1<recon_jets.size();++i1) { 00245 if(i1==j1||i1==j2||i1==j3) continue; 00246 for(unsigned int i2=i1+1;i2<recon_jets.size();++i2) { 00247 if(i2==j1||i2==j2||i2==j3) continue; 00248 for(unsigned int i3=i2+1;i3<recon_jets.size();++i3) { 00249 if(i3==j1||i3==j2||i3==j3) continue; 00250 double delR2 = 00251 sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i2].momentum())) + 00252 sqr(deltaR(recon_jets[i1].momentum(),recon_jets[i3].momentum())) + 00253 sqr(deltaR(recon_jets[i2].momentum(),recon_jets[i3].momentum())); 00254 if(delR2<minR2) { 00255 minR2=delR2; 00256 j4=i1; 00257 j5=i2; 00258 j6=i3; 00259 } 00260 } 00261 } 00262 } 00263 00264 // 4-momentum and mass of first triplet 00265 FourMomentum pjjj2 = recon_jets[j4].momentum() + 00266 recon_jets[j5].momentum()+ recon_jets[j6].momentum(); 00267 double mjjj2 = pjjj2.mass(); 00268 00269 _hist_mjjj1->fill(mjjj1,weight); 00270 _hist_mjjj2->fill(mjjj2,weight); 00271 // require triplets in 80<mjjj<270 00272 if(mjjj1<80.||mjjj1>270.||mjjj2<80.||mjjj2>270.) 00273 vetoEvent; 00274 00275 // counts in signal regions 00276 _count_SR_A->fill(0.5,weight); 00277 if(ETmiss>260.) _count_SR_B->fill(0.5,weight); 00278 00279 _hist_ETmiss->fill(ETmiss,weight); 00280 double m_T2 = mT2::mT2( pjjj1,pjjj2, 00281 pTmiss,0.0 ); // zero mass invisibles 00282 _hist_mT2->fill(m_T2,weight); 00283 } 00284 //@} 00285 00286 00287 void finalize() { 00288 00289 double norm = 4.7* crossSection()/sumOfWeights()/femtobarn; 00290 scale(_count_SR_A , norm ); 00291 scale(_count_SR_B , norm ); 00292 scale(_hist_mjjj1 , 20.*norm ); 00293 scale(_hist_ETmiss, 50.*norm ); 00294 scale(_hist_mjjj2 , 20.*norm ); 00295 scale(_hist_mT2 , norm ); 00296 00297 } 00298 00299 private: 00300 00301 /// @name Histograms 00302 //@{ 00303 Histo1DPtr _count_SR_A; 00304 Histo1DPtr _count_SR_B; 00305 00306 Histo1DPtr _hist_mjjj1; 00307 Histo1DPtr _hist_mjjj2; 00308 Histo1DPtr _hist_ETmiss; 00309 Histo1DPtr _hist_mT2; 00310 //@} 00311 00312 }; 00313 00314 // The hook for the plugin system 00315 DECLARE_RIVET_PLUGIN(ATLAS_2012_I1126136); 00316 00317 } Generated on Thu Feb 6 2014 17:38:42 for The Rivet MC analysis system by ![]() |