CDF_2000_S4266730.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   class CDF_2000_S4266730 : public Analysis {
00012   public:
00013 
00014     /// @name Constructors etc.
00015     //@{
00016 
00017     /// Constructor
00018     CDF_2000_S4266730()
00019       : Analysis("CDF_2000_S4266730")
00020     {
00021       setBeams(PROTON, ANTIPROTON);
00022       setNeedsCrossSection(true);
00023     }
00024 
00025     //@}
00026 
00027 
00028   public:
00029 
00030     /// @name Analysis methods
00031     //@{
00032 
00033     /// Book histograms and initialise projections before the run
00034     void init() {
00035       FinalState fs(-4.2, 4.2);
00036       addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "Jets");
00037 
00038       _h_mjj = bookHistogram1D(1, 1, 1);
00039 
00040     }
00041 
00042 
00043     /// Perform the per-event analysis
00044     void analyze(const Event& event) {
00045       const double weight = event.weight();
00046 
00047       Jets jets = applyProjection<FastJets>(event, "Jets").jetsByEt(0.0*GeV);
00048       if (jets.size()<2) {
00049         vetoEvent;
00050       }
00051       FourMomentum jet1 = jets[0].momentum();
00052       FourMomentum jet2 = jets[1].momentum();
00053       double eta1 = jet1.eta();
00054       double eta2 = jet2.eta();
00055       if (fabs(eta1)>2.0 || fabs(eta2)>2.0) {
00056         vetoEvent;
00057       }
00058       if (fabs(tanh((eta1-eta2)/2))>2.0/3.0) {
00059         vetoEvent;
00060       }
00061       double mjj = FourMomentum(jet1+jet2).mass()/GeV;
00062       if (mjj<180.0) {
00063         vetoEvent;
00064       }
00065       _h_mjj->fill(mjj, weight);
00066    
00067     }
00068 
00069 
00070     /// Normalise histograms etc., after the run
00071     void finalize() {
00072       scale(_h_mjj, crossSection()/picobarn/sumOfWeights());
00073     }
00074 
00075     //@}
00076   private:
00077 
00078     /// @name Histograms
00079     //@{
00080     AIDA::IHistogram1D *_h_mjj;
00081     //@}
00082 
00083   };
00084 
00085 
00086 
00087   // This global object acts as a hook for the plugin system
00088   AnalysisBuilder<CDF_2000_S4266730> plugin_CDF_2000_S4266730;
00089 
00090 
00091 }