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