rivet is hosted by Hepforge, IPPP Durham
CDF_2009_S8383952.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FinalState.hh"
00004 #include "Rivet/Projections/ZFinder.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   /// @brief CDF Z boson rapidity measurement
00010   class CDF_2009_S8383952 : public Analysis {
00011   public:
00012 
00013     /// @name Constructors etc.
00014     //@{
00015 
00016     /// Constructor
00017     CDF_2009_S8383952()
00018       : Analysis("CDF_2009_S8383952")
00019     {    }
00020 
00021     //@}
00022 
00023 
00024   public:
00025 
00026     /// @name Analysis methods
00027     //@{
00028 
00029     /// Book histograms and initialise projections before the run
00030     void init() {
00031 
00032       /// Initialise and register projections here
00033       // this seems to have been corrected completely for all selection cuts,
00034       // i.e. eta cuts and pT cuts on leptons.
00035       ZFinder zfinder(FinalState(), Cuts::open(), PID::ELECTRON,
00036                       66*GeV, 116*GeV, 0.2, ZFinder::CLUSTERNODECAY, ZFinder::TRACK);
00037       addProjection(zfinder, "ZFinder");
00038 
00039 
00040       /// Book histograms here
00041       _h_xs = bookHisto1D(1, 1, 1);
00042       _h_yZ = bookHisto1D(2, 1, 1);
00043 
00044     }
00045 
00046 
00047     /// Perform the per-event analysis
00048     void analyze(const Event& event) {
00049       const ZFinder& zfinder = applyProjection<ZFinder>(event, "ZFinder");
00050       if (zfinder.bosons().size() == 1) {
00051         const double weight = event.weight();
00052         _h_yZ->fill(fabs(zfinder.bosons()[0].rapidity()), weight);
00053         _h_xs->fill(1960, weight);
00054       } else {
00055         MSG_DEBUG("no unique lepton pair found.");
00056       }
00057 
00058     }
00059 
00060 
00061     /// Normalise histograms etc., after the run
00062     void finalize() {
00063       scale(_h_xs, crossSection()/sumOfWeights());
00064       // Data seems to have been normalized for the avg of the two sides
00065       // (+ve & -ve rapidity) rather than the sum, hence the 0.5:
00066       scale(_h_yZ, 0.5*crossSection()/sumOfWeights());
00067     }
00068 
00069     //@}
00070 
00071 
00072   private:
00073 
00074     /// @name Histograms
00075     //@{
00076     Histo1DPtr _h_yZ;
00077     Histo1DPtr _h_xs;
00078     //@}
00079 
00080   };
00081 
00082 
00083 
00084   // The hook for the plugin system
00085   DECLARE_RIVET_PLUGIN(CDF_2009_S8383952);
00086 
00087 }