rivet is hosted by Hepforge, IPPP Durham
ALEPH_1991_S2435284.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/ChargedFinalState.hh"
00004 #include "Rivet/Projections/Multiplicity.hh"
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/RivetYODA.hh"
00007 
00008 namespace Rivet {
00009 
00010 
00011   /// @brief ALEPH LEP1 charged multiplicity in hadronic Z decay
00012   /// @author Andy Buckley
00013   class ALEPH_1991_S2435284 : public Analysis {
00014   public:
00015 
00016     /// Constructor.
00017     ALEPH_1991_S2435284()
00018       : Analysis("ALEPH_1991_S2435284")
00019     {
00020     }
00021 
00022 
00023     /// @name Analysis methods
00024     //@{
00025 
00026     /// Book projections and histogram
00027     void init() {
00028       const ChargedFinalState cfs;
00029       addProjection(cfs, "FS");
00030       addProjection(Multiplicity(cfs), "Mult");
00031 
00032       _histChTot = bookHisto1D(1, 1, 1);
00033     }
00034 
00035 
00036     /// Do the analysis
00037     void analyze(const Event& event) {
00038       const Multiplicity& m = applyProjection<Multiplicity>(event, "Mult");
00039       MSG_DEBUG("Total charged multiplicity = " << m.totalMultiplicity());
00040       _histChTot->fill(m.totalMultiplicity(), event.weight());
00041     }
00042 
00043 
00044     /// Normalize the histogram
00045     void finalize() {
00046       scale(_histChTot, 2.0/sumOfWeights()); // same as in ALEPH 1996
00047     }
00048 
00049     //@}
00050 
00051 
00052   private:
00053 
00054     /// @name Histograms
00055     //@{
00056     Histo1DPtr _histChTot;
00057     //@}
00058 
00059   };
00060 
00061 
00062 
00063   // The hook for the plugin system
00064   DECLARE_RIVET_PLUGIN(ALEPH_1991_S2435284);
00065 
00066 }