CDF_2006_S6450792.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   class CDF_2006_S6450792 : public Analysis {
00011   public:
00012 
00013     /// Constructor
00014     CDF_2006_S6450792() : Analysis("CDF_2006_S6450792") {
00015       setBeams(PROTON, ANTIPROTON);
00016       setNeedsCrossSection(true);
00017     }
00018  
00019  
00020     /// @name Analysis methods
00021     //@{
00022  
00023     void init() {
00024       FinalState fs;
00025       addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7), "ConeFinder");
00026 
00027       _h_jet_pt = bookHistogram1D(1, 1, 1);
00028     }
00029 
00030 
00031     void analyze(const Event& event) {
00032       const Jets& jets = applyProjection<JetAlg>(event, "ConeFinder").jets(61.0*GeV);
00033       foreach (const Jet& jet, jets) {
00034         double y = fabs(jet.momentum().rapidity());
00035         if (inRange(y, 0.1, 0.7)) {
00036           _h_jet_pt->fill(jet.momentum().pT()/GeV, event.weight());
00037         }
00038       }
00039     }
00040  
00041  
00042     void finalize() {
00043       const double delta_y = 1.2;
00044       scale(_h_jet_pt, crossSection()/nanobarn/sumOfWeights()/delta_y);
00045     }
00046 
00047     //@}
00048 
00049 
00050   private:
00051 
00052     /// @name Histograms
00053     //@{
00054 
00055     AIDA::IHistogram1D *_h_jet_pt;
00056     //@}
00057 
00058   };
00059 
00060 
00061   // This global object acts as a hook for the plugin system
00062   AnalysisBuilder<CDF_2006_S6450792> plugin_CDF_2006_S6450792;
00063 
00064 }