rivet is hosted by Hepforge, IPPP Durham
CMS_2012_I1090423.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_2012_I1090423 : public Analysis {
00010   public:
00011 
00012     CMS_2012_I1090423()
00013       : Analysis("CMS_2012_I1090423")
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(3000, 7000, bookHisto1D(1, 1, 1));
00022       _h_chi_dijet.addHistogram(2400, 3000, bookHisto1D(2, 1, 1));
00023       _h_chi_dijet.addHistogram(1900, 2400, bookHisto1D(3, 1, 1));
00024       _h_chi_dijet.addHistogram(1500, 1900, bookHisto1D(4, 1, 1));
00025       _h_chi_dijet.addHistogram(1200, 1500, bookHisto1D(5, 1, 1));
00026       _h_chi_dijet.addHistogram(1000, 1200, bookHisto1D(6, 1, 1));
00027       _h_chi_dijet.addHistogram( 800, 1000, bookHisto1D(7, 1, 1));
00028       _h_chi_dijet.addHistogram( 600,  800, bookHisto1D(8, 1, 1));
00029       _h_chi_dijet.addHistogram( 400,  600, bookHisto1D(9, 1, 1));
00030     }
00031 
00032 
00033     void analyze(const Event& event) {
00034       const Jets& jets = applyProjection<JetAlg>(event, "ANTIKT").jetsByPt();
00035       if (jets.size() < 2) vetoEvent;
00036 
00037       const double y0 = jets[0].rapidity();
00038       const double y1 = jets[1].rapidity();
00039       if (fabs(y0+y1)/2 > 1.11) vetoEvent;
00040 
00041       const double chi = exp(fabs(y0-y1));
00042       if (chi > 16) vetoEvent;
00043 
00044       const FourMomentum jj = jets[0].momentum() + jets[1].momentum();
00045        _h_chi_dijet.fill(jj.mass(), chi, event.weight());
00046     }
00047 
00048 
00049     void finalize() {
00050       foreach (Histo1DPtr hist, _h_chi_dijet.getHistograms()) {
00051         normalize(hist);
00052       }
00053     }
00054 
00055 
00056   private:
00057 
00058     BinnedHistogram<double> _h_chi_dijet;
00059 
00060   };
00061 
00062 
00063 
00064   // The hook for the plugin system
00065   DECLARE_RIVET_PLUGIN(CMS_2012_I1090423);
00066 
00067 }