8#include <svd/modules/svdPerformance/SVDPerformanceModule.h>
9#include <framework/datastore/StoreObjPtr.h>
10#include <framework/datastore/RelationVector.h>
12#include <mdst/dataobjects/MCParticle.h>
13#include <mdst/dataobjects/HitPatternVXD.h>
14#include <svd/dataobjects/SVDTrueHit.h>
16#include <boost/foreach.hpp>
24 , m_nTracks(0), m_Pvalue(), m_mom(0), m_nSVDhits(0)
27 setDescription(
"This module check performances of SVD reconstruction of VXD TB data");
29 addParam(
"outputFileName",
m_rootFileName,
"Name of output root file.", std::string(
"SVDPerformance_output.root"));
35 addParam(
"debugLowTime",
m_debugLowTime,
"Cluster Time below this number will produce a printout.",
float(0.));
88 TString nameLayer =
"";
91 TString nameSensor =
"";
95 else if (i == 1 || i == 2)
102 for (
int k = 0; k <
m_nSides; k ++) {
105 TString nameSide =
"";
112 TString NameOfHisto =
"shaper_N_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
113 TString TitleOfHisto =
"number of ShaperDigits (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
118 NameOfHisto =
"reco_N_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
119 TitleOfHisto =
"number of RecoDigits (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
122 NameOfHisto =
"reco_charge_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
123 TitleOfHisto =
"charge of RecoDigits (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
126 NameOfHisto =
"reco_energy_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
127 TitleOfHisto =
"energy collected by RecoDigits (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
130 NameOfHisto =
"reco_noise_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
131 TitleOfHisto =
"strip noise (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
134 NameOfHisto =
"reco_time_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
135 TitleOfHisto =
"strip time (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
140 NameOfHisto =
"clTRK_N_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
141 TitleOfHisto =
"number of clusters related to Tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
144 NameOfHisto =
"clTRK_size_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
145 TitleOfHisto =
"cluster size (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
148 NameOfHisto =
"clTRK_charge_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
149 TitleOfHisto =
"cluster Charge (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
152 NameOfHisto =
"clTRK_energy_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
153 TitleOfHisto =
"cluster Energy (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
156 NameOfHisto =
"clTRK_SN_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
157 TitleOfHisto =
"cluster S/N (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
160 NameOfHisto =
"clTRK_chrgVSsize_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
161 TitleOfHisto =
"cluster charge VS size (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
162 h_cltrkChargeVSSize[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 500, 0, 100000,
"charge (e-)", 15, 0, 15,
"cl size",
165 NameOfHisto =
"clTRK_SNVSsize_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
166 TitleOfHisto =
"cluster SN ratio VS size (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
167 h_cltrkSNVSSize[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 150, 0, 150,
"S/N", 15, 0, 15,
"cl size",
170 NameOfHisto =
"clTRK_TimeVSsize_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
171 TitleOfHisto =
"cluster time VS size (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
172 h_cltrkTimeVSSize[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 200, -100, 100,
"cluster time (ns)", 15, 0, 15,
"cl size",
175 NameOfHisto =
"clTRK_time_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
176 TitleOfHisto =
"cluster time (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
179 NameOfHisto =
"clTRK_timeTB1_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
180 TitleOfHisto =
"cluster time - TB = 1 (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
183 NameOfHisto =
"clTRK_timeTB2_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
184 TitleOfHisto =
"cluster time - TB = 2 (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
187 NameOfHisto =
"clTRK_timeTB3_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
188 TitleOfHisto =
"cluster time - TB = 3 (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
191 NameOfHisto =
"clTRK_timeTB4_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
192 TitleOfHisto =
"cluster time - TB = 4 (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
196 NameOfHisto =
"clTRK_timeVStrueTime_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
197 TitleOfHisto =
"cluster time VS true hit time (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
203 NameOfHisto =
"1clTRK_charge_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
204 TitleOfHisto =
"1-strip cluster Charge (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
208 NameOfHisto =
"1clTRK_SN_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
209 TitleOfHisto =
"1-strip cluster S/N (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
213 NameOfHisto =
"2clTRK_charge_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
214 TitleOfHisto =
"2-strip cluster Charge (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
218 NameOfHisto =
"2clTRK_SN_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
219 TitleOfHisto =
"2-strip cluster S/N (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
223 NameOfHisto =
"clNOtrk_N_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
224 TitleOfHisto =
"number of clusters NOT related to Tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
227 NameOfHisto =
"clNOtrk_size_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
228 TitleOfHisto =
"cluster size, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
231 NameOfHisto =
"clNOtrk_charge_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
232 TitleOfHisto =
"cluster Charge, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
235 NameOfHisto =
"clNOtrk_energy_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
236 TitleOfHisto =
"cluster Energy, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
239 NameOfHisto =
"clNOtrk_maxbin_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
240 TitleOfHisto =
"cluster Seed maxbin, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
243 NameOfHisto =
"clNOtrk_energyVSmaxbin_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
244 TitleOfHisto =
"cluster Energy vs seed max bin U, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
246 h_clEnergyVSMaxbin[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 360, 0, 360,
"energy (keV)", 6, 0, 6,
"seed max bin",
250 NameOfHisto =
"clNOtrk_energyVSsizeMB12_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
251 TitleOfHisto =
"cluster Energy vs Size, maxbin = 1,2 U, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
254 h_clEnergyVSSize_mb12[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 360, 0, 360,
"energy (keV)", 15, 0, 15,
"cl size",
257 NameOfHisto =
"clNOtrk_energyVSsizeMB345_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
258 TitleOfHisto =
"cluster Energy vs Size, maxbin = 3,4,5 U, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
261 h_clEnergyVSSize_mb345[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 360, 0, 360,
"energy (keV)", 15, 0, 15,
"cl size",
264 NameOfHisto =
"clNOtrk_energyVSsizeMB6_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
265 TitleOfHisto =
"cluster Energy vs Size, maxbin = 6 U, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
268 h_clEnergyVSSize_mb6[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 360, 0, 360,
"energy (keV)", 15, 0, 15,
"cl size",
272 NameOfHisto =
"clNOtrk_energyVScoorU_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
273 TitleOfHisto =
"cluster Energy vs coor U, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide
276 h_clEnergyVSCoorU[i][j][1] =
createHistogram2D(NameOfHisto, TitleOfHisto, 360, 0, 360,
"energy (keV)", 200, -3, 3,
"coor U (cm)",
279 NameOfHisto =
"clNOtrk_coorU1VScoorU2_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
280 TitleOfHisto =
"cluster coor1 U vs coor2 U, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
286 NameOfHisto =
"clNOtrk_cellIDU1VScellIDU2_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
287 TitleOfHisto =
"cluster cellID1 U vs cellID2 U, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
293 NameOfHisto =
"clNOtrk_energy12VSdeltaU_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
294 TitleOfHisto =
"cluster energy1+2 U vs delta U, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
298 "delta U (# of cells)",
302 NameOfHisto =
"clNOtrk_energyVScoorV_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
303 TitleOfHisto =
"cluster Energy vs coor V, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide
309 NameOfHisto =
"clNOtrk_coorV1VScoorV2_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
310 TitleOfHisto =
"cluster coor1 V vs coor2 V, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
315 NameOfHisto =
"clNOtrk_cellIDV1VScellIDV2_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
316 TitleOfHisto =
"cluster cellID1 V vs cellID2 V, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
322 NameOfHisto =
"clNOtrk_energy12VSdeltaV_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
323 TitleOfHisto =
"cluster energy1+2 V vs delta V, TB=3,4,5 NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," +
327 "delta V (# of cells)",
332 NameOfHisto =
"clNOtrk_SN_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
333 TitleOfHisto =
"cluster S/N, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
336 NameOfHisto =
"clNOtrk_chrgVSsize_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
337 TitleOfHisto =
"cluster charge VS size, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
338 h_clChargeVSSize[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 500, 0, 100000,
"charge (e-)", 15, 0, 15,
"cl size",
340 NameOfHisto =
"clNOtrk_SNVSsize_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
341 TitleOfHisto =
"cluster S/N ratio VS size, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
343 h_clSNVSSize[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 150, 0, 150,
"S/N", 15, 0, 15,
"cl size",
346 NameOfHisto =
"clNOtrk_TimeVSsize_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
347 TitleOfHisto =
"cluster time VS size, NOT related to tracks (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
348 h_clTimeVSSize[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 200, -100, 100,
"cluster time (ns)", 15, 0, 15,
"cl size",
351 NameOfHisto =
"clNOtrk_time_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
352 TitleOfHisto =
"cluster time (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
357 NameOfHisto =
"clNOtrk_timeVStrueTime_L" + nameLayer +
"S" + nameSensor +
"" + nameSide;
358 TitleOfHisto =
"cluster time VS true hit time (L" + nameLayer +
", sensor" + nameSensor +
"," + nameSide +
" side)";
359 h_clTimeVSTrueTime[i][j][k] =
createHistogram2D(NameOfHisto, TitleOfHisto, 200, -100, 100,
"cluster time", 60, -30, 30,
"true time",
364 TString NameOfHisto =
"clNOtrk_nUVSnV_L" + nameLayer +
"S" + nameSensor;
365 TString TitleOfHisto =
"Number of U clusters VS number of V cluster, TB=3,4,5 (L" + nameLayer +
", sensor" + nameSensor +
")";
366 h_clNuVSNv[i][j] =
createHistogram2D(NameOfHisto, TitleOfHisto, 50, 0, 50,
"# V cluster", 50, 0, 50,
"# U clusters",
369 NameOfHisto =
"clNOtrk_coorUVScoorV_L" + nameLayer +
"S" + nameSensor;
370 TitleOfHisto =
"cluster coor U VS cluster coor V, TB=3,4,5 (L" + nameLayer +
", sensor" + nameSensor +
")";
371 h_clCoorUVSCoorV[i][j] =
createHistogram2D(NameOfHisto, TitleOfHisto, 200, -6.5, 6.5,
"coor V", 200, -3, 3,
"coor U",
374 NameOfHisto =
"clNOtrk_energyUVSenergyV_L" + nameLayer +
"S" + nameSensor;
375 TitleOfHisto =
"cluster energy U VS cluster energy V, TB=3,4,5 (L" + nameLayer +
", sensor" + nameSensor +
")";
383 h_cltrk_UU =
createHistogram1D(
"clTRK_dt_UU",
"track-related U-U clusters time difference", 200, -100, 100,
"time difference (ns)",
385 h_cltrk_VV =
createHistogram1D(
"clTRK_dt_VV",
"track-related V-V clusters time difference", 200, -100, 100,
"time difference (ns)",
387 h_cltrk_UV =
createHistogram1D(
"clTRK_dt_UV",
"track-related U-V clusters time difference", 200, -100, 100,
"time difference (ns)",
391 "L4u cluster time", 200, -100, 100,
"L5u cluster time",
395 "L4v cluster time", 200, -100, 100,
"L5v cluster time",
399 "L5u cluster time", 200, -100, 100,
"L5v cluster time",
432 float c_eTOkeV = 3.6 / 1000;
449 for (
int k = 0; k <
m_nSides; k ++) {
450 nShaperDigi[i][j][k] = 0;
451 nRecoDigi[i][j][k] = 0;
469 tfr = track.getTrackFitResultWithClosestMass(
Const::pion);
484 for (
int cl = 0 ; cl < (int)svdClustersTrack.
size(); cl++) {
486 float clCharge = svdClustersTrack[cl]->getCharge();
487 float clEnergy = svdClustersTrack[cl]->getCharge() * c_eTOkeV;
488 int clSize = svdClustersTrack[cl]->getSize();
489 float clSN = svdClustersTrack[cl]->getSNR();
490 float clTime = svdClustersTrack[cl]->getClsTime();
494 int side = svdClustersTrack[cl]->isUCluster();
496 nCltrk[layer][sensor][side]++;
500 h_cltrkSN[layer][sensor][side]->Fill(clSN);
514 for (
int cll = 0 ; cll < cl; cll++) {
516 int side2 = svdClustersTrack[cll]->isUCluster();
518 if ((
VxdID(theVxdID2).getLayerNumber() == 5) && (side2 != side)) {
520 h_cltrkTime_L5uL5v->Fill(svdClustersTrack[cl]->getClsTime(), svdClustersTrack[cll]->getClsTime());
522 h_cltrkTime_L5uL5v->Fill(svdClustersTrack[cll]->getClsTime(), svdClustersTrack[cl]->getClsTime());
527 if (side2 && side2 == side)
528 h_cltrkTime_L4uL5u->Fill(svdClustersTrack[cl]->getClsTime(), svdClustersTrack[cll]->getClsTime());
530 if (!side2 && side2 == side)
531 h_cltrkTime_L4vL5v->Fill(svdClustersTrack[cl]->getClsTime(), svdClustersTrack[cll]->getClsTime());
537 for (
int cl2 = 0 ; cl2 < cl ; cl2++) {
539 int layerDist = abs(
VxdID(theVxdID).getLayerNumber() - svdClustersTrack[cl2]->getSensorID().getLayerNumber());
541 int side2 = svdClustersTrack[cl2]->isUCluster();
543 if (layerDist == 0) {
544 if ((side == 0) && (side2 == 1))
545 h_cltrk_UV -> Fill(svdClustersTrack[cl2]->getClsTime() - svdClustersTrack[cl]->getClsTime());
547 if ((side == 1) && (side2 == 0))
548 h_cltrk_UV -> Fill(svdClustersTrack[cl]->getClsTime() - svdClustersTrack[cl2]->getClsTime());
549 }
else if (layerDist == 1) {
550 if ((side == 1) && (side2 == 1))
551 h_cltrk_UU -> Fill(svdClustersTrack[cl]->getClsTime() - svdClustersTrack[cl2]->getClsTime());
553 if ((side == 0) && (side2 == 0))
554 h_cltrk_VV -> Fill(svdClustersTrack[cl]->getClsTime() - svdClustersTrack[cl2]->getClsTime());
563 B2DEBUG(10,
"CLUSTER WITH A TIME BELOW " <<
m_debugLowTime <<
"ns");
564 B2DEBUG(10,
"size = " << svdClustersTrack[cl]->getSize() <<
", SNR = " << svdClustersTrack[cl]->getSNR() <<
" charge = " <<
565 svdClustersTrack[cl]->getCharge() <<
", SeedCharge = " << svdClustersTrack[cl]->getSeedCharge() <<
", time = " <<
566 svdClustersTrack[cl]->getClsTime());
573 for (
int i = 0; i < (int)svdTrueHitsTrack.
size(); i++) {
575 h_cltrkTimeVSTrueTime[layer][sensor][side]->Fill(svdClustersTrack[cl]->getClsTime(), svdTrueHitsTrack[i]->getGlobalTime());
577 B2DEBUG(10,
"True Hit Time = " << svdTrueHitsTrack[i]->getGlobalTime() <<
", EnergyDep = " << svdTrueHitsTrack[i]->getEnergyDep() <<
578 ", size = " << svdTrueHitsTrack.
size());
585 if ((
int)mcParticleTrack.
size() > 0)
586 B2DEBUG(10,
"MCParticle PDG = " << mcParticleTrack[0]->getPDG() <<
", energy = " << mcParticleTrack[0]->getEnergy() <<
", size = "
587 << mcParticleTrack.
size());
594 h_1cltrkSN[layer][sensor][side]->Fill(svdClustersTrack[cl]->getSNR());
599 h_2cltrkSN[layer][sensor][side]->Fill(svdClustersTrack[cl]->getSNR());
606 B2DEBUG(1,
"%%%%%%%% NEW EVENT, number of Tracks = " <<
m_Tracks.getEntries());
609 for (
int digi = 0 ; digi <
m_svdShapers.getEntries(); digi++) {
616 nShaperDigi[layer][sensor][side]++;
620 if (((layer == 0) && (
m_svdShapers[digi]->getCellID() > 767)) ||
621 ((layer != 0) && (
m_svdShapers[digi]->getCellID() > 511)))
622 B2WARNING(
" SVDShaperDigits: unexpected cellID for Layer " << layer <<
" Ladder " <<
VxdID(theVxdID).getLadderNumber() <<
623 " Sensor " <<
VxdID(theVxdID).getSensorNumber() <<
" V side, strip = " <<
m_svdShapers[digi]->getCellID());
626 B2WARNING(
" SVDShaperDigits: unexpected cellID for Layer " << layer <<
" Ladder " <<
VxdID(theVxdID).getLadderNumber() <<
627 " Sensor " <<
VxdID(theVxdID).getSensorNumber() <<
" U side, strip = " <<
m_svdShapers[digi]->getCellID());
634 for (
int digi = 0 ; digi <
m_svdRecos.getEntries(); digi++) {
648 nRecoDigi[layer][sensor][side]++;
661 float seed_maxbin = -1;
665 if ((
int)theRC.
size() > 0)
672 for (
int r = 0; r < (int)theRecoDigits.
size(); r++)
673 if (theRecoDigits.
weight(r) > charge) {
675 charge = theRecoDigits[r]->getCharge();
678 if (index_seed > -1) {
682 samples = theSeedShaperDigits[0]->getSamples();
684 const int nAPVSamples = 6;
685 for (
int k = 0; k < nAPVSamples; k ++) {
686 if (samples[k] > amplitude) {
687 amplitude = samples[k];
698 for (
int cl2 = 0 ; cl2 < cl; cl2++) {
710 float clEnergy2 =
m_svdClusters[cl2]->getCharge() * c_eTOkeV;
711 if ((layer != layer2) || (sensor != sensor2))
714 if (seed_maxbin < 2 || seed_maxbin > 4)
718 for (
int r = 0; r < (int)theRecoDigits.
size(); r++)
719 if (cellID1 < theRecoDigits[r]->getCellID())
720 cellID1 = theRecoDigits[r]->getCellID();
724 for (
int r = 0; r < (int)theRecoDigits2.
size(); r++)
725 if (cellID1 - theRecoDigits2[r]->getCellID() < dist)
726 dist = cellID1 - theRecoDigits2[r]->getCellID();
728 if (side == 1 && side2 == 1) {
733 if (side == 0 && side2 == 0) {
739 if (side == 1 && side2 == 0) {
743 if (side == 0 && side2 == 1) {
749 nCl[layer][sensor][side]++;
752 h_clCharge[layer][sensor][side]->Fill(clCharge);
753 h_clEnergy[layer][sensor][side]->Fill(clEnergy);
758 else if (seed_maxbin == 5)
762 nCl345[layer][sensor][side]++;
768 h_clSize[layer][sensor][side]->Fill(clSize);
769 h_clSN[layer][sensor][side]->Fill(clSN);
770 h_clTime[layer][sensor][side]->Fill(clTime);
778 if (svdTrueHits.
size() > 0)
786 for (
int k = 0; k <
m_nSides; k ++) {
787 h_nShaper[i][j][k]->Fill(nShaperDigi[i][j][k]);
788 h_nReco[i][j][k]->Fill(nRecoDigi[i][j][k]);
789 h_nCl[i][j][k]->Fill(nCl[i][j][k]);
790 h_clNuVSNv[i][j]->Fill(nCl345[i][j][0], nCl345[i][j][1]);
791 h_nCltrk[i][j][k]->Fill(nCltrk[i][j][k]);
814 TDirectory* oldDir = gDirectory;
817 TDirectory* dir_track = oldDir->mkdir(
"tracks");
820 while ((obj = nextH_track())) {
821 if (obj->InheritsFrom(
"TH1F"))((TH1F*)obj)->Scale(1. /
m_nEvents);
826 TDirectory* dir_shaper = oldDir->mkdir(
"shaper");
829 TString layerName =
"shaperL";
831 TDirectory* dir_layer = dir_shaper->mkdir(layerName.Data());
834 while ((obj = nextH_shaper())) {
835 if (obj->InheritsFrom(
"TH1F"))((TH1F*)obj)->Scale(1. /
m_nEvents);
841 TDirectory* dir_reco = oldDir->mkdir(
"reco");
844 TString layerName =
"recoL";
846 TDirectory* dir_layer = dir_reco->mkdir(layerName.Data());
849 while ((obj = nextH_reco())) {
850 if (obj->InheritsFrom(
"TH1F"))((TH1F*)obj)->Scale(1. /
m_nEvents);
855 TDirectory* dir_cluster = oldDir->mkdir(
"clusters");
858 TString layerName =
"clusterL";
860 TDirectory* dir_layer = dir_cluster->mkdir(layerName.Data());
863 while ((obj = nextH_cluster())) {
864 if (obj->InheritsFrom(
"TH1F"))((TH1F*)obj)->Scale(1. /
m_nEvents);
869 TDirectory* dir_clTRK = oldDir->mkdir(
"clustersTrk");
872 TString layerName =
"clstrkL";
874 TDirectory* dir_layer = dir_clTRK->mkdir(layerName.Data());
877 while ((obj = nextH_clTRK())) {
878 if (obj->InheritsFrom(
"TH1F"))((TH1F*)obj)->Scale(1. /
m_nEvents);
885 while ((obj = nextH_corr())) {
886 if (obj->InheritsFrom(
"TH1F"))
902 Int_t nbins, Double_t min, Double_t max,
903 const char* xtitle, TList* histoList)
906 TH1F* h =
new TH1F(name, title, nbins, min, max);
908 h->GetXaxis()->SetTitle(xtitle);
918 Int_t nbinsX, Double_t minX, Double_t maxX,
920 Int_t nbinsY, Double_t minY, Double_t maxY,
921 const char* titleY, TList* histoList)
924 TH2F* h =
new TH2F(name, title, nbinsX, minX, maxX, nbinsY, minY, maxY);
926 h->GetXaxis()->SetTitle(titleX);
927 h->GetYaxis()->SetTitle(titleY);
static const ChargedStable pion
charged pion particle
static const ChargedStable electron
electron particle
void setDescription(const std::string &description)
Sets the description of the module.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
float weight(int index) const
Get weight with index.
Class to store SVD mode information.
baseType getTriggerBin() const
Get the triggerBin id.
uint8_t baseType
The base integer type for SVDModeByte.
float getNoiseInElectrons(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
This method provides the correct noise conversion into electrons, taking into account that the noise ...
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
Values of the result of a track fit with a given particle hypothesis.
double getPValue() const
Getter for Chi2 Probability of the track fit.
ROOT::Math::XYZVector getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.
HitPatternVXD getHitPatternVXD() const
Getter for the hit pattern in the VXD;.
Class that bundles various TrackFitResults.
Class to uniquely identify a any structure of the PXD and SVD.
unsigned short baseType
The base integer type for VxdID.
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.
Abstract base class for different kinds of events.