CbmRoot
Loading...
Searching...
No Matches
CbmTofTrackingInterface.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 CbmTofTrackingInterface.h
7 * @brief Input data and parameters interface from TOF subsystem used in L1 tracker (declaration)
8 * @since 23.06.2022
9 * @author S.Zharko <s.zharko@gsi.de>
10 ***************************************************************************************************/
11
12#ifndef CbmTofTrackingInterface_h
13#define CbmTofTrackingInterface_h 1
14
15#include "CbmHit.h"
16#include "CbmTofAddress.h"
17#include "CbmTofCell.h"
18#include "CbmTofDigiBdfPar.h"
19#include "CbmTofDigiPar.h"
20#include "CbmTofHit.h"
22#include "FairTask.h"
23#include "Logger.h"
24#include "TMath.h"
25
26#include <vector>
27
28class CbmTofDigiPar;
29
34 public:
37
40
43
46
49
52
54 std::string GetDetectorName() const override { return "TOF"; }
55
60 std::tuple<double, double> GetStereoAnglesSensor(int /*address*/) const override
61 {
62 return std::tuple(0., TMath::Pi() * 0.5);
63 }
64
68 int GetTrackingStationIndex(const CbmHit* hit) const override { return GetTrackingStationIndex(hit->GetAddress()); }
69
73 int GetTrackingStationIndex(int address) const override
74 {
77 return iSt;
78 }
79
83 int GetTrackingStationIndex(const FairMCPoint* point) const override
84 {
85 return GetTrackingStationIndex(point->GetDetectorID());
86 }
87
91 double GetZrefModule(int address) override
92 {
93 auto* pCell = dynamic_cast<CbmTofCell*>(fDigiPar->GetCell(address));
94 assert(pCell);
95 return pCell->GetZ();
96 }
97
101 bool IsTimeInfoProvided(int /*stationId*/) const override { return true; }
102
104 InitStatus Init() override;
105
108
110 InitStatus ReInit() override;
111
113 void SetParContainers() override;
114
115 private:
116 inline static CbmTofTrackingInterface* fpInstance{nullptr};
117
120
121 std::vector<double> fTofStationZ{};
122 std::vector<double> fTofStationZMin{};
123 std::vector<double> fTofStationZMax{};
124
126};
127
128#endif // CbmTofTrackingInterface
Base abstract class for tracking detector interface to L1 (implementation of Checker)
int32_t GetAddress() const
Definition CbmHit.h:74
static int32_t GetSmId(uint32_t address)
static int32_t GetRpcId(uint32_t address)
static int32_t GetSmType(uint32_t address)
Parameters class for the CBM ToF digitizer using beam data distributions.
Int_t GetTrackingStation(Int_t iSmType, Int_t iSm, Int_t iRpc) const
CbmTofCell * GetCell(Int_t i)
std::vector< double > fTofStationZ
Centers of TOF stations along z-axis [cm].
CbmTofTrackingInterface(CbmTofTrackingInterface &&)=delete
Move constructor.
CbmTofTrackingInterface & operator=(CbmTofTrackingInterface &&)=delete
Move assignment operator.
CbmTofTrackingInterface & operator=(const CbmTofTrackingInterface &)=delete
Copy assignment operator.
ClassDefOverride(CbmTofTrackingInterface, 0)
static CbmTofTrackingInterface * Instance()
Gets pointer to the instance of the CbmTofTrackingInterface.
void SetParContainers() override
FairTask: sets parameter containers up.
std::string GetDetectorName() const override
Gets name of this subsystem.
int GetTrackingStationIndex(int address) const override
Gets a tracking station by the address of element.
bool IsTimeInfoProvided(int) const override
Check if station provides time measurements.
InitStatus Init() override
FairTask: Init method.
CbmTofTrackingInterface()
Default constructor.
static CbmTofTrackingInterface * fpInstance
Instance of the class.
std::vector< double > fTofStationZMin
Lower bounds of TOF stations along z-axis [cm].
int GetTrackingStationIndex(const FairMCPoint *point) const override
Gets a tracking station of a FairMCPoint.
CbmTofTrackingInterface(const CbmTofTrackingInterface &)=delete
Copy constructor.
std::vector< double > fTofStationZMax
Upper bounds of TOF stations along z-axis [cm].
double GetZrefModule(int address) override
Gets reference z of the detector module (e.g., RPC for TOF)
int GetTrackingStationIndex(const CbmHit *hit) const override
Gets a tracking station of a ToF hit.
std::tuple< double, double > GetStereoAnglesSensor(int) const override
Gets stereo angles of the two independent measured coordinates.
InitStatus ReInit() override
FairTask: ReInit method.
Abstract class, which should be inherited by every detecting subsystem tracking interface class.