CDF_1996_S3108457.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007 
00008 namespace Rivet {
00009 
00010 
00011   /// @brief CDF properties of high-mass multi-jet events
00012   class CDF_1996_S3108457 : public Analysis {
00013   public:
00014 
00015     /// @name Constructors etc.
00016     //@{
00017 
00018     /// Constructor
00019     CDF_1996_S3108457()
00020       : Analysis("CDF_1996_S3108457")
00021     {    }
00022 
00023     //@}
00024 
00025 
00026   public:
00027 
00028     /// @name Analysis methods
00029     //@{
00030 
00031     /// Book histograms and initialise projections before the run
00032     void init() {
00033 
00034       /// Initialise and register projections here
00035       const FinalState fs(-4.2, 4.2);
00036       addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "Jets");
00037 
00038 
00039       /// Book histograms here, e.g.:
00040       for (size_t i=0; i<5; ++i) {
00041         _h_m[i] = bookHistogram1D(1+i, 1, 1);
00042         _h_costheta[i] = bookHistogram1D(10+i, 1, 1);
00043         _h_pT[i] = bookHistogram1D(15+i, 1, 1);
00044       }
00045       /// @todo Ratios of mass histograms left out: Binning doesn't work out
00046     }
00047 
00048 
00049     /// Perform the per-event analysis
00050     void analyze(const Event& event) {
00051       const double weight = event.weight();
00052 
00053       /// Do the event by event analysis here
00054       Jets jets;
00055       double sumEt = 0.0;
00056       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
00057       foreach (const Jet& jet, applyProjection<FastJets>(event, "Jets").jetsByEt()) {
00058         double Et = jet.momentum().Et();
00059         if (Et > 20.0*GeV) {
00060           jets.push_back(jet);
00061           sumEt += Et;
00062           jetsystem += jet.momentum();
00063         }
00064       }
00065       /// @todo include gaussian jet energy resolution smearing?
00066 
00067       if (jets.size() < 2 || jets.size() > 6) {
00068         vetoEvent;
00069       }
00070 
00071       if (sumEt < 420.0*GeV) {
00072         vetoEvent;
00073       }
00074 
00075       LorentzTransform cms_boost(-jetsystem.boostVector());
00076       FourMomentum jet0boosted(cms_boost.transform(jets[0].momentum()));
00077 
00078       double mass = jetsystem.mass();
00079       double costheta0 = fabs(cos(jet0boosted.theta()));
00080 
00081       if (costheta0 < 2.0/3.0) {
00082         _h_m[jets.size()-2]->fill(mass, weight);
00083       }
00084 
00085       if (mass > 600.0*GeV) {
00086         _h_costheta[jets.size()-2]->fill(costheta0, weight);
00087       }
00088 
00089       if (costheta0 < 2.0/3.0 && mass > 600.0*GeV) {
00090         foreach (const Jet jet, jets) {
00091           _h_pT[jets.size()-2]->fill(jet.momentum().pT(), weight);
00092         }
00093       }
00094     }
00095 
00096 
00097     /// Normalise histograms etc., after the run
00098     void finalize() {
00099 
00100       /// Normalise, scale and otherwise manipulate histograms here
00101       for (size_t i=0; i<5; ++i) {
00102         normalize(_h_m[i], 40.0);
00103         normalize(_h_costheta[i], 2.0);
00104         normalize(_h_pT[i], 20.0);
00105       }
00106 
00107     }
00108 
00109     //@}
00110 
00111 
00112   private:
00113 
00114     /// @name Histograms
00115     //@{
00116 
00117     AIDA::IHistogram1D *_h_m[5];
00118     AIDA::IHistogram1D *_h_costheta[5];
00119     AIDA::IHistogram1D *_h_pT[5];
00120 
00121     //@}
00122 
00123   };
00124 
00125 
00126 
00127   // The hook for the plugin system
00128   DECLARE_RIVET_PLUGIN(CDF_1996_S3108457);
00129 
00130 }