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   class CMS_2015_I1327224 : public Analysis {
00008   public:
00009 
00010     CMS_2015_I1327224()
00011       : Analysis("CMS_2015_I1327224")
00012     { }
00013 
00014     void init() {
00015       FinalState fs;
00016       FastJets antikt(fs, FastJets::ANTIKT, 0.5);
00017       addProjection(antikt, "ANTIKT");
00018       _h_chi_dijet.addHistogram(4200., 8000., bookHisto1D(1, 1, 1));
00019       _h_chi_dijet.addHistogram(3600., 4200., bookHisto1D(2, 1, 1));
00020       _h_chi_dijet.addHistogram(3000., 3600., bookHisto1D(3, 1, 1));
00021       _h_chi_dijet.addHistogram(2400., 3000., bookHisto1D(4, 1, 1));
00022       _h_chi_dijet.addHistogram(1900., 2400., bookHisto1D(5, 1, 1));
00023     }
00024 
00025     void analyze(const Event& event) {
00026       const double weight = event.weight();
00027       const Jets& jets = applyProjection<JetAlg>(event, "ANTIKT").jetsByPt();
00028       if (jets.size() < 2) vetoEvent;
00029 
00030       FourMomentum j0(jets[0].momentum());
00031       FourMomentum j1(jets[1].momentum());
00032       double y0 = j0.rapidity();
00033       double y1 = j1.rapidity();
00034       if (fabs(y0 + y1) / 2. > 1.11) vetoEvent;
00035 
00036       double mjj = FourMomentum(j0 + j1).mass();
00037       if (mjj/GeV <1900) vetoEvent;
00038 
00039       double chi = exp(fabs(y0 - y1));
00040       if (chi >= 16.) vetoEvent;
00041      
00042       // Fill the histogram 
00043       _h_chi_dijet.fill(mjj/GeV, chi, weight);
00044     }
00045 
00046     void finalize() {
00047       foreach (Histo1DPtr hist, _h_chi_dijet.getHistograms()) {
00048         normalize(hist);
00049       }
00050     }
00051 
00052   private:
00053     BinnedHistogram<double> _h_chi_dijet;
00054   };
00055 
00056   // The hook for the plugin system
00057   DECLARE_RIVET_PLUGIN(CMS_2015_I1327224);
00058 }