Belle II Software development
ROIFinder.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 <tracking/trackFindingCDC/findlets/base/Findlet.h>
11#include <tracking/dataobjects/ROIid.h>
12#include <tracking/dataobjects/PXDIntercept.h>
13#include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorBase.h>
14#include <framework/datastore/StoreArray.h>
15#include <framework/geometry/B2Vector3.h>
16
17#include <string>
18#include <vector>
19
20namespace Belle2 {
25 class ModuleParamList;
26 class SpacePointTrackCand;
27
28 namespace vxdHoughTracking {
29
33 class ROIFinder : public TrackFindingCDC::Findlet<const SpacePointTrackCand> {
36
37 public:
39 ROIFinder();
40
43
45 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
46
48 void apply(const std::vector<SpacePointTrackCand>& finalTracks) override;
49
51 void initialize() override;
52
54 void beginRun() override;
55
57 void beginEvent() override;
58
59 private:
61 bool m_calculateROI = false;
62
63 // StoreArrays
65 std::string m_storePXDInterceptsName = "SVDHoughPXDIntercepts";
67 std::string m_storeROIsName = "SVDHoughROIs";
72
73
75 bool m_refit = true;
77 bool m_addVirtualIP = true;
79 std::string m_ROIFitMethod = "helixFit";
80
82 std::unique_ptr<QualityEstimatorBase> m_estimator;
83
84
85 // Extrapolation parameters
87 double m_tolerancePhi = 0.15;
89 double m_toleranceZ = 0.5;
90
91 // The extrapolation has two charge dependent biases:
92 // a) the residuals show a ~1/R bias, that is larger for low pT = small track radii
93 // b) the residuals show a larger sin(phi) and a smaller cos(phi modulation)
94 // Both of these can be corrected for
103
106
107
108 // ROI calculation parameters
117
122 double m_multiplierUL1 = 500;
124 double m_multiplierUL2 = 600;
126 double m_multiplierVL1 = 0.8;
128 double m_multiplierVL2 = 0.8;
129
131 unsigned short m_maximumROISizeU = 100;
133 unsigned short m_maximumROISizeV = 100;
134
135 // Constants used during extrapolation to PXD and ROI calculation
136 // ATTENTION: hard coded values taken and derived from pxd/data/PXD-Components.xml
139 const double c_centerZShiftLayer1[2] = {3.68255, -0.88255};
142 const double c_centerZShiftLayer2[2] = {5.01455, -1.21455};
145 const double c_sensorMinY = -0.36;
147 const double c_sensorMaxY = 0.89;
151 const double c_shiftY = (c_sensorMaxY + c_sensorMinY) / 2.0;
153 const double c_layerRadius[2] = {1.42854, 2.21218};
155 const double c_activeSensorLength[2] = {4.48, 6.144};
157 const double c_ladderPhiL1[8] = {0., 0.25 * M_PI, M_PI_2, 0.75 * M_PI, M_PI, -0.75 * M_PI, -M_PI_2, -0.25 * M_PI};
159 const double c_ladderPhiL2[12] = {0., 1. / 6. * M_PI, 1. / 3. * M_PI, M_PI_2, 2. / 3. * M_PI, 5. / 6. * M_PI, M_PI, -5. / 6. * M_PI, -2. / 3. * M_PI, -M_PI_2, -1. / 3. * M_PI, -1. / 6. * M_PI};
160
162 double m_bFieldZ = 1.5;
163
164
169
170 };
171
172 }
174}
The Module parameter list class.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
Findlet for performing the simple SVDHoughTracking ROI calculation.
Definition: ROIFinder.h:33
double m_radiusCorrectionFactorL2
Correction factor for radial bias for L2: factor * charge / radius.
Definition: ROIFinder.h:98
unsigned short m_maximumROISizeV
maximum ROI size in v in pixel
Definition: ROIFinder.h:133
double m_minimumROISizeUL1
Minimum size of ROI in u-direction on L1 in pixel.
Definition: ROIFinder.h:110
const double c_ladderPhiL2[12]
Phi values of the ladders of L2.
Definition: ROIFinder.h:159
B2Vector3D m_BeamSpotPosition
B2Vector3D actually containing the BeamSpot position. This will be used as the starting point of the ...
Definition: ROIFinder.h:166
bool m_calculateROI
Calculate ROI in this findlet?
Definition: ROIFinder.h:61
double m_multiplierVL1
Multiplier term for v-direction on L1.
Definition: ROIFinder.h:126
double m_radiusCorrectionFactorL1
Correction factor for radial bias for L1: factor * charge / radius.
Definition: ROIFinder.h:96
const double c_centerZShiftLayer2[2]
Shift of the center of the active area of each sensor in a ladder of layer 2 For use of mhp_z > (leng...
Definition: ROIFinder.h:142
double m_minimumROISizeVL2
Minimum size of ROI in v-direction on L2 in pixel.
Definition: ROIFinder.h:116
double m_multiplierUL2
Multiplier term for u-direction on L2.
Definition: ROIFinder.h:124
const double c_centerZShiftLayer1[2]
Shift of the center of the active area of each sensor in a ladder of layer 1 For use of mhp_z > (leng...
Definition: ROIFinder.h:139
void initialize() override
Initialize the StoreArrays.
Definition: ROIFinder.cc:112
double m_multiplierVL2
Multiplier term for v-direction on L2.
Definition: ROIFinder.h:128
StoreArray< ROIid > m_storeROIs
ROIs StoreArray.
Definition: ROIFinder.h:71
double m_sinPhiCorrectionFactor
Correction factor for the sin(phi) modulation.
Definition: ROIFinder.h:100
const double c_activeSensorLength[2]
Length of the active region for L1 and L2.
Definition: ROIFinder.h:155
const double c_sensorMaxY
Maximum y coordinate if x-axis is perpendicular to the sensor:
Definition: ROIFinder.h:147
std::string m_ROIFitMethod
Refit with this estimator, options are circleFit, tripletFit, helixFit.
Definition: ROIFinder.h:79
const double c_ladderPhiL1[8]
Phi values of the ladders of L1.
Definition: ROIFinder.h:157
double m_tolerancePhi
Allowed tolerance (in radians) phi to create intercepts per sensor.
Definition: ROIFinder.h:87
std::string m_storeROIsName
Name of the ROIs StoreArray.
Definition: ROIFinder.h:67
std::string m_storePXDInterceptsName
Name of the PXDIntercepts StoreArray.
Definition: ROIFinder.h:65
const double c_layerRadius[2]
Radius of the two layers.
Definition: ROIFinder.h:153
void apply(const std::vector< SpacePointTrackCand > &finalTracks) override
Function to call all the sub-findlets.
Definition: ROIFinder.cc:179
bool m_addVirtualIP
Add a virtual IP for the refit?
Definition: ROIFinder.h:77
StoreArray< PXDIntercept > m_storePXDIntercepts
PXDIntercepts StoreArray.
Definition: ROIFinder.h:69
void beginRun() override
Initialize the BField.
Definition: ROIFinder.cc:145
B2Vector3D m_BeamSpotPositionError
B2Vector3D actually containing the BeamSpot position error.
Definition: ROIFinder.h:168
bool m_refit
Refit the tracks with m_ROIFitMethod.
Definition: ROIFinder.h:75
double m_zPositionCorrectionFactor
Correction factor for the z position.
Definition: ROIFinder.h:105
void beginEvent() override
Clear the object pools.
Definition: ROIFinder.cc:169
double m_cosPhiCorrectionFactor
Correction factor for the cos(phi) modulation.
Definition: ROIFinder.h:102
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
Definition: ROIFinder.h:82
double m_bFieldZ
BField in Tesla.
Definition: ROIFinder.h:162
double m_minimumROISizeVL1
Minimum size of ROI in v-direction on L1 in pixel.
Definition: ROIFinder.h:112
const double c_shiftY
Shift of the center position in y if the x-axis is perpendicular to the sensor:
Definition: ROIFinder.h:151
const double c_sensorMinY
PXD is shifted to create the windmill structure.
Definition: ROIFinder.h:145
double m_minimumROISizeUL2
Minimum size of ROI in u-direction on L2 in pixel.
Definition: ROIFinder.h:114
unsigned short m_maximumROISizeU
maximum ROI size in u in pixel
Definition: ROIFinder.h:131
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: ROIFinder.cc:33
ROIFinder()
Constructor for adding the subfindlets.
Definition: ROIFinder.cc:29
double m_multiplierUL1
Multiplier term in ROI size estimation For u: size = multiplier * 1/R + minimumROISize For v: size = ...
Definition: ROIFinder.h:122
double m_toleranceZ
Allowed tolerance (in cm) in z to create intercepts per sensor.
Definition: ROIFinder.h:89
const double c_activeSensorWidth
PXD sensors in L1 and L2 have the same size in u direction (=width):
Definition: ROIFinder.h:149
Abstract base class for different kinds of events.