Belle II Software  release-06-01-15
PXDROIFinderAnalysisModule.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <tracking/modules/pxdDataReduction/PXDROIFinderAnalysisModule.h>
10 #include <framework/datastore/StoreArray.h>
11 #include <framework/datastore/RelationArray.h>
12 #include <framework/datastore/RelationIndex.h>
13 
14 #include <mdst/dataobjects/MCParticle.h>
15 #include <svd/dataobjects/SVDCluster.h>
16 #include <pxd/dataobjects/PXDDigit.h>
17 #include <pxd/dataobjects/PXDTrueHit.h>
18 #include <tracking/dataobjects/RecoTrack.h>
19 #include <tracking/dataobjects/ROIid.h>
20 #include <tracking/dataobjects/PXDIntercept.h>
21 #include <TVector3.h>
22 
23 #include <vxd/geometry/GeoCache.h>
24 
25 
26 using namespace std;
27 using namespace Belle2;
28 
29 //-----------------------------------------------------------------
30 // Register the Module
31 //-----------------------------------------------------------------
32 REG_MODULE(PXDROIFinderAnalysis)
33 
34 //-----------------------------------------------------------------
35 // Implementation
36 //-----------------------------------------------------------------
37 
39  , m_writeToRoot(false)
40  , m_rootEvent(-1)
41  //pxd sensors
42  , m_nSensorsL1(0)
43  , m_nSensorsL2(0)
44 
45  //variables
46  , m_globalTime(0.)
47  , m_coorU(0.)
48  , m_coorV(0.)
49  , m_sigmaU(0.)
50  , m_sigmaV(0.)
51  , m_vxdID(-1)
52 
53  , m_coorUmc(0.)
54  , m_coorVmc(0.)
55  , m_Uidmc(-1)
56  , m_Vidmc(-1)
57  , m_vxdIDmc(-1)
58  , m_pTmc(0.)
59  , m_momXmc(0.)
60  , m_momYmc(0.)
61  , m_momZmc(0.)
62  , m_thetamc(0.)
63  , m_costhetamc(0.)
64  , m_phimc(0.)
65  , m_lambdamc(0.)
66 
67  , Ntrack(0)
68  , NtrackHit(0)
69  , n_notINtrack2(0)
70  , n_notINtrack3(0)
71  , n_notINtrack4(0)
72  , n_notINtrack5(0)
73 
74  , n_rois(0)
75  , n_intercepts(0)
76  , n_tracks(0)
77  , n_tracksWithDigits(0)
78  , n_tracksWithDigitsInROI(0)
79 
80 
81  , n_pxdDigit(0)
82  , n_pxdDigitInROI(0)
83  , n_notINdigit2(0)
84  , n_notINdigit3(0)
85  , n_notINdigit4(0)
86  , n_notINdigit5(0)
87 
88  //vectors
89  , npxdDigit{0}
90  , npxdDigitInROI{0}
91  , nnotINdigit2{0}
92  , nnotINdigit3{0}
93  , nnotINdigit4{0}
94  , nnotINdigit5{0}
95  , TrackOneDigiIn{0}
96  , nnotINtrack2{0}
97  , nnotINtrack3{0}
98  , nnotINtrack4{0}
99  , nnotINtrack5{0}
100 
101 {
102  //Set module properties
103  setDescription("This module performs the analysis of the PXDROIFinder module output");
104 
105  addParam("writeToRoot", m_writeToRoot,
106  "set true if you want to save the informations in a root file named by parameter 'rootFileName'", bool(true));
107 
108  addParam("rootFileName", m_rootFileName,
109  "fileName used for . Will be ignored if parameter 'writeToRoot' is false (standard)",
110  string("pxdDataRedAnalysis"));
111 
112  addParam("recoTrackListName", m_recoTrackListName,
113  "name of the input collection of RecoTracks", std::string(""));
114 
115  addParam("PXDInterceptListName", m_PXDInterceptListName,
116  "name of the list of interceptions", std::string(""));
117 
118  addParam("ROIListName", m_ROIListName,
119  "name of the list of ROIs", std::string(""));
120 
121  m_rootEvent = 0;
122 }
123 
124 
125 void PXDROIFinderAnalysisModule::initialize()
126 {
127 
128  StoreArray<RecoTrack> recoTracks;
129  recoTracks.isRequired(m_recoTrackListName);
130 
131  StoreArray<ROIid> roiIDs;
132  roiIDs.isRequired(m_ROIListName);
133 
134  StoreArray<PXDIntercept> pxdIntercepts;
135  pxdIntercepts.isRequired(m_PXDInterceptListName);
136 
137  StoreArray<MCParticle> mcParticles;
138  mcParticles.isRequired();
139 
140  n_rois = 0;
141  n_intercepts = 0;
142  n_tracks = 0;
143  n_pxdDigit = 0;
144  n_pxdDigitInROI = 0;
145 
146  n_tracksWithDigits = 0;
147  n_tracksWithDigitsInROI = 0;
148  NtrackHit = 0;
149  n_notINtrack2 = 0;
150  n_notINtrack3 = 0;
151  n_notINtrack4 = 0;
152  n_notINtrack5 = 0;
153 
154  for (int i = 0; i < 6; i++) {
155  npxdDigit[i] = 0;
156  npxdDigitInROI[i] = 0;
157  }
158 
159  if (m_writeToRoot == true) {
160  m_rootFileName += ".root";
161  m_rootFilePtr = new TFile(m_rootFileName.c_str(), "RECREATE");
162  } else
163  m_rootFilePtr = nullptr;
164 
165 
166  m_h1GlobalTime = new TH1F("hGlobalTime", "global time for PXDDigits contained in ROI", 100, 0, 1);
167  m_h1PullU = new TH1F("hPullU", "U pulls for PXDDigits contained in ROI", 100, -6, 6);
168  m_h1PullV = new TH1F("hPullV", "V pulls for PXDDigits contained in ROI", 100, -6, 6);
169  m_h2sigmaUphi = new TH2F("hsigmaUvsPhi", "sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.35);
170  m_h2sigmaVphi = new TH2F("hsigmaVvsPhi", "sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.4);
171  m_h1ResidU = new TH1F("hResidU", "U resid for PXDDigits contained in ROI", 100, -0.5, 0.5);
172  m_h1ResidV = new TH1F("hResidV", "V resid for PXDDigits contained in ROI", 100, -0.5, 0.5);
173  m_h2ResidUV = new TH2F("hResidUV", "U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
174  m_h1SigmaU = new TH1F("hSigmaU", "sigmaU for PXDDigits contained in ROI", 100, 0, 0.35);
175  m_h1SigmaV = new TH1F("hSigmaV", "sigmaV for PXDDigits contained in ROI", 100, 0, 0.35);
176  m_h2Mapglob = new TH2F("h2Mapglob", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
177  m_h2MaplocL1 = new TH2F("h2MaplocL1", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
178  m_h2MaplocL2 = new TH2F("h2MaplocL2", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
179  m_h2MaplocL1->GetXaxis()->SetTitle("v ID");
180  m_h2MaplocL1->GetYaxis()->SetTitle("u ID");
181  m_h2MaplocL2->GetXaxis()->SetTitle("v ID");
182  m_h2MaplocL2->GetYaxis()->SetTitle("u ID");
183 
184 
185  m_h1GlobalTime_out2 = new TH1F("hGlobalTime_out2", "global time for PXDDigits not contained in ROI", 100, 0, 1);
186  m_h2sigmaUphi_out2 = new TH2F("hsigmaUvsPhi_out2", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
187  m_h2sigmaVphi_out2 = new TH2F("hsigmaVvsPhi_out2", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
188  m_h1ResidU_out2 = new TH1F("hResidU_out2", "U resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
189  m_h1ResidV_out2 = new TH1F("hResidV_out2", "V resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
190  m_h2ResidUV_out2 = new TH2F("hResidUV_out2", "U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
191  m_h1SigmaU_out2 = new TH1F("hSigmaU_out2", "sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
192  m_h1SigmaV_out2 = new TH1F("hSigmaV_out2", "sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
193  m_h2Mapglob_out2 = new TH2F("h2Mapglob_out2", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
194  m_h2MaplocL1_out2 = new TH2F("h2MaplocL1_out2", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
195  m_h2MaplocL2_out2 = new TH2F("h2MaplocL2_out2", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
196 
197 
198  m_h1GlobalTime_out3 = new TH1F("hGlobalTime_out3", "global time for PXDDigits not contained in ROI", 100, 0, 1);
199  m_h2sigmaUphi_out3 = new TH2F("hsigmaUvsPhi_out3", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
200  m_h2sigmaVphi_out3 = new TH2F("hsigmaVvsPhi_out3", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
201  m_h1ResidU_out3 = new TH1F("hResidU_out3", "U resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
202  m_h1ResidV_out3 = new TH1F("hResidV_out3", "V resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
203  m_h2ResidUV_out3 = new TH2F("hResidUV_out3", "U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
204  m_h1SigmaU_out3 = new TH1F("hSigmaU_out3", "sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
205  m_h1SigmaV_out3 = new TH1F("hSigmaV_out3", "sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
206 
207  m_h2Mapglob_out3 = new TH2F("h2Mapglob_out3", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
208  m_h2MaplocL1_out3 = new TH2F("h2MaplocL1_out3", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
209  m_h2MaplocL2_out3 = new TH2F("h2MaplocL2_out3", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
210 
211 
212  m_h1GlobalTime_out4 = new TH1F("hGlobalTime_out4", "global time for PXDDigits not contained in ROI", 100, 0, 1);
213  m_h2sigmaUphi_out4 = new TH2F("hsigmaUvsPhi_out4", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
214  m_h2sigmaVphi_out4 = new TH2F("hsigmaVvsPhi_out4", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
215  m_h1SigmaU_out4 = new TH1F("hSigmaU_out4", "sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
216  m_h1SigmaV_out4 = new TH1F("hSigmaV_out4", "sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
217 
218  m_h2Mapglob_out4 = new TH2F("h2Mapglob_out4", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
219  m_h2MaplocL1_out4 = new TH2F("h2MaplocL1_out4", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
220  m_h2MaplocL2_out4 = new TH2F("h2MaplocL2_out4", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
221 
222 
223  m_h1GlobalTime_out5 = new TH1F("hGlobalTime_out5", "global time for PXDDigits not contained in ROI", 100, 0, 1);
224 
225  m_h2Mapglob_out5 = new TH2F("h2Mapglob_out5", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
226  m_h2MaplocL1_out5 = new TH2F("h2MaplocL1_out5", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
227  m_h2MaplocL2_out5 = new TH2F("h2MaplocL2_out5", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
228 
229 
230  m_h1redFactor = new TH1F("hRedFactor", "L1+L2reduction factor", 1000, 0, 1);
231  m_h1redFactor_L1 = new TH1F("hRedFactor_L1", "L1-only reduction factor", 1000, 0, 1);
232  m_h1redFactor_L2 = new TH1F("hRedFactor_L2", "L2-only reduction factor", 1000, 0, 1);
233 
234  m_h1totROIs = new TH1F("h1TotNROIs", "number of all ROIs", 110, 0, 110);
235  m_h1okROIs = new TH1F("h1OkNROIs", "number of all ROIs containing a PXDDigit", 110, 0, 110);
236  m_h1okROIfrac = new TH1F("h1OkNROIfrac", "fraction of ROIs containing a PXDDigit", 100, 0, 1);
237 
238  m_h1totArea = new TH1F("h1TotArea", "Area of all ROIs", 100, 0, 2500000);
239  m_h1okArea = new TH1F("h1OkArea", "Area of ROIs containing a PXDDigit", 100, 0, 75000);
240 
241 
242 
243  m_h1effPerTrack = new TH1F("heffPerTrack", "fraction of digits in ROI per track", 100, -0.02, 1.02);
244 
245 
246 
247  m_h2ROIbottomLeft = new TH2F("h2ROIbottomLeft", "u,v ID of the bottom left pixel", 650, -200, 450, 1300, -300, 1000);
248  m_h2ROItopRight = new TH2F("h2ROItopRight", "u,v ID of the top right pixel", 650, -200, 450, 1300, -300, 1000);
249 
250  m_h2ROIuMinMax = new TH2F("h2ROIuMinMax", "u Min vs Max", 650, -200, 450, 650, -200, 450);
251  m_h2ROIvMinMax = new TH2F("h2ROIvMinMax", "v Min vs Max", 1300, -300, 1000, 1300, -300, 1000);
252 
253 
254  m_h1DigitsPerParticle = new TH1F("h1DigitsPerPart", "Number of PXDDigits per Particle", 50, 0, 50);
255  m_h1RecoTracksPerParticle = new TH1F("h1RecoTracksPerPart", "Number of RecoTracks per Particle", 10, 0, 10);
256 
257 
258  //analysis
259  Double_t lowBin[6 + 1];
260  for (int i = 0; i < 6; i++)
261  lowBin[i] = pt[i] - ptErr[i];
262  lowBin[6] = pt[5] + ptErr[5];
263 
264  m_h1TrackOneDigiIn = new TH1F("hTracksDigiIn", "Tracks with at least one digit contained in a ROI", 6, lowBin);
265  m_h1nnotINtrack2 = new TH1F("h1outROITrack", "Tracks with ROI with correct VxdID but no digits inside ROI", 6, lowBin);
266  m_h1nnotINtrack3 = new TH1F("h1noROITrack", "Tracks with ROI with wrong VxdID but no digits inside ROI", 6, lowBin);
267  m_h1nnotINtrack4 = new TH1F("h1wrongVxdIDTrack", "Tracks with no ROI, Intercept with correct VxdID", 6, lowBin);
268  m_h1nnotINtrack5 = new TH1F("h1noInterTrack", "Tracks with no Intercept matching a VxdID of digits", 6, lowBin);
269 
270  m_h1notINtrack5 = new TH1F("hNoInterTrack", "track with no intercepts", 20, 0, 20);
271  m_h1notINtrack5_pt = new TH1F("hNoInterTrack_pT", "track with no intercepts", 100, 0, 6);
272  m_h1notINtrack5_phi = new TH1F("h1NoInterTrack_phi", "hNoInterTrack_phi", 100, -180, 180);
273  m_h1notINtrack5_lambda = new TH1F("h1NoInterTrack_lambda", "hNoInterTrack_lambda", 100, -180, 180);
274  m_h1notINtrack5_cosTheta = new TH1F("h1NoInterTrack_cosTheta", "hNoInterTrack_cosTheta", 100, -1, 1);
275  m_h1notINtrack5_pVal = new TH1F("hNoInterTrack_pVal", "track with no intercepts", 100, 0, 1);
276  m_h1notINtrack5_nSVDhits = new TH1F("hNoInterTrack_nSVDhits", "track with no intercepts", 50, 0, 50);
277  m_h1notINtrack5_nCDChits = new TH1F("hNoInterTrack_nCDChits", "track with no intercepts", 100, 0, 100);
278 
279  m_h1INtrack1 = new TH1F("hINTrack", "track with at least one digit inside ROI", 20, 0, 20);
280  m_h1INtrack1_pt = new TH1F("hINTrack_pT", "track with at least one digit inside ROI", 100, 0, 6);
281  m_h1INtrack1_phi = new TH1F("h1INTrack_phi", "hINTrack_phi", 100, -180, 180);
282  m_h1INtrack1_lambda = new TH1F("h1INTrack_lambda", "hINTrack_lambda", 100, -180, 180);
283  m_h1INtrack1_cosTheta = new TH1F("h1INTrack_cosTheta", "hINTrack_cosTheta", 100, -1, 1);
284  m_h1INtrack1_pVal = new TH1F("h1INTrack_pVal", "track with no intercepts", 100, 0, 1);
285  m_h1INtrack1_nSVDhits = new TH1F("h1INTrack_nSVDhits", "track with no intercepts", 50, 0, 50);
286  m_h1INtrack1_nCDChits = new TH1F("h1INTrack_nCDChits", "track with no intercepts", 100, 0, 100);
287 
288  m_h1Track = new TH1F("hTrack", "all tracks", 20, 0, 20);
289  m_h1Track_pt = new TH1F("hTrack_pT", "all tracks with digits", 100, 0, 6);
290  m_h1Track_lambda = new TH1F("h1Track_lambda", "hTrack_lambda", 100, -180, 180);
291  m_h1Track_phi = new TH1F("h1Track_phi", "hTrack_phi", 100, -180, 180);
292  m_h1Track_cosTheta = new TH1F("h1Track_cosTheta", "hTrack_cos theta", 100, -1, 1);
293  m_h1Track_pVal = new TH1F("h1Track_pVal", "track with no intercepts", 100, 0, 1);
294  m_h1Track_nSVDhits = new TH1F("h1Track_nSVDhits", "track with no intercepts", 50, 0, 50);
295  m_h1Track_nCDChits = new TH1F("h1Track_nCDChits", "track with no intercepts", 100, 0, 100);
296 
297  m_h1digiIn = new TH1F("hdigiIn", "digits inside ROI", 6, lowBin);
298  m_h1digiOut2 = new TH1F("hdigiOut2", "ROI exists with with correct VxdID but no digits inside ROI", 6, lowBin);
299  m_h1digiOut3 = new TH1F("hdigiOut3", "ROI exists with with wrong VxdID", 6, lowBin);
300  m_h1digiOut4 = new TH1F("hdigiOut4", "ROI does not exist, but intercept has correct VxdID", 6, lowBin);
301  m_h1digiOut5 = new TH1F("hdigiOut5", "no ROI, no Intercpets with correct VXDid", 6, lowBin);
302 
303  // m_h2_VXDhitsPR_xy = new TH2F("hNoInteTrack_SVDhitsXY", "SVD Hits Missed by the VXDTF", 200, -15, 15, 200, -15, 15);
304 
305  // m_h2_VXDhitsPR_rz = new TH2F("hNoInteTrack_SVDhitsRZ", "SVD Hits Missed by the VXDTF, r_{T} z", 200, -30, 40, 200, 0, 15);
306 
307 
308 }
309 
310 void PXDROIFinderAnalysisModule::beginRun()
311 {
312  m_rootEvent = 0;
313 
314  VXD::GeoCache& aGeometry = VXD::GeoCache::getInstance();
315 
316  std::set<Belle2::VxdID> pxdLayers = aGeometry.getLayers(VXD::SensorInfoBase::PXD);
317  std::set<Belle2::VxdID>::iterator itPxdLayers = pxdLayers.begin();
318 
319  while ((itPxdLayers != pxdLayers.end()) && (itPxdLayers->getLayerNumber() != 7)) {
320 
321  std::set<Belle2::VxdID> pxdLadders = aGeometry.getLadders(*itPxdLayers);
322  std::set<Belle2::VxdID>::iterator itPxdLadders = pxdLadders.begin();
323 
324  while (itPxdLadders != pxdLadders.end()) {
325 
326  std::set<Belle2::VxdID> pxdSensors = aGeometry.getSensors(*itPxdLadders);
327  std::set<Belle2::VxdID>::iterator itPxdSensors = pxdSensors.begin();
328 
329  while (itPxdSensors != pxdSensors.end()) {
330 
331  if (itPxdLadders->getLayerNumber() == 1)
332  m_nSensorsL1++;
333  if (itPxdLadders->getLayerNumber() == 2)
334  m_nSensorsL2++;
335 
336  ++itPxdSensors;
337  }
338  ++itPxdLadders;
339  }
340  ++itPxdLayers;
341  }
342 
343 
344 }
345 
346 
347 void PXDROIFinderAnalysisModule::event()
348 {
349 
350  typedef RelationIndex < RecoTrack, PXDIntercept>::range_from PXDInterceptsFromRecoTracks;
351  typedef RelationIndex < RecoTrack, PXDIntercept>::iterator_from PXDInterceptIteratorType;
352  typedef RelationIndex < PXDDigit, PXDTrueHit>::range_from PXDTrueHitFromPXDDigit;
353  typedef RelationIndex < PXDDigit, PXDTrueHit>::iterator_from PXDTrueHitIteratorType;
355  relDigitTrueHit(DataStore::relationName(DataStore::arrayName<PXDDigit>(""),
356  DataStore::arrayName<PXDTrueHit>("")));
358  recoTrackToPXDIntercept(DataStore::relationName(m_recoTrackListName, m_PXDInterceptListName));
359 
360  double tmpGlobalTime;
361  int tmpNGlobalTime;
362 
363  NtrackHit = 0;
364  Ntrack = 0;
365 
366  B2DEBUG(1, " ++++++++++++++ PXDROIFinderAnalysisModule");
367 
368  int nROIs = 0;
369  int okArea_L1 = 0;
370  int okArea_L2 = 0;
371  int totArea_L1 = 0;
372  int totArea_L2 = 0;
373 
374  //MCParticles
375  StoreArray<MCParticle> mcParticles;
376 
377 
378  //ROIs general
379  StoreArray<ROIid> ROIList(m_ROIListName);
380  for (int i = 0; i < (int)ROIList.getEntries(); i++) { //loop on ROIlist
381 
382  m_h2ROIbottomLeft->Fill(ROIList[i]->getMinUid(), ROIList[i]->getMinVid());
383  m_h2ROItopRight->Fill(ROIList[i]->getMaxUid(), ROIList[i]->getMaxVid());
384  m_h2ROIuMinMax->Fill(ROIList[i]->getMinUid(), ROIList[i]->getMaxUid());
385  m_h2ROIvMinMax->Fill(ROIList[i]->getMinVid(), ROIList[i]->getMaxVid());
386  int tmpArea = (ROIList[i]->getMaxUid() - ROIList[i]->getMinUid()) * (ROIList[i]->getMaxVid() - ROIList[i]->getMinVid());
387  if ((ROIList[i]->getSensorID()).getLayerNumber() == 1)
388  totArea_L1 += tmpArea;
389  else
390  totArea_L2 += tmpArea;
391 
392  bool isOK = false;
393 
394  for (int j = 0; j < (int)mcParticles.getEntries(); j++) {
395  MCParticle* aMcParticle = mcParticles[j];
396 
397  // continue only if MCParticle has a related PXDDigit and RecoTrack
398  RelationVector<PXDDigit> pxdDigits_MCParticle = aMcParticle->getRelationsFrom<PXDDigit>();
399 
400  if (!isOK)
401  //loop on PXDDigits
402  for (unsigned int iPXDDigit = 0; iPXDDigit < pxdDigits_MCParticle.size(); iPXDDigit++)
403  if (ROIList[i]->Contains(*(pxdDigits_MCParticle[iPXDDigit]))) {
404  nROIs++;
405  isOK = true;
406  break;
407  }
408  }
409  }
410 
411  m_h1totArea->Fill(totArea_L1 + totArea_L2);
412  double redFactor_L1 = totArea_L1 / 768. / 250. / m_nSensorsL1; //16
413  double redFactor_L2 = totArea_L2 / 768. / 250. / m_nSensorsL2; //24
414  m_h1redFactor->Fill((double)(totArea_L1 + totArea_L2) / 768. / 250. / (m_nSensorsL1 + m_nSensorsL2));
415  m_h1redFactor_L1->Fill((double) redFactor_L1);
416  m_h1redFactor_L2->Fill((double) redFactor_L2);
417 
418  m_h1totROIs->Fill(ROIList.getEntries());
419  n_rois += ROIList.getEntries();
420 
421  //RecoTrack general
422  StoreArray<RecoTrack> trackList(m_recoTrackListName);
423  n_tracks += trackList.getEntries();
424 
425  //PXDIntercepts general
426  StoreArray<PXDIntercept> PXDInterceptList(m_PXDInterceptListName);
427  n_intercepts += PXDInterceptList.getEntries();
428 
429  Int_t n_NoInterceptTracks = 0;
430 
431  // bool hasDigits = false;
432  // bool hasRecoTrack = false;
433 
434  //loop on MCParticles
435  for (int j = 0; j < (int)mcParticles.getEntries(); j++) {
436 
437  MCParticle* aMcParticle = mcParticles[j];
438 
439  // continue only if MCParticle has a related PXDDigit and RecoTrack
440  RelationVector<PXDDigit> pxdDigits_MCParticle = aMcParticle->getRelationsFrom<PXDDigit>();
441  RelationVector<RecoTrack> recoTracks_MCParticle = aMcParticle->getRelationsWith<RecoTrack>();
442 
443  m_h1DigitsPerParticle->Fill(pxdDigits_MCParticle.size());
444  if (pxdDigits_MCParticle.size() == 0)
445  continue;
446 
447  // hasDigits = true;
448 
449  m_h1RecoTracksPerParticle->Fill(recoTracks_MCParticle.size());
450  if (recoTracks_MCParticle.size() == 0)
451  continue;
452 
453  // hasRecoTrack = true;
454 
455  Ntrack++;
456 
457  B2DEBUG(1, "Number of RecoTracks = " << recoTracks_MCParticle.size() << " and PXDDigits = " << pxdDigits_MCParticle.size() <<
458  " related to this MCParticle");
459 
460  //retrieve general informations of MCParticle
461  m_momXmc = (aMcParticle->getMomentum()).X();
462  m_momYmc = (aMcParticle->getMomentum()).Y();
463  m_momZmc = (aMcParticle->getMomentum()).Z();
464  m_phimc = (aMcParticle->getMomentum()).Phi() * 180 / 3.1415;
465  m_thetamc = (aMcParticle->getMomentum()).Theta() * 180 / 3.1415;
466  m_costhetamc = (aMcParticle->getMomentum()).CosTheta();
467  m_lambdamc = 90 - m_thetamc;
468  m_pTmc = (aMcParticle->getMomentum()).Perp();
469 
470  //SVDhits
471  RelationVector<SVDCluster> svdRelations = aMcParticle->getRelationsFrom<SVDCluster>();
472 
473  /* Int_t nMCPartSVDhits = 0;
474  Int_t nSVDhitLadder[4] = {0};
475  if((int)svdRelations.size() > 0){
476  nMCPartSVDhits = svdRelations.size();
477  for(int s=0; s<(int)svdRelations.size();s++)
478  nSVDhitLadder[ (svdRelations[s]->getSensorID()).getLayerNumber()-3 ]++;
479  }
480  */
481 
482  bool part_outsideROI = false;
483  bool part_noROI = false;
484  bool part_wrongVxdID = false;
485  bool part_noInter = false;
486  bool hasOneDigitInROI = false;
487 
488  double tmpArea = 0;
489 
490  Int_t nDigitsInRoiPerTrack = 0;
491  Int_t nDigitsPerTrack = 0;
492 
493  //loop on PXDDigits
494  for (unsigned int iPXDDigit = 0; iPXDDigit < pxdDigits_MCParticle.size(); iPXDDigit++) {
495 
496  bool hasIntercept = false;
497  bool hasROI = false;
498  bool interceptRightVxdID = false;
499  bool MissingHit = true;
500 
501  n_pxdDigit ++ ;
502  nDigitsPerTrack++;
503 
504  PXDTrueHitFromPXDDigit PXDTrueHits = relDigitTrueHit.getElementsFrom(*pxdDigits_MCParticle[iPXDDigit]);
505  PXDTrueHitIteratorType thePXDTrueHitIterator = PXDTrueHits.begin();
506  PXDTrueHitIteratorType thePXDTrueHitIteratorEnd = PXDTrueHits.end();
507  tmpGlobalTime = 0;
508  tmpNGlobalTime = 0;
509 
510  for (; thePXDTrueHitIterator != thePXDTrueHitIteratorEnd; thePXDTrueHitIterator++) {
511  tmpGlobalTime = tmpGlobalTime + thePXDTrueHitIterator->to->getGlobalTime();
512  tmpNGlobalTime++;
513  }
514  m_globalTime = tmpGlobalTime / tmpNGlobalTime;
515 
516 
517  m_Uidmc = pxdDigits_MCParticle[iPXDDigit]->getUCellID();
518  m_Vidmc = pxdDigits_MCParticle[iPXDDigit]->getVCellID();
519  m_vxdIDmc = pxdDigits_MCParticle[iPXDDigit]->getSensorID();
520 
521  int u2 = -999;
522  int v2 = -999;
523  if (VxdID(m_vxdIDmc).getSensorNumber() == 2) { //BKW
524  u2 = m_Uidmc;
525  v2 = -(767 - m_Vidmc);
526  } else if (VxdID(m_vxdIDmc).getSensorNumber() == 1) { //FWD
527  u2 = m_Uidmc;
528  v2 = m_Vidmc;
529  }
530 
531  VXD::GeoCache& aGeometry = VXD::GeoCache::getInstance();
532  const VXD::SensorInfoBase& aSensorInfo = aGeometry.getSensorInfo(m_vxdIDmc);
533 
534  m_coorUmc = aSensorInfo.getUCellPosition(m_Uidmc); //pxdDigits_MCParticle[iPXDDigit]->getUCellPosition();
535  m_coorVmc = aSensorInfo.getVCellPosition(m_Vidmc); //pxdDigits_MCParticle[iPXDDigit]->getVCellPosition();
536 
537  TVector3 local(m_coorUmc, m_coorVmc, 0);
538  TVector3 globalSensorPos = aSensorInfo.pointToGlobal(local, true);
539 
540 
541  if (m_pTmc > 1) npxdDigit[5]++;
542  if (m_pTmc <= 1 && m_pTmc > 0.5) npxdDigit[4]++;
543  if (m_pTmc <= 0.5 && m_pTmc > 0.3) npxdDigit[3]++;
544  if (m_pTmc <= 0.3 && m_pTmc > 0.2) npxdDigit[2]++;
545  if (m_pTmc <= 0.2 && m_pTmc > 0.1) npxdDigit[1]++;
546  if (m_pTmc <= 0.1) npxdDigit[0]++;
547 
548 
549  for (int i = 0; i < (int)recoTracks_MCParticle.size(); i++) { //loop on input RecoTracks
550 
551  PXDInterceptsFromRecoTracks PXDIntercepts = recoTrackToPXDIntercept.getElementsFrom(recoTracks_MCParticle[i]);
552 
553  PXDInterceptIteratorType thePXDInterceptIterator = PXDIntercepts.begin();
554  PXDInterceptIteratorType thePXDInterceptIteratorEnd = PXDIntercepts.end();
555 
556 
557  for (; thePXDInterceptIterator != thePXDInterceptIteratorEnd; thePXDInterceptIterator++) {
558 
559  const PXDIntercept* theIntercept = thePXDInterceptIterator->to;
560 
561  if (theIntercept) {
562 
563  hasIntercept = true;
564 
565  m_coorU = theIntercept->getCoorU();
566  m_coorV = theIntercept->getCoorV();
567  m_sigmaU = theIntercept->getSigmaU();
568  m_sigmaV = theIntercept->getSigmaV();
569  m_vxdID = theIntercept->getSensorID();
570 
571  if (m_vxdID == m_vxdIDmc)
572  interceptRightVxdID = true;
573  else
574  continue;
575 
576  const ROIid* theROIid = theIntercept->getRelatedTo<ROIid>(m_ROIListName);
577 
578  if (theROIid) {
579 
580  hasROI = true;
581 
582  tmpArea = (theROIid->getMaxUid() - theROIid->getMinUid()) * (theROIid->getMaxVid() - theROIid->getMinVid());
583 
584  if (theROIid->Contains(*(pxdDigits_MCParticle[iPXDDigit]))) { //CASO1
585 
586  if (MissingHit) {
587  nDigitsInRoiPerTrack++;
588 
589  m_h1GlobalTime->Fill(m_globalTime);
590  m_h1PullU->Fill((m_coorU - m_coorUmc) / m_sigmaU);
591  m_h1PullV->Fill((m_coorV - m_coorVmc) / m_sigmaV);
592  m_h1ResidU->Fill(m_coorU - m_coorUmc);
593  m_h1ResidV->Fill(m_coorV - m_coorVmc);
594  m_h2ResidUV->Fill(m_coorU - m_coorUmc, m_coorV - m_coorVmc);
595  m_h2sigmaUphi->Fill(m_phimc, m_sigmaU);
596  m_h2sigmaVphi->Fill(m_phimc, m_sigmaV);
597  m_h1SigmaU->Fill(m_sigmaU);
598  m_h1SigmaV->Fill(m_sigmaV);
599  m_h2Mapglob->Fill(globalSensorPos.Perp() , globalSensorPos.Phi());
600 
601 
602  if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
603  m_h2MaplocL1->Fill(v2, u2);
604  if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
605  m_h2MaplocL2->Fill(v2, u2);
606 
607 
608  m_h1okArea->Fill(tmpArea);
609  if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
610  okArea_L1 = okArea_L1 + tmpArea;
611  if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
612  okArea_L2 = okArea_L2 + tmpArea;
613 
614 
615  hasOneDigitInROI = true;
616  n_pxdDigitInROI++;
617 
618  if (m_pTmc > 1) npxdDigitInROI[5]++;
619  if (m_pTmc <= 1 && m_pTmc > 0.5) npxdDigitInROI[4]++;
620  if (m_pTmc <= 0.5 && m_pTmc > 0.3) npxdDigitInROI[3]++;
621  if (m_pTmc <= 0.3 && m_pTmc > 0.2) npxdDigitInROI[2]++;
622  if (m_pTmc <= 0.2 && m_pTmc > 0.1) npxdDigitInROI[1]++;
623  if (m_pTmc <= 0.1) npxdDigitInROI[0]++;
624 
625  MissingHit = false;
626  }
627 
628 
629  break; // To avoid double counting (intercepts)
630  } //if theROIid contains
631  } //if (theROIid)
632  } //if (theintercept)
633  } //(end loop on intercept list)
634 
635  if (!MissingHit)
636  break;// To avoid double counting (recoTracks)
637 
638  } //(end loop on recoTracks)
639 
640 
641  if (MissingHit) {
642 
643  if (hasROI && hasIntercept && interceptRightVxdID) {
644  part_outsideROI = true;
645 
646  n_notINdigit2 ++;
647 
648  m_h1GlobalTime_out2->Fill(m_globalTime);
649  m_h1ResidU_out2->Fill(m_coorU - m_coorUmc);
650  m_h1ResidV_out2->Fill(m_coorV - m_coorVmc);
651  m_h2ResidUV_out2->Fill(m_coorU - m_coorUmc, m_coorV - m_coorVmc);
652  m_h2sigmaUphi_out2->Fill(m_phimc, m_sigmaU);
653  m_h2sigmaVphi_out2->Fill(m_phimc, m_sigmaV);
654  m_h1SigmaU_out2->Fill(m_sigmaU);
655  m_h1SigmaV_out2->Fill(m_sigmaV);
656  m_h2Mapglob_out2->Fill(globalSensorPos.Perp() , globalSensorPos.Phi());
657  if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
658  m_h2MaplocL1_out2->Fill(v2, u2);
659  if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
660  m_h2MaplocL2_out2->Fill(v2, u2);
661 
662  if (m_pTmc > 1) nnotINdigit2[5]++;
663  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit2[4]++;
664  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit2[3]++;
665  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit2[2]++;
666  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit2[1]++;
667  if (m_pTmc <= 0.1) nnotINdigit2[0]++;
668 
669  } else if (!hasROI && hasIntercept && interceptRightVxdID) {
670  part_noROI = true;
671 
672  n_notINdigit3 ++;
673 
674  m_h1GlobalTime_out3->Fill(m_globalTime);
675  m_h1ResidU_out3->Fill(m_coorU - m_coorUmc);
676  m_h1ResidV_out3->Fill(m_coorV - m_coorVmc);
677  m_h2ResidUV_out3->Fill(m_coorU - m_coorUmc, m_coorV - m_coorVmc);
678  m_h2sigmaUphi_out3->Fill(m_phimc, m_sigmaU);
679  m_h2sigmaVphi_out3->Fill(m_phimc, m_sigmaV);
680  m_h1SigmaU_out3->Fill(m_sigmaU);
681  m_h1SigmaV_out3->Fill(m_sigmaV);
682  m_h2Mapglob_out3->Fill(globalSensorPos.Perp() , globalSensorPos.Phi());
683  if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
684  m_h2MaplocL1_out3->Fill(v2, u2);
685 
686  if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
687  m_h2MaplocL2_out3->Fill(v2, u2);
688 
689 
690  if (m_pTmc > 1) nnotINdigit3[5]++;
691  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit3[4]++;
692  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit3[3]++;
693  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit3[2]++;
694  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit3[1]++;
695  if (m_pTmc <= 0.1) nnotINdigit3[0]++;
696 
697  } else if (hasIntercept && !interceptRightVxdID) {
698  part_wrongVxdID = true;
699 
700  n_notINdigit4 ++;
701 
702  m_h1GlobalTime_out4->Fill(m_globalTime);
703  m_h2sigmaUphi_out4->Fill(m_phimc, m_sigmaU);
704  m_h2sigmaVphi_out4->Fill(m_phimc, m_sigmaV);
705  m_h1SigmaU_out4->Fill(m_sigmaU);
706  m_h1SigmaV_out4->Fill(m_sigmaV);
707  m_h2Mapglob_out4->Fill(globalSensorPos.Perp() , globalSensorPos.Phi());
708  if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
709  m_h2MaplocL1_out4->Fill(v2, u2);
710  if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
711  m_h2MaplocL2_out4->Fill(v2, u2);
712 
713  if (m_pTmc > 1) nnotINdigit4[5]++;
714  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit4[4]++;
715  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit4[3]++;
716  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit4[2]++;
717  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit4[1]++;
718  if (m_pTmc <= 0.1) nnotINdigit4[0]++;
719 
720  } else if (!hasIntercept) {
721  part_noInter = true;
722 
723  n_notINdigit5 ++;
724 
725  m_h1GlobalTime_out5->Fill(m_globalTime);
726  m_h2Mapglob_out5->Fill(globalSensorPos.Perp() , globalSensorPos.Phi());
727  if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
728  m_h2MaplocL1_out5->Fill(v2, u2);
729  if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
730  m_h2MaplocL2_out5->Fill(v2, u2);
731 
732  if (m_pTmc > 1) nnotINdigit5[5]++;
733  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit5[4]++;
734  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit5[3]++;
735  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit5[2]++;
736  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit5[1]++;
737  if (m_pTmc <= 0.1) nnotINdigit5[0]++;
738  }
739  }
740  } //end loop on digits
741 
742  m_h1effPerTrack->Fill((float) nDigitsInRoiPerTrack / nDigitsPerTrack);
743  m_h1Track_pt->Fill(m_pTmc);
744  m_h1Track_phi->Fill(m_phimc);
745  m_h1Track_lambda->Fill(m_lambdamc);
746  m_h1Track_cosTheta->Fill(m_costhetamc);
747 
748  if (hasOneDigitInROI) {
749  NtrackHit++;
750  if (m_pTmc > 1) TrackOneDigiIn[5]++;
751  if (m_pTmc <= 1 && m_pTmc > 0.5) TrackOneDigiIn[4]++;
752  if (m_pTmc <= 0.5 && m_pTmc > 0.3) TrackOneDigiIn[3]++;
753  if (m_pTmc <= 0.3 && m_pTmc > 0.2) TrackOneDigiIn[2]++;
754  if (m_pTmc <= 0.2 && m_pTmc > 0.1) TrackOneDigiIn[1]++;
755  if (m_pTmc <= 0.1) TrackOneDigiIn[0]++;
756 
757  m_h1INtrack1_pt->Fill(m_pTmc);
758  m_h1INtrack1_phi->Fill(m_phimc);
759  m_h1INtrack1_lambda->Fill(m_lambdamc);
760  m_h1INtrack1_cosTheta->Fill(m_costhetamc);
761  } else if (part_outsideROI) { //CASO2
762  n_notINtrack2++;
763  if (m_pTmc > 1) nnotINtrack2[5]++;
764  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack2[4]++;
765  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack2[3]++;
766  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack2[2]++;
767  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack2[1]++;
768  if (m_pTmc <= 0.1) nnotINtrack2[0]++;
769  } else if (part_noROI) { //CASO3
770  n_notINtrack3++;
771  if (m_pTmc > 1) nnotINtrack3[5]++;
772  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack3[4]++;
773  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack3[3]++;
774  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack3[2]++;
775  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack3[1]++;
776  if (m_pTmc <= 0.1) nnotINtrack3[0]++;
777  } else if (part_wrongVxdID) { //CASO4
778  n_notINtrack4++;
779  if (m_pTmc > 1) nnotINtrack4[5]++;
780  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack4[4]++;
781  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack4[3]++;
782  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack4[2]++;
783  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack4[1]++;
784  if (m_pTmc <= 0.1) nnotINtrack4[0]++;
785  } else if (part_noInter) { //CASO5
786  n_notINtrack5++;
787  if (m_pTmc > 1) nnotINtrack5[5]++;
788  if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack5[4]++;
789  if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack5[3]++;
790  if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack5[2]++;
791  if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack5[1]++;
792  if (m_pTmc <= 0.1) nnotINtrack5[0]++;
793 
794  n_NoInterceptTracks++;
795  m_h1notINtrack5_phi->Fill(m_phimc);
796  m_h1notINtrack5_lambda->Fill(m_lambdamc);
797  m_h1notINtrack5_cosTheta->Fill(m_costhetamc);
798  m_h1notINtrack5_pt->Fill(m_pTmc);
799  }
800 
801  } // close loop on MCParticlet
802 
803 
804  m_h1notINtrack5->Fill(n_NoInterceptTracks);
805  m_h1Track->Fill(Ntrack);
806  m_h1INtrack1->Fill(NtrackHit);
807 
808  n_tracksWithDigits += Ntrack;
809  n_tracksWithDigitsInROI += NtrackHit;
810 
811  m_rootEvent++;
812  B2RESULT(" o PXDROIFinder ANALYSIS: tot ROIs = " << ROIList.getEntries() << ", ok ROIs = " << nROIs);
813  B2RESULT(" o : NtrackHit/Ntrack = " << NtrackHit << "/ " << Ntrack << " = " <<
814  (double)NtrackHit / Ntrack);
815  if (nROIs > ROIList.getEntries()) B2RESULT(" HOUSTON WE HAVE A PROBLEM!");
816 
817  m_h1okROIs->Fill(nROIs);
818  m_h1okROIfrac->Fill(1.*nROIs / ROIList.getEntries());
819  cout << "" << endl;
820 
821 
822 }
823 
824 
825 void PXDROIFinderAnalysisModule::terminate()
826 {
827 
828  Double_t epsilon[6];
829  Double_t epsilonErr[6];
830  double epsilonTot = (double)n_pxdDigitInROI / (double) n_pxdDigit;
831  Double_t epsilon2[6];
832  Double_t epsilon2Err[6];
833  double epsilon2Tot = (double)n_tracksWithDigitsInROI / (double) n_tracksWithDigits;
834 
835  for (int i = 0; i < 6; i++) {
836  m_h1digiOut2->SetBinContent(i + 1, nnotINdigit2[i]);
837  m_h1digiOut3->SetBinContent(i + 1, nnotINdigit3[i]);
838  m_h1digiOut4->SetBinContent(i + 1, nnotINdigit4[i]);
839  m_h1digiOut5->SetBinContent(i + 1, nnotINdigit5[i]);
840  m_h1digiIn->SetBinContent(i + 1, npxdDigitInROI[i]);
841  }
842 
843  for (int i = 0; i < 6; i++) {
844  m_h1nnotINtrack2->SetBinContent(i + 1, nnotINtrack2[i]);
845  m_h1nnotINtrack3->SetBinContent(i + 1, nnotINtrack3[i]);
846  m_h1nnotINtrack4->SetBinContent(i + 1, nnotINtrack4[i]);
847  m_h1nnotINtrack5->SetBinContent(i + 1, nnotINtrack5[i]);
848  m_h1TrackOneDigiIn->SetBinContent(i + 1, TrackOneDigiIn[i]);
849  }
850 
851  B2RESULT(" ROI Analysis Summary ");
852  B2RESULT("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
853  B2RESULT("");
854  B2RESULT(" number of tracks = " << n_tracks);
855  B2RESULT(" number of Intercepts = " << n_intercepts);
856  B2RESULT(" number of ROIs = " << n_rois);
857  B2RESULT("");
858  B2RESULT(" average number of ROIs = " << m_h1totROIs->GetMean() << ", average area " << m_h1totArea->GetMean() <<
859  " (not excluding overlaps!)");
860  B2RESULT(" average number of ROIs w digits = " << m_h1okROIs->GetMean() << ", average tot area " << m_h1okArea->GetMean());
861  B2RESULT("");
862  B2RESULT(" red Factor = " << m_h1redFactor->GetMean() << ", RMS = " << m_h1redFactor->GetRMS());
863  B2RESULT("");
864  B2RESULT("tracks w digits: " << n_tracksWithDigits);
865  B2RESULT("tracks w digits in ROI: " << n_tracksWithDigitsInROI);
866  B2RESULT("efficiency PTD : " << epsilon2Tot << " +/- " << sqrt(epsilon2Tot * (1 - epsilon2Tot) / n_tracksWithDigits));
867 
868  Int_t totTrackOneDigiIn = 0; //not used for the moment, added to double check
869  Int_t totnnotINtrack2 = 0;
870  Int_t totnnotINtrack3 = 0;
871  Int_t totnnotINtrack4 = 0;
872  Int_t totnnotINtrack5 = 0;
873 
874  Int_t totTrack[6];
875 
876  for (int j = 0; j < m_h1TrackOneDigiIn->GetNbinsX(); j++) {
877  totTrackOneDigiIn = totTrackOneDigiIn + m_h1TrackOneDigiIn->GetBinContent(j + 1);
878  totnnotINtrack2 = totnnotINtrack2 + m_h1nnotINtrack2->GetBinContent(j + 1);
879  totnnotINtrack3 = totnnotINtrack3 + m_h1nnotINtrack3->GetBinContent(j + 1);
880  totnnotINtrack4 = totnnotINtrack4 + m_h1nnotINtrack4->GetBinContent(j + 1);
881  totnnotINtrack5 = totnnotINtrack5 + m_h1nnotINtrack5->GetBinContent(j + 1);
882 
883  totTrack[j] = m_h1nnotINtrack5->GetBinContent(j + 1) + m_h1nnotINtrack4->GetBinContent(j + 1) + m_h1nnotINtrack3->GetBinContent(
884  j + 1) + m_h1nnotINtrack2->GetBinContent(j + 1) + m_h1TrackOneDigiIn->GetBinContent(j + 1);
885  }
886 
887  B2RESULT(" out ROI = " << totnnotINtrack2);
888  B2RESULT(" no ROI = " << totnnotINtrack3);
889  B2RESULT(" wrongVxdID = " << totnnotINtrack4);
890  B2RESULT(" no Inter = " << totnnotINtrack5);
891  B2RESULT("");
892 
893  B2RESULT(" pxdDigit : " << n_pxdDigit);
894  B2RESULT(" pxdDigitIn : " << n_pxdDigitInROI);
895 
896  B2RESULT(" eff DGT: " << epsilonTot << " +/- " << sqrt(epsilonTot * (1 - epsilonTot) / n_pxdDigit));
897  B2RESULT(" inefficiency (PXDDigits): ");
898  B2RESULT(" out ROI: " << n_notINdigit2);
899  B2RESULT(" no ROI: " << n_notINdigit3);
900  B2RESULT(" wrongVxdID: " << n_notINdigit4);
901  B2RESULT(" noInter: " << n_notINdigit5);
902  B2RESULT("");
903 
904 
905  B2RESULT(" pT > 1 : " << pt[5]);
906  B2RESULT(" out ROI: " << nnotINdigit2[5]);
907  B2RESULT(" no ROI: " << nnotINdigit3[5]);
908  B2RESULT(" wrongVxdID: " << nnotINdigit4[5]);
909  B2RESULT(" noInter: " << nnotINdigit5[5]);
910  B2RESULT(" pxdDigit : " << npxdDigit[5]);
911  B2RESULT(" pxdDigitIn : " << npxdDigitInROI[5]);
912  if ((npxdDigit[5] - npxdDigitInROI[5]) != (nnotINdigit2[5] + nnotINdigit3[5] + nnotINdigit4[5] + nnotINdigit5[5]))
913  B2RESULT(" pxdDigitOut : " << npxdDigit[5] - npxdDigitInROI[5] << " != " << nnotINdigit2[5] + nnotINdigit3[5] + nnotINdigit4[5] +
914  nnotINdigit5[5]);
915  epsilon[5] = (double)npxdDigitInROI[5] / (double) npxdDigit[5];
916  epsilonErr[5] = sqrt(epsilon[5] * (1 - epsilon[5]) / npxdDigit[5]);
917  B2RESULT(" efficiency : " << epsilon[5] << " +/- " << epsilonErr[5]);
918  epsilon2[5] = (double)TrackOneDigiIn[5] / (double) totTrack[5] ;
919  epsilon2Err[5] = sqrt(epsilon2[5] * (1 - epsilon2[5]) / totTrack[5]);
920  B2RESULT(" efficiency2 : " << epsilon2[5] << " +/- " << epsilon2Err[5]);
921  B2RESULT("");
922 
923  B2RESULT(" 0.5 < pT < 1 : " << pt[4]);
924  B2RESULT(" out ROI: " << nnotINdigit2[4]);
925  B2RESULT(" no ROI: " << nnotINdigit3[4]);
926  B2RESULT(" wrongVxdID: " << nnotINdigit4[4]);
927  B2RESULT(" noInter: " << nnotINdigit5[4]);
928  B2RESULT(" pxdDigit : " << npxdDigit[4]);
929  B2RESULT(" pxdDigitIn : " << npxdDigitInROI[4]);
930  if ((npxdDigit[4] - npxdDigitInROI[4]) != (nnotINdigit2[4] + nnotINdigit3[4] + nnotINdigit4[4] + nnotINdigit5[4]))
931  B2RESULT(" pxdDigitOut : " << npxdDigit[4] - npxdDigitInROI[4] << " != " << nnotINdigit2[4] + nnotINdigit3[4] + nnotINdigit4[4] +
932  nnotINdigit5[4]);
933  epsilon[4] = (double)npxdDigitInROI[4] / (double) npxdDigit[4];
934  epsilonErr[4] = sqrt(epsilon[4] * (1 - epsilon[4]) / npxdDigit[4]);
935  B2RESULT(" efficiency : " << epsilon[4] << " +/- " << epsilonErr[4]);
936  epsilon2[4] = (double)TrackOneDigiIn[4] / (double) totTrack[4] ;
937  epsilon2Err[4] = sqrt(epsilon2[4] * (1 - epsilon2[4]) / totTrack[4]);
938  B2RESULT(" efficiency2 : " << epsilon2[4] << " +/- " << epsilon2Err[4]);
939 
940  B2RESULT("");
941  B2RESULT(" 0.3 < pT < 0.5 : " << pt[3]);
942  B2RESULT(" out ROI: " << nnotINdigit2[3]);
943  B2RESULT(" no ROI: " << nnotINdigit3[3]);
944  B2RESULT(" wrongVxdID: " << nnotINdigit4[3]);
945  B2RESULT(" noInter: " << nnotINdigit5[3]);
946  B2RESULT(" pxdDigit : " << npxdDigit[3]);
947  B2RESULT(" pxdDigitIn : " << npxdDigitInROI[3]);
948  if ((npxdDigit[3] - npxdDigitInROI[3]) != (nnotINdigit2[3] + nnotINdigit3[3] + nnotINdigit4[3] + nnotINdigit5[3]))
949  B2RESULT(" pxdDigitOut : " << npxdDigit[3] - npxdDigitInROI[3] << " != " << nnotINdigit2[3] + nnotINdigit3[3] + nnotINdigit4[3] +
950  nnotINdigit5[3]);
951  epsilon[3] = (double)npxdDigitInROI[3] / (double) npxdDigit[3];
952  epsilonErr[3] = sqrt(epsilon[3] * (1 - epsilon[3]) / npxdDigit[3]);
953  B2RESULT(" efficiency : " << epsilon[3] << " +/- " << epsilonErr[3]);
954  epsilon2[3] = (double)TrackOneDigiIn[3] / (double) totTrack[3];
955  epsilon2Err[3] = sqrt(epsilon2[3] * (1 - epsilon2[3]) / totTrack[3]);
956  B2RESULT(" efficiency2 : " << epsilon2[3] << " +/- " << epsilon2Err[3]);
957 
958  B2RESULT("");
959  B2RESULT(" 0.2 < pT < 0.3 : " << pt[2]);
960  B2RESULT(" out ROI: " << nnotINdigit2[2]);
961  B2RESULT(" no ROI: " << nnotINdigit3[2]);
962  B2RESULT(" wrongVxdID: " << nnotINdigit4[2]);
963  B2RESULT(" noInter: " << nnotINdigit5[2]);
964  B2RESULT(" pxdDigit : " << npxdDigit[2]);
965  B2RESULT(" pxdDigitIn : " << npxdDigitInROI[2]);
966  if ((npxdDigit[2] - npxdDigitInROI[2]) != (nnotINdigit2[2] + nnotINdigit3[2] + nnotINdigit4[2] + nnotINdigit5[2]))
967  B2RESULT(" pxdDigitOut : " << npxdDigit[2] - npxdDigitInROI[2] << " != " << nnotINdigit2[2] + nnotINdigit3[2] + nnotINdigit4[2] +
968  nnotINdigit5[2]);
969  epsilon[2] = (double)npxdDigitInROI[2] / (double) npxdDigit[2];
970  epsilonErr[2] = sqrt(epsilon[2] * (1 - epsilon[2]) / npxdDigit[2]);
971  B2RESULT(" efficiency : " << epsilon[2] << " +/- " << epsilonErr[2]);
972  epsilon2[2] = (double)TrackOneDigiIn[2] / (double) totTrack[2] ;
973  epsilon2Err[2] = sqrt(epsilon2[2] * (1 - epsilon2[2]) / totTrack[2]);
974  B2RESULT(" efficiency2 : " << epsilon2[2] << " +/- " << epsilon2Err[2]);
975 
976  B2RESULT("");
977  B2RESULT(" 0.1 < pT < 0.2 : " << pt[1]);
978  B2RESULT(" out ROI: " << nnotINdigit2[1]);
979  B2RESULT(" no ROI: " << nnotINdigit3[1]);
980  B2RESULT(" wrongVxdID: " << nnotINdigit4[1]);
981  B2RESULT(" noInter: " << nnotINdigit5[1]);
982  B2RESULT(" pxdDigit : " << npxdDigit[1]);
983  B2RESULT(" pxdDigitIn : " << npxdDigitInROI[1]);
984  if ((npxdDigit[1] - npxdDigitInROI[1]) != (nnotINdigit2[1] + nnotINdigit3[1] + nnotINdigit4[1] + nnotINdigit5[1]))
985  B2RESULT(" pxdDigitOut : " << npxdDigit[1] - npxdDigitInROI[1] << " ?=? " << nnotINdigit2[1] + nnotINdigit3[1] + nnotINdigit4[1] +
986  nnotINdigit5[1]);
987  epsilon[1] = (double)npxdDigitInROI[1] / (double) npxdDigit[1];
988  epsilonErr[1] = sqrt(epsilon[1] * (1 - epsilon[1]) / npxdDigit[1]);
989  B2RESULT(" efficiency : " << epsilon[1] << " +/- " << epsilonErr[1]);
990  epsilon2[1] = (double)TrackOneDigiIn[1] / (double) totTrack[1] ;
991  epsilon2Err[1] = sqrt(epsilon2[1] * (1 - epsilon2[1]) / totTrack[1]);
992  B2RESULT(" efficiency2 : " << epsilon2[1] << " +/- " << epsilon2Err[1]);
993 
994  B2RESULT("");
995  B2RESULT(" pT < 0.1 : " << pt[0]);
996  B2RESULT(" out ROI: " << nnotINdigit2[0]);
997  B2RESULT(" no ROI: " << nnotINdigit3[0]);
998  B2RESULT(" wrongVxdID: " << nnotINdigit4[0]);
999  B2RESULT(" noInter: " << nnotINdigit5[0]);
1000  B2RESULT(" pxdDigit : " << npxdDigit[0]);
1001  B2RESULT(" pxdDigitIn : " << npxdDigitInROI[0]);
1002  if ((npxdDigit[0] - npxdDigitInROI[0]) != (nnotINdigit2[0] + nnotINdigit3[0] + nnotINdigit4[0] + nnotINdigit5[0]))
1003  B2RESULT(" pxdDigitOut : " << npxdDigit[0] - npxdDigitInROI[0] << " ?=? " << nnotINdigit2[0] + nnotINdigit3[0] + nnotINdigit4[0] +
1004  nnotINdigit5[0]);
1005  epsilon[0] = (double)npxdDigitInROI[0] / (double) npxdDigit[0];
1006  epsilonErr[0] = sqrt(epsilon[0] * (1 - epsilon[0]) / npxdDigit[0]);
1007  B2RESULT(" efficiency : " << epsilon[0] << " +/- " << epsilonErr[0]);
1008  epsilon2[0] = (double)TrackOneDigiIn[0] / (double) totTrack[0] ;
1009  epsilon2Err[0] = sqrt(epsilon2[0] * (1 - epsilon2[0]) / totTrack[0]);
1010  B2RESULT(" efficiency2 : " << epsilon2[0] << " +/- " << epsilon2Err[0]);
1011 
1012  B2RESULT("legend:");
1013  B2RESULT(" CASO2: if (ROI exists but no PXDDigit inside)");
1014  B2RESULT(" CASO3: if (ROI does not exist, intercept with correct VxdID)");
1015  B2RESULT(" CASO4: if (intercept with wrong VxdID)");
1016  B2RESULT(" CASO5: if (intercept does not exist)");
1017 
1018 
1019  m_gEff2 = new TGraphErrors(6, pt, epsilon2, ptErr, epsilon2Err);
1020  m_gEff2->SetName("g_eff2");
1021  m_gEff2->SetTitle("Normalized to MCParticles with digits and related track");
1022  m_gEff = new TGraphErrors(6, pt, epsilon, ptErr, epsilonErr);
1023  m_gEff->SetName("g_eff");
1024  m_gEff->SetTitle("Normalized to digits of MCParticles with digits and related track");
1025 
1026 
1027 
1028  if (m_rootFilePtr != nullptr) {
1029  m_rootFilePtr->cd(); //important! without this the famework root I/O (SimpleOutput etc) could mix with the root I/O of this module
1030 
1031  TDirectory* oldDir = gDirectory;
1032  TDirectory* m_digiDir = oldDir->mkdir("digits");
1033  TDirectory* m_tracksDir = oldDir->mkdir("tracks");
1034  TDirectory* m_notINtrack5 = oldDir->mkdir("notINtrack5");
1035  TDirectory* m_INtrack1 = oldDir->mkdir("INtrack1");
1036  TDirectory* m_alltracks = oldDir->mkdir("alltracks");
1037  TDirectory* m_in = oldDir->mkdir("digi_in");
1038  TDirectory* m_out2 = oldDir->mkdir("digi_out2");
1039  TDirectory* m_out3 = oldDir->mkdir("digi_out3");
1040  TDirectory* m_out4 = oldDir->mkdir("digi_out4");
1041  TDirectory* m_out5 = oldDir->mkdir("digi_out5");
1042  TDirectory* m_ROIDir = oldDir->mkdir("roi");
1043 
1044  m_h1DigitsPerParticle->Write();
1045  m_h1RecoTracksPerParticle->Write();
1046 
1047  m_gEff->Write();
1048  m_gEff2->Write();
1049  m_h1effPerTrack->Write();
1050 
1051 
1052  m_digiDir->cd();
1053  m_h1digiIn->Write();
1054  m_h1digiOut2->Write();
1055  m_h1digiOut3->Write();
1056  m_h1digiOut4->Write();
1057  m_h1digiOut5->Write();
1058 
1059  m_tracksDir->cd();
1060  m_h1TrackOneDigiIn->Write();
1061  m_h1nnotINtrack2->Write();
1062  m_h1nnotINtrack3->Write();
1063  m_h1nnotINtrack4->Write();
1064  m_h1nnotINtrack5->Write();
1065 
1066  m_notINtrack5->cd();
1067  m_h1notINtrack5->Write();
1068  m_h1notINtrack5_pt->Write();
1069  m_h1notINtrack5_phi->Write();
1070  m_h1notINtrack5_lambda->Write();
1071  m_h1notINtrack5_cosTheta->Write();
1072 
1073  m_INtrack1->cd();
1074  m_h1INtrack1->Write();
1075  m_h1INtrack1_pt->Write();
1076  m_h1INtrack1_phi->Write();
1077  m_h1INtrack1_lambda->Write();
1078  m_h1INtrack1_cosTheta->Write();
1079 
1080  m_alltracks->cd();
1081  m_h1Track->Write();
1082  m_h1Track_pt->Write();
1083  m_h1Track_phi->Write();
1084  m_h1Track_lambda->Write();
1085  m_h1Track_cosTheta->Write();
1086 
1087  m_in->cd();
1088  m_h1GlobalTime->Write();
1089  m_h1PullU->Write();
1090  m_h1PullV->Write();
1091  m_h1ResidU->Write();
1092  m_h1ResidV->Write();
1093  m_h2ResidUV->Write();
1094  m_h1SigmaU->Write();
1095  m_h1SigmaV->Write();
1096  m_h2sigmaUphi->Write();
1097  m_h2sigmaVphi->Write();
1098  m_h2Mapglob->Write();
1099  m_h2MaplocL1->Write();
1100  m_h2MaplocL2->Write();
1101 
1102  m_out2->cd();
1103  m_h1GlobalTime_out2->Write();
1104  m_h1ResidU_out2->Write();
1105  m_h1ResidV_out2->Write();
1106  m_h2ResidUV_out2->Write();
1107  m_h1SigmaU_out2->Write();
1108  m_h1SigmaV_out2->Write();
1109  m_h2sigmaUphi_out2->Write();
1110  m_h2sigmaVphi_out2->Write();
1111  m_h2Mapglob_out2->Write();
1112  m_h2MaplocL1_out2->Write();
1113  m_h2MaplocL2_out2->Write();
1114 
1115  m_out3->cd();
1116  m_h1GlobalTime_out3->Write();
1117  m_h1ResidU_out3->Write();
1118  m_h1ResidV_out3->Write();
1119  m_h2ResidUV_out3->Write();
1120  m_h1SigmaU_out3->Write();
1121  m_h1SigmaV_out3->Write();
1122  m_h2sigmaUphi_out3->Write();
1123  m_h2sigmaVphi_out3->Write();
1124  m_h2Mapglob_out3->Write();
1125  m_h2MaplocL1_out3->Write();
1126  m_h2MaplocL2_out3->Write();
1127 
1128  m_out4->cd();
1129  m_h1GlobalTime_out4->Write();
1130  m_h1SigmaU_out4->Write();
1131  m_h1SigmaV_out4->Write();
1132  m_h2sigmaUphi_out4->Write();
1133  m_h2sigmaVphi_out4->Write();
1134  m_h2Mapglob_out4->Write();
1135  m_h2MaplocL1_out4->Write();
1136  m_h2MaplocL2_out4->Write();
1137 
1138  m_out5->cd();
1139  m_h1GlobalTime_out5->Write();
1140  m_h2Mapglob_out5->Write();
1141  m_h2MaplocL1_out5->Write();
1142  m_h2MaplocL2_out5->Write();
1143 
1144  m_ROIDir->cd();
1145  m_h1totArea->Write();
1146  m_h1okArea->Write();
1147  m_h1okROIs->Write();
1148  m_h1okROIfrac->Write();
1149  m_h1totROIs->Write();
1150  m_h1redFactor->Write();
1151  m_h1redFactor_L1->Write();
1152  m_h1redFactor_L2->Write();
1153 
1154 
1155  m_h2ROIbottomLeft->Write();
1156  m_h2ROItopRight->Write();
1157  m_h2ROIuMinMax->Write();
1158  m_h2ROIvMinMax->Write();
1159  m_rootFilePtr->Close();
1160 
1161  }
1162 
1163 }
1164 
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
TVector3 getMomentum() const
Return momentum.
Definition: MCParticle.h:198
Base class for Modules.
Definition: Module.h:72
The PXD digit class.
Definition: PXDDigit.h:27
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
Definition: PXDIntercept.h:22
The PXD Data Reduction Analysis Module.
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:25
bool Contains(const Belle2::PXDRawHit &thePXDRawHit) const
true if the ROI contains the thePXDRawHit
Definition: ROIid.cc:25
int getMaxVid() const
return the maximum V id of the ROI
Definition: ROIid.h:46
int getMinVid() const
return the minimum V id of the ROI
Definition: ROIid.h:45
int getMinUid() const
return the minimum U id of the ROI
Definition: ROIid.h:43
int getMaxUid() const
return the maximum U id of the ROI
Definition: ROIid.h:44
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:76
Provides access to fast ( O(log n) ) bi-directional lookups on a specified relation.
Definition: RelationIndex.h:76
index_from::const_iterator iterator_from
Element iterator of the from side index.
Definition: RelationIndex.h:95
range_from getElementsFrom(const FROM *from) const
Return a range of all elements pointing from the given object.
boost::iterator_range< iterator_from > range_from
Iterator range [first,second) of the from side.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
RelationVector< FROM > getRelationsFrom(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from another store array to this object.
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:28
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
double getSigmaV() const
return the statistical error on the V coordinate of the intercept
Definition: VXDIntercept.h:62
double getCoorV() const
return the V coordinate of the intercept
Definition: VXDIntercept.h:60
double getSigmaU() const
return the statistical error on the U coordinate of the intercept
Definition: VXDIntercept.h:61
VxdID::baseType getSensorID() const
return the sensor ID
Definition: VXDIntercept.h:66
double getCoorU() const
return the U coordinate of the intercept
Definition: VXDIntercept.h:59
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
Definition: GeoCache.cc:175
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:66
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
Definition: GeoCache.cc:203
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
Definition: GeoCache.cc:192
Base class to provide Sensor Information for PXD and SVD.
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
double getUCellPosition(int uID, int vID=-1) const
Return the position of a specific strip/pixel in u direction.
TVector3 pointToGlobal(const TVector3 &local, bool reco=false) const
Convert a point from local to global coordinates.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
baseType getSensorNumber() const
Get the sensor id.
Definition: VxdID.h:100
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:96
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Abstract base class for different kinds of events.