9 #include <tracking/modules/trackingDQM/TrackDQMModule.h>
10 #include <tracking/modules/trackingDQM/TrackDQMEventProcessor.h>
11 #include <tracking/dqmUtils/HistogramFactory.h>
13 #include <TDirectory.h>
16 using namespace Belle2::HistogramFactory;
32 setDescription(
"DQM of finding tracks, their momentum, "
33 "Number of hits in tracks, "
47 m_eventLevelTrackingInfo.isOptional();
55 B2FATAL(
"Missing geometry for VXD.");
58 TDirectory* originalDirectory = gDirectory;
60 TDirectory* TracksDQM = originalDirectory->GetDirectory(
"TracksDQM");
62 TracksDQM = originalDirectory->mkdir(
"TracksDQM");
64 TDirectory* TracksDQMAlignment = originalDirectory->GetDirectory(
"TracksDQMAlignment");
65 if (!TracksDQMAlignment)
66 TracksDQMAlignment = originalDirectory->mkdir(
"TracksDQMAlignment");
71 DefineMomentumAngles();
72 DefineMomentumCoordinates();
73 DefineHelixParametersAndCorrelations();
74 DefineTrackFitStatus();
76 DefineUBResidualsVXD();
77 DefineHalfShellsVXD();
81 TracksDQMAlignment->cd();
85 originalDirectory->cd();
87 for (
auto change : m_histogramParameterChanges)
88 ProcessHistogramParameterChange(get<0>(change), get<1>(change), get<2>(change));
94 if (!histogramsDefined)
101 if (m_eventLevelTrackingInfo.isValid())
102 m_trackingErrorFlags->Fill((
double)m_eventLevelTrackingInfo->hasAnErrorFlag());
104 m_trackingErrorFlags->Fill(0.0);
110 const char* flagTitle =
111 "Tracking error summary. Mean = errors/event (should be 0 or very close to 0); Error occured yes or no; Number of events";
113 m_trackingErrorFlags = Create(
"NumberTrackingErrorFlags", flagTitle, 2, -0.5, 1.5,
"",
"");
115 m_trackingErrorFlags->GetXaxis()->SetBinLabel(1,
"No Error");
116 m_trackingErrorFlags->GetXaxis()->SetBinLabel(2,
"Error occured");
virtual void Run()
Call this to start processing the event data and filling histograms.
This class serves as a base for the TrackDQMModule and AlignDQMModule (and possibly other DQM histogr...
virtual void initialize() override
Module functions.
virtual void event() override
Function to process event record.
virtual void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
The purpose of this class is to process one event() in TrackDQMModule.
DQM of tracks their momentum, Number of hits in tracks, Number of tracks.
virtual void initialize() override
Module functions.
virtual void event() override
Function to process event record.
virtual void DefineFlags()
All the following Define- functions should be used in the defineHisto() function to define histograms...
virtual void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
static GeoCache & getInstance()
Return a reference to the singleton instance.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.