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   class CMS_2011_S8968497 : public Analysis {
00009   public:
00010     CMS_2011_S8968497() : Analysis("CMS_2011_S8968497") {}
00011 
00012     void init() {
00013       FinalState fs;
00014       FastJets antikt(fs, FastJets::ANTIKT, 0.5);
00015       addProjection(antikt, "ANTIKT");
00016       _h_chi_dijet.addHistogram(2200., 7000., bookHistogram1D(1, 1, 1));
00017       _h_chi_dijet.addHistogram(1800., 2200., bookHistogram1D(2, 1, 1));
00018       _h_chi_dijet.addHistogram(1400., 1800., bookHistogram1D(3, 1, 1));
00019       _h_chi_dijet.addHistogram(1100., 1400., bookHistogram1D(4, 1, 1));
00020       _h_chi_dijet.addHistogram( 850., 1100., bookHistogram1D(5, 1, 1));
00021       _h_chi_dijet.addHistogram( 650.,  850., bookHistogram1D(6, 1, 1));
00022       _h_chi_dijet.addHistogram( 500.,  650., bookHistogram1D(7, 1, 1));
00023       _h_chi_dijet.addHistogram( 350.,  500., bookHistogram1D(8, 1, 1));
00024       _h_chi_dijet.addHistogram( 250.,  350., bookHistogram1D(9, 1, 1));
00025     }
00026 
00027     void analyze(const Event& event) {
00028       const double weight = event.weight();
00029       const Jets& jets = applyProjection<JetAlg>(event, "ANTIKT").jetsByPt();
00030       if (jets.size() < 2) vetoEvent;
00031       FourMomentum j0(jets[0].momentum());
00032       FourMomentum j1(jets[1].momentum());
00033       double y0 = j0.rapidity();
00034       double y1 = j1.rapidity();
00035       if (fabs(y0+y1)/2. > 1.11) vetoEvent;
00036       double mjj = FourMomentum(j0+j1).mass();
00037       double chi = exp(fabs(y0-y1));
00038       _h_chi_dijet.fill(mjj, chi, weight);
00039     }
00040 
00041     void finalize() {
00042       foreach (AIDA::IHistogram1D* hist, _h_chi_dijet.getHistograms()) {
00043         normalize(hist);
00044       }
00045     }
00046 
00047   private:
00048     BinnedHistogram<double> _h_chi_dijet;
00049    };
00050 
00051   AnalysisBuilder<CMS_2011_S8968497> plugin_CMS_2011_S8968497;
00052 }
00053