8#include <tracking/datcon/findlets/DATCONSVDClusterLoaderAndPreparer.h>
9#include <tracking/datcon/utilities/DATCONHelpers.h>
10#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
11#include <svd/dataobjects/SVDCluster.h>
12#include <vxd/dataobjects/VxdID.h>
13#include <framework/core/ModuleParamList.h>
16using namespace TrackFindingCDC;
36 std::vector<std::pair<
VxdID, std::pair<long, long>>>& uHits,
37 std::vector<std::pair<
VxdID, std::pair<long, long>>>& vHits)
39 if (uClusters.size() == 0 or vClusters.size() == 0) {
45 for (
auto& cluster : uClusters) {
46 const VxdID& sensorID = cluster.getSensorID();
53 const double cosRotAngle = cos(rotangle);
54 const double sinRotAngle = sin(rotangle);
59 const long x = round(sensorRadius * cosRotAngle - ytmp * sinRotAngle);
60 const long y = round(sensorRadius * sinRotAngle + ytmp * cosRotAngle);
61 const long radiusSquared = x * x + y * y;
64 std::pair<long, long> pos2D = std::make_pair(
convertFloatToInt(2. * (
double)x / (
double)radiusSquared, 10),
66 B2DEBUG(29,
"x, y: " << x <<
" " << y <<
" Hough-values: " << pos2D.first <<
" " << pos2D.second);
67 uHits.emplace_back(std::make_pair(sensorID, pos2D));
71 for (
auto& cluster : vClusters) {
72 const VxdID& sensorID = cluster.getSensorID();
80 if (layerNumber == 3) {
83 switch (layerNumber) {
85 if (sensorNumber == 1) {
92 if (sensorNumber == 1) {
99 if (sensorNumber == 1) {
107 vHits.emplace_back(std::make_pair(sensorID, std::make_pair(z, radius)));
112 B2WARNING(
"High occupancy in SVD, aborting FPGA-DATCON...");
const std::array< int, 3 > m_const_ZShiftL4
shift along z of the L4 senosrs, in µn
uint m_param_maxClustersPerLayer
Cut value for aborting tracking if more than this number of clusters is found on one layer.
void apply(const std::vector< SVDCluster > &uClusters, const std::vector< SVDCluster > &vClusters, std::vector< std::pair< VxdID, std::pair< long, long > > > &uHits, std::vector< std::pair< VxdID, std::pair< long, long > > > &vHits) override
Load the SVDClusters and create two vectors containing the hits prepared for intercept finding This f...
void initialize() override
Create the store arrays.
std::array< uint, 8 > m_nClusterPerLayer
array containing the number of clusters per layer. If this exceeds a cut value, tracking is aborted
const std::array< int, 2 > m_const_ZShiftL3
shift along z of the L3 senosrs, in µn
const std::array< double, 4 > m_const_AngleStep
angle difference between two consecutive ladders, in rad
const std::array< int, 4 > m_const_RPhiShiftsOfLayers
shift in r-phi to create windmill structure, in µm
const std::array< double, 4 > m_const_InitialAngle
phi-value of the first ladder in each layer, i.e. sensors X.1.Y, in rad
const std::array< double, 4 > m_const_CosSlantedAngles
cosine values of the slanted sensors
DATCONSVDClusterLoaderAndPreparer()
Load clusters and prepare them for intercept finding.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
const std::array< int, 4 > m_const_ZShiftL5
shift along z of the L5 senosrs, in µn
const std::array< int, 5 > m_const_ZShiftL6
shift along z of the L6 senosrs, in µn
const std::array< int, 4 > m_const_SVDRadii
Radii of the SVD layers, in µm.
The Module parameter list class.
void initialize() override
Receive and dispatch signal before the start of the event processing.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Class to uniquely identify a any structure of the PXD and SVD.
baseType getSensorNumber() const
Get the sensor id.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
long convertFloatToInt(double value, int power)
Convert float or double to long int for more similarity to the FPGA implementation.
Abstract base class for different kinds of events.