Belle II Software release-09-00-00
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
40
41 public:
42
47
48
49 private:
50
54 void initialize() override final;
55
59 void beginRun() override final;
60
64 void event() override final;
65
69 void terminate() override final;
70
76 std::string m_recoTrackListName;
78 std::string m_ROIListName;
80 TFile* m_rootFilePtr = nullptr;
81 std::string m_rootFileName;
86 //pxd sensor number
90 //graphs & histos - results
91 Double_t pt[6] = {0.05, 0.15, 0.25, 0.4, 0.75, 1.5};
92 Double_t ptErr[6] = { 0.05, 0.05, 0.05, 0.1, 0.25, 0.5};
94 TGraphErrors* m_gEff2 = nullptr;
95 TGraphErrors* m_gEff = nullptr;
97 TH1F* m_h1DigitsPerParticle = nullptr;
98 TH1F* m_h1RecoTracksPerParticle = nullptr;
100 TH1F* m_h1digiIn = nullptr;
101 TH1F* m_h1digiOut2 = nullptr;
102 TH1F* m_h1digiOut3 = nullptr;
103 TH1F* m_h1digiOut4 = nullptr;
104 TH1F* m_h1digiOut5 = nullptr;
106 TH1F* m_h1TrackOneDigiIn = nullptr;
107 TH1F* m_h1nnotINtrack2 = nullptr;
108 TH1F* m_h1nnotINtrack3 = nullptr;
109 TH1F* m_h1nnotINtrack4 = nullptr;
110 TH1F* m_h1nnotINtrack5 = nullptr;
112 TH1F* m_h1Track = nullptr;
113 TH1F* m_h1Track_pt = nullptr;
114 TH1F* m_h1Track_phi = nullptr;
115 TH1F* m_h1Track_lambda = nullptr;
116 TH1F* m_h1Track_cosTheta = nullptr;
117 TH1F* m_h1Track_pVal = nullptr;
118 TH1F* m_h1Track_nSVDhits = nullptr;
119 TH1F* m_h1Track_nCDChits = nullptr;
121 TH1F* m_h1INtrack1 = nullptr;
122 TH1F* m_h1INtrack1_pt = nullptr;
123 TH1F* m_h1INtrack1_phi = nullptr;
124 TH1F* m_h1INtrack1_lambda = nullptr;
125 TH1F* m_h1INtrack1_cosTheta = nullptr;
126 TH1F* m_h1INtrack1_pVal = nullptr;
127 TH1F* m_h1INtrack1_nSVDhits = nullptr;
128 TH1F* m_h1INtrack1_nCDChits = nullptr;
130 TH1F* m_h1notINtrack5 = nullptr;
131 TH1F* m_h1notINtrack5_pt = nullptr;
132 TH1F* m_h1notINtrack5_phi = nullptr;
133 TH1F* m_h1notINtrack5_lambda = nullptr;
134 TH1F* m_h1notINtrack5_cosTheta = nullptr;
135 TH1F* m_h1notINtrack5_pVal = nullptr;
136 TH1F* m_h1notINtrack5_nSVDhits = nullptr;
137 TH1F* m_h1notINtrack5_nCDChits = nullptr;
140 //fill digits inside ROIs
141 TH1F* m_h1PullU = nullptr;
142 TH1F* m_h1PullV = nullptr;
143 TH2F* m_h2sigmaUphi = nullptr;
144 TH2F* m_h2sigmaVphi = nullptr;
145 TH1F* m_h1ResidU = nullptr;
146 TH1F* m_h1ResidV = nullptr;
147 TH2F* m_h2ResidUV = nullptr;
148 TH1F* m_h1SigmaU = nullptr;
149 TH1F* m_h1SigmaV = nullptr;
150 TH1F* m_h1GlobalTime = nullptr;
151 TH2F* m_h2Mapglob = nullptr;
152 TH2F* m_h2MaplocL1 = nullptr;
153 TH2F* m_h2MaplocL2 = nullptr;
155 //fill digits outside2 ROIs
156 TH2F* m_h2sigmaUphi_out2 = nullptr;
157 TH2F* m_h2sigmaVphi_out2 = nullptr;
158 TH1F* m_h1ResidU_out2 = nullptr;
159 TH1F* m_h1ResidV_out2 = nullptr;
160 TH2F* m_h2ResidUV_out2 = nullptr;
161 TH1F* m_h1SigmaU_out2 = nullptr;
162 TH1F* m_h1SigmaV_out2 = nullptr;
163 TH1F* m_h1GlobalTime_out2 = nullptr;
164 TH2F* m_h2Mapglob_out2 = nullptr;
165 TH2F* m_h2MaplocL1_out2 = nullptr;
166 TH2F* m_h2MaplocL2_out2 = nullptr;
168 //fill digits outside3 ROIs
169 TH2F* m_h2sigmaUphi_out3 = nullptr;
170 TH2F* m_h2sigmaVphi_out3 = nullptr;
171 TH1F* m_h1ResidU_out3 = nullptr;
172 TH1F* m_h1ResidV_out3 = nullptr;
173 TH2F* m_h2ResidUV_out3 = nullptr;
174 TH1F* m_h1SigmaU_out3 = nullptr;
175 TH1F* m_h1SigmaV_out3 = nullptr;
176 TH1F* m_h1GlobalTime_out3 = nullptr;
177 TH2F* m_h2Mapglob_out3 = nullptr;
178 TH2F* m_h2MaplocL1_out3 = nullptr;
179 TH2F* m_h2MaplocL2_out3 = nullptr;
181 //fill digits outside4 ROIs
182 TH2F* m_h2sigmaUphi_out4 = nullptr;
183 TH2F* m_h2sigmaVphi_out4 = nullptr;
184 TH1F* m_h1SigmaU_out4 = nullptr;
185 TH1F* m_h1SigmaV_out4 = nullptr;
186 TH1F* m_h1GlobalTime_out4 = nullptr;
187 TH2F* m_h2Mapglob_out4 = nullptr;
188 TH2F* m_h2MaplocL1_out4 = nullptr;
189 TH2F* m_h2MaplocL2_out4 = nullptr;
191 //fill digits outside5 ROIs
192 TH1F* m_h1GlobalTime_out5 = nullptr;
193 TH2F* m_h2Mapglob_out5 = nullptr;
194 TH2F* m_h2MaplocL1_out5 = nullptr;
195 TH2F* m_h2MaplocL2_out5 = nullptr;
197 //ROI stuff
198 TH2F* m_h2ROIbottomLeft = nullptr;
199 TH2F* m_h2ROItopRight = nullptr;
200 TH2F* m_h2ROIuMinMax = nullptr;
201 TH2F* m_h2ROIvMinMax = nullptr;
202 TH1F* m_h1totROIs = nullptr;
203 TH1F* m_h1okROIs = nullptr;
204 TH1F* m_h1okROIfrac = nullptr;
205 TH1F* m_h1redFactor = nullptr;
206 TH1F* m_h1redFactor_L1 = nullptr;
207 TH1F* m_h1redFactor_L2 = nullptr;
208 TH1F* m_h1totArea = nullptr;
209 TH1F* m_h1okArea = nullptr;
211 TH1F* m_h1effPerTrack = nullptr;
215 //variables
217 double m_coorU;
218 double m_coorV;
219 double m_sigmaU;
220 double m_sigmaV;
223 double m_coorUmc;
224 double m_coorVmc;
228 double m_pTmc;
229 double m_momXmc;
230 double m_momYmc;
231 double m_momZmc;
232 double m_thetamc;
234 double m_phimc;
235 double m_lambdamc;
237 unsigned int Ntrack;
238 unsigned int NtrackHit;
239 unsigned int n_notINtrack2;
240 unsigned int n_notINtrack3;
241 unsigned int n_notINtrack4;
242 unsigned int n_notINtrack5;
245 unsigned int n_rois;
246 unsigned int n_intercepts;
247 unsigned int n_tracks;
248 unsigned int n_tracksWithDigits;
250 unsigned int n_pxdDigit;
251 unsigned int n_pxdDigitInROI;
253 unsigned int n_notINdigit2;
254 unsigned int n_notINdigit3;
255 unsigned int n_notINdigit4;
256 unsigned int n_notINdigit5;
258 unsigned int npxdDigit[6];
259 unsigned int npxdDigitInROI[6];
260 unsigned int nnotINdigit2[6];
261 unsigned int nnotINdigit3[6];
262 unsigned int nnotINdigit4[6];
263 unsigned int nnotINdigit5[6];
264 unsigned int TrackOneDigiIn[6];
265 unsigned int nnotINtrack2[6];
266 unsigned int nnotINtrack3[6];
267 unsigned int nnotINtrack4[6];
268 unsigned int nnotINtrack5[6];
270 };
271
273}
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.