CMS_2012_I1087342.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/FastJets.hh" 00006 00007 00008 namespace Rivet { 00009 00010 // This analysis is a derived from the class Analysis: 00011 class CMS_2012_I1087342 : public Analysis { 00012 00013 public: 00014 00015 // Constructor 00016 CMS_2012_I1087342() : Analysis("CMS_2012_I1087342") { 00017 } 00018 00019 void init() { 00020 const FinalState fs; 00021 addProjection(FastJets(fs, FastJets::ANTIKT, 0.5),"Jets"); 00022 00023 _hist_jetpt_fwdincl = bookHisto1D(1,1,1); 00024 _hist_jetpt_forward = bookHisto1D(2,1,1); 00025 _hist_jetpt_central = bookHisto1D(3,1,1); 00026 } 00027 00028 void analyze(const Event &event) { 00029 const double weight = event.weight(); 00030 00031 const FastJets &fj = applyProjection<FastJets>(event,"Jets"); 00032 const Jets jets = fj.jets(35*GeV, 150*GeV, -4.7, 4.7, ETA); 00033 00034 double cjet_pt=0.0; 00035 double fjet_pt=0.0; 00036 00037 foreach(const Jet &j, jets) { 00038 if(j.momentum().eta() > 3.2 || j.momentum().eta() < -3.2) { 00039 _hist_jetpt_fwdincl -> fill(j.momentum().pT(), weight); 00040 } 00041 double pT = j.momentum().pT()*GeV; 00042 if (fabs(j.momentum().eta()) < 2.8) { 00043 if(cjet_pt < pT) cjet_pt = pT; 00044 } 00045 if (fabs(j.momentum().eta()) < 4.7 && fabs(j.momentum().eta()) > 3.2) { 00046 if(fjet_pt < pT) fjet_pt = pT; 00047 } 00048 } 00049 00050 if (cjet_pt > 35 && fjet_pt > 35) { 00051 _hist_jetpt_forward->fill(fjet_pt, weight); 00052 _hist_jetpt_central->fill(cjet_pt, weight); 00053 } 00054 00055 } 00056 00057 void finalize() { 00058 scale(_hist_jetpt_fwdincl, crossSection() / picobarn / sumOfWeights() / 3.0); 00059 scale(_hist_jetpt_forward, crossSection() / picobarn / sumOfWeights() / 3.0); 00060 scale(_hist_jetpt_central, crossSection() / picobarn / sumOfWeights() / 5.6); 00061 } 00062 00063 00064 private: 00065 Histo1DPtr _hist_jetpt_fwdincl; 00066 Histo1DPtr _hist_jetpt_forward; 00067 Histo1DPtr _hist_jetpt_central; 00068 00069 }; 00070 00071 00072 // The hook for the plugin system 00073 DECLARE_RIVET_PLUGIN(CMS_2012_I1087342); 00074 00075 } 00076 Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |