Belle II Software  release-08-01-10
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 /* Additional Info:
9 * This Module is in an early stage of developement. The comments are mainly for temporal purposes
10 * and will be changed and corrected in later stages of developement. So please ignore them.
11 */
12 
13 #pragma once
14 
15 #include <framework/core/Module.h>
16 #include <framework/datastore/StoreArray.h>
17 #include <mdst/dataobjects/MCParticle.h>
18 #include <tracking/dataobjects/RecoTrack.h>
19 #include <tracking/dataobjects/ROIid.h>
20 #include <tracking/dataobjects/PXDIntercept.h>
21 #include <string>
22 #include <TFile.h>
23 #include <TH1F.h>
24 #include <TH2F.h>
25 #include <TGraphErrors.h>
26 
27 namespace Belle2 {
43 
44  public:
45 
50 
51 
52  private:
53 
57  void initialize() override final;
58 
62  void beginRun() override final;
63 
67  void event() override final;
68 
72  void terminate() override final;
73 
79  std::string m_recoTrackListName;
80  std::string m_PXDInterceptListName;
81  std::string m_ROIListName;
83  TFile* m_rootFilePtr = nullptr;
84  std::string m_rootFileName;
89  //pxd sensor number
90  Int_t m_nSensorsL1;
91  Int_t m_nSensorsL2;
93  //graphs & histos - results
94  Double_t pt[6] = {0.05, 0.15, 0.25, 0.4, 0.75, 1.5};
95  Double_t ptErr[6] = { 0.05, 0.05, 0.05, 0.1, 0.25, 0.5};
97  TGraphErrors* m_gEff2 = nullptr;
98  TGraphErrors* m_gEff = nullptr;
100  TH1F* m_h1DigitsPerParticle = nullptr;
101  TH1F* m_h1RecoTracksPerParticle = nullptr;
103  TH1F* m_h1digiIn = nullptr;
104  TH1F* m_h1digiOut2 = nullptr;
105  TH1F* m_h1digiOut3 = nullptr;
106  TH1F* m_h1digiOut4 = nullptr;
107  TH1F* m_h1digiOut5 = nullptr;
109  TH1F* m_h1TrackOneDigiIn = nullptr;
110  TH1F* m_h1nnotINtrack2 = nullptr;
111  TH1F* m_h1nnotINtrack3 = nullptr;
112  TH1F* m_h1nnotINtrack4 = nullptr;
113  TH1F* m_h1nnotINtrack5 = nullptr;
115  TH1F* m_h1Track = nullptr;
116  TH1F* m_h1Track_pt = nullptr;
117  TH1F* m_h1Track_phi = nullptr;
118  TH1F* m_h1Track_lambda = nullptr;
119  TH1F* m_h1Track_cosTheta = nullptr;
120  TH1F* m_h1Track_pVal = nullptr;
121  TH1F* m_h1Track_nSVDhits = nullptr;
122  TH1F* m_h1Track_nCDChits = nullptr;
124  TH1F* m_h1INtrack1 = nullptr;
125  TH1F* m_h1INtrack1_pt = nullptr;
126  TH1F* m_h1INtrack1_phi = nullptr;
127  TH1F* m_h1INtrack1_lambda = nullptr;
128  TH1F* m_h1INtrack1_cosTheta = nullptr;
129  TH1F* m_h1INtrack1_pVal = nullptr;
130  TH1F* m_h1INtrack1_nSVDhits = nullptr;
131  TH1F* m_h1INtrack1_nCDChits = nullptr;
133  TH1F* m_h1notINtrack5 = nullptr;
134  TH1F* m_h1notINtrack5_pt = nullptr;
135  TH1F* m_h1notINtrack5_phi = nullptr;
136  TH1F* m_h1notINtrack5_lambda = nullptr;
137  TH1F* m_h1notINtrack5_cosTheta = nullptr;
138  TH1F* m_h1notINtrack5_pVal = nullptr;
139  TH1F* m_h1notINtrack5_nSVDhits = nullptr;
140  TH1F* m_h1notINtrack5_nCDChits = nullptr;
143  //fill digits inside ROIs
144  TH1F* m_h1PullU = nullptr;
145  TH1F* m_h1PullV = nullptr;
146  TH2F* m_h2sigmaUphi = nullptr;
147  TH2F* m_h2sigmaVphi = nullptr;
148  TH1F* m_h1ResidU = nullptr;
149  TH1F* m_h1ResidV = nullptr;
150  TH2F* m_h2ResidUV = nullptr;
151  TH1F* m_h1SigmaU = nullptr;
152  TH1F* m_h1SigmaV = nullptr;
153  TH1F* m_h1GlobalTime = nullptr;
154  TH2F* m_h2Mapglob = nullptr;
155  TH2F* m_h2MaplocL1 = nullptr;
156  TH2F* m_h2MaplocL2 = nullptr;
158  //fill digits outside2 ROIs
159  TH2F* m_h2sigmaUphi_out2 = nullptr;
160  TH2F* m_h2sigmaVphi_out2 = nullptr;
161  TH1F* m_h1ResidU_out2 = nullptr;
162  TH1F* m_h1ResidV_out2 = nullptr;
163  TH2F* m_h2ResidUV_out2 = nullptr;
164  TH1F* m_h1SigmaU_out2 = nullptr;
165  TH1F* m_h1SigmaV_out2 = nullptr;
166  TH1F* m_h1GlobalTime_out2 = nullptr;
167  TH2F* m_h2Mapglob_out2 = nullptr;
168  TH2F* m_h2MaplocL1_out2 = nullptr;
169  TH2F* m_h2MaplocL2_out2 = nullptr;
171  //fill digits outside3 ROIs
172  TH2F* m_h2sigmaUphi_out3 = nullptr;
173  TH2F* m_h2sigmaVphi_out3 = nullptr;
174  TH1F* m_h1ResidU_out3 = nullptr;
175  TH1F* m_h1ResidV_out3 = nullptr;
176  TH2F* m_h2ResidUV_out3 = nullptr;
177  TH1F* m_h1SigmaU_out3 = nullptr;
178  TH1F* m_h1SigmaV_out3 = nullptr;
179  TH1F* m_h1GlobalTime_out3 = nullptr;
180  TH2F* m_h2Mapglob_out3 = nullptr;
181  TH2F* m_h2MaplocL1_out3 = nullptr;
182  TH2F* m_h2MaplocL2_out3 = nullptr;
184  //fill digits outside4 ROIs
185  TH2F* m_h2sigmaUphi_out4 = nullptr;
186  TH2F* m_h2sigmaVphi_out4 = nullptr;
187  TH1F* m_h1SigmaU_out4 = nullptr;
188  TH1F* m_h1SigmaV_out4 = nullptr;
189  TH1F* m_h1GlobalTime_out4 = nullptr;
190  TH2F* m_h2Mapglob_out4 = nullptr;
191  TH2F* m_h2MaplocL1_out4 = nullptr;
192  TH2F* m_h2MaplocL2_out4 = nullptr;
194  //fill digits outside5 ROIs
195  TH1F* m_h1GlobalTime_out5 = nullptr;
196  TH2F* m_h2Mapglob_out5 = nullptr;
197  TH2F* m_h2MaplocL1_out5 = nullptr;
198  TH2F* m_h2MaplocL2_out5 = nullptr;
200  //ROI stuff
201  TH2F* m_h2ROIbottomLeft = nullptr;
202  TH2F* m_h2ROItopRight = nullptr;
203  TH2F* m_h2ROIuMinMax = nullptr;
204  TH2F* m_h2ROIvMinMax = nullptr;
205  TH1F* m_h1totROIs = nullptr;
206  TH1F* m_h1okROIs = nullptr;
207  TH1F* m_h1okROIfrac = nullptr;
208  TH1F* m_h1redFactor = nullptr;
209  TH1F* m_h1redFactor_L1 = nullptr;
210  TH1F* m_h1redFactor_L2 = nullptr;
211  TH1F* m_h1totArea = nullptr;
212  TH1F* m_h1okArea = nullptr;
214  TH1F* m_h1effPerTrack = nullptr;
218  //variables
219  double m_globalTime;
220  double m_coorU;
221  double m_coorV;
222  double m_sigmaU;
223  double m_sigmaV;
224  int m_vxdID;
226  double m_coorUmc;
227  double m_coorVmc;
228  int m_Uidmc;
229  int m_Vidmc;
230  int m_vxdIDmc;
231  double m_pTmc;
232  double m_momXmc;
233  double m_momYmc;
234  double m_momZmc;
235  double m_thetamc;
236  double m_costhetamc;
237  double m_phimc;
238  double m_lambdamc;
240  unsigned int Ntrack;
241  unsigned int NtrackHit;
242  unsigned int n_notINtrack2;
243  unsigned int n_notINtrack3;
244  unsigned int n_notINtrack4;
245  unsigned int n_notINtrack5;
248  unsigned int n_rois;
249  unsigned int n_intercepts;
250  unsigned int n_tracks;
251  unsigned int n_tracksWithDigits;
252  unsigned int n_tracksWithDigitsInROI;
253  unsigned int n_pxdDigit;
254  unsigned int n_pxdDigitInROI;
256  unsigned int n_notINdigit2;
257  unsigned int n_notINdigit3;
258  unsigned int n_notINdigit4;
259  unsigned int n_notINdigit5;
261  unsigned int npxdDigit[6];
262  unsigned int npxdDigitInROI[6];
263  unsigned int nnotINdigit2[6];
264  unsigned int nnotINdigit3[6];
265  unsigned int nnotINdigit4[6];
266  unsigned int nnotINdigit5[6];
267  unsigned int TrackOneDigiIn[6];
268  unsigned int nnotINtrack2[6];
269  unsigned int nnotINtrack3[6];
270  unsigned int nnotINtrack4[6];
271  unsigned int nnotINtrack5[6];
273  };
274 
276 }
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
Abstract base class for different kinds of events.