CbmRoot
Loading...
Searching...
No Matches
CaTripletConstructor.h
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov [committer] */
4
8
9#pragma once // include this header only once per compilation unit
10
11#include "CaFramework.h"
12#include "CaGridEntry.h"
13#include "CaMcMatch.h"
14#include "CaTriplet.h"
15#include "CaVector.h"
16#include "CaWindowData.h"
17#include "KfActiveLayer.h"
18#include "KfFieldRegion.h"
19#include "KfSetup.h"
20#include "KfSimd.h"
21#include "KfTrackKalmanFilter.h"
22#include "KfTrackParam.h"
23
24namespace cbm::algo::ca
25{
26
29 class alignas(kf::VcMemAlign) TripletConstructor {
30
31 public:
33
36 TripletConstructor(const ca::Framework& framework, const ca::Parameters<fvec>& pars, WindowData& wData,
37 const fscal mass, const ca::TrackingMode& mode);
38
41
44
47
50
53
55 void CreateTripletsForHit(Vector<ca::Triplet>& tripletsOut, int istal, int istam, int istar, ca::HitIndex_t ihl);
56
57 private:
58 typedef std::pair<Vector<TrackParamV>, Vector<ca::HitIndex_t>> Doublet_t;
59 typedef std::tuple<Vector<TrackParamV>, Vector<ca::HitIndex_t>, Vector<ca::HitIndex_t>> Triplet_t;
60
61 bool InitStations(int istal, int istam, int istar);
62
65
68 void FindTripletHits();
69
71 void FindTriplets();
72
74 void SelectTriplets(Vector<ca::Triplet>& tripletsOut);
75
76 void CollectHits(Vector<ca::HitIndex_t>& collectedHits, kf::TrackKalmanFilter<fvec>& fit, const int iSta,
77 const double chi2Cut, const McMatch& mc, const int maxNhits);
78
79 private:
87
88 bool fIsTargetField{false};
89
90 // Number of stations situated in field region (MVD + STS in CBM)
92
93 int fIstaL{-1};
94 int fIstaM{-1};
95 int fIstaR{-1};
96
97 const kf::ActiveLayer<fvec>* fStaL{nullptr};
98 const kf::ActiveLayer<fvec>* fStaM{nullptr};
99 const kf::ActiveLayer<fvec>* fStaR{nullptr};
100
101 std::array<int, 2> fFldStaTL{};
102 std::array<int, 3> fFldStaLR{};
103
106
107 // Persistent storage for triplet tracks and hits
109
110 // Persistent storage for doublet tracks and hits
112
113 private:
114 static constexpr bool fDebugDublets = false; // print debug info for dublets
115 static constexpr bool fDebugTriplets = false; // print debug info for triplets
116 static constexpr bool fDebugCollectHits = false; // print debug info for CollectHits
117 };
118
119} // namespace cbm::algo::ca
Data structure to represent a set of MC links in CA tracking MC module.
Container for all data, which are processed within a single sub-timeslice (implementation)
Properties of an active surface of the layer.
Magnetic flux density interpolation along the track vs. z-coordinate (header)
Setup representation for the Kalman-filter framework (header)
Implementation selection for the SIMD utilities (VS or pseudo)
Track fit utilities for the CA tracking based on the Kalman filter.
A container for all external parameters of the CA tracking algorithm.
const kf::ActiveLayer< fvec > * fStaL
left station
const cbm::algo::kf::Setup< fvec > & fSetup
Reference to the setup.
const Parameters< fvec > & fParameters
Object of Framework parameters class.
TripletConstructor & operator=(const TripletConstructor &)=delete
Copy assignment operator.
void SelectTriplets(Vector< ca::Triplet > &tripletsOut)
Select good triplets.
void CreateTripletsForHit(Vector< ca::Triplet > &tripletsOut, int istal, int istam, int istar, ca::HitIndex_t ihl)
---— FUNCTIONAL PART ---—
fscal fDefaultMass
mass of the propagated particle [GeV/c2]
const kf::ActiveLayer< fvec > * fStaR
right station
const ca::Framework & fFramework
Reference to the Framework object.
TripletConstructor(const ca::Framework &framework, const ca::Parameters< fvec > &pars, WindowData &wData, const fscal mass, const ca::TrackingMode &mode)
---— Constructors and destructor ---—
bool InitStations(int istal, int istam, int istar)
const cbm::algo::kf::Field< fvec > & fField
Reference to field.
TripletConstructor(const TripletConstructor &)=delete
Copy constructor.
std::tuple< Vector< TrackParamV >, Vector< ca::HitIndex_t >, Vector< ca::HitIndex_t > > Triplet_t
TripletConstructor(TripletConstructor &&)=delete
Move constructor.
TripletConstructor & operator=(TripletConstructor &&)=delete
Move assignment operator.
void FindDoublets(kf::TrackKalmanFilter< fvec > &fit)
Find the doublets. Reformat data in the portion of doublets.
std::array< int, 2 > fFldStaTL
indices of two stations for field approximation between the t. and l. hit
void FindTriplets()
Find triplets on station.
~TripletConstructor()=default
Destructor.
void CollectHits(Vector< ca::HitIndex_t > &collectedHits, kf::TrackKalmanFilter< fvec > &fit, const int iSta, const double chi2Cut, const McMatch &mc, const int maxNhits)
std::array< int, 3 > fFldStaLR
indices of three stations for field approximation between the l. and r. hits
const kf::ActiveLayer< fvec > * fStaM
mid station
ca::HitIndex_t fIhitL
index of the left hit in fAlgo->fWindowHits
std::pair< Vector< TrackParamV >, Vector< ca::HitIndex_t > > Doublet_t
bool fIsTargetField
is the magnetic field present at the target
Container for internal data, processed on a single time window.
Properties of an active surface of the layer.
Magnetic field region, corresponding to a hit triplet.
Magnetic field manager class.
Definition KfField.h:272
KF-framework representation of the detector setup.
Definition KfSetup.h:37
constexpr fscal MuonMass
Particle masses etc used for the track fit, fscal precision.
Definition CaDefs.h:90
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14
kf::fscal fscal
Definition CaSimd.h:14
unsigned int HitIndex_t
Index of ca::Hit.
Definition CaHit.h:27