CMS_2011_S9215166.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/Projections/VetoedFinalState.hh" 00009 00010 namespace Rivet { 00011 00012 00013 class CMS_2011_S9215166 : public Analysis { 00014 public: 00015 00016 /// Constructor 00017 CMS_2011_S9215166() : Analysis("CMS_2011_S9215166"), _weightMB(0.), _weightDiJet(0.) { } 00018 00019 00020 void init() { 00021 const FinalState fs(-6.0, 6.0, 0.0*GeV); 00022 addProjection(fs, "FS"); 00023 addProjection(FastJets(fs, FastJets::ANTIKT, 0.5), "Jets"); 00024 00025 VetoedFinalState fsv(fs); 00026 fsv.vetoNeutrinos(); 00027 fsv.addVetoPairDetail(MUON, 0.0*GeV, 99999.9*GeV); 00028 addProjection(fsv, "fsv"); 00029 00030 // For the MB ND selection 00031 const ChargedFinalState fschrgd(-6.0,6.0,0.0*GeV); 00032 addProjection(fschrgd, "fschrgd"); 00033 VetoedFinalState fschrgdv(fschrgd); 00034 fschrgdv.vetoNeutrinos(); 00035 addProjection(fschrgdv, "fschrgdv"); 00036 00037 if (fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) { 00038 _hist_mb = bookHisto1D(1, 1, 1); // energy flow in MB, 0.9 TeV 00039 _hist_dijet = bookHisto1D(2, 1, 1); // energy flow in dijet events, 0.9 TeV 00040 } else if (fuzzyEquals(sqrtS()/GeV, 7000, 1E-3)) { 00041 _hist_mb = bookHisto1D(3, 1, 1); // energy flow in MB, 7 TeV 00042 _hist_dijet = bookHisto1D(4, 1, 1); // energy flow in dijet events, 7 TeV 00043 } 00044 } 00045 00046 00047 void analyze(const Event& event) { 00048 const double weight = event.weight(); 00049 00050 // Skip if the event is empty 00051 const FinalState& fsv = applyProjection<FinalState>(event, "fsv"); 00052 if (fsv.empty()) vetoEvent; 00053 00054 // Veto diffractive topologies according to defined hadron level 00055 double count_chrg_forward = 0; 00056 double count_chrg_backward = 0; 00057 const FinalState& fschrgdv = applyProjection<FinalState>(event, "fschrgdv"); 00058 foreach (const Particle& p, fschrgdv.particles()) { 00059 if (3.9 < p.momentum().eta() && p.momentum().eta() < 4.4) count_chrg_forward++; 00060 if (-4.4 < p.momentum().eta() && p.momentum().eta() < -3.9) count_chrg_backward++; 00061 } 00062 if (count_chrg_forward == 0 || count_chrg_backward == 0) vetoEvent; 00063 /// @todo "Diffractive" veto should really also veto dijet events? 00064 00065 00066 // MINIMUM BIAS EVENTS 00067 _weightMB += weight; 00068 foreach (const Particle& p, fsv.particles()) { 00069 _hist_mb->fill(fabs(p.momentum().eta()), weight*p.momentum().E()/GeV); 00070 } 00071 00072 00073 // DIJET EVENTS 00074 double PTCUT = -1.0; 00075 if (fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) PTCUT = 8.0*GeV; 00076 else if (fuzzyEquals(sqrtS()/GeV, 7000, 1E-3)) PTCUT = 20.0*GeV; 00077 const FastJets& jetpro = applyProjection<FastJets>(event, "Jets"); 00078 const Jets jets = jetpro.jetsByPt(PTCUT); 00079 if (jets.size() >= 2) { 00080 // eta cut for the central jets 00081 if (fabs(jets[0].momentum().eta()) < 2.5 && fabs(jets[1].momentum().eta()) < 2.5) { 00082 // Back to back condition of the jets 00083 const double diffphi = deltaPhi(jets[1].momentum().phi(), jets[0].momentum().phi()); 00084 if (diffphi-PI < 1.0) { 00085 _weightDiJet += weight; 00086 foreach (const Particle& p, fsv.particles()) { 00087 _hist_dijet->fill(fabs(p.momentum().eta()), weight*p.momentum().E()/GeV); 00088 } 00089 } 00090 } 00091 } 00092 00093 } 00094 00095 00096 void finalize() { 00097 scale(_hist_mb , 0.5/_weightMB ); 00098 scale(_hist_dijet, 0.5/_weightDiJet); 00099 } 00100 00101 00102 private: 00103 00104 Histo1DPtr _hist_mb, _hist_dijet; 00105 double _weightMB,_weightDiJet; 00106 00107 }; 00108 00109 00110 // Hook for the plugin system 00111 DECLARE_RIVET_PLUGIN(CMS_2011_S9215166); 00112 00113 } Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |