ATLAS_2012_I1183818.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/ChargedFinalState.hh" 00007 #include "Rivet/Projections/FastJets.hh" 00008 #include "Rivet/Tools/ParticleIdUtils.hh" 00009 00010 00011 /// @author Peter Wijeratne <paw@hep.ucl.ac.uk> 00012 /// @author Robindra Prabhu <prabhu@cern.ch> 00013 namespace Rivet { 00014 00015 // A very basic analysis sensitive to ET flow in minbias and dijet events 00016 class ATLAS_2012_I1183818 : public Analysis { 00017 00018 public: 00019 00020 ATLAS_2012_I1183818() 00021 : Analysis("ATLAS_2012_I1183818") 00022 {} 00023 00024 00025 public: 00026 00027 void init() { 00028 00029 const FinalState cnfs(-4.8, 4.8, 0*MeV); 00030 const ChargedFinalState cfs(-2.5, 2.5, 250*MeV); 00031 addProjection(cnfs, "FS"); 00032 addProjection(cfs, "CFS"); 00033 00034 const FastJets jetsAntiKt4(cnfs, FastJets::ANTIKT, 0.4); 00035 addProjection(jetsAntiKt4, "AntiKt4Jets"); 00036 00037 // ------- MINBIAS HISTOGRAMS -------- 00038 // 00039 // MB event counter 00040 m_chargedEvents = 0.0; 00041 00042 _h_ETflowEta = bookHisto1D(1, 1, 1); 00043 _h_SumETbin1 = bookHisto1D(3, 1, 1); 00044 _h_SumETbin2 = bookHisto1D(4, 1, 1); 00045 _h_SumETbin3 = bookHisto1D(5, 1, 1); 00046 _h_SumETbin4 = bookHisto1D(6, 1, 1); 00047 _h_SumETbin5 = bookHisto1D(7, 1, 1); 00048 _h_SumETbin6 = bookHisto1D(8, 1, 1); 00049 00050 // ------- DIJET HISTOGRAMS -------- 00051 // 00052 // Dijet event counter 00053 m_events_dijets = 0.0; 00054 00055 // sumET 00056 _h_transETflowEta = bookHisto1D( 2, 1, 1); 00057 _h_transSumETbin1 = bookHisto1D( 9, 1, 1); 00058 _h_transSumETbin2 = bookHisto1D(10, 1, 1); 00059 _h_transSumETbin3 = bookHisto1D(11, 1, 1); 00060 _h_transSumETbin4 = bookHisto1D(12, 1, 1); 00061 _h_transSumETbin5 = bookHisto1D(13, 1, 1); 00062 _h_transSumETbin6 = bookHisto1D(14, 1, 1); 00063 00064 00065 } 00066 00067 00068 void analyze(const Event& event) { 00069 00070 const double weight = event.weight(); 00071 00072 const FinalState& cfs = applyProjection<FinalState>(event, "CFS"); 00073 00074 bool isCharged = false; 00075 if (cfs.size() >= 2) { // event selection: > 2 charged particles with pT > 250.MeV and |eta| < 2.5 00076 isCharged = true; 00077 m_chargedEvents += weight; 00078 } 00079 00080 const FinalState& cnfs = applyProjection<FinalState>(event, "FS"); 00081 00082 ParticleVector particles; 00083 foreach( const Particle& p, cnfs.particles() ) { 00084 // enforce truth selection representing detected particle sensitivity 00085 double pp = p.momentum().p().mod(); 00086 if (PID::threeCharge(p.pdgId()) != 0 && pp < 0.5*GeV) continue; 00087 if (PID::threeCharge(p.pdgId()) == 0 && pp < 0.2*GeV) continue; 00088 00089 particles.push_back(p); 00090 } 00091 00092 00093 // get jets 00094 const FastJets& jetsAntiKt4 = applyProjection<FastJets>(event, "AntiKt4Jets"); 00095 const Jets& jets = jetsAntiKt4.jetsByPt(20.0*GeV); 00096 00097 // initialise sumET variables 00098 double sumETbin1 = 0; 00099 double sumETbin2 = 0; 00100 double sumETbin3 = 0; 00101 double sumETbin4 = 0; 00102 double sumETbin5 = 0; 00103 double sumETbin6 = 0; 00104 00105 // if (passes event selection) 00106 if (isCharged) { 00107 00108 foreach( const Particle& p, particles ) { 00109 00110 ///calculate variables 00111 double ET = p.momentum().Et()/GeV; 00112 double eta = fabs(p.momentum().eta()); 00113 00114 // fill histograms 00115 _h_ETflowEta->fill(eta, weight*ET); 00116 00117 if (eta < 0.8) sumETbin1 += ET; 00118 else if (eta < 1.6) sumETbin2 += ET; 00119 else if (eta < 2.4) sumETbin3 += ET; 00120 else if (eta < 3.2) sumETbin4 += ET; 00121 else if (eta < 4.0) sumETbin5 += ET; 00122 else if (eta <= 4.8) sumETbin6 += ET; 00123 00124 } // end of foreach 00125 00126 _h_SumETbin1->fill(sumETbin1, weight); 00127 _h_SumETbin2->fill(sumETbin2, weight); 00128 _h_SumETbin3->fill(sumETbin3, weight); 00129 _h_SumETbin4->fill(sumETbin4, weight); 00130 _h_SumETbin5->fill(sumETbin5, weight); 00131 _h_SumETbin6->fill(sumETbin6, weight); 00132 } 00133 00134 // --- do dijet analysis --- 00135 00136 if ( jets.size() >= 2 && // require at least two jets 00137 jets[0].momentum().Et() >= 20.*GeV && // require two leading jets to pass ET cuts 00138 jets[1].momentum().Et() >= 20.*GeV && 00139 fabs(jets[0].momentum().eta()) < 2.5 && // require leading jets to be central 00140 fabs(jets[1].momentum().eta()) < 2.5 && 00141 deltaPhi(jets[0], jets[1]) > 2.5 && // require back-to-back topology 00142 jets[1].momentum().Et()/jets[0].momentum().Et() >= 0.5) { //require ET-balance 00143 00144 // found an event that satisfies dijet selection, now fill histograms... 00145 // initialise dijet sumET variables 00146 double trans_sumET_bin1 = 0.; 00147 double trans_sumET_bin2 = 0.; 00148 double trans_sumET_bin3 = 0.; 00149 double trans_sumET_bin4 = 0.; 00150 double trans_sumET_bin5 = 0.; 00151 double trans_sumET_bin6 = 0.; 00152 00153 m_events_dijets += weight; 00154 00155 // loop over all particles and check their relation to leading jet 00156 foreach( const Particle& particle, particles ) { 00157 00158 // calculate variables 00159 double dPhi = deltaPhi( jets[0], particle.momentum() ); 00160 double ET = particle.momentum().Et()/GeV; 00161 double eta = fabs(particle.momentum().eta()); 00162 00163 // Transverse region 00164 if ( dPhi > 1./3.*M_PI && dPhi < 2./3.*M_PI ) { 00165 _h_transETflowEta->fill( eta, weight*ET ); 00166 if (eta < 0.8) { trans_sumET_bin1 += ET; } 00167 else if (eta < 1.6) { trans_sumET_bin2 += ET; } 00168 else if (eta < 2.4) { trans_sumET_bin3 += ET; } 00169 else if (eta < 3.2) { trans_sumET_bin4 += ET; } 00170 else if (eta < 4.0) { trans_sumET_bin5 += ET; } 00171 else if (eta <= 4.8) { trans_sumET_bin6 += ET; } 00172 } 00173 00174 } // end loop over particles 00175 00176 _h_transSumETbin1->fill( trans_sumET_bin1, weight); 00177 _h_transSumETbin2->fill( trans_sumET_bin2, weight); 00178 _h_transSumETbin3->fill( trans_sumET_bin3, weight); 00179 _h_transSumETbin4->fill( trans_sumET_bin4, weight); 00180 _h_transSumETbin5->fill( trans_sumET_bin5, weight); 00181 _h_transSumETbin6->fill( trans_sumET_bin6, weight); 00182 } // end of dijet selection cuts 00183 00184 } 00185 00186 00187 void finalize() { 00188 /// several scale factors here: 00189 /// 1. nEvents (m_chargedEvents) 00190 /// 2. phase-space (2*M_PI) 00191 /// 3. double binning due to symmetrisation (2) 00192 scale( _h_ETflowEta, 1./m_chargedEvents/(4.*M_PI) ); 00193 scale( _h_SumETbin1, 1./m_chargedEvents ); 00194 scale( _h_SumETbin2, 1./m_chargedEvents ); 00195 scale( _h_SumETbin3, 1./m_chargedEvents ); 00196 scale( _h_SumETbin4, 1./m_chargedEvents ); 00197 scale( _h_SumETbin5, 1./m_chargedEvents ); 00198 scale( _h_SumETbin6, 1./m_chargedEvents ); 00199 00200 //Dijet analysis 00201 00202 // Dijet scale factors: 00203 //1. number of events passing dijet selection 00204 //2. phase-space: 1. / 2/3*M_PI 00205 //3. double binning due to symmetrisation in |eta| plots : 1/2 00206 scale( _h_transETflowEta, 1./m_events_dijets * 1./(4./3.*M_PI) ); 00207 scale( _h_transSumETbin1, 1./m_events_dijets ); 00208 scale( _h_transSumETbin2, 1./m_events_dijets ); 00209 scale( _h_transSumETbin3, 1./m_events_dijets ); 00210 scale( _h_transSumETbin4, 1./m_events_dijets ); 00211 scale( _h_transSumETbin5, 1./m_events_dijets ); 00212 scale( _h_transSumETbin6, 1./m_events_dijets ); 00213 } 00214 00215 private: 00216 00217 // Event counts 00218 double m_chargedEvents; 00219 double m_events_dijets; 00220 00221 // Minbias-analysis: variable + histograms 00222 Histo1DPtr _h_ETflowEta; 00223 Histo1DPtr _h_SumETbin1; 00224 Histo1DPtr _h_SumETbin2; 00225 Histo1DPtr _h_SumETbin3; 00226 Histo1DPtr _h_SumETbin4; 00227 Histo1DPtr _h_SumETbin5; 00228 Histo1DPtr _h_SumETbin6; 00229 00230 // Transverse region 00231 Histo1DPtr _h_transETflowEta; 00232 Histo1DPtr _h_transSumETbin1; 00233 Histo1DPtr _h_transSumETbin2; 00234 Histo1DPtr _h_transSumETbin3; 00235 Histo1DPtr _h_transSumETbin4; 00236 Histo1DPtr _h_transSumETbin5; 00237 Histo1DPtr _h_transSumETbin6; 00238 00239 }; 00240 00241 00242 DECLARE_RIVET_PLUGIN(ATLAS_2012_I1183818); 00243 00244 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |