CbmRoot
Loading...
Searching...
No Matches
CbmMvdTrackingInterface.h
Go to the documentation of this file.
1/* Copyright (C) 2022-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov, Sergei Zharko [committer] */
4
5/***************************************************************************************************
6 * @file CbmMvdTrackingInterface.h
7 * @brief Input data and parameters interface from MVD subsystem used in L1 tracker (declaration)
8 * @since 31.05.2022
9 * @author S.Zharko <s.zharko@gsi.de>
10 ***************************************************************************************************/
11
12#ifndef CbmMvdTrackingInterface_h
13#define CbmMvdTrackingInterface_h 1
14
15#include "CbmHit.h"
16#include "CbmMvdDetectorId.h"
17#include "CbmMvdHit.h"
18#include "CbmMvdStationPar.h"
20
21#include <FairTask.h> // for InitStatus, FairTask
22
23#include <Rtypes.h> // for ClassDef
24#include <TMath.h> // for Pi
25
26#include <algorithm>
27#include <limits>
28#include <string>
29
30class TBuffer;
31class TClass;
32class TMemberInspector;
33
39public:
42
45
48
51
54
57
59 std::string GetDetectorName() const override { return "MVD"; }
60
64 // TODO: remove this method
65 [[deprecated]] double GetRadLength(int stationId) const
66 {
67 return fMvdStationPar->GetZThickness(stationId) / (10. * fMvdStationPar->GetZRadThickness(stationId));
68 }
69
74 std::tuple<double, double> GetStereoAnglesSensor(int /*address*/) const override
75 {
76 return std::tuple(0., TMath::Pi() / 2.);
77 }
78
82 // TODO: remove this method
83 [[deprecated]] double GetSensorThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); }
84
88 int GetTrackingStationIndex(const CbmHit* hit) const override
89 {
90 auto hitMvd = [&] {
91 if constexpr (kUseDynamicCast) { return dynamic_cast<const CbmMvdHit*>(hit); }
92 else {
93 return static_cast<const CbmMvdHit*>(hit);
94 }
95 }();
96 return hitMvd->GetStationNr();
97 }
98
102 int GetTrackingStationIndex(const FairMCPoint* point) const override;
103
107 int GetTrackingStationIndex(int detectorId) const override { return StationNr(detectorId); }
108
109
111 InitStatus Init() override;
112
115
119 bool IsTimeInfoProvided(int /*stationId*/) const override { return true; }
120
122 InitStatus ReInit() override;
123
125 void SetParContainers() override;
126
127 private:
128 inline static CbmMvdTrackingInterface* fpInstance{nullptr};
129
131
133};
134
135#endif // CbmMvdTrackingInterface
Base abstract class for tracking detector interface to L1 (implementation of Checker)
int32_t StationNr(int32_t detectorId) const
Double_t GetZRadThickness(Int_t stationNumber) const
Double_t GetZThickness(Int_t stationNumber) const
CbmMvdTrackingInterface.
CbmMvdTrackingInterface & operator=(CbmMvdTrackingInterface &&)=delete
Move assignment operator.
double GetRadLength(int stationId) const
static CbmMvdTrackingInterface * fpInstance
Instance of the class.
InitStatus Init() override
FairTask: Init method.
void SetParContainers() override
FairTask: sets parameter containers up.
CbmMvdTrackingInterface(const CbmMvdTrackingInterface &)=delete
Copy constructor.
std::tuple< double, double > GetStereoAnglesSensor(int) const override
Gets stereo angles of the two independent measured coordinates.
int GetTrackingStationIndex(const CbmHit *hit) const override
Gets a tracking station of a CbmHit.
int GetTrackingStationIndex(int detectorId) const override
Gets a tracking station by the address of element (detectorID in terms of MVD)
const CbmMvdStationPar * fMvdStationPar
Pointer to the Mvd station parameters.
CbmMvdTrackingInterface & operator=(const CbmMvdTrackingInterface &)=delete
Copy assignment operator.
InitStatus ReInit() override
FairTask: ReInit method.
ClassDefOverride(CbmMvdTrackingInterface, 0)
CbmMvdTrackingInterface()
Default constructor.
std::string GetDetectorName() const override
Gets name of this subsystem.
bool IsTimeInfoProvided(int) const override
Check if the detector provides time measurements.
CbmMvdTrackingInterface(CbmMvdTrackingInterface &&)=delete
Move constructor.
static CbmMvdTrackingInterface * Instance()
Gets pointer to the instance of the CbmMvdTrackingInterface.
double GetSensorThickness(int stationId) const
Abstract class, which should be inherited by every detecting subsystem tracking interface class.