00001
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
00015 _histChTot = bookHistogram1D(1, 1, 1, "Total charged multiplicity");
00016 }
00017
00018
00019
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
00029 void PL273B181::finalize() {
00030
00031 normalize(_histChTot);
00032 }
00033
00034 }