9 #include <daq/dqm/modules/TrackAna.h>
11 #include <framework/dataobjects/EventMetaData.h>
12 #include <framework/datastore/StoreObjPtr.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <mdst/dataobjects/Track.h>
15 #include <mdst/dataobjects/TrackFitResult.h>
32 setDescription(
"The simplest physics analysis");
33 setPropertyFlags(c_ParallelProcessingCertified);
36 B2INFO(
"TrackAna: Constructor done.");
40 TrackAnaModule::~TrackAnaModule()
44 void TrackAnaModule::initialize()
49 void TrackAnaModule::defineHisto()
51 h_multi =
new TH1F(
"Multi",
"Particle Multiplicity", 50, 0.0, 50.0);
52 h_p[0] =
new TH1F(
"Px",
"Particle Momentum X", 100, -5.0, 5.0);
53 h_p[1] =
new TH1F(
"Py",
"Particle Momentum Y", 100, -5.0, 5.0);
54 h_p[2] =
new TH1F(
"Pz",
"Particle Momentum Z", 100, -5.0, 5.0);
55 h_p[3] =
new TH1F(
"E",
"Particle Energy", 100, 0.0, 10.0);
58 void TrackAnaModule::beginRun()
60 B2INFO(
"TrackAna: started to measure elapsed time.");
64 void TrackAnaModule::event()
73 h_multi->Fill((
float)ntrk);
75 for (
int i = 0; i < ntrk; i++) {
76 Track* trk = trklist[i];
78 ROOT::Math::PxPyPzEVector p4 = fit->get4Momentum();
79 h_p[0]->Fill(p4.Px());
80 h_p[1]->Fill(p4.Py());
81 h_p[2]->Fill(p4.Pz());
86 void TrackAnaModule::endRun()
91 void TrackAnaModule::terminate()
93 B2INFO(
"TrackAna: terminate called");
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
Type-safe access to single objects in the data store.
A class definition of an input module for Sequential ROOT I/O.
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
const TrackFitResult * getTrackFitResult(const Const::ChargedStable &chargedStable) const
Default Access to TrackFitResults.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.