9 #include <tracking/modules/trackingDQM/TrackingExpressRecoDQMModule.h>
10 #include <tracking/modules/trackingDQM/TrackDQMEventProcessor.h>
11 #include <tracking/dqmUtils/HistogramFactory.h>
13 #include <TDirectory.h>
16 using namespace Belle2::HistogramFactory;
32 setPropertyFlags(c_ParallelProcessingCertified);
33 setDescription(
"Data Quality Monitoring of the tracking run on ExpressReco.");
34 addParam(
"produce1Dresiduals", m_produce1Dres,
"If True, produce 1D residual plots for each VXD sensor", m_produce1Dres);
35 addParam(
"produce2Dresiduals", m_produce2Dres,
"If True, produce 2D residual plots for each VXD sensor", m_produce2Dres);
36 addParam(
"histogramDirectoryName", m_histogramDirectoryName,
"Name of the directory for the histograms", m_histogramDirectoryName);
46 m_eventLevelTrackingInfo.isOptional();
54 B2FATAL(
"Missing geometry for VXD.");
57 TDirectory* originalDirectory = gDirectory;
59 TDirectory* TracksDQM = originalDirectory->GetDirectory(m_histogramDirectoryName.c_str());
61 TracksDQM = originalDirectory->mkdir(m_histogramDirectoryName.c_str());
66 DefineHelixParametersAndCorrelations();
67 DefineTrackFitStatus();
69 DefineUBResidualsVXD();
70 DefineHalfShellsVXD();
72 DefineAbortFlagsHistograms();
78 originalDirectory->cd();
80 for (
auto change : m_histogramParameterChanges)
81 ProcessHistogramParameterChange(get<0>(change), get<1>(change), get<2>(change));
87 if (!histogramsDefined)
90 bool runningOnHLT =
false;
100 eventProcessor.
Run();
102 if (m_eventLevelTrackingInfo.isValid()) {
103 if (m_eventLevelTrackingInfo->hasAnErrorFlag()) {
104 m_trackingErrorFlags->Fill(1);
105 if (m_eventLevelTrackingInfo->hasUnspecifiedTrackFindingFailure())
106 m_trackingErrorFlagsReasons->Fill(1);
107 if (m_eventLevelTrackingInfo->hasVXDTF2AbortionFlag())
108 m_trackingErrorFlagsReasons->Fill(2);
109 if (m_eventLevelTrackingInfo->hasSVDCKFAbortionFlag())
110 m_trackingErrorFlagsReasons->Fill(3);
111 if (m_eventLevelTrackingInfo->hasPXDCKFAbortionFlag())
112 m_trackingErrorFlagsReasons->Fill(4);
113 if (m_eventLevelTrackingInfo->hasSVDSpacePointCreatorAbortionFlag())
114 m_trackingErrorFlagsReasons->Fill(5);
116 m_trackingErrorFlags->Fill(0);
117 m_trackingErrorFlagsReasons->Fill(0);
120 m_trackingErrorFlags->Fill(0);
126 m_trackingErrorFlags =
127 Create(
"NumberTrackingErrorFlags",
128 "Tracking error summary. Mean = errors/event (should be 0 or very close to 0);Error occured yes or no;Number of events",
129 2, -0.5, 1.5,
"Error occured yes or no",
"Number of events");
130 m_trackingErrorFlags->GetXaxis()->SetBinLabel(1,
"No Error");
131 m_trackingErrorFlags->GetXaxis()->SetBinLabel(2,
"Error occured");
134 m_trackingErrorFlagsReasons =
135 Create(
"TrackingErrorFlagsReasons",
136 "Tracking errors by reason. A single event may fall in multiple bins.;Type of error occurred;Number of events",
137 6, -0.5, 5.5,
"Type of error occurred",
"Number of events");
138 m_trackingErrorFlagsReasons->GetXaxis()->SetBinLabel(1,
"No Error");
139 m_trackingErrorFlagsReasons->GetXaxis()->SetBinLabel(2,
"Unspecified PR");
140 m_trackingErrorFlagsReasons->GetXaxis()->SetBinLabel(3,
"VXDTF2");
141 m_trackingErrorFlagsReasons->GetXaxis()->SetBinLabel(4,
"SVDCKF");
142 m_trackingErrorFlagsReasons->GetXaxis()->SetBinLabel(5,
"PXDCKF");
143 m_trackingErrorFlagsReasons->GetXaxis()->SetBinLabel(6,
"SpacePoint");
void produce1Dres()
Call this if you want to produce 1D Track Residual plots for each VXD sensor.
virtual void Run()
Call this to start processing the event data and filling histograms.
void produce2Dres()
Call this if you want to produce 2D Track Residual plots for each VXD sensor.
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.
Tracking ExpressReco DQM.
void initialize() override
Module functions.
void event() override
fill of the histograms happens here
virtual void DefineAbortFlagsHistograms()
Defines the histograms for the tracking abort flags.
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.