rivet is hosted by Hepforge, IPPP Durham
CDF_1998_S3618439.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 diff cross-section in events with large missing energy
00010   class CDF_1998_S3618439 : public Analysis {
00011   public:
00012 
00013     /// @name Constructors etc.
00014     //@{
00015 
00016     /// Constructor
00017     CDF_1998_S3618439()
00018       : Analysis("CDF_1998_S3618439")
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_sumET_20 = bookHisto1D(1, 1, 1);
00035       _h_sumET_100 = bookHisto1D(1, 1, 2);
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(20.0*GeV);
00044       double sumET_20(0.0), sumET_100(0.0);
00045       foreach (const Jet& jet, jets) {
00046         double ET = jet.momentum().Et()/GeV;
00047         sumET_20 += ET;
00048         if (ET>100.0) sumET_100 += ET;
00049       }
00050       if (sumET_20>320.0) _h_sumET_20->fill(sumET_20, weight);
00051       if (sumET_100>320.0) _h_sumET_100->fill(sumET_100, weight);
00052     }
00053 
00054 
00055     /// Normalise histograms etc., after the run
00056     void finalize() {
00057       scale(_h_sumET_20, crossSection()/picobarn/sumOfWeights());
00058       scale(_h_sumET_100, crossSection()/picobarn/sumOfWeights());
00059     }
00060 
00061     //@}
00062 
00063 
00064   private:
00065 
00066     /// @name Histograms
00067     //@{
00068     Histo1DPtr _h_sumET_20, _h_sumET_100;
00069     //@}
00070 
00071   };
00072 
00073 
00074 
00075   // The hook for the plugin system
00076   DECLARE_RIVET_PLUGIN(CDF_1998_S3618439);
00077 
00078 }