9#include <pxd/modules/pxdDQM/PXDTrackClusterDQMModule.h>
10#include <pxd/unpacking/PXDMappingLookup.h>
11#include <pxd/geometry/SensorInfo.h>
12#include <TDirectory.h>
34 std::string(
"PXDER"));
57 TDirectory* oldDir = gDirectory;
64 for (
VxdID& avxdid : sensors) {
69 TString buff = (std::string)avxdid;
70 buff.ReplaceAll(
".",
"_");
72 m_trackClusterCharge[avxdid] =
new TH1F(
"PXD_Track_Cluster_Charge_" + buff,
"PXD Track Cluster Charge " + buff +
";Charge/ADU;",
76 "PXD Track Cluster Charge (uncorrected)" + buff +
";Charge/ADU;", 100, 0, 100);
80 if (avxdid ==
VxdID(
"1.5.1")) {
81 for (
int s = 0; s < 6; s++) {
82 for (
int d = 0; d < 4; d++) {
83 m_trackASICClusterCharge[avxdid][s][d] =
new TH1F(
"PXD_Track_Cluster_Charge_" + buff + Form(
"_sw%d_dcd%d", s + 1, d + 1),
84 "PXD Track Cluster Charge " + buff + Form(
" sw%d dcd%d ", s + 1, d + 1) +
";Charge/ADU;", 100, 0, 100);
91 m_trackedClusters =
new TH1F(
"PXD_Tracked_Clusters",
"PXD_Tracked_Clusters", 64, 0, 64);
93 for (
auto i = 0; i < 64; i++) {
94 auto layer = (((i >> 5) & 0x1) + 1);
95 auto ladder = ((i >> 1) & 0xF);
96 auto sensor = ((i & 0x1) + 1);
115 for (
const auto& it2 : it1.second) {
116 for (
const auto& it3 : it2) {
117 if (it3) it3->Reset();
132 if (!recoTrack.
size())
continue;
136 double correction = 1.0;
137 if (tfr) correction = sin(tfr->
getMomentum().Theta());
138 for (
auto& cluster : pxdClustersTrack) {
142 cluster.getCharge()*correction);
145 if (cluster.getSensorID() ==
VxdID(
"1.5.1")) {
148 cluster.getSensorID());
156 if (h) h->Fill(cluster.getCharge()*correction);
static const ChargedStable pion
charged pion particle
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...
void initialize() override final
Initialize.
bool m_ASICHistos
Fill aditional histograms per ASCI region.
std::map< VxdID, TH1F * > m_trackClusterChargeUC
Cluster Charge for PXD clusters, uncorrected.
std::string m_TracksStoreArrayName
StoreArray name where Tracks are written.
void defineHisto() override final
Define histograms.
TH1F * m_trackedClusters
Number of Tracked Clusters per module.
std::map< VxdID, std::array< std::array< TH1F *, 4 >, 6 > > m_trackASICClusterCharge
Cluster Charge for ASIC combinations for PXD clusters.
void event() override final
Event.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
StoreArray< Track > m_tracks
reco track store array
bool m_moreHistos
Fill aditional histograms.
PXDTrackClusterDQMModule()
Constructor.
StoreArray< RecoTrack > m_recoTracks
reco track store array
void beginRun() override final
Begin run.
VXD::GeoCache & m_vxdGeometry
the geometry
std::map< VxdID, TH1F * > m_trackClusterCharge
Cluster Charge for PXD clusters.
std::map< VxdID, int > m_vxd_to_dhe
map vxd id to dhe id
std::string m_RecoTracksStoreArrayName
StoreArray name where RecoTracks are written.
static int getDCDID(const int u, const int v, const VxdID sensorID)
get ID of DCD for giving pixel, range: 1..4.
static int getSWBID(const int v)
get ID of SWB for giving pixel, range: 1..6.
Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific inform...
This is the Reconstruction Event-Data Model Track.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
Values of the result of a track fit with a given particle hypothesis.
ROOT::Math::XYZVector getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.
Class that bundles various TrackFitResults.
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.
int getVCellID(double v, bool clamp=false) const
Return the corresponding pixel/strip ID of a given v coordinate.
int getUCellID(double u, double v=0, bool clamp=false) const
Return the corresponding pixel/strip ID of a given u coordinate.
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.
Abstract base class for different kinds of events.