Belle II Software  release-08-01-10
ToPXDExtrapolator Class Referenceabstract

Findlet to extrapolate found tracks to the PXD sensors and calculate intercepts. More...

#include <ToPXDExtrapolator.h>

Inheritance diagram for ToPXDExtrapolator:
Collaboration diagram for ToPXDExtrapolator:

Public Types

using IOTypes = std::tuple< AIOTypes... >
 Types that should be served to apply on invokation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invokation.
 

Public Member Functions

 ToPXDExtrapolator ()
 Find intercepts in the 2D Hough space.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the sub findlets.
 
void initialize () override
 Create the store arrays.
 
void apply (const std::vector< std::pair< double, double >> &uTracks, const std::vector< std::pair< double, double >> &vTracks, std::vector< std::pair< VxdID, long >> &uExtrapolations, std::vector< std::pair< VxdID, long >> &vExtrapolations) override
 Load in the prepared hits and create tracks for extrapolation to PXD.
 
virtual std::string getDescription ()
 Brief description of the purpose of the concret findlet.
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Types

using ToVector = typename ToVectorImpl< T >::Type
 Short hand for ToRangeImpl.
 

Protected Member Functions

void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Types

using Super = TrackFindingCDC::Findlet< const std::pair< double, double >, const std::pair< double, double >, std::pair< VxdID, long >, std::pair< VxdID, long > >
 Parent class.
 

Private Member Functions

void extrapolateUTrack (const double trackPhi, const double trackRadius, const uint layer, std::vector< std::pair< VxdID, long >> &uExtrapolations)
 extrapolate the u-track to the two PXD layers More...
 
void extrapolateVTrack (const long tanLambda, const uint layer, std::vector< std::pair< VxdID, long >> &vExtrapolations)
 extrapolate the v-track to the two PXD layers More...
 

Private Attributes

double m_param_phiCutL1 = M_PI / 3.
 Create ROIs in phi only if the absolute difference in phi between sensor and track is smaller than this value on L1.
 
double m_param_phiCutL2 = M_PI / 4.
 Create ROIs in phi only if the absolute difference in phi between sensor and track is smaller than this value on L2.
 
bool m_param_createPXDIntercepts = false
 Create PXDIntercepts?
 
std::string m_param_PXDInterceptStoreArrayName = "DATCONFPGAPXDIntercepts"
 name of the PXDIntercept StoreArray
 
StoreArray< PXDInterceptm_pxdIntercepts
 PXDIntercept StoreArray.
 
const long centerZShiftLayer1 [2] = {36825500, -8825500}
 shift of the sensor center along z for L1, in µm for use of mhp_z > (lengh/-2)+shiftZ && mhp_z < (lengh/2)+shiftZ
 
const long centerZShiftLayer2 [2] = {50145500, -12145500}
 shift of the sensor center along z for L2, in µm for use of mhp_z > (lengh/-2)+shiftZ && mhp_z < (lengh/2)+shiftZ
 
const long layerRadius [2] = {14285, 22121}
 radius of L1 and L2, in µm
 
const long sensorLength [2] = {44800000, 61440000}
 length of the modules flr L1 and L2, in µm
 
const long sensorMinY = -3600000
 minimum y coordinate for a ladder in the position of ladder 1 (perpendicular to the x-axis), in µm
 
const long sensorMaxY = 8900000
 maximum y coordinate for a ladder in the position of ladder 1 (perpendicular to the x-axis), in µm
 
const long shiftY = (sensorMaxY + sensorMinY) / 2
 shift of the sensor center in r-phi
 
const uint laddersPerLayer [2] = {8, 12}
 number of ladders per layer
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

Findlet to extrapolate found tracks to the PXD sensors and calculate intercepts.

Definition at line 29 of file ToPXDExtrapolator.h.

Member Function Documentation

◆ extrapolateUTrack()

void extrapolateUTrack ( const double  trackPhi,
const double  trackRadius,
const uint  layer,
std::vector< std::pair< VxdID, long >> &  uExtrapolations 
)
private

extrapolate the u-track to the two PXD layers

Parameters
trackPhiazimtutal angle of the track
trackRadiusradius of the track
layerPXD layer to extrapolate to
uExtrapolationsvector containing the extrapolated positions in u

Definition at line 105 of file ToPXDExtrapolator.cc.

107 {
108  long sensorPerpRadius = layerRadius[layer - 1];
109  for (uint ladder = 1; ladder <= laddersPerLayer[layer - 1]; ladder++) {
110  double sensorPhi = M_PI / (laddersPerLayer[layer - 1] / 2) * (ladder - 1);
111  if (sensorPhi > M_PI) {
112  sensorPhi -= 2. * M_PI;
113  }
114 
115  double angleDiff = trackPhi - sensorPhi;
116  if (angleDiff > M_PI) {
117  angleDiff -= 2. * M_PI;
118  }
119  if (angleDiff < -M_PI) {
120  angleDiff += 2. * M_PI;
121  }
122  if (fabs(angleDiff) >= (layer == 1 ? m_param_phiCutL1 : m_param_phiCutL2)) continue;
123 
124  // additional factor of 10^3, as the sine and cosine values are also multiplied by 1000
125  long trackRadiusSquared = convertFloatToInt(trackRadius, 3) * convertFloatToInt(trackRadius, 3);
126  // additional factor of 10^3, as the sine and cosine values are also multiplied by 1000
127  long b = convertFloatToInt(sensorPerpRadius, 3) - trackRadius * convertFloatToInt(sin(angleDiff), 3);
128  double y = -trackRadius * convertFloatToInt(cos(angleDiff), 3) + sqrt(trackRadiusSquared - b * b);
129 
130  if (y >= sensorMinY && y <= sensorMaxY) {
131  long localUPosition = y - shiftY;
132 
133  // store extrapolated hit for first sensor in ladder
134  VxdID sensorID = VxdID(layer, ladder, 1);
135  uExtrapolations.emplace_back(sensorID, localUPosition);
136 
137  // store extrapolated hit for second sensor in ladder
138  sensorID = VxdID(layer, ladder, 2);
139  uExtrapolations.emplace_back(sensorID, localUPosition);
140  }
141  }
142 }
const long layerRadius[2]
radius of L1 and L2, in µm
const long sensorMinY
minimum y coordinate for a ladder in the position of ladder 1 (perpendicular to the x-axis),...
double m_param_phiCutL1
Create ROIs in phi only if the absolute difference in phi between sensor and track is smaller than th...
double m_param_phiCutL2
Create ROIs in phi only if the absolute difference in phi between sensor and track is smaller than th...
const long sensorMaxY
maximum y coordinate for a ladder in the position of ladder 1 (perpendicular to the x-axis),...
const long shiftY
shift of the sensor center in r-phi
const uint laddersPerLayer[2]
number of ladders per layer
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
long convertFloatToInt(double value, int power)
Convert float or double to long int for more similarity to the FPGA implementation.
Definition: DATCONHelpers.h:21

◆ extrapolateVTrack()

void extrapolateVTrack ( const long  tanLambda,
const uint  layer,
std::vector< std::pair< VxdID, long >> &  vExtrapolations 
)
private

extrapolate the v-track to the two PXD layers

Parameters
tanLambdaazimtutal angle of the track
layerPXD layer to extrapolate to
vExtrapolationsvector containing the extrapolated positions in v

Definition at line 144 of file ToPXDExtrapolator.cc.


The documentation for this class was generated from the following files: