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 "CaStation.h"
14#include "CaTriplet.h"
15#include "CaVector.h"
16#include "CaWindowData.h"
17#include "KfFieldRegion.h"
18#include "KfSetup.h"
19#include "KfSimd.h"
20#include "KfTrackKalmanFilter.h"
21#include "KfTrackParam.h"
22
23namespace cbm::algo::ca
24{
25
28 class alignas(kf::VcMemAlign) TripletConstructor {
29
30 public:
32
35 TripletConstructor(const ca::Parameters<fvec>& pars, WindowData& wData, const fscal mass,
36 const ca::TrackingMode& mode);
37
40
43
46
49
52
54 void CreateTripletsForHit(Vector<ca::Triplet>& tripletsOut, int istal, int istam, int istar, ca::HitIndex_t ihl);
55
56 private:
57 typedef std::pair<Vector<TrackParamV>, Vector<ca::HitIndex_t>> Doublet_t;
58 typedef std::tuple<Vector<TrackParamV>, Vector<ca::HitIndex_t>, Vector<ca::HitIndex_t>> Triplet_t;
59
60 bool InitStations(int istal, int istam, int istar);
61
64
67 void FindTripletHits();
68
70 void FindTriplets();
71
73 void SelectTriplets(Vector<ca::Triplet>& tripletsOut);
74
75 void CollectHits(Vector<ca::HitIndex_t>& collectedHits, kf::TrackKalmanFilter<fvec>& fit, const int iSta,
76 const double chi2Cut, const int iMC, const int maxNhits);
77
78 private:
84
85 bool fIsTargetField{false};
86
87 // Number of stations situated in field region (MVD + STS in CBM)
89
90 int fIstaL{-1};
91 int fIstaM{-1};
92 int fIstaR{-1};
93
94 const ca::Station<fvec>* fStaL{nullptr};
95 const ca::Station<fvec>* fStaM{nullptr};
96 const ca::Station<fvec>* fStaR{nullptr};
97
99 fFld0Sta[2]; // two stations for approximating the field between the target and the left hit
100 const ca::Station<fvec>*
101 fFld1Sta[3]; // three stations for approximating the field between the left and the right hit
102
105
106 // Persistent storage for triplet tracks and hits
108
109 // Persistent storage for doublet tracks and hits
111
112 private:
113 static constexpr bool fDebugDublets = false; // print debug info for dublets
114 static constexpr bool fDebugTriplets = false; // print debug info for triplets
115 static constexpr bool fDebugCollectHits = false; // print debug info for CollectHits
116 };
117
118} // namespace cbm::algo::ca
Container for all data, which are processed within a single sub-timeslice (implementation)
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 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]
void CollectHits(Vector< ca::HitIndex_t > &collectedHits, kf::TrackKalmanFilter< fvec > &fit, const int iSta, const double chi2Cut, const int iMC, const int maxNhits)
const ca::Station< fvec > * fFld0Sta[2]
const ca::Station< fvec > * fFld1Sta[3]
bool InitStations(int istal, int istam, int istar)
TripletConstructor(const TripletConstructor &)=delete
Copy constructor.
std::pair< Vector< TrackParamV >, Vector< ca::HitIndex_t > > Doublet_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.
TripletConstructor(const ca::Parameters< fvec > &pars, WindowData &wData, const fscal mass, const ca::TrackingMode &mode)
---— Constructors and destructor ---—
void FindTriplets()
Find triplets on station.
~TripletConstructor()=default
Destructor.
const ca::Station< fvec > * fStaR
right station
ca::HitIndex_t fIhitL
index of the left hit in fAlgo->fWindowHits
const ca::Station< fvec > * fStaL
left station
std::tuple< Vector< TrackParamV >, Vector< ca::HitIndex_t >, Vector< ca::HitIndex_t > > Triplet_t
const ca::Station< fvec > * fStaM
mid station
bool fIsTargetField
is the magnetic field present at the target
Container for internal data, processed on a single time window.
Magnetic field region, corresponding to a hit triplet.
KF-framework representation of the detector setup.
Definition KfSetup.h:33
constexpr fscal MuonMass
Particle masses etc used for the track fit, fscal precision.
Definition CaDefs.h:83
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