Belle II Software development
PXDROIFinderAnalysisModule.h
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#pragma once
9
10#include <framework/core/Module.h>
11#include <framework/datastore/StoreArray.h>
12
13#include <TFile.h>
14#include <TH1F.h>
15#include <TH2F.h>
16#include <TGraphErrors.h>
17
18#include <string>
19
20namespace Belle2 {
25 class RecoTrack;
26 class ROIid;
27 class PXDIntercept;
28 class MCParticle;
29
37
38 public:
39
44
45
46 private:
47
51 void initialize() override final;
52
56 void beginRun() override final;
57
61 void event() override final;
62
66 void terminate() override final;
67
73 std::string m_recoTrackListName;
75 std::string m_ROIListName;
77 TFile* m_rootFilePtr = nullptr;
78 std::string m_rootFileName;
83 //pxd sensor number
87 //graphs & histos - results
88 Double_t pt[6] = {0.05, 0.15, 0.25, 0.4, 0.75, 1.5};
89 Double_t ptErr[6] = { 0.05, 0.05, 0.05, 0.1, 0.25, 0.5};
91 TGraphErrors* m_gEff2 = nullptr;
92 TGraphErrors* m_gEff = nullptr;
94 TH1F* m_h1DigitsPerParticle = nullptr;
95 TH1F* m_h1RecoTracksPerParticle = nullptr;
97 TH1F* m_h1digiIn = nullptr;
98 TH1F* m_h1digiOut2 = nullptr;
99 TH1F* m_h1digiOut3 = nullptr;
100 TH1F* m_h1digiOut4 = nullptr;
101 TH1F* m_h1digiOut5 = nullptr;
103 TH1F* m_h1TrackOneDigiIn = nullptr;
104 TH1F* m_h1nnotINtrack2 = nullptr;
105 TH1F* m_h1nnotINtrack3 = nullptr;
106 TH1F* m_h1nnotINtrack4 = nullptr;
107 TH1F* m_h1nnotINtrack5 = nullptr;
109 TH1F* m_h1Track = nullptr;
110 TH1F* m_h1Track_pt = nullptr;
111 TH1F* m_h1Track_phi = nullptr;
112 TH1F* m_h1Track_lambda = nullptr;
113 TH1F* m_h1Track_cosTheta = nullptr;
114 TH1F* m_h1Track_pVal = nullptr;
115 TH1F* m_h1Track_nSVDhits = nullptr;
116 TH1F* m_h1Track_nCDChits = nullptr;
118 TH1F* m_h1INtrack1 = nullptr;
119 TH1F* m_h1INtrack1_pt = nullptr;
120 TH1F* m_h1INtrack1_phi = nullptr;
121 TH1F* m_h1INtrack1_lambda = nullptr;
122 TH1F* m_h1INtrack1_cosTheta = nullptr;
123 TH1F* m_h1INtrack1_pVal = nullptr;
124 TH1F* m_h1INtrack1_nSVDhits = nullptr;
125 TH1F* m_h1INtrack1_nCDChits = nullptr;
127 TH1F* m_h1notINtrack5 = nullptr;
128 TH1F* m_h1notINtrack5_pt = nullptr;
129 TH1F* m_h1notINtrack5_phi = nullptr;
130 TH1F* m_h1notINtrack5_lambda = nullptr;
131 TH1F* m_h1notINtrack5_cosTheta = nullptr;
132 TH1F* m_h1notINtrack5_pVal = nullptr;
133 TH1F* m_h1notINtrack5_nSVDhits = nullptr;
134 TH1F* m_h1notINtrack5_nCDChits = nullptr;
137 //fill digits inside ROIs
138 TH1F* m_h1PullU = nullptr;
139 TH1F* m_h1PullV = nullptr;
140 TH2F* m_h2sigmaUphi = nullptr;
141 TH2F* m_h2sigmaVphi = nullptr;
142 TH1F* m_h1ResidU = nullptr;
143 TH1F* m_h1ResidV = nullptr;
144 TH2F* m_h2ResidUV = nullptr;
145 TH1F* m_h1SigmaU = nullptr;
146 TH1F* m_h1SigmaV = nullptr;
147 TH1F* m_h1GlobalTime = nullptr;
148 TH2F* m_h2Mapglob = nullptr;
149 TH2F* m_h2MaplocL1 = nullptr;
150 TH2F* m_h2MaplocL2 = nullptr;
152 //fill digits outside2 ROIs
153 TH2F* m_h2sigmaUphi_out2 = nullptr;
154 TH2F* m_h2sigmaVphi_out2 = nullptr;
155 TH1F* m_h1ResidU_out2 = nullptr;
156 TH1F* m_h1ResidV_out2 = nullptr;
157 TH2F* m_h2ResidUV_out2 = nullptr;
158 TH1F* m_h1SigmaU_out2 = nullptr;
159 TH1F* m_h1SigmaV_out2 = nullptr;
160 TH1F* m_h1GlobalTime_out2 = nullptr;
161 TH2F* m_h2Mapglob_out2 = nullptr;
162 TH2F* m_h2MaplocL1_out2 = nullptr;
163 TH2F* m_h2MaplocL2_out2 = nullptr;
165 //fill digits outside3 ROIs
166 TH2F* m_h2sigmaUphi_out3 = nullptr;
167 TH2F* m_h2sigmaVphi_out3 = nullptr;
168 TH1F* m_h1ResidU_out3 = nullptr;
169 TH1F* m_h1ResidV_out3 = nullptr;
170 TH2F* m_h2ResidUV_out3 = nullptr;
171 TH1F* m_h1SigmaU_out3 = nullptr;
172 TH1F* m_h1SigmaV_out3 = nullptr;
173 TH1F* m_h1GlobalTime_out3 = nullptr;
174 TH2F* m_h2Mapglob_out3 = nullptr;
175 TH2F* m_h2MaplocL1_out3 = nullptr;
176 TH2F* m_h2MaplocL2_out3 = nullptr;
178 //fill digits outside4 ROIs
179 TH2F* m_h2sigmaUphi_out4 = nullptr;
180 TH2F* m_h2sigmaVphi_out4 = nullptr;
181 TH1F* m_h1SigmaU_out4 = nullptr;
182 TH1F* m_h1SigmaV_out4 = nullptr;
183 TH1F* m_h1GlobalTime_out4 = nullptr;
184 TH2F* m_h2Mapglob_out4 = nullptr;
185 TH2F* m_h2MaplocL1_out4 = nullptr;
186 TH2F* m_h2MaplocL2_out4 = nullptr;
188 //fill digits outside5 ROIs
189 TH1F* m_h1GlobalTime_out5 = nullptr;
190 TH2F* m_h2Mapglob_out5 = nullptr;
191 TH2F* m_h2MaplocL1_out5 = nullptr;
192 TH2F* m_h2MaplocL2_out5 = nullptr;
194 //ROI stuff
195 TH2F* m_h2ROIbottomLeft = nullptr;
196 TH2F* m_h2ROItopRight = nullptr;
197 TH2F* m_h2ROIuMinMax = nullptr;
198 TH2F* m_h2ROIvMinMax = nullptr;
199 TH1F* m_h1totROIs = nullptr;
200 TH1F* m_h1okROIs = nullptr;
201 TH1F* m_h1okROIfrac = nullptr;
202 TH1F* m_h1redFactor = nullptr;
203 TH1F* m_h1redFactor_L1 = nullptr;
204 TH1F* m_h1redFactor_L2 = nullptr;
205 TH1F* m_h1totArea = nullptr;
206 TH1F* m_h1okArea = nullptr;
208 TH1F* m_h1effPerTrack = nullptr;
212 //variables
214 double m_coorU;
215 double m_coorV;
216 double m_sigmaU;
217 double m_sigmaV;
220 double m_coorUmc;
221 double m_coorVmc;
225 double m_pTmc;
226 double m_momXmc;
227 double m_momYmc;
228 double m_momZmc;
229 double m_thetamc;
231 double m_phimc;
232 double m_lambdamc;
234 unsigned int Ntrack;
235 unsigned int NtrackHit;
236 unsigned int n_notINtrack2;
237 unsigned int n_notINtrack3;
238 unsigned int n_notINtrack4;
239 unsigned int n_notINtrack5;
242 unsigned int n_rois;
243 unsigned int n_intercepts;
244 unsigned int n_tracks;
245 unsigned int n_tracksWithDigits;
247 unsigned int n_pxdDigit;
248 unsigned int n_pxdDigitInROI;
250 unsigned int n_notINdigit2;
251 unsigned int n_notINdigit3;
252 unsigned int n_notINdigit4;
253 unsigned int n_notINdigit5;
255 unsigned int npxdDigit[6];
256 unsigned int npxdDigitInROI[6];
257 unsigned int nnotINdigit2[6];
258 unsigned int nnotINdigit3[6];
259 unsigned int nnotINdigit4[6];
260 unsigned int nnotINdigit5[6];
261 unsigned int TrackOneDigiIn[6];
262 unsigned int nnotINtrack2[6];
263 unsigned int nnotINtrack3[6];
264 unsigned int nnotINtrack4[6];
265 unsigned int nnotINtrack5[6];
267 };
268
270}
Base class for Modules.
Definition: Module.h:72
The PXD Data Reduction Analysis Module.
unsigned int n_pxdDigit
number of pxd digits
unsigned int nnotINtrack3[6]
number of tracks in bins of pt: no hit, wrong vxdID
TH1F * m_h1SigmaU_out4
distribution of sigmaU for PXDDigits not contained in a ROI
TGraphErrors * m_gEff
efficiency graph
TH1F * m_h1GlobalTime_out3
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1GlobalTime_out4
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1notINtrack5_nCDChits
denominator track pVal
TH1F * m_h1ResidU_out2
distribution of U resid for PXDDigits not contained in a ROI
void initialize() override final
Initializes the Module.
TH1F * m_h1INtrack1
track with no intercept
Int_t m_nSensorsL2
number of sensors on L2
unsigned int n_pxdDigitInROI
number of pxd digits in ROIs
TH1F * m_h1nnotINtrack2
tracks with lost digit: ROI exist with right vxdID
TH2F * m_h2sigmaVphi_out2
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
TH1F * m_h1SigmaV_out4
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1redFactor_L1
distribution of number of ROIsreduction factor
TH2F * m_h2ResidUV_out3
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1ResidV
distribution of V resid for PXDDigits contained in a ROI
TH1F * m_h1nnotINtrack3
lost digit: ROI exist with wrong vxdID
TH1F * m_h1nnotINtrack5
lost digit: ROI does not exist, intercept with wrong vxdID
Int_t m_nSensorsL1
number of sensors on L1
TH1F * m_h1nnotINtrack4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int n_notINdigit2
number of lost digits: no hit, correct vxdID
Double_t ptErr[6]
bin widths (transverse momentum)
unsigned int n_notINtrack4
number of tracks with no ROI (intercept with correct vxdID)
double m_coorUmc
true intercept U coordinate
unsigned int n_intercepts
number of PXDIntercepts
TH1F * m_h1redFactor_L2
distribution of number of ROIsreduction factor
TH1F * m_h1INtrack1_nCDChits
denominator track pVal
std::string m_recoTrackListName
RecoTrack list name.
TH1F * m_h1INtrack1_pt
track with no intercept pT
bool m_writeToRoot
if true, a rootFile named by m_rootFileName will be filled with info
TH1F * m_h1INtrack1_lambda
track with no intercept lambda
TH1F * m_h1SigmaV_out3
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1redFactor
distribution of number of ROIsreduction factor
unsigned int nnotINtrack2[6]
number of tracks in bins of pt: no hit, correct vxdID
TH1F * m_h1INtrack1_phi
track with no intercept phi
TH1F * m_h1PullV
distribution of V pulls for PDXDigits contained in a ROI
TH1F * m_h1ResidV_out2
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1Track_pVal
denominator track pVal
TH1F * m_h1PullU
distribution of U pulls for PDXDigits contained in a ROI
TH1F * m_h1okROIs
distribution of number of ROIs containin a PXDDigit
TH1F * m_h1Track_cosTheta
denominator track cosTheta
TH1F * m_h1INtrack1_nSVDhits
denominator track pVal
std::string m_PXDInterceptListName
Intercept list name.
unsigned int nnotINdigit3[6]
number of lost digits in bins of pt: no hit, wrong vxdID
unsigned int nnotINtrack4[6]
number of tracks in bins of pt: no ROI, intercepts with correct vxdID
unsigned int n_notINtrack2
number of tracks with no digits in ROI (correct vxdID)
TH1F * m_h1notINtrack5_phi
track with no intercept phi
unsigned int n_notINdigit3
number of lost digits: no hit, wrong vxdID
TH1F * m_h1Track_nCDChits
denominator track pVal
TH1F * m_h1digiOut5
lost digit: ROI does not exist, intercept with wrong vxdID
TH2F * m_h2ResidUV_out2
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1Track_lambda
denominator track lambda
unsigned int nnotINdigit4[6]
number of lost digits in bins of pt: no ROI, intercepts with correct vxdID
unsigned int nnotINdigit2[6]
number of lost digits in bins of pt: no hit, correct vxdID
TH1F * m_h1notINtrack5_lambda
track with no intercept lambda
unsigned int npxdDigit[6]
number of pxd digits in bins of pt
TGraphErrors * m_gEff2
efficiency graph
TH1F * m_h1totROIs
distribution of number of all ROIs
TH1F * m_h1TrackOneDigiIn
tracks with at least digit contained in ROI
TH2F * m_h2sigmaUphi_out2
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1ResidU_out3
distribution of U resid for PXDDigits not contained in a ROI
TH1F * m_h1okROIfrac
distribution of number of ROIsreduction factor
TH1F * m_h1digiOut4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int nnotINtrack5[6]
number of tracks in bins of pt: no ROI, intercepts with wrong vxdID
unsigned int n_notINdigit5
number of lost digits: no ROI, intercepts with wrong vxdID
TH1F * m_h1GlobalTime
distribution of global time for PDXDigits contained in a ROI
TH2F * m_h2ROItopRight
u,v coordinates of the top right pixel
unsigned int NtrackHit
number of tracks with hits
TH1F * m_h1SigmaU_out2
distribution of sigmaU for PXDDigits not contained in a ROI
TH1F * m_h1notINtrack5_pVal
denominator track pVal
TH1F * m_h1effPerTrack
fraction of digits in ROI per track
void terminate() override final
Termination action.
TH1F * m_h1SigmaV
distribution of sigmaV for PXDDigits contained in a ROI
TH1F * m_h1digiOut2
lost digit: ROI exist with right vxdID
TH1F * m_h1GlobalTime_out2
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1INtrack1_cosTheta
track with no intercept costheta
unsigned int n_tracksWithDigitsInROI
number of tracks with digits in ROI
TH2F * m_h2sigmaUphi_out4
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1RecoTracksPerParticle
number of RecoTracks per particle
TH1F * m_h1SigmaU
distribution of sigmaU for PXDDigits contained in a ROI
void event() override final
This method is called for each event.
TH1F * m_h1GlobalTime_out5
distribution of global time for PDXDigits not contained in a ROI
unsigned int Ntrack
number of tracks with pxd digits
unsigned int n_notINtrack5
number of tracks with no ROI (intercept with wrong vxdID)
TH1F * m_h1ResidV_out3
distribution of V resid for PXDDigits not contained in a ROI
unsigned int nnotINdigit5[6]
number of lost digits in bins of pt: no ROI, intercepts with wrong vxdID
unsigned int n_tracksWithDigits
number of tracks with digits
TH1F * m_h1Track_nSVDhits
denominator track pVal
unsigned int n_notINdigit4
number of lost digits: no ROI, intercepts with correct vxdID
TH1F * m_h1ResidU
distribution of U resid for PXDDigits contained in a ROI
TH2F * m_h2ResidUV
distribution of V resid for PXDDigits contained in a ROI
TH1F * m_h1notINtrack5_nSVDhits
denominator track pVal
double m_lambdamc
true lambda = pi/2 - theta
TH1F * m_h1INtrack1_pVal
denominator track pVal
TH2F * m_h2sigmaVphi_out3
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
TH1F * m_h1notINtrack5_pt
track with no intercept pT
TH2F * m_h2sigmaVphi_out4
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
double m_coorVmc
true intercept V coordinate
Double_t pt[6]
bin edges (in pt = transverse momentum)
TH1F * m_h1okArea
distribution of Area of ROIs containing a PXDDigit
unsigned int npxdDigitInROI[6]
number of pxd digits inside ROI in bins of pt
TH1F * m_h1notINtrack5
track with no intercept
StoreArray< PXDIntercept > m_PXDIntercepts
PXDIntercept StoreArray.
TH2F * m_h2sigmaUphi
distribution of sigmaU VS phi for PDXDigits contained in a ROI
TH2F * m_h2ROIbottomLeft
u,v coordinates of the bottom left pixel
TH1F * m_h1digiIn
digits contained in ROI histogram
TH2F * m_h2ROIvMinMax
v-coordinate Min vs Max
TH1F * m_h1SigmaV_out2
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1DigitsPerParticle
number of digits per particle
StoreArray< RecoTrack > m_recoTracks
RecoTrack StoreArray.
void beginRun() override final
Called when entering a new run.
TH1F * m_h1totArea
distribution of Area of all ROIs
TH2F * m_h2sigmaVphi
distribution of sigmaV VS phi for PDXDigits contained in a ROI
TH2F * m_h2sigmaUphi_out3
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TFile * m_rootFilePtr
pointer at root file used for storing infos for debugging and validating purposes
unsigned int TrackOneDigiIn[6]
number of tracks with one digit inside ROI in bins of pt
TH2F * m_h2ROIuMinMax
u-coordinate Min vs Max
StoreArray< MCParticle > m_MCParticles
MCParticle StoreArray.
unsigned int n_notINtrack3
number of tracks with no digits in ROI (wrong vxdID)
PXDROIFinderAnalysisModule()
Constructor of the module.
TH1F * m_h1SigmaU_out3
distribution of sigmaU for PXDDigits not contained in a ROI
TH1F * m_h1digiOut3
lost digit: ROI exist with wrong vxdID
StoreArray< ROIid > m_ROIs
ROIid StoreArray.
TH1F * m_h1notINtrack5_cosTheta
track with no intercept costheta
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.