CbmRoot
Loading...
Searching...
No Matches
CbmTrdTrackingInterface.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 CbmTrdTrackingInterface.h
7 * @brief Input data and parameters interface from TRD subsystem used in L1 tracker (declaration)
8 * @since 31.05.2022
9 * @author S.Zharko <s.zharko@gsi.de>
10 ***************************************************************************************************/
11
12#ifndef CbmTrdTrackingInterface_h
13#define CbmTrdTrackingInterface_h 1
14
15#include "CbmHit.h"
17#include "CbmTrdAddress.h"
18#include "CbmTrdParModDigi.h"
19#include "CbmTrdParSetDigi.h"
20#include "FairTask.h"
21#include "TMath.h"
22
23#include <iostream>
24#include <vector>
25
33 public:
36
39
42
45
48
51
53 std::string GetDetectorName() const override { return "TRD"; }
54
59 std::tuple<double, double> GetStereoAnglesSensor(int address) const override;
60
64 int GetTrackingStationIndex(const CbmHit* hit) const override { return GetTrackingStationIndex(hit->GetAddress()); }
65
69 int GetTrackingStationIndex(int address) const override { return CbmTrdAddress::GetLayerId(address); }
70
74 int GetTrackingStationIndex(const FairMCPoint* point) const override
75 {
76 return GetTrackingStationIndex(point->GetDetectorID());
77 }
78
82 bool IsTimeInfoProvided(int /*stationId*/) const override { return true; }
83
87 std::tuple<double, double, double> GetHitRanges(const CbmPixelHit& hit) const override;
88
90 InitStatus Init() override;
91
94
96 InitStatus ReInit() override;
97
99 void SetParContainers() override;
100
101 private:
105 __attribute__((always_inline)) CbmTrdParModDigi* GetTrdModulePar(int moduleId) const
106 {
107 return static_cast<CbmTrdParModDigi*>(fTrdDigiPar->GetModulePar(fTrdDigiPar->GetModuleId(moduleId)));
108 }
109
110 inline static CbmTrdTrackingInterface* fpInstance{nullptr};
111
113 //CbmTrdParModDigi* fTrdModuleInfo {nullptr};
114
116};
117
118#endif // CbmTrdTrackingInterface
Base abstract class for tracking detector interface to L1 (implementation of Checker)
Helper class to convert unique channel ID back and forth.
int32_t GetAddress() const
Definition CbmHit.h:74
Abstract class, which should be inherited by every detecting subsystem tracking interface class.
static uint32_t GetLayerId(uint32_t address)
Return layer ID from address.
Definition of chamber gain conversion for one TRD module.
virtual Int_t GetModuleId(Int_t i) const
virtual const CbmTrdParMod * GetModulePar(Int_t detId) const
A CbmL1 subtask, which provides necessary methods for CA tracker to access the geometry and dataflow ...
CbmTrdTrackingInterface & operator=(const CbmTrdTrackingInterface &)=delete
Copy assignment operator.
int GetTrackingStationIndex(int address) const override
Gets a tracking station by the address.
CbmTrdTrackingInterface()
Default constructor.
static CbmTrdTrackingInterface * Instance()
Gets pointer to the instance of the CbmTrdTrackingInterface.
CbmTrdTrackingInterface(const CbmTrdTrackingInterface &)=delete
Copy constructor.
int GetTrackingStationIndex(const CbmHit *hit) const override
Gets a tracking station of a CbmHit.
std::string GetDetectorName() const override
Gets name of this subsystem.
InitStatus Init() override
FairTask: Init method.
InitStatus ReInit() override
FairTask: ReInit method.
static CbmTrdTrackingInterface * fpInstance
Instance of the class.
std::tuple< double, double > GetStereoAnglesSensor(int address) const override
Gets stereo angles of the two independent measured coordinates.
ClassDefOverride(CbmTrdTrackingInterface, 0)
void SetParContainers() override
FairTask: sets parameter containers up.
CbmTrdTrackingInterface & operator=(CbmTrdTrackingInterface &&)=delete
Move assignment operator.
__attribute__((always_inline)) CbmTrdParModDigi *GetTrdModulePar(int moduleId) const
Gets pointer to the TRD module.
bool IsTimeInfoProvided(int) const override
Check if station provides time measurements.
std::tuple< double, double, double > GetHitRanges(const CbmPixelHit &hit) const override
Gets x,y,t ranges of a CbmTrdHit.
int GetTrackingStationIndex(const FairMCPoint *point) const override
Gets a tracking station of a FairMCPoint.
CbmTrdTrackingInterface(CbmTrdTrackingInterface &&)=delete
Move constructor.