Belle II Software  release-06-02-00
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 <framework/datastore/StoreArray.h>
14 #include <framework/geometry/B2Vector3.h>
15 
16 #include <string>
17 #include <vector>
18 
19 namespace Belle2 {
24  class ModuleParamList;
25  class SpacePointTrackCand;
26 
27  namespace vxdHoughTracking {
28 
32  class ROIFinder : public TrackFindingCDC::Findlet<const SpacePointTrackCand> {
35 
36  public:
38  ROIFinder();
39 
42 
44  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
45 
47  void apply(const std::vector<SpacePointTrackCand>& finalTracks) override;
48 
50  void initialize() override;
51 
53  void beginRun() override;
54 
56  void beginEvent() override;
57 
58  private:
60  bool m_param_calculateROI = false;
61 
62  // StoreArrays
64  std::string m_param_storePXDInterceptsName = "DATCONPXDIntercepts";
66  std::string m_param_storeROIsName = "DATCONROIs";
71 
72 
73  // Extrapolation parameters
75  double m_param_tolerancePhi = 0.15;
77  double m_param_toleranceZ = 0.5;
78 
79  // The extrapolation has two charge dependent biases:
80  // a) the residuals show a ~1/R bias, that is larger for low pT = small track radii
81  // b) the residuals show a larger sin(phi) and a smaller cos(phi modulation)
82  // Both of these can be corrected for
89 
90 
91  // ROI calculation parameters
100 
105  double m_param_multiplierUL1 = 600;
107  double m_param_multiplierUL2 = 800;
109  double m_param_multiplierVL1 = 0.8;
111  double m_param_multiplierVL2 = 1.2;
112 
114  unsigned short m_param_maximumROISizeU = 120;
116  unsigned short m_param_maximumROISizeV = 192;
117 
118  // Constants used during extrapolation to PXD and ROI calculation
119  // ATTENTION: hard coded values taken and derived from pxd/data/PXD-Components.xml
122  const double m_const_centerZShiftLayer1[2] = {3.68255, -0.88255};
125  const double m_const_centerZShiftLayer2[2] = {5.01455, -1.21455};
128  const double m_const_sensorMinY = -0.36;
130  const double m_const_sensorMaxY = 0.89;
136  const double m_const_layerRadius[2] = {1.42854, 2.21218};
138  const double m_const_activeSensorLength[2] = {4.48, 6.144};
140  const double m_const_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};
142  const double m_const_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};
143 
145  double m_bFieldZ = 1.5;
146 
147 
150 
151  };
152 
153  }
155 }
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
Interface for an algorithm part that needs to receive the module processing signals.
Findlet for performing the DATCON ROI calculation.
Definition: ROIFinder.h:32
std::string m_param_storePXDInterceptsName
Name of the PXDIntercepts StoreArray.
Definition: ROIFinder.h:64
unsigned short m_param_maximumROISizeV
maximum ROI size in v in pixel
Definition: ROIFinder.h:116
double m_param_tolerancePhi
Allowed tolerance (in radians) phi to create intercepts per sensor.
Definition: ROIFinder.h:75
B2Vector3D m_BeamSpotPosition
B2Vector3D actually contining the BeamSpot position. This will be used as the starting point of the e...
Definition: ROIFinder.h:149
const double m_const_activeSensorWidth
PXD sensors in L1 and L2 have the same size in u direction (=width):
Definition: ROIFinder.h:132
const double m_const_ladderPhiL2[12]
Phi values of the ladders of L2.
Definition: ROIFinder.h:142
const double m_const_activeSensorLength[2]
Length of the active region for L1 and L2.
Definition: ROIFinder.h:138
~ROIFinder()
Default desctructor.
bool m_param_calculateROI
Calculate ROI in this findlet?
Definition: ROIFinder.h:60
std::string m_param_storeROIsName
Name of the ROIs StoreArray.
Definition: ROIFinder.h:66
void initialize() override
Initialize the StoreArrays.
Definition: ROIFinder.cc:93
StoreArray< ROIid > m_storeROIs
ROIs StoreArray.
Definition: ROIFinder.h:70
double m_param_cosPhiCorrectionFactor
Correction factor for the cos(phi) modulation.
Definition: ROIFinder.h:88
double m_param_minimumROISizeUL2
Minimum size of ROI in u-direction on L2 in pixel.
Definition: ROIFinder.h:97
const double m_const_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:122
void apply(const std::vector< SpacePointTrackCand > &finalTracks) override
Function to call all the sub-findlets.
Definition: ROIFinder.cc:146
double m_param_minimumROISizeVL2
Minimum size of ROI in v-direction on L2 in pixel.
Definition: ROIFinder.h:99
double m_param_sinPhiCorrectionFactor
Correction factor for the sin(phi) modulation.
Definition: ROIFinder.h:86
const double m_const_ladderPhiL1[8]
Phi values of the ladders of L1.
Definition: ROIFinder.h:140
double m_param_multiplierVL1
Multiplier term for v-direction on L1.
Definition: ROIFinder.h:109
StoreArray< PXDIntercept > m_storePXDIntercepts
PXDIntercepts StoreArray.
Definition: ROIFinder.h:68
const double m_const_sensorMaxY
Maximum y coordinate if x-axis is perpendicular to the sensor:
Definition: ROIFinder.h:130
double m_param_multiplierUL2
Multiplier term for u-direction on L2.
Definition: ROIFinder.h:107
void beginRun() override
Initialize the BField.
Definition: ROIFinder.cc:116
double m_param_minimumROISizeVL1
Minimum size of ROI in v-direction on L1 in pixel.
Definition: ROIFinder.h:95
double m_param_multiplierUL1
Multiplier term in ROI size estimation For u: size = multiplier * 1/R + minimumROISize For v: size = ...
Definition: ROIFinder.h:105
unsigned short m_param_maximumROISizeU
maximum ROI size in u in pixel
Definition: ROIFinder.h:114
void beginEvent() override
Clear the object pools.
Definition: ROIFinder.cc:136
double m_bFieldZ
BField in Tesla.
Definition: ROIFinder.h:145
const double m_const_layerRadius[2]
Radius of the two layers.
Definition: ROIFinder.h:136
double m_param_toleranceZ
Allowed tolerance (in cm) in z to create intercepts per sensor.
Definition: ROIFinder.h:77
double m_param_multiplierVL2
Multiplier term for v-direction on L2.
Definition: ROIFinder.h:111
const double m_const_shiftY
Shift of the center position in y if the x-axis is perpendicular to the sensor:
Definition: ROIFinder.h:134
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Definition: ROIFinder.cc:30
ROIFinder()
Constructor for adding the subfindlets.
Definition: ROIFinder.cc:26
double m_param_radiusCorrectionFactor
Correction factor for radial bias: factor * charge / radius.
Definition: ROIFinder.h:84
double m_param_minimumROISizeUL1
Minimum size of ROI in u-direction on L1 in pixel.
Definition: ROIFinder.h:93
const double m_const_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:125
const double m_const_sensorMinY
PXD is shifted to create the windmill structure.
Definition: ROIFinder.h:128
Abstract base class for different kinds of events.