Belle II Software  release-08-01-10
OverlapResidualsModule.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 
9 #pragma once
10 
11 #include <pxd/dataobjects/PXDCluster.h>
12 #include <svd/dataobjects/SVDCluster.h>
13 
14 #include <framework/core/HistoModule.h>
15 #include <framework/datastore/StoreArray.h>
16 
17 #include <TH1F.h>
18 #include <TH2F.h>
19 #include <TTree.h>
20 
21 namespace Belle2 {
34  class OverlapResidualsModule : public HistoModule { // <- derived from HistoModule
35 
36  public:
40  void initialize() override;
42  void event() override;
44  void defineHisto() override;
45 
46  private:
50  std::string m_recoTracksStoreArrayName{"RecoTracks"};
56  TH1F* h_U_DeltaRes = nullptr;
58  TH1F* h_V_DeltaRes = nullptr;
60  TH1F* h_U_DeltaRes_PXD = nullptr;
62  TH1F* h_U_DeltaRes_PXD_Lyr1 = nullptr;
64  TH1F* h_U_DeltaRes_PXD_Lyr2 = nullptr;
66  TH1F* h_V_DeltaRes_PXD = nullptr;
68  TH1F* h_V_DeltaRes_PXD_Lyr1 = nullptr;
70  TH1F* h_V_DeltaRes_PXD_Lyr2 = nullptr;
72  TH1F* h_U_DeltaRes_SVD = nullptr;
74  TH1F* h_U_DeltaRes_SVD_Lyr3 = nullptr;
76  TH1F* h_U_DeltaRes_SVD_Lyr4 = nullptr;
78  TH1F* h_U_DeltaRes_SVD_Lyr5 = nullptr;
80  TH1F* h_U_DeltaRes_SVD_Lyr6 = nullptr;
82  TH1F* h_V_DeltaRes_SVD = nullptr;
84  TH1F* h_V_DeltaRes_SVD_Lyr3 = nullptr;
86  TH1F* h_V_DeltaRes_SVD_Lyr4 = nullptr;
88  TH1F* h_V_DeltaRes_SVD_Lyr5 = nullptr;
90  TH1F* h_V_DeltaRes_SVD_Lyr6 = nullptr;
92  TH2F* h_DeltaResUPhi_Lyr6 = nullptr;
94  TH2F* h_DeltaResUPhi_Lyr5 = nullptr;
96  TH2F* h_DeltaResUPhi_Lyr4 = nullptr;
98  TH2F* h_DeltaResUPhi_Lyr3 = nullptr;
100  TH2F* h_DeltaResUPhi_Lyr2 = nullptr;
102  TH2F* h_DeltaResUPhi_Lyr1 = nullptr;
104  TH2F* h_DeltaResUz_Lyr6 = nullptr;
106  TH2F* h_DeltaResUz_Lyr5 = nullptr;
108  TH2F* h_DeltaResUz_Lyr4 = nullptr;
110  TH2F* h_DeltaResUz_Lyr3 = nullptr;
112  TH2F* h_DeltaResUz_Lyr2 = nullptr;
114  TH2F* h_DeltaResUz_Lyr1 = nullptr;
116  TH2F* h_DeltaResVz_Lyr6 = nullptr;
118  TH2F* h_DeltaResVz_Lyr5 = nullptr;
120  TH2F* h_DeltaResVz_Lyr4 = nullptr;
122  TH2F* h_DeltaResVz_Lyr3 = nullptr;
124  TH2F* h_DeltaResVz_Lyr2 = nullptr;
126  TH2F* h_DeltaResVz_Lyr1 = nullptr;
128  TH2F* h_DeltaResVPhi_Lyr6 = nullptr;
130  TH2F* h_DeltaResVPhi_Lyr5 = nullptr;
132  TH2F* h_DeltaResVPhi_Lyr4 = nullptr;
134  TH2F* h_DeltaResVPhi_Lyr3 = nullptr;
136  TH2F* h_DeltaResVPhi_Lyr2 = nullptr;
138  TH2F* h_DeltaResVPhi_Lyr1 = nullptr;
140  TH1F* h_SVDstrips_Mult = nullptr;
142  TH1F* h_U_Cl1Cl2_DeltaRes[5] = {nullptr};
144  TH1F* h_V_Cl1Cl2_DeltaRes[5] = {nullptr};
146  TH2F* h_Lyr6[17][6] = {{nullptr}}; //[Ladder][sensor number]
148  TH2F* h_Lyr5[13][5] = {{nullptr}}; //[Ladder][sensor number]
150  TH2F* h_Lyr4[11][4] = {{nullptr}}; //[Ladder][sensor number]
152  TH2F* h_Lyr3[8][3] = {{nullptr}}; //[Ladder][sensor number]
154  TH2F* h_Lyr2[13][3] = {{nullptr}}; //[Ladder][sensor number]
156  TH2F* h_Lyr1[9][3] = {{nullptr}}; //[Ladder][sensor number]
158  TTree* t_PXD = nullptr;
160  TTree* t_SVD_U = nullptr;
162  TTree* t_SVD_V = nullptr;
163  /* Branches of PXD tree */
164  float deltaResU_PXD = 0,
167  intU_PXD = 0,
168  intV_PXD = 0,
170  intZ_PXD = 0,
173  extU_PXD = 0,
174  extV_PXD = 0,
176  extZ_PXD = 0;
177  unsigned int intLayer_PXD = 0,
183  /* Branches of SVD u-clusters tree */
184  float svdDeltaRes_U = 0,
195  svdTrkd0 = 0,
196  svdTrkz0 = 0,
197  svdTrkpT = 0,
198  svdTrkpCM = 0,
233  int svdTrkPXDHits = 0,
236  unsigned int svdLayer_U_int = 0,
244  std::vector<float> svdStripCharge_U_int,
252  /* Branches of SVD v-clusters tree */
253  float svdDeltaRes_V = 0,
298  unsigned int svdLayer_V_int = 0,
306  std::vector<float> svdStripCharge_V_int,
314  };
316 }
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
The module studies VXD hits from overlapping sensors of a same VXD layer.
float svdTrkQoP_V_int
V internal track q/p.
float svdTrkPosUnbiased_U_int
U internal unbiased track position.
TH2F * h_DeltaResVPhi_Lyr6
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 6
float svdTrkQoP_U_int
U internal track q/p.
TH1F * h_V_DeltaRes_SVD
Histogram of SVD v-coordinate differences of residuals.
float svdRes_U_int
U internal residual computed by genfit.
float svdTrkPosErr_U_int
U internal track position error.
std::vector< float > svdStrip6Samples_V_ext
V external 6 samples of the strips of the cluster.
std::vector< float > svdStripPosition_U_ext
U external position of the strips of the cluster.
TH2F * h_DeltaResVz_Lyr1
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 1
float svdTrkQoPUnbiased_V_ext
V external unbiased track q/p.
TH2F * h_DeltaResUz_Lyr3
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 3
float svdTrkPos_U_ext
U external track position.
float svdTruePos_V_int
V internal true position.
float svdClPhi_V_ext
V external cluster global phi.
float extResV_PXD
tree t_PXD branch extResV_PXD/F
float svdTrkPosUnbiased_V_ext
V external unbiased track position.
TH1F * h_U_DeltaRes_SVD_Lyr4
Histogram of SVD layer-4 u-coordinate differences of residuals.
std::vector< float > svdStripCharge_U_ext
U external charge of the strips of the cluster.
unsigned int svdLayer_U_ext
U external layer.
float svdTrkPrimeUnbiased_U_int
U internal unbiased tan of incident angle projected on u,w.
float extResU_PXD
tree t_PXD branch extResU_PXD/F
TH2F * h_DeltaResUPhi_Lyr2
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 2
TH2F * h_DeltaResUPhi_Lyr5
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 5
TH2F * h_DeltaResUPhi_Lyr3
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 3
float svdTrkPos_V_int
V internal track position.
TH1F * h_U_DeltaRes_PXD_Lyr1
Histogram of PXD layer-1 u-coordinate differences of residuals.
float svdTrkTraversedLength_V_int
V internal traversed length of the track in the sensor.
TH2F * h_DeltaResUz_Lyr2
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 2
float svdTrkPosOS_V_ext
V external track position on the other side.
float svdClTime_V_ext
V external cluster time.
float svdRes_V_ext
V external residual computed by genfit.
float svdTrkPosOS_U_ext
U external track position on the other side.
float svdTrkPosErrUnbiased_V_int
V internal unbiased track position error.
float svdTrkPrimeOS_U_int
U internal tan of incident angle projected on v/u,w (other side)
std::vector< float > svdStripTime_V_ext
V external time of the strips of the cluster.
TH2F * h_DeltaResUPhi_Lyr1
2D Histogram of DeltaRes_u vs phi of VXD overlaps for layer 1
unsigned int svdLadder_U_ext
U external ladder.
TH2F * h_DeltaResVz_Lyr4
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 4
int svdTrkPXDHits
number of PXD hits on the track
TH1F * h_U_DeltaRes_PXD
Histogram of PXD u-coordinate differences of residuals.
unsigned int extLayer_PXD
tree t_PXD branch extLayer_PXD/i
void initialize() override
Register input and output data.
TH2F * h_DeltaResVPhi_Lyr5
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 5
float svdTrkQoP_V_ext
V external track q/p.
float svdClIntStrPos_V_ext
V external cluster interstrip position.
StoreArray< PXDCluster > m_pxdcluster
Array storing PXD clusters.
std::vector< float > svdStrip6Samples_U_ext
U external 6 samples of the strips of the cluster.
float svdClSNR_V_int
V internal cluster SNR.
float svdTrkPrimeUnbiased_V_ext
V external unbiased tan of incident angle projected on u,w.
unsigned int svdLadder_V_ext
V external ladder.
TH2F * h_Lyr1[9][3]
Sensor hit-map for layer 1 from reconstructed u and v coordinates.
float svdClSNR_U_ext
U external cluster SNR.
unsigned int svdLadder_U_int
U internal ladder.
float svdClSNR_V_ext
V external cluster SNR.
unsigned int svdLayer_V_ext
V external layer.
float svdTrkQoPUnbiased_U_int
U internal unbiased track q/p.
float svdTrkPrimeUnbiased_U_ext
U external unbiased tan of incident angle projected on u,w.
void event() override
Compute the difference of coordinate residuals between two hits in overlapping sensors of a same VXD ...
TH2F * h_DeltaResVPhi_Lyr3
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 3
TH2F * h_DeltaResVPhi_Lyr4
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 4
TH1F * h_V_DeltaRes_PXD_Lyr1
Histogram of PXD layer-1 v-coordinate differences of residuals.
float extU_PXD
tree t_PXD branch extU_PXD/F
float svdTrkTraversedLength_U_ext
U external traversed length of the track in the sensor.
float extPhi_PXD
tree t_PXD branch extPhi/PXD/F
float svdClZ_U_int
U internal cluster global Z.
float svdTruePos_U_int
U internal true position.
TH2F * h_DeltaResVz_Lyr3
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 3
float svdRes_U_ext
U external residual computed by genfit.
unsigned int extLadder_PXD
tree t_PXD branch extLadder_PXD/i
unsigned int svdSensor_V_int
V internal sensor.
float svdTruePos_V_ext
V external true position.
float svdClPos_U_int
U internal cluster position.
TH1F * h_U_DeltaRes_SVD_Lyr6
Histogram of SVD layer-6 u-coordinate differences of residuals.
TTree * t_SVD_V
Tree containing global information on SVD v-coordinate overlaps.
TH1F * h_V_DeltaRes_PXD
Histogram of PXD v-coordinate differences of residuals.
unsigned int intLayer_PXD
tree t_PXD branch intLayer_PXD/i
float svdClPosErr_U_ext
U external cluster position error.
TTree * t_SVD_U
Tree containing global information on SVD u-coordinate overlaps.
std::vector< float > svdStripCharge_V_int
V internal charge of the strips of the cluster.
float svdClCharge_U_int
U internal cluster charge.
float svdClCharge_U_ext
U external cluster charge.
std::vector< float > svdStrip6Samples_V_int
V internal 6 samples of the strips of the cluster.
TH2F * h_DeltaResUPhi_Lyr6
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 6
float svdClTime_U_int
U internal cluster time.
TH2F * h_DeltaResUz_Lyr5
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 5
float svdTrkPosUnbiased_V_int
V internal unbiased track position.
float svdClIntStrPos_U_int
U internal cluster interstrip position.
float svdTrkQoPUnbiased_V_int
V internal unbiased track q/p.
float svdClTime_U_ext
U external cluster time.
std::vector< float > svdStripCharge_U_int
U internal charge of the strips of the cluster.
unsigned int svdLadder_V_int
V internal ladder.
unsigned int svdSize_V_int
V internal size.
TH2F * h_DeltaResVz_Lyr5
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 5
unsigned int svdLayer_V_int
V internal layer.
float svdTrkPosErr_V_ext
V external track position error.
float svdTrkPrime_U_ext
U external tan of incident angle projected on u,w.
float svdDeltaRes_V
V difference between external and internal residual.
TH1F * h_U_Cl1Cl2_DeltaRes[5]
Histogram of SVD differences of u-coordinate residuals grouped by clusters sizes.
float svdTrkPosErrUnbiased_U_ext
U external unbiased track position error.
TH2F * h_DeltaResVz_Lyr6
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 6
float extV_PXD
tree t_PXD branch extV_PXD/F
float svdTrkPosOS_U_int
U internal track position on the other side.
float svdTrkQoPUnbiased_U_ext
U external unbiased track q/p.
TH2F * h_Lyr4[11][4]
Sensor hit-map for layer 4 from reconstructed u and v coordinates.
TH1F * h_V_DeltaRes_SVD_Lyr6
Histogram of SVD layer-6 v-coordinate differences of residuals.
unsigned int svdSensor_V_ext
V external sensor.
int svdTrkCDCHits
number of PXD hits on the track
float svdClPosErr_V_int
V internal cluster position error.
TH1F * h_V_DeltaRes_SVD_Lyr3
Histogram of SVD layer-3 v-coordinate differences of residuals.
TH1F * h_V_Cl1Cl2_DeltaRes[5]
Histogram of SVD differences of v-coordinate residuals grouped by clusters sizes.
float svdTrkPosErr_U_ext
U external track position error.
float svdTrkPrime_U_int
U internal tan of incident angle projected on u,w.
float svdRes_V_int
V internal residual computed by genfit.
float svdTrkPrimeOS_V_ext
V external tan of incident angle projected on v/u,w (other side)
TH1F * h_V_DeltaRes_PXD_Lyr2
Histogram of PXD layer-2 v-coordinate differences of residuals.
TH1F * h_U_DeltaRes_SVD_Lyr5
Histogram of SVD layer-5 u-coordinate differences of residuals.
float svdTrkPosErr_V_int
V internal track position error.
TH1F * h_V_DeltaRes_SVD_Lyr5
Histogram of SVD layer-5 v-coordinate differences of residuals.
float svdClPosErr_V_ext
V external cluster position error.
float deltaResU_PXD
tree t_PXD branch deltaResU/F
TH2F * h_Lyr2[13][3]
Sensor hit-map for layer 2 from reconstructed u and v coordinates.
float svdDeltaRes_U
U difference between external and internal residual.
float intU_PXD
tree t_PXD branch intU_PXD/F
unsigned int extSensor_PXD
tree t_PXD branch extSensor_PXD/i
std::vector< float > svdStripPosition_V_ext
V external position of the strips of the cluster.
float svdClIntStrPos_V_int
V internal cluster interstrip position.
float svdTrkPosErrUnbiased_U_int
U internal unbiased track position error.
TH1F * h_V_DeltaRes_SVD_Lyr4
Histogram of SVD layer-4 v-coordinate differences of residuals.
float svdTrkPosErrUnbiased_V_ext
V external unbiased track position error.
std::vector< float > svdStripCharge_V_ext
V external charge of the strips of the cluster.
std::vector< float > svdStripTime_U_ext
U external time of the strips of the cluster.
TH2F * h_DeltaResUPhi_Lyr4
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 4
float intZ_PXD
tree t_PXD branch intZ_PXD/F
float svdClPos_V_ext
V external cluster position.
float svdTrkPosErrOS_V_int
V internal track position error on the other side.
std::vector< float > svdStripPosition_U_int
U internal position of the strips of the cluster.
bool m_ExpertLevel
Expert level switch.
unsigned int svdSensor_U_int
U internal sensor.
std::vector< float > svdStrip6Samples_U_int
U internal 6 samples of the strips of the cluster.
float svdClPosErr_U_int
U internal cluster position error.
float svdClIntStrPos_U_ext
U external cluster interstrip position.
float svdClTime_V_int
V internal cluster time.
TH2F * h_DeltaResVPhi_Lyr2
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 2
TH1F * h_U_DeltaRes
Histogram of VXD ( PXD + SVD ) differences of u-coordinate residuals.
float svdTrkPrime_V_ext
V external tan of incident angle projected on u,w.
float svdTrkTraversedLength_U_int
U internal traversed length of the track in the sensor.
TH2F * h_DeltaResUz_Lyr4
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 4
TH2F * h_Lyr5[13][5]
Sensor hit-map for layer 5 from reconstructed u and v coordinates.
TH1F * h_SVDstrips_Mult
Histogram of SVD strips multiplicity.
TH2F * h_DeltaResUz_Lyr6
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 6
StoreArray< SVDCluster > m_svdcluster
Array storing SVD clusters.
float extZ_PXD
tree t_PXD branch extZ_PXD/F
TH2F * h_Lyr3[8][3]
Sensor hit-map for layer 3 from reconstructed u and v coordinates.
float svdClZ_V_int
V internal cluster global Z.
float svdTrkPrime_V_int
V internal tan of incident angle projected on u,w.
float svdTrkTraversedLength_V_ext
V external traversed length of the track in the sensor.
float svdClCharge_V_ext
V external cluster charge.
unsigned int svdSize_U_int
U internal size.
TH2F * h_DeltaResVPhi_Lyr1
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 1
std::vector< float > svdStripTime_V_int
V internal time of the strips of the cluster.
float svdClPhi_U_int
U internal cluster global phi.
TH2F * h_DeltaResUz_Lyr1
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 1
float svdClSNR_U_int
U internal cluster SNR.
unsigned int svdLayer_U_int
U internal layer.
float svdClCharge_V_int
V internal cluster charge.
unsigned int svdSensor_U_ext
U external sensor.
float intV_PXD
tree t_PXD branch intV_PXD/F
TH2F * h_Lyr6[17][6]
Sensor hit-map for layer 6 from reconstructed u and v coordinates.
std::vector< float > svdStripPosition_V_int
V internal position of the strips of the cluster.
float svdTrkPrimeOS_U_ext
U external tan of incident angle projected on v/u,w (other side)
unsigned int intSensor_PXD
tree t_PXD branch intSensor_PXD/i
std::vector< float > svdStripTime_U_int
U internal time of the strips of the cluster.
float svdTrkPrimeUnbiased_V_int
V internal unbiased tan of incident angle projected on u,w.
TH2F * h_DeltaResVz_Lyr2
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 2
unsigned int intLadder_PXD
tree t_PXD branch intLadder_PXD/i
float svdClPos_V_int
V internal cluster position.
std::string m_recoTracksStoreArrayName
StoreArray name of the input and output RecoTracks.
float svdTrkPos_V_ext
V external track position.
float svdClZ_U_ext
U external cluster global Z.
int svdTrkSVDHits
number of PXD hits on the track
float intPhi_PXD
tree t_PXD branch intPhi_PXD/F
float svdTrkPrimeOS_V_int
V internal tan of incident angle projected on v/u,w (other side)
float svdTrkPosErrOS_U_ext
U external track position error on the other side.
TTree * t_PXD
Tree containing global information on PXD overlaps.
float svdTrkPosErrOS_U_int
U internal track position error on the other side.
float svdTrkQoP_U_ext
U external track q/p.
float svdClZ_V_ext
V external cluster global Z.
float svdClPhi_V_int
V internal cluster global phi.
TH1F * h_V_DeltaRes
Histogram of VXD ( PXD + SVD ) differences of v-coordinate residuals.
float svdTrkPosOS_V_int
V internal track position on the other side.
unsigned int svdSize_V_ext
V external size.
float intResV_PXD
tree t_PXD branch intResV/PXD/F
TH1F * h_U_DeltaRes_SVD_Lyr3
Histogram of SVD layer-3 u-coordinate differences of residuals.
TH1F * h_U_DeltaRes_PXD_Lyr2
Histogram of PXD layer-2 u-coordinate differences of residuals.
float svdClPhi_U_ext
U external cluster global phi.
TH1F * h_U_DeltaRes_SVD
Histogram of SVD u-coordinate differences of residuals.
float svdClPos_U_ext
U external cluster position.
float svdTruePos_U_ext
U external true position.
float svdTrkPosErrOS_V_ext
V external track position error on the other side.
void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
float svdTrkPosUnbiased_U_ext
U external unbiased track position.
float svdTrkPos_U_int
U internal track position.
unsigned int svdSize_U_ext
U external size.
float intResU_PXD
tree t_PXD branch intResU_PXD/F
Abstract base class for different kinds of events.