9#include <pxd/modules/pxdDQM/PXDRawDQMModule.h>
11#include <vxd/geometry/GeoCache.h>
12#include <TDirectory.h>
13#include <boost/format.hpp>
38 std::string(
"pxdraw"));
48 TDirectory* oldDir = gDirectory;
54 hrawPxdPackets =
new TH1F(
"hrawPxdPackets",
"Pxd Raw Packet Nr;Nr per Event", 16, 0, 16);
55 hrawPxdPacketSize =
new TH1F(
"hrawPxdPacketSize",
"Pxd Raw Packetsize;Words per packet", 1024, 0, 1024);
57 "Pxd Raw Hit Map Overview;column+(ladder-1)*300+100;row+850*((layer-1)*2+(sensor-1))", 3700 / 50, 0, 3700, 3500 / 50, 0, 3500);
62 hrawPxdHitsCount =
new TH1F(
"hrawPxdCount",
"Pxd Raw Count ;Nr per Event", 8192, 0, 8192);
66 for (
const VxdID& avxdid : sensors) {
70 TString buff = (std::string)avxdid;
71 TString buffus = buff;
72 buffus.ReplaceAll(
".",
"_");
75 (
"Pxd Raw Hit Map, " + buff +
";column;row"), 250,
78 (
"Pxd Raw Charge Map, " + buff +
";column;row"), 250, 0, 250, 768, 0, 768);
80 (
"Pxd Raw Hit Charge, " + buff +
";Charge"), 256, 0, 256);
82 (
"Pxd Raw Hit Time Window (framenr*192-gate_of_hit), " + buff +
";Time [a.u.]"), 2048, -256, 2048 - 256);
84 (
"Pxd Raw Gate Time Window (framenr*192-triggergate_of_hit), " + buff +
";Time [a.u.]"), 2048, -256, 2048 - 256);
127 VxdID currentVxdId = it.getSensorID();
133 const PXDDAQDHEStatus* dhe = (*m_storeDAQEvtStats).findDHE(currentVxdId);
134 if (dhe ==
nullptr) {
135 B2ERROR(
"No DHE found for SensorId: " << currentVxdId);
141 100 + it.getRow() + 850 * (layer + layer + sensor - 3));
156 unsigned int layer, ladder, sensor;
158 currentVxdId = it.getSensorID();
163 dhh_id = ((layer - 1) << 5) | ((ladder) << 1) | (sensor - 1);
164 if (dhh_id <= 0 || dhh_id >= 64) {
165 B2ERROR(
"SensorId (DHH ID) out of range: " << dhh_id);
169 unsigned int chip_offset;
170 chip_offset = it.getChip() * 64;
171 const unsigned char* data = &it.getData()[0];
172 for (
int row = 0; row < 768; row++) {
173 for (
int col = 0; col < 64; col++) {
174 hrawPxdAdcMapAll->Fill(col + chip_offset + ladder * 300 - 200, 100 + row + 850 * (layer + layer + sensor - 3), *(data++));
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...
The PXD DAQ DHE Status class.
unsigned short getTriggerGate(void) const
get Trigger Gate
TH2F * hrawPxdAdcMapAll
Histogram Adc 2d hitmap (full frames only) (all pxd)
void initialize() override final
Initialize.
std::string m_storeRawAdcsName
RawAdcs StoreArray name.
TH1F * hrawPxdPacketSize
Histogram raw packet size.
StoreObjPtr< PXDDAQStatus > m_storeDAQEvtStats
Input array for DAQ Status.
StoreArray< RawPXD > m_storeRawPxdrarray
Storearray for raw data packets.
std::map< VxdID, TH2F * > m_hrawPxdChargeMap
Histogram 2d chargemap.
void defineHisto() override final
Define histograms.
std::string m_storeRawHitsName
PXDRawHits StoreArray name.
std::map< VxdID, TH1F * > m_hrawPxdGateTimeWindow
Histogram raw pixel trigger gate window.
std::string m_storeRawPxdrarrayName
RawPXD StoreArray name.
void event() override final
Event.
TH1F * hrawPxdHitsCount
Histogram pixelcount/?
TH2F * hrawPxdHitMapAll
Histogram 2d hitmap (all)
std::map< VxdID, TH1F * > m_hrawPxdHitTimeWindow
Histogram raw pixel hit "time" window.
PXDRawDQMModule()
Constructor defining the parameters.
StoreArray< PXDRawAdc > m_storeRawAdcs
Storearray for ADC from full frames.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
std::map< VxdID, TH2F * > m_hrawPxdHitMap
Histogram 2d hitmap.
TH1F * hrawPxdPackets
Histogram number of raw packets.
void beginRun() override final
Begin run.
std::map< VxdID, TH1F * > m_hrawPxdHitsCharge
Histogram raw pixel charge.
StoreArray< PXDRawHit > m_storeRawHits
Storearray for raw pixels.
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
const std::vector< VxdID > getListOfSensors() const
Get list of all sensors.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a reference to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
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.