9#include <pxd/modules/pxdDQM/PXDInjectionDQMModule.h>
10#include <pxd/dataobjects/PXDRawHit.h>
11#include <pxd/dataobjects/PXDCluster.h>
12#include <mdst/dataobjects/EventLevelTriggerTimeInfo.h>
14#include "TDirectory.h"
36 std::string(
"PXDINJ"));
49 TDirectory* oldDir = gDirectory;
56 hOccAfterInjLER =
new TH1F(
"PXDOccInjLER",
"PXDOccInjLER/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
57 hOccAfterInjHER =
new TH1F(
"PXDOccInjHER",
"PXDOccInjHER/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
58 hEOccAfterInjLER =
new TH1I(
"PXDEOccInjLER",
"PXDEOccInjLER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0, 50000);
59 hEOccAfterInjHER =
new TH1I(
"PXDEOccInjHER",
"PXDEOccInjHER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0, 50000);
61 hMaxOccAfterInjLER =
new TH1F(
"PXDMaxOccInjLER",
"PXDMaxOccInjLER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0,
63 hMaxOccAfterInjHER =
new TH1F(
"PXDMaxOccInjHER",
"PXDMaxOccInjHER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0,
67 hOccAfterInjLERGate =
new TH2F(
"PXDOccInjLERGate",
"PXDOccInjLERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
68 hOccAfterInjHERGate =
new TH2F(
"PXDOccInjHERGate",
"PXDOccInjHERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
71 hOccAfterInjLER =
new TH1F(
"PXDOccInjLER",
"PXDOccInjLER/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
72 hOccAfterInjHER =
new TH1F(
"PXDOccInjHER",
"PXDOccInjHER/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
73 hEOccAfterInjLER =
new TH1I(
"PXDEOccInjLER",
"PXDEOccInjLER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
74 hEOccAfterInjHER =
new TH1I(
"PXDEOccInjHER",
"PXDEOccInjHER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
76 hMaxOccAfterInjLER =
new TH1F(
"PXDMaxOccInjLER",
"PXDMaxOccInjLER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
77 hMaxOccAfterInjHER =
new TH1F(
"PXDMaxOccInjHER",
"PXDMaxOccInjHER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
80 hOccAfterInjLERGate =
new TH2F(
"PXDOccInjLERGate",
"PXDOccInjLERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
81 hOccAfterInjHERGate =
new TH2F(
"PXDOccInjHERGate",
"PXDOccInjHERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
86 std::vector<VxdID> sensors =
m_vxdGeometry.getListOfSensors();
87 for (
VxdID& avxdid : sensors) {
92 TString buff = (std::string)avxdid;
93 TString buffus = buff;
94 buffus.ReplaceAll(
".",
"_");
100 "PXDOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
102 "PXDOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
105 "PXDMaxOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
107 "PXDMaxOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
110 hOccModAfterInjLERGate[avxdid] =
new TH2F(
"PXDOccInjLERGate_" + buffus,
"PXDOccInjLERGate " + buff +
";Time;Gate", 1000, 0, 10000,
113 hOccModAfterInjHERGate[avxdid] =
new TH2F(
"PXDOccInjHERGate_" + buffus,
"PXDOccInjHERGate " + buff +
";Time;Gate", 1000, 0, 10000,
119 "PXDOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
121 "PXDOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
124 "PXDMaxOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
126 "PXDMaxOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
129 hOccModAfterInjLERGate[avxdid] =
new TH2F(
"PXDOccInjLERGate_" + buffus,
"PXDOccInjLERGate " + buff +
";Time;Gate", 1000, 0, 10000,
132 hOccModAfterInjHERGate[avxdid] =
new TH2F(
"PXDOccInjHERGate_" + buffus,
"PXDOccInjHERGate " + buff +
";Time;Gate", 1000, 0, 10000,
148 "PXD Trigger after Last Trigger;Time diff in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
149 hTriggersPerBunch =
new TH1I(
"PXDTriggerBunch",
"PXD Trigger per Bunch;Bunch/4;Triggers", 1280, 0, 1280);
203 unsigned int all = 0;
204 std::map <VxdID, int> freq;
207 freq[p.getSensorID()]++;
212 freq[p.getSensorID()]++;
227 if (a.second) a.second->Fill(difference, freq[a.first]);
232 auto bin = a.second->FindBin(difference);
233 auto value = a.second->GetBinContent(bin);
234 if (freq[a.first] > value) a.second->SetBinContent(bin, freq[a.first]);
262 if (a.second) a.second->Fill(difference, freq[a.first]);
267 auto bin = a.second->FindBin(difference);
268 auto value = a.second->GetBinContent(bin);
269 if (freq[a.first] > value) a.second->SetBinContent(bin, freq[a.first]);
HistoModule()
Constructor.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
std::map< VxdID, TH1F * > hOccModAfterInjLER
Histogram Occupancy after LER injection.
TH1F * hMaxOccAfterInjHER
Histogram Max Occupancy after HER injection.
TH2F * hOccAfterInjLERGate
Occupancy after LER injection per Gate.
std::string m_PXDRawHitsName
The name of the StoreArray of PXDRawHits.
TH1F * hMaxOccAfterInjLER
Histogram Max Occupancy after LER injection.
void initialize() override final
initialize function
TH1I * hTriggersAfterTrigger
Histogram for Nr Entries (=Triggers after Last Trigger.
StoreArray< PXDCluster > m_storeClusters
Input array for PXD Clusters.
std::map< VxdID, TH1F * > hMaxOccModAfterInjHER
Histogram Max Occupancy after HER injection.
std::map< VxdID, TH1F * > hMaxOccModAfterInjLER
Histogram Max Occupancy after LER injection.
void defineHisto() override final
defineHisto function
std::map< VxdID, TH2F * > hOccModAfterInjLERGate
Occupancy after LER injection per Gate per Module.
bool m_eachModule
create a histo per module
bool m_useClusters
use PXDClusters instead of Raw Hits
void event() override final
event function
bool m_createMaxHist
create max hits histogram, not multi processing save!!
std::string m_PXDClustersName
The name of the StoreArray of PXDClusters.
std::map< VxdID, TH2F * > hOccModAfterInjHERGate
Occupancy after HER injection per Gate per Module.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
TH1F * hOccAfterInjLER
Histogram Occupancy after LER injection.
PXDInjectionDQMModule()
Constructor defining the parameters.
void beginRun() override final
beginRun function
VXD::GeoCache & m_vxdGeometry
the VXD geometry
TH1F * hOccAfterInjHER
Histogram Occupancy after HER injection.
TH2F * hOccAfterInjHERGate
Occupancy after HER injection per Gate.
TH1I * hEOccAfterInjLER
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
StoreObjPtr< EventLevelTriggerTimeInfo > m_EventLevelTriggerTimeInfo
Object for TTD mdst object.
StoreArray< PXDRawHit > m_storeRawHits
Input array for PXD Raw Hits.
TH1I * hTriggersPerBunch
Histogram forTrigger per Bunch.
std::map< VxdID, TH1F * > hOccModAfterInjHER
Histogram Occupancy after HER injection.
bool m_offlineStudy
create histos with much finer binning and larger range
bool m_createGateHist
create per gate hits 2d histogram
TH1I * hEOccAfterInjHER
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
Base class to provide Sensor Information for PXD and SVD.
Class to uniquely identify a any structure of the PXD and SVD.
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.
Namespace to encapsulate code needed for simulation and reconstrucion of the PXD.
Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes.
Abstract base class for different kinds of events.