rivet is hosted by Hepforge, IPPP Durham
CMS_2015_I1327224.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FastJets.hh"
00004 #include "Rivet/Tools/BinnedHistogram.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   class CMS_2015_I1327224 : public Analysis {
00010   public:
00011 
00012     DEFAULT_RIVET_ANALYSIS_CTOR(CMS_2015_I1327224);
00013 
00014 
00015     void init() {
00016       FinalState fs;
00017       FastJets antikt(fs, FastJets::ANTIKT, 0.5);
00018       declare(antikt, "ANTIKT");
00019       _h_chi_dijet.addHistogram(4200., 8000., bookHisto1D(1, 1, 1));
00020       _h_chi_dijet.addHistogram(3600., 4200., bookHisto1D(2, 1, 1));
00021       _h_chi_dijet.addHistogram(3000., 3600., bookHisto1D(3, 1, 1));
00022       _h_chi_dijet.addHistogram(2400., 3000., bookHisto1D(4, 1, 1));
00023       _h_chi_dijet.addHistogram(1900., 2400., bookHisto1D(5, 1, 1));
00024     }
00025 
00026 
00027     void analyze(const Event& event) {
00028       const double weight = event.weight();
00029       const Jets& jets = apply<JetAlg>(event, "ANTIKT").jetsByPt();
00030       if (jets.size() < 2) vetoEvent;
00031 
00032       FourMomentum j0(jets[0].momentum());
00033       FourMomentum j1(jets[1].momentum());
00034       double y0 = j0.rapidity();
00035       double y1 = j1.rapidity();
00036       if (fabs(y0 + y1) / 2. > 1.11) vetoEvent;
00037 
00038       double mjj = FourMomentum(j0 + j1).mass();
00039       if (mjj/GeV <1900) vetoEvent;
00040 
00041       double chi = exp(fabs(y0 - y1));
00042       if (chi >= 16.) vetoEvent;
00043 
00044       // Fill the histogram
00045       _h_chi_dijet.fill(mjj/GeV, chi, weight);
00046     }
00047 
00048     void finalize() {
00049       foreach (Histo1DPtr hist, _h_chi_dijet.getHistograms()) {
00050         normalize(hist);
00051       }
00052     }
00053 
00054   private:
00055     BinnedHistogram<double> _h_chi_dijet;
00056   };
00057 
00058   // The hook for the plugin system
00059   DECLARE_RIVET_PLUGIN(CMS_2015_I1327224);
00060 }