14#include <dqm/analysis/modules/DQMHistAnalysisPXDInjection.h>
35 std::string(
"PXDINJ"));
36 B2DEBUG(1,
"DQMHistAnalysisPXDInjection: Constructor done.");
45 TString(
"/c_PXDInjectionLER"));
47 TString(
"/c_PXDInjectionHER"));
48 m_hInjectionLERPXD =
new TH1F(
"HitInjectionLERPXD",
"PXD Hits after LER Injection;Time in #mus;Mean Hits/event", 4000, 0, 20000);
49 m_hInjectionHERPXD =
new TH1F(
"HitInjectionHERPXD",
"PXD Hits after HER Injection;Time in #mus;Mean Hits/event", 4000, 0, 20000);
52 for (
VxdID& avxdid : vxdsensors) {
59 TString buff = (std::string)avxdid;
60 TString bufful = buff;
61 bufful.ReplaceAll(
".",
"_");
66 "PXD Hits after LER Injection " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
68 "PXD Hits after HER Injection " + buff +
"/Time;Time in #mus;Count/Time (5 #mus bins)", 4000, 0, 20000);
72 "PXD Hits after LER Injection " + buff +
" normalized to 1.1.x/Time;Time in #mus;factor", 4000, 0, 20000);
74 "PXD Hits after HER Injection " + buff +
" normalized to 1.1.x/Time;Time in #mus;factor", 4000, 0, 20000);
77 B2DEBUG(1,
"DQMHistAnalysisPXDInjection: initialized.");
83 B2DEBUG(1,
"DQMHistAnalysisPXDInjection: beginRun called.");
96 TH1* Triggers =
nullptr;
98 TString locationHits =
"";
99 TString locationTriggers =
"PXDEOccInjLER";
103 Triggers = (TH1*)
findHist(locationTriggers.Data());
108 TH1* Hits =
nullptr, *RefMod_fw =
nullptr, *RefMod_bw =
nullptr;
109 locationHits =
"PXDOccInjLER";
113 Hits = (TH1*)
findHist(locationHits.Data());
117 locationHits =
"PXDOccInjLER_1_1_1";
121 RefMod_fw = (TH1*)
findHist(locationHits.Data());
122 locationHits =
"PXDOccInjLER_1_1_2";
126 RefMod_bw = (TH1*)
findHist(locationHits.Data());
130 TString buff = (std::string)avxdid;
131 TString bufful = buff;
132 bufful.ReplaceAll(
".",
"_");
134 locationHits =
"PXDOccInjLER_" + bufful;
138 Hits = (TH1*)
findHist(locationHits.Data());
141 if (avxdid.getSensorNumber() == 1 && RefMod_fw) {
143 }
else if (avxdid.getSensorNumber() == 2 && RefMod_bw) {
152 locationTriggers =
"PXDEOccInjHER";
156 Triggers = (TH1*)
findHist(locationTriggers.Data());
161 TH1* Hits =
nullptr, *RefMod_fw =
nullptr, *RefMod_bw =
nullptr;
162 locationHits =
"PXDOccInjHER";
166 Hits = (TH1*)
findHist(locationHits.Data());
170 locationHits =
"PXDOccInjHER_1_1_1";
174 RefMod_fw = (TH1*)
findHist(locationHits.Data());
175 locationHits =
"PXDOccInjHER_1_1_2";
179 RefMod_bw = (TH1*)
findHist(locationHits.Data());
182 TString buff = (std::string)avxdid;
183 TString bufful = buff;
184 bufful.ReplaceAll(
".",
"_");
185 locationHits =
"PXDOccInjHER_" + bufful;
189 Hits = (TH1*)
findHist(locationHits.Data());
192 if (avxdid.getSensorNumber() == 1 && RefMod_fw) {
194 }
else if (avxdid.getSensorNumber() == 2 && RefMod_bw) {
The base class for the histogram analysis module.
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
void terminate(void) override final
This method is called at the end of the event processing.
std::map< VxdID, TCanvas * > m_cInjectionLERPXDModNorm
Canvases per sensor for LER normalized.
std::map< VxdID, TH1F * > m_hInjectionHERPXDModNorm
Histogram per sensor for HER normalized.
void initialize(void) override final
Initializer.
std::map< VxdID, TCanvas * > m_cInjectionHERPXDModNorm
Canvases per sensor for HER normalized.
TCanvas * m_cInjectionLERPXD
Final Canvas.
DQMHistAnalysisPXDInjectionModule()
Constructor.
TH1F * m_hInjectionHERPXD
PXD Hits.
std::string m_histogramDirectoryName
name of histogram directory
TH1F * m_hInjectionLERPXD
PXD Hits.
std::map< VxdID, TCanvas * > m_cInjectionLERPXDMod
Canvases per sensor for LER.
std::map< VxdID, TH1F * > m_hInjectionHERPXDMod
Histogram per sensor for HER.
std::map< VxdID, TH1F * > m_hInjectionLERPXDMod
Histogram per sensor for LER.
std::map< VxdID, TH1F * > m_hInjectionLERPXDModNorm
Histogram per sensor for LER normalized.
std::vector< VxdID > m_sensors
List of PXD sensors.
std::map< VxdID, TCanvas * > m_cInjectionHERPXDMod
Canvases per sensor for HER.
TCanvas * m_cInjectionHERPXD
Final Canvas.
void beginRun(void) override final
Called when entering a new run.
void event(void) override final
This method is called for each event.
void setDescription(const std::string &description)
Sets the description of the module.
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.
static GeoCache & getInstance()
Return a reference to the singleton instance.
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.
Abstract base class for different kinds of events.