rivet is hosted by Hepforge, IPPP Durham
CMS_2011_S8968497.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_2011_S8968497 : public Analysis {
00010   public:
00011 
00012     CMS_2011_S8968497()
00013       : Analysis("CMS_2011_S8968497")
00014     { }
00015 
00016 
00017     void init() {
00018       FinalState fs;
00019       FastJets antikt(fs, FastJets::ANTIKT, 0.5);
00020       addProjection(antikt, "ANTIKT");
00021       _h_chi_dijet.addHistogram(2200., 7000., bookHisto1D(1, 1, 1));
00022       _h_chi_dijet.addHistogram(1800., 2200., bookHisto1D(2, 1, 1));
00023       _h_chi_dijet.addHistogram(1400., 1800., bookHisto1D(3, 1, 1));
00024       _h_chi_dijet.addHistogram(1100., 1400., bookHisto1D(4, 1, 1));
00025       _h_chi_dijet.addHistogram( 850., 1100., bookHisto1D(5, 1, 1));
00026       _h_chi_dijet.addHistogram( 650.,  850., bookHisto1D(6, 1, 1));
00027       _h_chi_dijet.addHistogram( 500.,  650., bookHisto1D(7, 1, 1));
00028       _h_chi_dijet.addHistogram( 350.,  500., bookHisto1D(8, 1, 1));
00029       _h_chi_dijet.addHistogram( 250.,  350., bookHisto1D(9, 1, 1));
00030     }
00031 
00032 
00033     void analyze(const Event& event) {
00034       const double weight = event.weight();
00035       const Jets& jets = applyProjection<JetAlg>(event, "ANTIKT").jetsByPt();
00036       if (jets.size() < 2) vetoEvent;
00037       FourMomentum j0(jets[0].momentum());
00038       FourMomentum j1(jets[1].momentum());
00039       double y0 = j0.rapidity();
00040       double y1 = j1.rapidity();
00041       if (fabs(y0+y1)/2. > 1.11) vetoEvent;
00042       double mjj = FourMomentum(j0+j1).mass();
00043       double chi = exp(fabs(y0-y1));
00044       if(chi<16.)  _h_chi_dijet.fill(mjj, chi, weight);
00045     }
00046 
00047 
00048     void finalize() {
00049       foreach (Histo1DPtr hist, _h_chi_dijet.getHistograms()) {
00050         normalize(hist);
00051       }
00052     }
00053 
00054 
00055   private:
00056 
00057     BinnedHistogram<double> _h_chi_dijet;
00058 
00059   };
00060 
00061 
00062 
00063   // The hook for the plugin system
00064   DECLARE_RIVET_PLUGIN(CMS_2011_S8968497);
00065 
00066 }