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