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 namespace Rivet {
00011
00012 void PL273B181::init() {
00013
00014
00015 histChTot_ = bookHistogram1D(1, 1, 1, "Total charged multiplicity");
00016 histSphericity_ = bookHistogram1D("Sphericity", "Event Shape: Sphericity", 8, 0.0, 0.70);
00017 histAplanarity_ = bookHistogram1D("Aplanarity", "Event Shape: APlanarity", 10, 0.0, 0.09);
00018 histPlanarity_ = bookHistogram1D("Planarity", "Event Shape: Planarity", 16, 0.0, 0.70);
00019
00020 }
00021
00022
00023
00024 void PL273B181::analyze(const Event & event) {
00025 Log& log = getLog();
00026 log << Log::DEBUG << "Starting analyzing" << endl;
00027
00028
00029 const Multiplicity& m = event.applyProjection(mult);
00030 log << Log::INFO << "Total charged multiplicity = " << m.totalChargedMultiplicity() << endl;
00031
00032
00033 const Sphericity& s = event.applyProjection(spher);
00034 log << Log::INFO << "Sphericity = " << s.sphericity() << endl;
00035 log << Log::INFO << "Aplanarity = " << s.aplanarity() << endl;
00036 log << Log::INFO << "Planarity = " << s.planarity() << endl;
00037
00038
00039 const double weight = event.weight();
00040 histChTot_->fill(m.totalChargedMultiplicity(), weight);
00041 histSphericity_->fill(s.sphericity(), weight);
00042 histPlanarity_->fill(s.planarity(), weight);
00043 histAplanarity_->fill(s.aplanarity(), weight);
00044
00045
00046 log << Log::DEBUG << "Finished analyzing" << endl;
00047 }
00048
00049
00050
00051 void PL273B181::finalize() {
00052
00053 normalize(histChTot_);
00054 normalize(histSphericity_);
00055 normalize(histPlanarity_);
00056 normalize(histAplanarity_);
00057 }
00058
00059 }