rivet is hosted by Hepforge, IPPP Durham
CDF_1996_S3108457.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 #include "Rivet/Projections/SmearedJets.hh"
00006 
00007 namespace Rivet {
00008 
00009 
00010   /// @brief CDF properties of high-mass multi-jet events
00011   class CDF_1996_S3108457 : public Analysis {
00012   public:
00013 
00014     /// @name Constructors etc.
00015     //@{
00016 
00017     /// Constructor
00018     CDF_1996_S3108457()
00019       : Analysis("CDF_1996_S3108457")
00020     {    }
00021 
00022     //@}
00023 
00024 
00025     /// @name Analysis methods
00026     //@{
00027 
00028     /// Book histograms and initialise projections before the run
00029     void init() {
00030 
00031       /// Initialise and register projections here
00032       const FinalState fs(-4.2, 4.2);
00033 
00034       FastJets fj(fs, FastJets::CDFJETCLU, 0.7);
00035       declare(fj, "Jets");
00036 
00037       // Smear Energy and mass with the 10% uncertainty quoted in the paper
00038       SmearedJets sj_E(fj, [](const Jet& jet){ return P4_SMEAR_MASS_GAUSS(P4_SMEAR_E_GAUSS(jet, 0.1*jet.E()), 0.1*jet.mass()); });
00039       declare(sj_E, "SmearedJets_E");
00040 
00041 
00042       /// Book histograms here, e.g.:
00043       for (size_t i=0; i<5; ++i) {
00044         _h_m[i] = bookHisto1D(1+i, 1, 1);
00045         _h_costheta[i] = bookHisto1D(10+i, 1, 1);
00046         _h_pT[i] = bookHisto1D(15+i, 1, 1);
00047       }
00048       /// @todo Ratios of mass histograms left out: Binning doesn't work out
00049     }
00050 
00051 
00052     /// Perform the per-event analysis
00053     void analyze(const Event& event) {
00054       const double weight = event.weight();
00055 
00056       // Get the smeared jets
00057       Jets SJets = apply<JetAlg>(event, "SmearedJets_E").jets(Cuts::Et > 20.0*GeV, cmpMomByEt);
00058       if (SJets.size() < 2 || SJets.size() > 6) vetoEvent;
00059 
00060       // Calculate Et, total jet 4 Momentum
00061       double sumEt(0), sumE(0);
00062       FourMomentum JS(0,0,0,0);
00063 
00064       foreach(const Jet& jet, SJets) {
00065         sumEt += jet.Et()*GeV;
00066         sumE  += jet.E()*GeV;
00067         JS+=jet.momentum();
00068       }
00069 
00070       if (sumEt < 420*GeV || sumE > 2000*GeV) vetoEvent;
00071 
00072       double mass = JS.mass();
00073 
00074       LorentzTransform cms_boost = LorentzTransform::mkFrameTransformFromBeta(JS.betaVec());
00075       FourMomentum jet0boosted(cms_boost.transform(SJets[0].momentum()));
00076       double costheta0 = fabs(cos(jet0boosted.theta()));
00077 
00078       if (costheta0 < 2.0/3.0) {
00079         _h_m[SJets.size()-2]->fill(mass, weight);
00080       }
00081       if (mass > 600.0*GeV) _h_costheta[JS.size()-2]->fill(costheta0, weight);
00082       if (costheta0 < 2.0/3.0 && mass > 600.0*GeV) {
00083         foreach (const Jet& jet, SJets) {
00084           _h_pT[SJets.size()-2]->fill(jet.pT(), weight);
00085         }
00086       }
00087     }
00088 
00089 
00090     /// Normalise histograms etc., after the run
00091     void finalize() {
00092 
00093       /// Normalise, scale and otherwise manipulate histograms here
00094       for (size_t i=0; i<5; ++i) {
00095         normalize(_h_m[i], 40.0);
00096         normalize(_h_costheta[i], 2.0);
00097         normalize(_h_pT[i], 20.0);
00098       }
00099 
00100     }
00101 
00102     //@}
00103 
00104 
00105   private:
00106 
00107     /// @name Histograms
00108     //@{
00109 
00110     Histo1DPtr _h_m[5];
00111     Histo1DPtr _h_costheta[5];
00112     Histo1DPtr _h_pT[5];
00113 
00114     //@}
00115 
00116   };
00117 
00118 
00119 
00120   // The hook for the plugin system
00121   DECLARE_RIVET_PLUGIN(CDF_1996_S3108457);
00122 
00123 }