9#include <dqm/analysis/modules/DQMHistAnalysisTrackingER.h>
51 for (
const string suffix : {
"_FromIP",
"_NotFromIP"}) {
53 TH1* hNoPXDHits =
findHist(
"TrackingERDQM" + suffix +
"/NoOfHitsInTrack_PXD");
54 if (hNoPXDHits !=
nullptr) {
55 int nTracks = hNoPXDHits->GetEntries();
56 int nTracksNoPXD = hNoPXDHits->GetBinContent(1);
62 TH1* hnTracks =
findHist(
"TrackingERDQM" + suffix +
"/NoOfTracks");
63 if (hnTracks !=
nullptr) {
64 double averageNTracks = hnTracks->GetMean();
67 TH1* hnVXDTracks =
findHist(
"TrackingERDQM" + suffix +
"/NoOfTracksInVXDOnly");
68 if (hnVXDTracks !=
nullptr) {
69 double averageNVXDTracks = hnVXDTracks->GetMean();
72 TH1* hnCDCTracks =
findHist(
"TrackingERDQM" + suffix +
"/NoOfTracksInCDCOnly");
73 if (hnCDCTracks !=
nullptr) {
74 double averageNCDCTracks = hnCDCTracks->GetMean();
77 TH1* hnVXDCDCTracks =
findHist(
"TrackingERDQM" + suffix +
"/NoOfTracksInVXDCDC");
78 if (hnVXDCDCTracks !=
nullptr) {
79 double averageNVXDCDCTracks = hnVXDCDCTracks->GetMean();
87 TH1* hSVDL3VTime =
findHist(
"SVDClsTrk/SVDTRK_ClusterTimeV3");
88 if (hSVDL3VTime !=
nullptr) {
89 int all = hSVDL3VTime->GetEntries();
93 int offtime = all - hSVDL3VTime->Integral(bin_min, bin_max);
94 double offtimeL3Hits = (double)offtime / all;
99 TH1* hSVDL456VTime =
findHist(
"SVDClsTrk/SVDTRK_ClusterTimeV456");
100 if (hSVDL456VTime !=
nullptr) {
101 int all = hSVDL456VTime->GetEntries();
105 int offtime = all - hSVDL456VTime->Integral(bin_min, bin_max);
106 double offtimeL456Hits = (double)offtime / all;
113 TH1* hAbort =
findHist(
"TrackingERDQM_FromIP/NumberTrackingErrorFlags");
114 TH1* hAbortReasons =
findHist(
"TrackingERDQM_FromIP/TrackingErrorFlagsReasons");
115 if (hAbort !=
nullptr) {
116 double nEvents = hAbort->GetEntries();
119 if (hAbortReasons !=
nullptr) {
120 m_monObj->
setVariable(
"abortRateUnspecifiedPR", hAbortReasons->GetBinContent(2) / nEvents);
127 for (
int i = 1; i <= 6; i++) {
128 hAbortReasons->SetBinContent(i, hAbortReasons->GetBinContent(i) / nEvents);
The base class for the histogram analysis module.
static MonitoringObject * getMonitoringObject(const std::string &name)
Get MonitoringObject with given name (new object is created if non-existing)
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
void initialize() override final
Module function initialize.
float m_onTimeHalfWidth
[ns], cluster is on time if within ± onTimeHalfWidth
MonitoringObject * m_monObj
Monitoring Object to be produced by this module, which contain defined canvases and monitoring variab...
void event() override final
Module function event.
DQMHistAnalysisTrackingERModule()
Constructor.
void setDescription(const std::string &description)
Sets the description of the module.
void setVariable(const std::string &var, float val, float upErr=-1., float dwErr=-1)
set value to float variable (new variable is made if not yet existing)
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.