D0_2007_S7075677.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/ZFinder.hh"
00006 
00007 namespace Rivet {
00008 
00009 
00010   /// @brief Measurement of D0 Run II Z pT diff cross-section shape
00011   /// @author Andy Buckley
00012   /// @author Gavin Hesketh
00013   /// @author Frank Siegert
00014   class D0_2007_S7075677 : public Analysis {
00015 
00016   public:
00017 
00018     /// Default constructor.
00019     D0_2007_S7075677() : Analysis("D0_2007_S7075677")
00020     {
00021       // Run II Z rapidity
00022       setBeams(PROTON, ANTIPROTON);
00023     }
00024  
00025 
00026     /// @name Analysis methods
00027     //@{
00028 
00029     /// Book histograms
00030     void init() {
00031       /// @todo Ask Gavin Hesketh about his first implemention without eta cuts.
00032       vector<pair<double, double> > etaRanges;
00033       // Remove eta cuts for the moment, because it seems like they have been
00034       // corrected for.
00035       // etaRanges.push_back(make_pair(-3.2, -1.5));
00036       // etaRanges.push_back(make_pair(-0.9, 0.9));
00037       // etaRanges.push_back(make_pair(1.5, 3.2));
00038       ZFinder zfinder(etaRanges, 15.0*GeV, ELECTRON, 71.0*GeV, 111.0*GeV, 0.2);
00039       addProjection(zfinder, "ZFinder");
00040 
00041       _h_yZ = bookHistogram1D(1, 1, 1);
00042     }
00043 
00044 
00045     /// Do the analysis
00046     void analyze(const Event & e) {
00047       const double weight = e.weight();
00048    
00049       const ZFinder& zfinder = applyProjection<ZFinder>(e, "ZFinder");
00050       if (zfinder.particles().size() == 1) {
00051         const ParticleVector& el(zfinder.constituentsFinalState().particles());
00052         if (el[0].momentum().pT() > 25.0*GeV || el[1].momentum().pT() > 25.0*GeV) {
00053           double yZ = fabs(zfinder.particles()[0].momentum().rapidity());
00054           _h_yZ->fill(yZ, weight);
00055         }
00056       }
00057       else {
00058         getLog() << Log::DEBUG << "No unique lepton pair found." << endl;
00059       }
00060     }
00061  
00062  
00063     // Finalize
00064     void finalize() {
00065       // Data seems to have been normalized for the avg of the two sides
00066       // (+ve & -ve rapidity) rather than the sum, hence the 0.5:
00067       normalize(_h_yZ, 0.5);
00068     }
00069 
00070     //@}
00071 
00072 
00073   private:
00074 
00075     /// @name Histograms
00076     //@{
00077     AIDA::IHistogram1D * _h_yZ;
00078     //@}
00079 
00080   };
00081 
00082 
00083 
00084   // This global object acts as a hook for the plugin system
00085   AnalysisBuilder<D0_2007_S7075677> plugin_D0_2007_S7075677;
00086 
00087 }