Belle II Software development
SVDClusterEvaluationModule.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#ifndef SVD_CLUSTEREVALUATION_H_
10#define SVD_CLUSTEREVALUATION_H_
11
12#include <framework/core/Module.h>
13#include <vxd/geometry/GeoCache.h>
14#include <framework/datastore/StoreArray.h>
15#include <framework/datastore/StoreObjPtr.h>
16#include <svd/dataobjects/SVDCluster.h>
17#include <svd/dataobjects/SVDHistograms.h>
18#include <tracking/dataobjects/SVDIntercept.h>
19#include <mdst/dataobjects/Track.h>
20#include <framework/dataobjects/EventMetaData.h>
21
22
23#include <string>
24#include <TTree.h>
25#include <TFile.h>
26#include <TH1F.h>
27#include <TH2F.h>
28
29namespace Belle2 {
40
41 public:
42
47
48 virtual void initialize() override;
49 virtual void beginRun() override;
50 virtual void event() override;
51 virtual void endRun() override;
53 /* user-defined parameters */
54 std::string m_rootFileName;
55 std::string m_ClusterName;
56 std::string m_InterceptName;
57 std::string m_TrackName;
59 /* ROOT file related parameters */
60 TFile* m_rootFilePtr = nullptr;
61 TTree* m_tree = nullptr;
62 TTree* m_treeSummary = nullptr;
64 double m_UbinWidth;
65 double m_VbinWidth;
67 //branches
68 TBranch* b_experiment = nullptr;
69 TBranch* b_run = nullptr;
70 TBranch* b_ladder = nullptr;
71 TBranch* b_layer = nullptr;
72 TBranch* b_sensor = nullptr;
73 TBranch* b_interU = nullptr;
74 TBranch* b_interV = nullptr;
75 TBranch* b_interErrU = nullptr;
76 TBranch* b_interErrV = nullptr;
77 TBranch* b_interUprime = nullptr;
78 TBranch* b_interVprime = nullptr;
79 TBranch* b_interErrUprime = nullptr;
80 TBranch* b_interErrVprime = nullptr;
81 TBranch* b_residU = nullptr;
82 TBranch* b_residV = nullptr;
83 TBranch* b_clUpos = nullptr;
84 TBranch* b_clVpos = nullptr;
85 TBranch* b_clUcharge = nullptr;
86 TBranch* b_clVcharge = nullptr;
87 TBranch* b_clUsnr = nullptr;
88 TBranch* b_clVsnr = nullptr;
89 TBranch* b_clUsize = nullptr;
90 TBranch* b_clVsize = nullptr;
91 TBranch* b_clUtime = nullptr;
92 TBranch* b_clVtime = nullptr;
94 //branch variables
95 int m_experiment = -1;
96 int m_run = -1;
97 int m_ladder = -1;
98 int m_layer = -1;
99 int m_sensor = -1;
100 float m_interU = -1;
101 float m_interV = -1;
102 float m_interErrU = -1;
103 float m_interErrV = -1;
104 float m_interUprime = -1;
105 float m_interVprime = -1;
106 float m_interErrUprime = -1;
107 float m_interErrVprime = -1;
108 float m_residU = -1;
109 float m_residV = -1;
110 float m_clUpos = -1;
111 float m_clVpos = -1;
112 float m_clUcharge = -1;
113 float m_clVcharge = -1;
114 float m_clUsnr = -1;
115 float m_clVsnr = -1;
116 int m_clUsize = -1;
117 int m_clVsize = -1;
118 float m_clUtime = -1;
119 float m_clVtime = -1;
121 //branches summary variables
122 TBranch* bs_experiment = nullptr;
123 TBranch* bs_run = nullptr;
124 TBranch* bs_ladder = nullptr;
125 TBranch* bs_layer = nullptr;
126 TBranch* bs_sensor = nullptr;
127 TBranch* bs_effU = nullptr;
128 TBranch* bs_effV = nullptr;
129 TBranch* bs_effErrU = nullptr;
130 TBranch* bs_effErrV = nullptr;
131 TBranch* bs_nIntercepts = nullptr;
132 TBranch* bs_residU = nullptr;
133 TBranch* bs_residV = nullptr;
134 TBranch* bs_misU = nullptr;
135 TBranch* bs_misV = nullptr;
136 TBranch* bs_statU = nullptr;
137 TBranch* bs_statV = nullptr;
139 //branch variables
140 int ms_experiment = -1;
141 int ms_run = -1;
142 int ms_ladder = -1;
143 int ms_layer = -1;
144 int ms_sensor = -1;
145 float ms_effU = -1;
146 float ms_effV = -1;
147 float ms_effErrU = -1;
148 float ms_effErrV = -1;
149 int ms_nIntercepts = -1;
150 float ms_residU = -1;
151 float ms_residV = -1;
152 float ms_misU = -1;
153 float ms_misV = -1;
154 float ms_statU = -1;
155 float ms_statV = -1;
157 private:
158
159 double m_cmTomicron = 10000;
160 int m_theLayer = -1;
161 double m_interSigmaMax = -1;
162 double m_uFiducial = -1;
163 double m_vFiducial = -1;
164 float m_nSigma = -1;
165 float m_halfWidth = -1;
166 int m_groupNstrips = -1;
182 float m_width_LargeS_U = 5.772;
183 float m_width_LargeS_V = 12.290;
184 float m_width_SmallS_U = 3.855;
187 float m_safety_margin = 0.2;
194 float m_abs_LargeS_U = 1;
195 float m_abs_LargeS_V = 1;
196 float m_abs_SmallS_U = 1;
197 float m_abs_SmallS_V = 1;
204 double getOneSigma(TH1F* h);
206 bool isRelatedToTrack(SVDIntercept* inter);
208 };
210}
211
212#endif /* SVDClusterEvaluationModule_H_ */
213
Base class for Modules.
Definition: Module.h:72
The SVD ClusterEvaluation Module.
TBranch * b_interErrV
intercept V position error
TTree * m_tree
pointer at tree containing the parameters
TBranch * bs_statV
intercept stat error V
int m_groupNstrips
number of strip in the group in 2D resid vs position
VXD::GeoCache & m_geoCache
the geo cache instance
float m_abs_LargeS_U
half width including safety margin, large sensor U
virtual void initialize() override
check StoreArrays & create rootfile
SVDHistograms< TH1F > * m_clsResid
cluster resid plots
double getOneSigma(TH1F *h)
returns one sigma using quantiles
double m_VbinWidth
histogram v-bin width in microns
void create_SVDHistograms_interCoor()
create intercept coordinates plots
StoreArray< SVDCluster > m_svdClusters
clusters
virtual void event() override
fill histograms
bool isRelatedToTrack(SVDIntercept *inter)
is the intercept related to a track
TBranch * b_interV
intercept V position
void create_SVDHistograms_interSigma()
create intercept error plots
float m_halfWidth
window half width for efficiency computation
void create_SVDHistograms_clsResid()
create slucter resid plots
virtual void endRun() override
write histogrmas
TBranch * b_interErrUprime
intercept U prime error
TBranch * b_interU
intercept U position
TBranch * b_interErrU
intercept U position error
float m_abs_SmallS_V
half width including safety margin, small sensor V
SVDHistograms< TH1F > * m_interSigma
intercept stat error plots
StoreObjPtr< EventMetaData > m_eventMetaData
event meta data
float m_nSigma
number of sigmas for efficiency computation
TBranch * bs_statU
intercept stat error U
SVDHistograms< TH2F > * m_clsResid2D
2D resid plots
std::string m_TrackName
Track StoreArray name.
TBranch * b_interErrVprime
intercept V prime error
SVDHistograms< TH1F > * m_clsMinResid
cluster minimum resid plots
virtual void beginRun() override
create histograms
double m_interSigmaMax
max of the histo of the intercept stat error
float m_interErrUprime
intercept U prime error
SVDHistograms< TH1F > * m_clsCoor
cluster coordinates plots
TTree * m_treeSummary
pointer at tree containing the summary parameters
SVDHistograms< TH2F > * m_interCoor
intercept coordinates plots
float m_interErrVprime
intercept V prime error
std::string m_ClusterName
SVDCluster StoreArray name.
int m_nBins_SmallS_U
number of bins for small sensor U
float m_interErrU
intercept U position error
float m_abs_LargeS_V
half width including safety margin, large sensor V
double m_UbinWidth
histogram u-bin width in microns
StoreArray< SVDIntercept > m_svdIntercepts
intercepts
int m_nBins_LargeS_U
number of bins for large sensor U
float m_interErrV
intercept V position error
TFile * m_rootFilePtr
pointer at root file used for storing histograms
int m_nBins_LargeS_V
number of bins for large sensor V
int m_nBins_SmallS_V
number of bins for small sensor V
float m_abs_SmallS_U
half width including safety margin, small sensor U
std::string m_InterceptName
SVDIntercept StoreArray name.
TBranch * bs_nIntercepts
number of intercepts
void create_SVDHistograms_clsCoor()
create cluster coordinates plots
template class for SVd histograms
Definition: SVDHistograms.h:24
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
Definition: SVDIntercept.h:22
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Abstract base class for different kinds of events.