rivet is hosted by Hepforge, IPPP Durham
CMS_2012_I1087342.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FinalState.hh"
00004 #include "Rivet/Projections/FastJets.hh"
00005 
00006 
00007 namespace Rivet {
00008 
00009   // This analysis is a derived from the class Analysis:
00010   class CMS_2012_I1087342 : public Analysis {
00011 
00012   public:
00013 
00014     // Constructor
00015     CMS_2012_I1087342() : Analysis("CMS_2012_I1087342") {
00016     }
00017 
00018     void init() {
00019       const FinalState fs;
00020       addProjection(FastJets(fs, FastJets::ANTIKT, 0.5),"Jets");
00021 
00022       _hist_jetpt_fwdincl = bookHisto1D(1,1,1);
00023       _hist_jetpt_forward = bookHisto1D(2,1,1);
00024       _hist_jetpt_central = bookHisto1D(3,1,1);
00025     }
00026 
00027     void analyze(const Event& event) {
00028       const double weight = event.weight();
00029 
00030       const FastJets& fj = applyProjection<FastJets>(event,"Jets");
00031       const Jets jets = fj.jets(35*GeV, 150*GeV, -4.7, 4.7, ETARAP);
00032 
00033       double cjet_pt = 0.0;
00034       double fjet_pt = 0.0;
00035 
00036       foreach(const Jet& j, jets) {
00037         double pT = j.pT();
00038         if (j.eta() > 3.2 || j.eta() < -3.2) {
00039           _hist_jetpt_fwdincl->fill(j.pT()/GeV, weight);
00040         }
00041         if (fabs(j.eta()) < 2.8) {
00042           if (cjet_pt < pT) cjet_pt = pT;
00043         }
00044         if (fabs(j.eta()) < 4.7  && fabs(j.eta()) > 3.2) {
00045           if (fjet_pt < pT) fjet_pt = pT;
00046         }
00047       }
00048 
00049       if (cjet_pt > 35*GeV && fjet_pt > 35*GeV) {
00050         _hist_jetpt_forward->fill(fjet_pt/GeV, weight);
00051         _hist_jetpt_central->fill(cjet_pt/GeV, weight);
00052       }
00053 
00054     }
00055 
00056     void finalize() {
00057       scale(_hist_jetpt_fwdincl, crossSection() / picobarn / sumOfWeights() / 3.0);
00058       scale(_hist_jetpt_forward, crossSection() / picobarn / sumOfWeights() / 3.0);
00059       scale(_hist_jetpt_central, crossSection() / picobarn / sumOfWeights() / 5.6);
00060     }
00061 
00062 
00063   private:
00064 
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