rivet is hosted by Hepforge, IPPP Durham
D0_1996_S3324664.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetYODA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Tools/BinnedHistogram.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007 #include "Rivet/Projections/FinalState.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00012   /// @brief D0 azimuthal correlation of jets widely separated in rapidity
00013   class D0_1996_S3324664 : public Analysis {
00014   public:
00015 
00016     /// @name Constructors etc.
00017     //@{
00018 
00019     /// Constructor
00020     D0_1996_S3324664() : Analysis("D0_1996_S3324664")
00021     {    }
00022 
00023 
00024     /// @name Analysis methods
00025     //@{
00026 
00027     void init() {
00028       const FinalState fs;
00029       addProjection(fs, "FS");
00030       /// @todo Use correct jet algorithm
00031       addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7), "ConeJets");
00032 
00033       _h_deta = bookHisto1D(1, 1, 1);
00034       _h_dphi.addHistogram(0.0, 2.0, bookHisto1D(2, 1, 1));
00035       _h_dphi.addHistogram(2.0, 4.0, bookHisto1D(2, 1, 2));
00036       _h_dphi.addHistogram(4.0, 6.0, bookHisto1D(2, 1, 3));
00037       _h_cosdphi_deta = bookProfile1D(3, 1, 1);
00038     }
00039 
00040 
00041     void analyze(const Event& event) {
00042       const double weight = event.weight();
00043 
00044       Jets jets;
00045       foreach (const Jet& jet, applyProjection<FastJets>(event, "ConeJets").jets(20.0*GeV)) {
00046         if (fabs(jet.momentum().eta()) < 3.0) {
00047           jets.push_back(jet);
00048         }
00049       }
00050 
00051       if (jets.size() < 2) {
00052         vetoEvent;
00053       }
00054 
00055       FourMomentum minjet = jets[0].momentum();
00056       FourMomentum maxjet = jets[1].momentum();
00057       double mineta = minjet.eta();
00058       double maxeta = maxjet.eta();
00059 
00060       foreach(const Jet& jet, jets) {
00061         double eta = jet.momentum().eta();
00062         if (eta < mineta) {
00063           minjet = jet.momentum();
00064           mineta = eta;
00065         }
00066         else if (eta > maxeta) {
00067           maxjet = jet.momentum();
00068           maxeta = eta;
00069         }
00070       }
00071 
00072       if (minjet.Et()<50*GeV && maxjet.Et()<50.0*GeV) {
00073         vetoEvent;
00074       }
00075 
00076       double deta = maxjet.eta()-minjet.eta();
00077       double dphi = mapAngle0To2Pi(maxjet.phi()-minjet.phi());
00078 
00079       _h_deta->fill(deta, weight);
00080       _h_dphi.fill(deta, 1.0-dphi/M_PI, weight);
00081       _h_cosdphi_deta->fill(deta, cos(M_PI-dphi), weight);
00082 
00083     }
00084 
00085 
00086     void finalize() {
00087       // Normalised to #events
00088       normalize(_h_deta, 8830.0); // fixed norm OK
00089 
00090       // I have no idea what this is normalised to... in the paper it says unity!
00091       /// @todo Understand this!
00092       foreach (Histo1DPtr histo, _h_dphi.getHistograms()) {
00093         /// @todo Prefer to scale rather than normalize, if possible
00094         normalize(histo, 0.0798);
00095       }
00096 
00097     }
00098 
00099     //@}
00100 
00101 
00102   private:
00103 
00104     /// @name Histograms
00105     //@{
00106 
00107     Histo1DPtr _h_deta;
00108     BinnedHistogram<double> _h_dphi;
00109     Profile1DPtr _h_cosdphi_deta;
00110     //@}
00111 
00112   };
00113 
00114 
00115 
00116   // The hook for the plugin system
00117   DECLARE_RIVET_PLUGIN(D0_1996_S3324664);
00118 
00119 }