D0_1996_S3324664.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/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       setBeams(PROTON, ANTIPROTON);
00022       setNeedsCrossSection(false);
00023     }
00024 
00025 
00026     /// @name Analysis methods
00027     //@{
00028 
00029     void init() {
00030       const FinalState fs;
00031       addProjection(fs, "FS");
00032       /// @todo Use correct jet algorithm
00033       addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7), "ConeJets");
00034 
00035       _h_deta = bookHistogram1D(1, 1, 1);
00036       _h_dphi.addHistogram(0.0, 2.0, bookHistogram1D(2, 1, 1));
00037       _h_dphi.addHistogram(2.0, 4.0, bookHistogram1D(2, 1, 2));
00038       _h_dphi.addHistogram(4.0, 6.0, bookHistogram1D(2, 1, 3));
00039       _h_cosdphi_deta = bookProfile1D(3, 1, 1);
00040     }
00041 
00042 
00043     void analyze(const Event& event) {
00044       const double weight = event.weight();
00045 
00046       Jets jets;
00047       foreach (const Jet& jet, applyProjection<FastJets>(event, "ConeJets").jets(20.0*GeV)) {
00048         if (fabs(jet.momentum().eta()) < 3.0) {
00049           jets.push_back(jet);
00050         }
00051       }
00052 
00053       if (jets.size() < 2) {
00054         vetoEvent;
00055       }
00056 
00057       FourMomentum minjet = jets[0].momentum();
00058       FourMomentum maxjet = jets[1].momentum();
00059       double mineta = minjet.eta();
00060       double maxeta = maxjet.eta();
00061 
00062       foreach(const Jet& jet, jets) {
00063         double eta = jet.momentum().eta();
00064         if (eta < mineta) {
00065           minjet = jet.momentum();
00066           mineta = eta;
00067         }
00068         else if (eta > maxeta) {
00069           maxjet = jet.momentum();
00070           maxeta = eta;
00071         }
00072       }
00073 
00074       if (minjet.Et()<50*GeV && maxjet.Et()<50.0*GeV) {
00075         vetoEvent;
00076       }
00077 
00078       double deta = maxjet.eta()-minjet.eta();
00079       double dphi = mapAngle0To2Pi(maxjet.phi()-minjet.phi());
00080 
00081       _h_deta->fill(deta, weight);
00082       _h_dphi.fill(deta, 1.0-dphi/M_PI, weight);
00083       _h_cosdphi_deta->fill(deta, cos(M_PI-dphi), weight);
00084 
00085     }
00086 
00087 
00088     void finalize() {
00089       // Normalised to #events
00090       normalize(_h_deta, 8830.0); // fixed norm OK
00091 
00092       // I have no idea what this is normalised to... in the paper it says unity!
00093       /// @todo Understand this!
00094       foreach (IHistogram1D* histo, _h_dphi.getHistograms()) {
00095         /// @todo Prefer to scale rather than normalize, if possible
00096         normalize(histo, 0.0798);
00097       }
00098 
00099     }
00100 
00101     //@}
00102 
00103 
00104   private:
00105 
00106     /// @name Histograms
00107     //@{
00108 
00109     AIDA::IHistogram1D *_h_deta;
00110     BinnedHistogram<double> _h_dphi;
00111     AIDA::IProfile1D *_h_cosdphi_deta;
00112     //@}
00113 
00114   };
00115 
00116 
00117   // This global object acts as a hook for the plugin system
00118   AnalysisBuilder<D0_1996_S3324664> plugin_D0_1996_S3324664;
00119 
00120 
00121 }