9 #include <pxd/modules/pxdDQM/PXDInjectionDQMModule.h>
10 #include "TDirectory.h"
26 PXDInjectionDQMModule::PXDInjectionDQMModule() :
HistoModule(), m_vxdGeometry(VXD::
GeoCache::getInstance())
32 std::string(
"PXDINJ"));
45 TDirectory* oldDir = gDirectory;
52 hOccAfterInjLER =
new TH1F(
"PXDOccInjLER",
"PXDOccInjLER/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
53 hOccAfterInjHER =
new TH1F(
"PXDOccInjHER",
"PXDOccInjHER/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
54 hEOccAfterInjLER =
new TH1I(
"PXDEOccInjLER",
"PXDEOccInjLER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0, 50000);
55 hEOccAfterInjHER =
new TH1I(
"PXDEOccInjHER",
"PXDEOccInjHER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0, 50000);
57 hMaxOccAfterInjLER =
new TH1F(
"PXDMaxOccInjLER",
"PXDMaxOccInjLER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0,
59 hMaxOccAfterInjHER =
new TH1F(
"PXDMaxOccInjHER",
"PXDMaxOccInjHER/Time;Time in #mus;Triggers/Time (0.5 #mus bins)", 100000, 0,
63 hOccAfterInjLERGate =
new TH2F(
"PXDOccInjLERGate",
"PXDOccInjLERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
64 hOccAfterInjHERGate =
new TH2F(
"PXDOccInjHERGate",
"PXDOccInjHERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
67 hOccAfterInjLER =
new TH1F(
"PXDOccInjLER",
"PXDOccInjLER/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
68 hOccAfterInjHER =
new TH1F(
"PXDOccInjHER",
"PXDOccInjHER/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
69 hEOccAfterInjLER =
new TH1I(
"PXDEOccInjLER",
"PXDEOccInjLER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
70 hEOccAfterInjHER =
new TH1I(
"PXDEOccInjHER",
"PXDEOccInjHER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
72 hMaxOccAfterInjLER =
new TH1F(
"PXDMaxOccInjLER",
"PXDMaxOccInjLER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
73 hMaxOccAfterInjHER =
new TH1F(
"PXDMaxOccInjHER",
"PXDMaxOccInjHER/Time;Time in #mus;Triggers/Time (5 #mus bins)", 4000, 0, 20000);
76 hOccAfterInjLERGate =
new TH2F(
"PXDOccInjLERGate",
"PXDOccInjLERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
77 hOccAfterInjHERGate =
new TH2F(
"PXDOccInjHERGate",
"PXDOccInjHERGate;Time;Gate", 1000, 0, 10000, 192, 0, 192);
83 for (
VxdID& avxdid : sensors) {
88 TString buff = (std::string)avxdid;
89 TString bufful = buff;
90 bufful.ReplaceAll(
".",
"_");
96 "PXDOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
98 "PXDOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
101 "PXDMaxOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
103 "PXDMaxOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
106 hOccModAfterInjLERGate[avxdid] =
new TH2F(
"PXDOccInjLERGate_" + bufful,
"PXDOccInjLERGate " + buff +
";Time;Gate", 1000, 0, 10000,
109 hOccModAfterInjHERGate[avxdid] =
new TH2F(
"PXDOccInjHERGate_" + bufful,
"PXDOccInjHERGate " + buff +
";Time;Gate", 1000, 0, 10000,
115 "PXDOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
117 "PXDOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
120 "PXDMaxOccModInjLER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
122 "PXDMaxOccModInjHER " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
125 hOccModAfterInjLERGate[avxdid] =
new TH2F(
"PXDOccInjLERGate_" + bufful,
"PXDOccInjLERGate " + buff +
";Time;Gate", 1000, 0, 10000,
128 hOccModAfterInjHERGate[avxdid] =
new TH2F(
"PXDOccInjHERGate_" + bufful,
"PXDOccInjHERGate " + buff +
";Time;Gate", 1000, 0, 10000,
144 "PXD Trigger after Last Trigger;Time diff in #mus;Count/Time (0.5 #mus bins)", 100000, 0, 50000);
145 hTriggersPerBunch =
new TH1I(
"PXDTriggerBunch",
"PXD Trigger per Bunch;Bunch/4;Triggers", 1280, 0, 1280);
199 unsigned int all = 0;
200 std::map <VxdID, int> freq;
203 freq[p.getSensorID()]++;
208 freq[p.getSensorID()]++;
223 if (a.second) a.second->Fill(difference, freq[a.first]);
228 auto bin = a.second->FindBin(difference);
229 auto value = a.second->GetBinContent(bin);
230 if (freq[a.first] > value) a.second->SetBinContent(bin, freq[a.first]);
258 if (a.second) a.second->Fill(difference, freq[a.first]);
263 auto bin = a.second->FindBin(difference);
264 auto value = a.second->GetBinContent(bin);
265 if (freq[a.first] > value) a.second->SetBinContent(bin, freq[a.first]);
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
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.
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.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const std::vector< VxdID > getListOfSensors() const
Get list of all sensors.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
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.