rivet is hosted by Hepforge, IPPP Durham
CDF_2000_S4266730.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FinalState.hh"
00004 #include "Rivet/Projections/FastJets.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   /// @brief CDF dijet cross-section, differential in dijet mass
00010   class CDF_2000_S4266730 : public Analysis {
00011   public:
00012 
00013     /// @name Constructors etc.
00014     //@{
00015 
00016     /// Constructor
00017     CDF_2000_S4266730()
00018       : Analysis("CDF_2000_S4266730")
00019     {    }
00020 
00021     //@}
00022 
00023 
00024   public:
00025 
00026     /// @name Analysis methods
00027     //@{
00028 
00029     /// Book histograms and initialise projections before the run
00030     void init() {
00031       FinalState fs(-4.2, 4.2);
00032       addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "Jets");
00033 
00034       _h_mjj = bookHisto1D(1, 1, 1);
00035 
00036     }
00037 
00038 
00039     /// Perform the per-event analysis
00040     void analyze(const Event& event) {
00041       const double weight = event.weight();
00042 
00043       Jets jets = applyProjection<FastJets>(event, "Jets").jetsByEt();
00044       if (jets.size()<2) {
00045         vetoEvent;
00046       }
00047       FourMomentum jet1 = jets[0].momentum();
00048       FourMomentum jet2 = jets[1].momentum();
00049       double eta1 = jet1.eta();
00050       double eta2 = jet2.eta();
00051       if (fabs(eta1)>2.0 || fabs(eta2)>2.0) {
00052         vetoEvent;
00053       }
00054       if (fabs(tanh((eta1-eta2)/2))>2.0/3.0) {
00055         vetoEvent;
00056       }
00057       double mjj = FourMomentum(jet1+jet2).mass()/GeV;
00058       if (mjj<180.0) {
00059         vetoEvent;
00060       }
00061       _h_mjj->fill(mjj, weight);
00062 
00063     }
00064 
00065 
00066     /// Normalise histograms etc., after the run
00067     void finalize() {
00068       scale(_h_mjj, crossSection()/picobarn/sumOfWeights());
00069     }
00070 
00071     //@}
00072   private:
00073 
00074     /// @name Histograms
00075     //@{
00076     Histo1DPtr _h_mjj;
00077     //@}
00078 
00079   };
00080 
00081 
00082 
00083   // The hook for the plugin system
00084   DECLARE_RIVET_PLUGIN(CDF_2000_S4266730);
00085 
00086 }