ATLAS_2012_CONF_2012_103.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 #include "Rivet/Tools/RivetMT2.hh" 00011 00012 namespace Rivet { 00013 00014 using namespace Cuts; 00015 00016 00017 class ATLAS_2012_CONF_2012_103 : public Analysis { 00018 public: 00019 00020 /// @name Constructors etc. 00021 //@{ 00022 00023 /// Constructor 00024 ATLAS_2012_CONF_2012_103() 00025 : Analysis("ATLAS_2012_CONF_2012_103") 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 IdentifiedFinalState elecs(etaIn(-2.47, 2.47) 00041 & (pT >= 20.0*GeV)); 00042 elecs.acceptIdPair(PID::ELECTRON); 00043 addProjection(elecs, "elecs"); 00044 00045 // projection to find the muons 00046 IdentifiedFinalState muons(etaIn(-2.4, 2.4) 00047 & (pT >= 10.0*GeV)); 00048 muons.acceptIdPair(PID::MUON); 00049 addProjection(muons, "muons"); 00050 00051 // for pTmiss 00052 addProjection(VisibleFinalState(-4.9,4.9),"vfs"); 00053 00054 VetoedFinalState vfs; 00055 vfs.addVetoPairId(PID::MUON); 00056 00057 /// Jet finder 00058 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), 00059 "AntiKtJets04"); 00060 00061 /// Book histograms 00062 _etmiss_HT_7j55 = bookHisto1D("etmiss_HT_7j55", 8, 0., 16.); 00063 _etmiss_HT_8j55 = bookHisto1D("etmiss_HT_8j55", 8, 0., 16.); 00064 _etmiss_HT_9j55 = bookHisto1D("etmiss_HT_9j55", 8, 0., 16.); 00065 _etmiss_HT_6j80 = bookHisto1D("etmiss_HT_6j80", 8, 0., 16.); 00066 _etmiss_HT_7j80 = bookHisto1D("etmiss_HT_7j80", 8, 0., 16.); 00067 _etmiss_HT_8j80 = bookHisto1D("etmiss_HT_8j80", 8, 0., 16.); 00068 00069 _hist_njet55 = bookHisto1D("hist_njet55", 4, 5.5, 9.5); 00070 _hist_njet80 = bookHisto1D("hist_njet80", 4, 4.5, 8.5); 00071 00072 _count_7j55 = bookHisto1D("count_7j55", 1, 0., 1.); 00073 _count_8j55 = bookHisto1D("count_8j55", 1, 0., 1.); 00074 _count_9j55 = bookHisto1D("count_9j55", 1, 0., 1.); 00075 _count_6j80 = bookHisto1D("count_6j80", 1, 0., 1.); 00076 _count_7j80 = bookHisto1D("count_7j80", 1, 0., 1.); 00077 _count_8j80 = bookHisto1D("count_8j80", 1, 0., 1.); 00078 00079 } 00080 00081 00082 /// Perform the per-event analysis 00083 void analyze(const Event& event) { 00084 const double weight = event.weight(); 00085 00086 // get the jet candidates 00087 Jets cand_jets; 00088 foreach (const Jet& jet, 00089 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) { 00090 if ( fabs( jet.eta() ) < 2.8 ) { 00091 cand_jets.push_back(jet); 00092 } 00093 } 00094 00095 // candidate muons 00096 Particles cand_mu = 00097 applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt(); 00098 00099 // candidate electrons 00100 Particles cand_e = 00101 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt(); 00102 00103 // resolve jet/lepton ambiguity 00104 Jets recon_jets; 00105 foreach ( const Jet& jet, cand_jets ) { 00106 // candidates after |eta| < 2.8 00107 if ( fabs( jet.eta() ) >= 2.8 ) continue; 00108 bool away_from_e = true; 00109 foreach ( const Particle & e, cand_e ) { 00110 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) { 00111 away_from_e = false; 00112 break; 00113 } 00114 } 00115 if ( away_from_e ) recon_jets.push_back( jet ); 00116 } 00117 00118 // only keep electrons more than R=0.4 from jets 00119 Particles recon_e; 00120 foreach ( const Particle & e, cand_e ) { 00121 bool away = true; 00122 foreach ( const Jet& jet, recon_jets ) { 00123 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) { 00124 away = false; 00125 break; 00126 } 00127 } 00128 if ( away ) 00129 recon_e.push_back( e ); 00130 } 00131 00132 // only keep muons more than R=0.4 from jets 00133 Particles recon_mu; 00134 foreach ( const Particle & mu, cand_mu ) { 00135 bool away = true; 00136 foreach ( const Jet& jet, recon_jets ) { 00137 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) { 00138 away = false; 00139 break; 00140 } 00141 } 00142 if ( away ) 00143 recon_mu.push_back( mu ); 00144 } 00145 00146 // pTmiss 00147 Particles vfs_particles = 00148 applyProjection<VisibleFinalState>(event, "vfs").particles(); 00149 FourMomentum pTmiss; 00150 foreach ( const Particle & p, vfs_particles ) { 00151 pTmiss -= p.momentum(); 00152 } 00153 double eTmiss = pTmiss.pT(); 00154 00155 // now only use recon_jets, recon_mu, recon_e 00156 00157 // reject events with electrons and muons 00158 if ( ! ( recon_mu.empty() && recon_e.empty() ) ) { 00159 MSG_DEBUG("Charged leptons left after selection"); 00160 vetoEvent; 00161 } 00162 00163 // calculate H_T 00164 double HT=0; 00165 foreach ( const Jet& jet, recon_jets ) { 00166 if ( jet.pT() > 40 * GeV ) 00167 HT += jet.pT() ; 00168 } 00169 00170 // number of jets 00171 unsigned int njet55=0, njet80=0; 00172 for (unsigned int ix=0;ix<recon_jets.size();++ix) { 00173 if(recon_jets[ix].pT()>80.*GeV) ++njet80; 00174 if(recon_jets[ix].pT()>55.*GeV) ++njet55; 00175 } 00176 00177 double ratio = eTmiss/sqrt(HT); 00178 00179 if(ratio>4.) { 00180 if(njet55>9) njet55 = 9; 00181 if(njet80>8) njet80 = 8; 00182 _hist_njet55->fill(njet55,weight); 00183 _hist_njet80->fill(njet80,weight); 00184 // 7j55 00185 if(njet55>=7) 00186 _count_7j55->fill( 0.5, weight); 00187 // 8j55 00188 if(njet55>=8) 00189 _count_8j55->fill( 0.5, weight) ; 00190 // 8j55 00191 if(njet55==9) 00192 _count_9j55->fill( 0.5, weight) ; 00193 // 6j80 00194 if(njet80>=6) 00195 _count_6j80->fill( 0.5, weight) ; 00196 // 7j80 00197 if(njet80>=7) 00198 _count_7j80->fill( 0.5, weight) ; 00199 // 8j80 00200 if(njet80==8) 00201 _count_8j80->fill( 0.5, weight) ; 00202 } 00203 00204 if(njet55>=7) 00205 _etmiss_HT_7j55->fill( ratio, weight); 00206 // 8j55 00207 if(njet55>=8) 00208 _etmiss_HT_8j55->fill( ratio, weight) ; 00209 // 8j55 00210 if(njet55>=9) 00211 _etmiss_HT_9j55->fill( ratio, weight) ; 00212 // 6j80 00213 if(njet80>=6) 00214 _etmiss_HT_6j80->fill( ratio, weight) ; 00215 // 7j80 00216 if(njet80>=7) 00217 _etmiss_HT_7j80->fill( ratio, weight) ; 00218 // 8j80 00219 if(njet80>=8) 00220 _etmiss_HT_8j80->fill( ratio, weight) ; 00221 00222 } 00223 00224 //@} 00225 00226 void finalize() { 00227 double norm = crossSection()/femtobarn*5.8/sumOfWeights(); 00228 00229 scale(_etmiss_HT_7j55,2.*norm); 00230 scale(_etmiss_HT_8j55,2.*norm); 00231 scale(_etmiss_HT_9j55,2.*norm); 00232 scale(_etmiss_HT_6j80,2.*norm); 00233 scale(_etmiss_HT_7j80,2.*norm); 00234 scale(_etmiss_HT_8j80,2.*norm); 00235 00236 scale(_hist_njet55,norm); 00237 scale(_hist_njet80,norm); 00238 00239 scale(_count_7j55,norm); 00240 scale(_count_8j55,norm); 00241 scale(_count_9j55,norm); 00242 scale(_count_6j80,norm); 00243 scale(_count_7j80,norm); 00244 scale(_count_8j80,norm); 00245 } 00246 00247 private: 00248 00249 /// @name Histograms 00250 //@{ 00251 Histo1DPtr _etmiss_HT_7j55; 00252 Histo1DPtr _etmiss_HT_8j55; 00253 Histo1DPtr _etmiss_HT_9j55; 00254 Histo1DPtr _etmiss_HT_6j80; 00255 Histo1DPtr _etmiss_HT_7j80; 00256 Histo1DPtr _etmiss_HT_8j80; 00257 00258 Histo1DPtr _hist_njet55; 00259 Histo1DPtr _hist_njet80; 00260 00261 Histo1DPtr _count_7j55; 00262 Histo1DPtr _count_8j55; 00263 Histo1DPtr _count_9j55; 00264 Histo1DPtr _count_6j80; 00265 Histo1DPtr _count_7j80; 00266 Histo1DPtr _count_8j80; 00267 //@} 00268 00269 }; 00270 00271 // The hook for the plugin system 00272 DECLARE_RIVET_PLUGIN(ATLAS_2012_CONF_2012_103); 00273 00274 } Generated on Tue Sep 30 2014 19:45:42 for The Rivet MC analysis system by ![]() |