Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PL273B181.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Tools/Logging.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Analyses/PL273B181.hh"
00005 #include "HepPDT/ParticleID.hh"
00006 
00007 using namespace AIDA;
00008 using namespace HepMC;
00009 
00010 
00011 namespace Rivet {
00012 
00013   void PL273B181::init() {
00014     // Book histogram
00015     _histChTot = bookHistogram1D(1, 1, 1, "Total charged multiplicity");
00016   }
00017 
00018 
00019   // Do the analysis
00020   void PL273B181::analyze(const Event& event) {
00021     Log& log = getLog();
00022     const Multiplicity& m = event.applyProjection(_multproj);
00023     log << Log::INFO << "Total charged multiplicity = " << m.totalChargedMultiplicity() << endl;
00024     _histChTot->fill(m.totalChargedMultiplicity(), event.weight());
00025   }
00026 
00027 
00028   // Finalize
00029   void PL273B181::finalize() { 
00030     // Normalize the histogram
00031     normalize(_histChTot);
00032   }
00033 
00034 }