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 <framework/datastore/StoreArray.h>
12#include <framework/geometry/B2Vector3.h>
13
14namespace Belle2 {
19 class ModuleParamList;
21 class ROIid;
22 class PXDIntercept;
24
25 namespace vxdHoughTracking {
26
30 class ROIFinder : public TrackFindingCDC::Findlet<const SpacePointTrackCand> {
33
34 public:
36 ROIFinder();
37
40
42 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
43
45 void apply(const std::vector<SpacePointTrackCand>& finalTracks) override;
46
48 void initialize() override;
49
51 void beginRun() override;
52
54 void beginEvent() override;
55
56 private:
58 bool m_calculateROI = false;
59
60 // StoreArrays
62 std::string m_storePXDInterceptsName = "SVDHoughPXDIntercepts";
64 std::string m_storeROIsName = "SVDHoughROIs";
69
70
72 bool m_refit = true;
74 bool m_addVirtualIP = true;
76 std::string m_ROIFitMethod = "helixFit";
77
79 std::unique_ptr<QualityEstimatorBase> m_estimator;
80
81
82 // Extrapolation parameters
84 double m_tolerancePhi = 0.15;
86 double m_toleranceZ = 0.5;
87
88 // The extrapolation has two charge dependent biases:
89 // a) the residuals show a ~1/R bias, that is larger for low pT = small track radii
90 // b) the residuals show a larger sin(phi) and a smaller cos(phi modulation)
91 // Both of these can be corrected for
100
103
104
105 // ROI calculation parameters
114
119 double m_multiplierUL1 = 500;
121 double m_multiplierUL2 = 600;
123 double m_multiplierVL1 = 0.8;
125 double m_multiplierVL2 = 0.8;
126
128 unsigned short m_maximumROISizeU = 100;
130 unsigned short m_maximumROISizeV = 100;
131
132 // Constants used during extrapolation to PXD and ROI calculation
133 // ATTENTION: hard coded values taken and derived from pxd/data/PXD-Components.xml
136 const double c_centerZShiftLayer1[2] = {3.68255, -0.88255};
139 const double c_centerZShiftLayer2[2] = {5.01455, -1.21455};
142 const double c_sensorMinY = -0.36;
144 const double c_sensorMaxY = 0.89;
148 const double c_shiftY = (c_sensorMaxY + c_sensorMinY) / 2.0;
150 const double c_layerRadius[2] = {1.42854, 2.21218};
152 const double c_activeSensorLength[2] = {4.48, 6.144};
154 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};
156 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};
157
159 double m_bFieldZ = 1.5;
160
161
166
167 };
168
169 }
171}
The Module parameter list class.
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
BaseClass for QualityEstimators.
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition ROIid.h:25
Storage for (VXD) SpacePoint-based track candidates.
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
double m_radiusCorrectionFactorL2
Correction factor for radial bias for L2: factor * charge / radius.
Definition ROIFinder.h:95
unsigned short m_maximumROISizeV
maximum ROI size in v in pixel
Definition ROIFinder.h:130
double m_minimumROISizeUL1
Minimum size of ROI in u-direction on L1 in pixel.
Definition ROIFinder.h:107
const double c_ladderPhiL2[12]
Phi values of the ladders of L2.
Definition ROIFinder.h:156
B2Vector3D m_BeamSpotPosition
B2Vector3D actually containing the BeamSpot position. This will be used as the starting point of the ...
Definition ROIFinder.h:163
bool m_calculateROI
Calculate ROI in this findlet?
Definition ROIFinder.h:58
double m_multiplierVL1
Multiplier term for v-direction on L1.
Definition ROIFinder.h:123
double m_radiusCorrectionFactorL1
Correction factor for radial bias for L1: factor * charge / radius.
Definition ROIFinder.h:93
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:139
double m_minimumROISizeVL2
Minimum size of ROI in v-direction on L2 in pixel.
Definition ROIFinder.h:113
double m_multiplierUL2
Multiplier term for u-direction on L2.
Definition ROIFinder.h:121
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:136
void initialize() override
Initialize the StoreArrays.
Definition ROIFinder.cc:113
double m_multiplierVL2
Multiplier term for v-direction on L2.
Definition ROIFinder.h:125
StoreArray< ROIid > m_storeROIs
ROIs StoreArray.
Definition ROIFinder.h:68
double m_sinPhiCorrectionFactor
Correction factor for the sin(phi) modulation.
Definition ROIFinder.h:97
const double c_activeSensorLength[2]
Length of the active region for L1 and L2.
Definition ROIFinder.h:152
const double c_sensorMaxY
Maximum y coordinate if x-axis is perpendicular to the sensor:
Definition ROIFinder.h:144
std::string m_ROIFitMethod
Refit with this estimator, options are circleFit, tripletFit, helixFit.
Definition ROIFinder.h:76
const double c_ladderPhiL1[8]
Phi values of the ladders of L1.
Definition ROIFinder.h:154
double m_tolerancePhi
Allowed tolerance (in radians) phi to create intercepts per sensor.
Definition ROIFinder.h:84
std::string m_storeROIsName
Name of the ROIs StoreArray.
Definition ROIFinder.h:64
std::string m_storePXDInterceptsName
Name of the PXDIntercepts StoreArray.
Definition ROIFinder.h:62
const double c_layerRadius[2]
Radius of the two layers.
Definition ROIFinder.h:150
void apply(const std::vector< SpacePointTrackCand > &finalTracks) override
Function to call all the sub-findlets.
Definition ROIFinder.cc:180
bool m_addVirtualIP
Add a virtual IP for the refit?
Definition ROIFinder.h:74
StoreArray< PXDIntercept > m_storePXDIntercepts
PXDIntercepts StoreArray.
Definition ROIFinder.h:66
void beginRun() override
Initialize the BField.
Definition ROIFinder.cc:146
TrackFindingCDC::Findlet< const SpacePointTrackCand > Super
Parent class.
Definition ROIFinder.h:32
B2Vector3D m_BeamSpotPositionError
B2Vector3D actually containing the BeamSpot position error.
Definition ROIFinder.h:165
bool m_refit
Refit the tracks with m_ROIFitMethod.
Definition ROIFinder.h:72
double m_zPositionCorrectionFactor
Correction factor for the z position.
Definition ROIFinder.h:102
void beginEvent() override
Clear the object pools.
Definition ROIFinder.cc:170
double m_cosPhiCorrectionFactor
Correction factor for the cos(phi) modulation.
Definition ROIFinder.h:99
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
Definition ROIFinder.h:79
double m_bFieldZ
BField in Tesla.
Definition ROIFinder.h:159
double m_minimumROISizeVL1
Minimum size of ROI in v-direction on L1 in pixel.
Definition ROIFinder.h:109
const double c_shiftY
Shift of the center position in y if the x-axis is perpendicular to the sensor:
Definition ROIFinder.h:148
const double c_sensorMinY
PXD is shifted to create the windmill structure.
Definition ROIFinder.h:142
double m_minimumROISizeUL2
Minimum size of ROI in u-direction on L2 in pixel.
Definition ROIFinder.h:111
unsigned short m_maximumROISizeU
maximum ROI size in u in pixel
Definition ROIFinder.h:128
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition ROIFinder.cc:34
ROIFinder()
Constructor for adding the subfindlets.
Definition ROIFinder.cc:30
double m_multiplierUL1
Multiplier term in ROI size estimation For u: size = multiplier * 1/R + minimumROISize For v: size = ...
Definition ROIFinder.h:119
double m_toleranceZ
Allowed tolerance (in cm) in z to create intercepts per sensor.
Definition ROIFinder.h:86
const double c_activeSensorWidth
PXD sensors in L1 and L2 have the same size in u direction (=width):
Definition ROIFinder.h:146
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition B2Vector3.h:516
Abstract base class for different kinds of events.