13 #include "pxd/modules/pxdDQM/PXDDQMClustersModule.h"
15 #include <framework/core/HistoModule.h>
16 #include <framework/gearbox/Unit.h>
17 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/datastore/StoreArray.h>
19 #include <framework/datastore/RelationArray.h>
21 #include <pxd/dataobjects/PXDDigit.h>
22 #include <pxd/dataobjects/PXDCluster.h>
23 #include <pxd/geometry/SensorInfo.h>
25 #include <vxd/geometry/GeoCache.h>
26 #include <vxd/geometry/SensorInfoBase.h>
27 #include <vxd/geometry/GeoTools.h>
28 #include <pxd/unpacking/PXDMappingLookup.h>
29 #include <pxd/reconstruction/PXDGainCalibrator.h>
31 #include <boost/format.hpp>
33 #include "TDirectory.h"
53 setDescription(
"PXD DQM clusters module "
54 "Recommended Number of events for monitorin is 40 kEvents or more to fill all histograms "
57 setPropertyFlags(c_ParallelProcessingCertified);
58 addParam(
"CutMinCharge", m_CutMinCharge,
59 "cut on pixel charge for accepting good pixel, default >= 12", 12);
60 addParam(
"CutMinSeedCharge", m_CutMinSeedCharge,
61 "cut on cluster seed for accepting good cluster, default >= 12", 12);
62 addParam(
"CutMaxClusterSize", m_CutMaxClusterSize,
63 "cut on cluster size accepting good cluster, default <= 4", 4);
64 addParam(
"CutMinClusterCharge", m_CutMinClusterCharge,
65 "cut on cluster charge for accepting good cluster, default >= 12", 12);
66 addParam(
"histogramDirectoryName", m_histogramDirectoryName,
"Name of the directory where histograms will be placed",
67 std::string(
"PXDDQMClusters"));
75 void PXDDQMClustersModule::defineHisto()
77 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
78 if (gTools->getNumberOfLayers() == 0) {
79 B2FATAL(
"Missing geometry for VXD, check steering file.");
81 if (gTools->getNumberOfPXDLayers() == 0) {
82 B2WARNING(
"Missing geometry for PXD, PXD-DQM is skipped.");
87 TDirectory* oldDir = gDirectory;
88 if (m_histogramDirectoryName !=
"") {
89 oldDir->mkdir(m_histogramDirectoryName.c_str());
90 oldDir->cd(m_histogramDirectoryName.c_str());
94 int nPXDSensors = gTools->getNumberOfPXDSensors();
95 int nPXDChips = gTools->getTotalPXDChips();
98 m_hitMapCounts =
new TH1D(
"DQM_PXD_PixelHitmapCounts",
"PXD Integrated number of fired pixels per sensor",
99 nPXDSensors, 0, nPXDSensors);
100 m_hitMapCounts->GetXaxis()->SetTitle(
"Sensor ID");
101 m_hitMapCounts->GetYaxis()->SetTitle(
"counts");
103 m_hitMapFilterCounts =
new TH1D(
"DQM_PXD_PixelHitmapFilterCounts",
"PXD Integrated number of filtered pixels per sensor",
104 nPXDSensors, 0, nPXDSensors);
105 m_hitMapFilterCounts->GetXaxis()->SetTitle(
"Sensor ID");
106 m_hitMapFilterCounts->GetYaxis()->SetTitle(
"counts");
108 m_hitMapClCounts =
new TH1D(
"DQM_PXD_ClusterHitmapCounts",
"PXD Integrated number of clusters per sensor",
109 nPXDSensors, 0, nPXDSensors);
110 m_hitMapClCounts->GetXaxis()->SetTitle(
"Sensor ID");
111 m_hitMapClCounts->GetYaxis()->SetTitle(
"counts");
113 m_hitMapClFilterCounts =
new TH1D(
"DQM_PXD_ClusterHitmapFilterCounts",
"PXD Integrated number of filtered clusters per sensor",
114 nPXDSensors, 0, nPXDSensors);
115 m_hitMapClFilterCounts->GetXaxis()->SetTitle(
"Sensor ID");
116 m_hitMapClFilterCounts->GetYaxis()->SetTitle(
"counts");
119 m_hitMapCountsChip =
new TH1D(
"DQM_PXD_PixelHitmapCountsChip",
"PXD Integrated number of fired pixels per chip",
120 nPXDChips, 0, nPXDChips);
121 m_hitMapCountsChip->GetXaxis()->SetTitle(
"Chip ID");
122 m_hitMapCountsChip->GetYaxis()->SetTitle(
"counts");
123 m_hitMapClCountsChip =
new TH1D(
"DQM_PXD_ClusterHitmapCountsChip",
"PXD Integrated number of clusters per chip",
124 nPXDChips, 0, nPXDChips);
125 m_hitMapClCountsChip->GetXaxis()->SetTitle(
"Chip ID");
126 m_hitMapClCountsChip->GetYaxis()->SetTitle(
"counts");
127 for (
int i = 0; i < nPXDChips; i++) {
128 VxdID id = gTools->getChipIDFromPXDIndex(i);
130 int iLadder =
id.getLadderNumber();
131 int iSensor =
id.getSensorNumber();
132 int iChip = gTools->getPXDChipNumber(
id);
133 int IsU = gTools->isPXDSideU(
id);
134 TString AxisTicks = Form(
"%i_%i_%i_u%iDCD", iLayer, iLadder, iSensor, iChip);
136 AxisTicks = Form(
"%i_%i_%i_v%iSWB", iLayer, iLadder, iSensor, iChip);
137 m_hitMapCountsChip->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
138 m_hitMapClCountsChip->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
141 for (
int i = 0; i < nPXDSensors; i++) {
142 VxdID id = gTools->getSensorIDFromPXDIndex(i);
144 int iLadder =
id.getLadderNumber();
145 int iSensor =
id.getSensorNumber();
146 TString AxisTicks = Form(
"%i_%i_%i", iLayer, iLadder, iSensor);
147 m_hitMapCounts->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
148 m_hitMapClCounts->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
151 m_fired.resize(nPXDSensors);
152 m_goodfired.resize(nPXDSensors);
153 m_clusters.resize(nPXDSensors);
154 m_goodclusters.resize(nPXDSensors);
155 m_startRow.resize(nPXDSensors);
156 m_chargStartRow.resize(nPXDSensors);
157 m_startRowCount.resize(nPXDSensors);
158 m_clusterCharge.resize(nPXDSensors);
159 m_clusterEnergy.resize(nPXDSensors);
160 m_pixelSignal.resize(nPXDSensors);
161 m_clusterSizeU.resize(nPXDSensors);
162 m_clusterSizeV.resize(nPXDSensors);
163 m_clusterSizeUV.resize(nPXDSensors);
165 m_hitMapU.resize(nPXDSensors);
166 m_hitMapV.resize(nPXDSensors);
167 m_hitMap.resize(nPXDSensors);
168 m_hitMapUCl.resize(nPXDSensors);
169 m_hitMapVCl.resize(nPXDSensors);
170 m_hitMapCl.resize(nPXDSensors);
171 m_seed.resize(nPXDSensors);
172 for (
int i = 0; i < nPXDSensors; i++) {
173 VxdID id = gTools->getSensorIDFromPXDIndex(i);
175 int iLadder =
id.getLadderNumber();
176 int iSensor =
id.getSensorNumber();
177 VxdID sensorID(iLayer, iLadder, iSensor);
179 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
185 string name = str(format(
"DQM_PXD_%1%_Fired") % sensorDescr);
186 string title = str(format(
"PXD Sensor %1% Fired pixels") % sensorDescr);
187 m_fired[i] =
new TH1D(name.c_str(), title.c_str(), 50, 0, 50);
188 m_fired[i]->GetXaxis()->SetTitle(
"# of fired pixels");
189 m_fired[i]->GetYaxis()->SetTitle(
"counts");
193 name = str(format(
"DQM_PXD_%1%_GoodFired") % sensorDescr);
194 title = str(format(
"PXD Sensor %1% Good Fired pixels") % sensorDescr);
195 m_goodfired[i] =
new TH1D(name.c_str(), title.c_str(), 50, 0, 50);
196 m_goodfired[i]->GetXaxis()->SetTitle(
"# of fired pixels");
197 m_goodfired[i]->GetYaxis()->SetTitle(
"counts");
201 name = str(format(
"DQM_PXD_%1%_Clusters") % sensorDescr);
202 title = str(format(
"PXD Sensor %1% Number of clusters") % sensorDescr);
203 m_clusters[i] =
new TH1D(name.c_str(), title.c_str(), 20, 0, 20);
204 m_clusters[i]->GetXaxis()->SetTitle(
"# of clusters");
205 m_clusters[i]->GetYaxis()->SetTitle(
"counts");
209 name = str(format(
"DQM_PXD_%1%_GoodClusters") % sensorDescr);
210 title = str(format(
"PXD Sensor %1% Number of good clusters") % sensorDescr);
211 m_goodclusters[i] =
new TH1D(name.c_str(), title.c_str(), 20, 0, 20);
212 m_goodclusters[i]->GetXaxis()->SetTitle(
"# of clusters");
213 m_goodclusters[i]->GetYaxis()->SetTitle(
"counts");
217 name = str(format(
"DQM_PXD_%1%_StartRow") % sensorDescr);
218 title = str(format(
"PXD Sensor %1% Start row distribution") % sensorDescr);
220 m_startRow[i] =
new TH1D(name.c_str(), title.c_str(), nVPixels / 4, 0.0, nVPixels);
221 m_startRow[i]->GetXaxis()->SetTitle(
"start row [pitch units]");
222 m_startRow[i]->GetYaxis()->SetTitle(
"count");
226 name = str(format(
"DQM_PXD_%1%_AverageSeedByStartRow") % sensorDescr);
227 title = str(format(
"PXD Sensor %1% Average seed charge by distance from the start row") % sensorDescr);
228 m_chargStartRow[i] =
new TH1D(name.c_str(), title.c_str(), nVPixels / 4, 0.0, nVPixels);
229 m_chargStartRow[i]->GetXaxis()->SetTitle(
"distance from the start row [pitch units]");
230 m_chargStartRow[i]->GetYaxis()->SetTitle(
"average seed [ADU]");
231 name = str(format(
"DQM_PXD_%1%_SeedCountsByStartRow") % sensorDescr);
232 title = str(format(
"PXD Sensor %1% Seed charge count by distance from the start row") % sensorDescr);
233 m_startRowCount[i] =
new TH1D(name.c_str(), title.c_str(), nVPixels / 4, 0.0, nVPixels);
234 m_startRowCount[i]->GetXaxis()->SetTitle(
"distance from the start row [pitch units]");
235 m_startRowCount[i]->GetYaxis()->SetTitle(
"count");
239 name = str(format(
"DQM_PXD_%1%_ClusterCharge") % sensorDescr);
240 title = str(format(
"PXD Sensor %1% Cluster Charge") % sensorDescr);
241 m_clusterCharge[i] =
new TH1D(name.c_str(), title.c_str(), 256, 0, 256);
242 m_clusterCharge[i]->GetXaxis()->SetTitle(
"charge of clusters [ADU]");
243 m_clusterCharge[i]->GetYaxis()->SetTitle(
"counts");
247 name = str(format(
"DQM_PXD_%1%_ClusterEnergy") % sensorDescr);
248 title = str(format(
"PXD Sensor %1% Cluster Energy") % sensorDescr);
249 m_clusterEnergy[i] =
new TH1D(name.c_str(), title.c_str(), 100, 0, 50);
250 m_clusterEnergy[i]->GetXaxis()->SetTitle(
"energy of clusters [keV]");
251 m_clusterEnergy[i]->GetYaxis()->SetTitle(
"counts");
255 name = str(format(
"DQM_PXD_%1%_PixelSignal") % sensorDescr);
256 title = str(format(
"PXD Sensor %1% Pixel Signal") % sensorDescr);
257 m_pixelSignal[i] =
new TH1D(name.c_str(), title.c_str(), 256, 0, 256);
258 m_pixelSignal[i]->GetXaxis()->SetTitle(
"signal of pixels [ADU]");
259 m_pixelSignal[i]->GetYaxis()->SetTitle(
"counts");
263 name = str(format(
"DQM_PXD_%1%_ClusterSizeU") % sensorDescr);
264 title = str(format(
"PXD Sensor %1% Cluster Size U") % sensorDescr);
265 m_clusterSizeU[i] =
new TH1D(name.c_str(), title.c_str(), 10, 0, 10);
266 m_clusterSizeU[i]->GetXaxis()->SetTitle(
"size of u clusters");
267 m_clusterSizeU[i]->GetYaxis()->SetTitle(
"counts");
271 name = str(format(
"DQM_PXD_%1%_ClusterSizeV") % sensorDescr);
272 title = str(format(
"PXD Sensor %1% Cluster Size V") % sensorDescr);
273 m_clusterSizeV[i] =
new TH1D(name.c_str(), title.c_str(), 10, 0, 10);
274 m_clusterSizeV[i]->GetXaxis()->SetTitle(
"size of v clusters");
275 m_clusterSizeV[i]->GetYaxis()->SetTitle(
"counts");
279 name = str(format(
"DQM_PXD_%1%_ClusterSizeUV") % sensorDescr);
280 title = str(format(
"PXD Sensor %1% Cluster Size U+V") % sensorDescr);
281 m_clusterSizeUV[i] =
new TH1D(name.c_str(), title.c_str(), 10, 0, 10);
282 m_clusterSizeUV[i]->GetXaxis()->SetTitle(
"size of u+v clusters");
283 m_clusterSizeUV[i]->GetYaxis()->SetTitle(
"counts");
289 name = str(format(
"PXD_%1%_PixelHitmapU") % sensorDescr);
290 title = str(format(
"PXD Sensor %1% Pixel Hitmap in U") % sensorDescr);
291 m_hitMapU[i] =
new TH1D(name.c_str(), title.c_str(), nUPixels, 0, nUPixels);
292 m_hitMapU[i]->GetXaxis()->SetTitle(
"u position [pitch units]");
293 m_hitMapU[i]->GetYaxis()->SetTitle(
"hits");
295 name = str(format(
"PXD_%1%_PixelHitmapV") % sensorDescr);
296 title = str(format(
"PXD Sensor %1% Pixel Hitmap in V") % sensorDescr);
297 m_hitMapV[i] =
new TH1D(name.c_str(), title.c_str(), nVPixels, 0, nVPixels);
298 m_hitMapV[i]->GetXaxis()->SetTitle(
"v position [pitch units]");
299 m_hitMapV[i]->GetYaxis()->SetTitle(
"hits");
301 name = str(format(
"PXD_%1%_PixelHitmap") % sensorDescr);
302 title = str(format(
"PXD Sensor %1% Pixel Hitmap") % sensorDescr);
303 m_hitMap[i] =
new TH2D(name.c_str(), title.c_str(), nUPixels, 0, nUPixels, nVPixels, 0, nVPixels);
304 m_hitMap[i]->GetXaxis()->SetTitle(
"u position [pitch units]");
305 m_hitMap[i]->GetYaxis()->SetTitle(
"v position [pitch units]");
306 m_hitMap[i]->GetZaxis()->SetTitle(
"hits");
312 name = str(format(
"PXD_%1%_HitmapClstU") % sensorDescr);
313 title = str(format(
"PXD Sensor %1% Hitmap Clusters in U") % sensorDescr);
314 m_hitMapUCl[i] =
new TH1D(name.c_str(), title.c_str(), nUPixels, 0, nUPixels);
315 m_hitMapUCl[i]->GetXaxis()->SetTitle(
"u position [pitch units]");
316 m_hitMapUCl[i]->GetYaxis()->SetTitle(
"hits");
318 name = str(format(
"PXD_%1%_HitmapClstV") % sensorDescr);
319 title = str(format(
"PXD Sensor %1% Hitmap Clusters in V") % sensorDescr);
320 m_hitMapVCl[i] =
new TH1D(name.c_str(), title.c_str(), nVPixels, 0, nVPixels);
321 m_hitMapVCl[i]->GetXaxis()->SetTitle(
"v position [pitch units]");
322 m_hitMapVCl[i]->GetYaxis()->SetTitle(
"hits");
324 name = str(format(
"PXD_%1%_HitmapClst") % sensorDescr);
325 title = str(format(
"PXD Sensor %1% Hitmap Clusters") % sensorDescr);
326 m_hitMapCl[i] =
new TH2D(name.c_str(), title.c_str(), nUPixels, 0, nUPixels, nVPixels, 0, nVPixels);
327 m_hitMapCl[i]->GetXaxis()->SetTitle(
"u position [pitch units]");
328 m_hitMapCl[i]->GetYaxis()->SetTitle(
"v position [pitch units]");
329 m_hitMapCl[i]->GetZaxis()->SetTitle(
"hits");
334 name = str(format(
"PXD_%1%_Seed") % sensorDescr);
335 title = str(format(
"PXD Sensor %1% Seed charge") % sensorDescr);
336 m_seed[i] =
new TH1D(name.c_str(), title.c_str(), 256, 0, 256);
337 m_seed[i]->GetXaxis()->SetTitle(
"seed charge of clusters [ADU]");
338 m_seed[i]->GetYaxis()->SetTitle(
"count");
345 void PXDDQMClustersModule::initialize()
350 m_storeDAQEvtStats.isOptional();
352 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
353 if (gTools->getNumberOfPXDLayers() != 0) {
357 RelationArray relPXDClusterDigits(storePXDClusters, storePXDDigits);
358 m_storePXDClustersName = storePXDClusters.getName();
359 m_relPXDClusterDigitName = relPXDClusterDigits.
getName();
362 m_storePXDDigitsName = storePXDDigits.getName();
366 void PXDDQMClustersModule::beginRun()
368 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
369 if (gTools->getNumberOfPXDLayers() == 0)
return;
371 if (m_hitMapCounts !=
nullptr) m_hitMapCounts->Reset();
372 if (m_hitMapFilterCounts !=
nullptr) m_hitMapFilterCounts->Reset();
373 if (m_hitMapClCounts !=
nullptr) m_hitMapClCounts->Reset();
374 if (m_hitMapClFilterCounts !=
nullptr) m_hitMapClFilterCounts->Reset();
375 if (m_hitMapCountsChip !=
nullptr) m_hitMapCountsChip->Reset();
376 if (m_hitMapClCountsChip !=
nullptr) m_hitMapClCountsChip->Reset();
378 for (
int i = 0; i < gTools->getNumberOfPXDSensors(); i++) {
379 if (m_fired[i] !=
nullptr) m_fired[i]->Reset();
380 if (m_goodfired[i] !=
nullptr) m_goodfired[i]->Reset();
381 if (m_clusters[i] !=
nullptr) m_clusters[i]->Reset();
382 if (m_goodclusters[i] !=
nullptr) m_goodclusters[i]->Reset();
383 if (m_startRow[i] !=
nullptr) m_startRow[i]->Reset();
384 if (m_chargStartRow[i] !=
nullptr) m_chargStartRow[i]->Reset();
385 if (m_startRowCount[i] !=
nullptr) m_startRowCount[i]->Reset();
386 if (m_clusterCharge[i] !=
nullptr) m_clusterCharge[i]->Reset();
387 if (m_clusterEnergy[i] !=
nullptr) m_clusterEnergy[i]->Reset();
388 if (m_pixelSignal[i] !=
nullptr) m_pixelSignal[i]->Reset();
389 if (m_clusterSizeU[i] !=
nullptr) m_clusterSizeU[i]->Reset();
390 if (m_clusterSizeV[i] !=
nullptr) m_clusterSizeV[i]->Reset();
391 if (m_clusterSizeUV[i] !=
nullptr) m_clusterSizeUV[i]->Reset();
393 if (m_hitMapU[i] !=
nullptr) m_hitMapU[i]->Reset();
394 if (m_hitMapV[i] !=
nullptr) m_hitMapV[i]->Reset();
395 if (m_hitMap[i] !=
nullptr) m_hitMap[i]->Reset();
396 if (m_hitMapUCl[i] !=
nullptr) m_hitMapUCl[i]->Reset();
397 if (m_hitMapVCl[i] !=
nullptr) m_hitMapVCl[i]->Reset();
398 if (m_hitMapCl[i] !=
nullptr) m_hitMapCl[i]->Reset();
399 if (m_seed[i] !=
nullptr) m_seed[i]->Reset();
405 void PXDDQMClustersModule::event()
407 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
408 if (gTools->getNumberOfPXDLayers() == 0)
return;
412 const RelationArray relPXDClusterDigits(storePXDClusters, storePXDDigits, m_relPXDClusterDigitName);
415 if (!storePXDDigits || !storePXDDigits.
getEntries())
return;
417 int firstPXDLayer = gTools->getFirstPXDLayer();
418 int lastPXDLayer = gTools->getLastPXDLayer();
419 int nPXDSensors = gTools->getNumberOfPXDSensors();
423 vector< int > Pixels(nPXDSensors);
424 vector< int > GoodPixels(nPXDSensors);
425 for (
const PXDDigit& digit : storePXDDigits) {
426 int iLayer = digit.getSensorID().getLayerNumber();
427 if ((iLayer < firstPXDLayer) || (iLayer > lastPXDLayer))
continue;
428 int iLadder = digit.getSensorID().getLadderNumber();
429 int iSensor = digit.getSensorID().getSensorNumber();
430 VxdID sensorID(iLayer, iLadder, iSensor);
431 int index = gTools->getPXDSensorIndex(sensorID);
434 int iChip = PXDMappingLookup::getDCDID(digit.getUCellID(), digit.getVCellID(), sensorID);
435 int indexChip = gTools->getPXDChipIndex(sensorID, kTRUE, iChip);
436 if (m_hitMapCountsChip !=
nullptr) m_hitMapCountsChip->Fill(indexChip);
437 iChip = PXDMappingLookup::getSWBID(digit.getVCellID());
438 indexChip = gTools->getPXDChipIndex(sensorID, kFALSE, iChip);
439 if (m_hitMapCountsChip !=
nullptr) m_hitMapCountsChip->Fill(indexChip);
440 if (m_pixelSignal[index] !=
nullptr) m_pixelSignal[index]->Fill(digit.getCharge());
441 if (m_hitMapCounts !=
nullptr) m_hitMapCounts->Fill(index);
443 if (digit.getCharge() >= m_CutMinCharge && digit.getCharge() < 255) {
445 if (m_hitMapFilterCounts !=
nullptr) m_hitMapFilterCounts->Fill(index);
446 if (m_hitMapU[index] !=
nullptr) m_hitMapU[index]->Fill(digit.getUCellID());
447 if (m_hitMapV[index] !=
nullptr) m_hitMapV[index]->Fill(digit.getVCellID());
448 if (m_hitMap[index] !=
nullptr) m_hitMap[index]->Fill(digit.getUCellID(), digit.getVCellID());
451 for (
int i = 0; i < nPXDSensors; i++) {
452 if (m_fired[i] !=
nullptr && Pixels[i] > 0) m_fired[i]->Fill(Pixels[i]);
453 if (m_goodfired[i] !=
nullptr && GoodPixels[i] > 0) m_goodfired[i]->Fill(GoodPixels[i]);
457 vector< int > Clusters(nPXDSensors);
458 vector< int > GoodClusters(nPXDSensors);
459 for (
const PXDCluster& cluster : storePXDClusters) {
460 int iLayer = cluster.getSensorID().getLayerNumber();
461 if ((iLayer < firstPXDLayer) || (iLayer > lastPXDLayer))
continue;
462 int iLadder = cluster.getSensorID().getLadderNumber();
463 int iSensor = cluster.getSensorID().getSensorNumber();
464 VxdID sensorID(iLayer, iLadder, iSensor);
465 int index = gTools->getPXDSensorIndex(sensorID);
469 int indexChip = gTools->getPXDChipIndex(sensorID, kTRUE, iChip);
470 if (m_hitMapClCountsChip !=
nullptr) m_hitMapClCountsChip->Fill(indexChip);
472 indexChip = gTools->getPXDChipIndex(sensorID, kFALSE, iChip);
473 if (m_hitMapClCountsChip !=
nullptr) m_hitMapClCountsChip->Fill(indexChip);
474 if (m_hitMapClCounts !=
nullptr) m_hitMapClCounts->Fill(index);
475 if (m_clusterCharge[index] !=
nullptr) m_clusterCharge[index]->Fill(cluster.getCharge());
481 auto ADUToEnergy = PXDGainCalibrator::getInstance().getADUToEnergy(sensorID, cluster_uID, cluster_vID);
482 if (m_clusterEnergy[index] !=
nullptr) m_clusterEnergy[index]->Fill(cluster.getCharge()* ADUToEnergy / Unit::keV);
483 if (m_clusterSizeU[index] !=
nullptr) m_clusterSizeU[index]->Fill(cluster.getUSize());
484 if (m_clusterSizeV[index] !=
nullptr) m_clusterSizeV[index]->Fill(cluster.getVSize());
485 if (m_clusterSizeUV[index] !=
nullptr) m_clusterSizeUV[index]->Fill(cluster.getSize());
486 if (m_seed[index] !=
nullptr) m_seed[index]->Fill(cluster.getSeedCharge());
489 if (cluster.getSize() <= m_CutMaxClusterSize && cluster.getCharge() >= m_CutMinClusterCharge
490 && cluster.getSeedCharge() >= m_CutMinSeedCharge && cluster.getSeedCharge() < 255) {
491 GoodClusters[index]++;
492 if (m_hitMapClFilterCounts !=
nullptr) m_hitMapClFilterCounts->Fill(index);
494 if (m_hitMapUCl[index] !=
nullptr) m_hitMapUCl[index]->Fill(
496 if (m_hitMapVCl[index] !=
nullptr) m_hitMapVCl[index]->Fill(
498 if (m_hitMapCl[index] !=
nullptr) m_hitMapCl[index]->Fill(
503 for (
int i = 0; i < nPXDSensors; i++) {
504 if (m_clusters[i] !=
nullptr && Clusters[i] > 0) m_clusters[i]->Fill(Clusters[i]);
505 if (m_goodclusters[i] !=
nullptr && GoodClusters[i] > 0) m_goodclusters[i]->Fill(GoodClusters[i]);
509 if (m_storeDAQEvtStats.isValid()) {
510 std::map<VxdID, unsigned short> startRows;
511 for (
int index = 0; index < nPXDSensors; index++) {
512 VxdID id = gTools->getSensorIDFromPXDIndex(index);
515 if (dhe !=
nullptr) {
517 if (m_startRow[index] !=
nullptr) m_startRow[index]->Fill(startRow);
518 startRows.insert(std::make_pair(
id, startRow));
520 B2WARNING(
"No PXDDAQDHEStatus for VXD Sensor " <<
id <<
" found.");
525 for (
auto& cluster : storePXDClusters) {
526 VxdID sensorID = cluster.getSensorID();
527 int index = gTools->getPXDSensorIndex(sensorID);
532 if (m_chargStartRow[index] !=
nullptr) m_chargStartRow[index]->Fill(fDistance, cluster.getSeedCharge());
533 if (m_startRowCount[index] !=
nullptr) m_startRowCount[index]->Fill(fDistance);