9#include <pxd/modules/pxdDQM/PXDRawDQMChipsModule.h>
10#include <vxd/geometry/GeoCache.h>
12#include <TDirectory.h>
13#include <boost/format.hpp>
38 std::string(
"pxdraw"));
46 TDirectory* oldDir = gDirectory;
53 for (
auto i = 0; i < 64; i++) {
54 auto layer = (((i >> 5) & 0x1) + 1);
55 auto ladder = ((i >> 1) & 0xF);
56 auto sensor = ((i & 0x1) + 1);
60 for (
auto j = 0; j < eNumSwitcher; j++) {
61 for (
auto k = 0; k < eNumDCD; k++) {
62 string s = str(format(
"Sensor %d:%d:%d (DHH ID %02Xh) Switcher %d DCD %d") % layer % ladder % sensor % i % j % k);
63 string s2 = str(format(
"_%d.%d.%d_%d_%d") % layer % ladder % sensor % j % k);
65 hrawPxdHitsCount[i][j][k] =
new TH1F((
"hrawPxdCount" + s2).c_str(), (
"Pxd Raw Count " + s +
";Nr per Event").c_str(), 8192, 0,
68 (
"Pxd Raw Hit Charge, " + s +
";Charge").c_str(), 256, 0, 256);
72 for (
auto j = 0; j < eNumSwitcher; j++) {
73 for (
auto k = 0; k < eNumDCD; k++) {
94 for (
auto i = 0; i < eNumSensors; i++) {
95 for (
auto j = 0; j < eNumSwitcher; j++) {
96 for (
auto k = 0; k < eNumDCD; k++) {
106 uint nhits[eNumSensors][eNumSwitcher][eNumDCD] = {};
111 unsigned int layer, ladder, sensor;
113 currentVxdId = it.getSensorID();
118 dhh_id = ((layer - 1) << 5) | ((ladder) << 1) | (sensor - 1);
119 if (dhh_id <= 0 || dhh_id >= 64) {
120 B2ERROR(
"SensorId (DHH ID) out of range: " << dhh_id);
123 int switcher = it.getRow() / 128;
124 int dcd = it.getColumn() / 64;
126 nhits[dhh_id][switcher][dcd]++;
129 for (
auto i = 0; i < eNumSensors; i++) {
130 for (
auto j = 0; j < eNumSwitcher; j++) {
131 for (
auto k = 0; k < eNumDCD; k++) {
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...
virtual void initialize() override
Initialize.
virtual void event() override
Event.
TH1F * hrawPxdHitsCharge[eNumSensors][eNumSwitcher][eNumDCD]
Histogram raw pixel charge.
std::string m_storeRawHitsName
PXDRawHits StoreArray name.
TH1F * hrawPxdHitsCount[eNumSensors][eNumSwitcher][eNumDCD]
Histogram pixelcount/???
virtual void beginRun() override
Begin run.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
PXDRawDQMChipsModule()
Constructor defining the parameters.
StoreArray< PXDRawHit > m_storeRawHits
Storearray for raw pixels
virtual void defineHisto() override
Define histograms.
static GeoCache & getInstance()
Return a reference to the singleton instance.
bool validSensorID(Belle2::VxdID id) const
Check that id is a valid sensor number.
Class to uniquely identify a any structure of the PXD and SVD.
baseType getSensorNumber() const
Get the sensor id.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
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.