CbmRoot
Loading...
Searching...
No Matches
CbmMuchTrackingInterface.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 CbmMuchTrackingInterface.h
7 * @brief Input data and parameters interface from MuCh subsystem used in L1 tracker (declaration)
8 * @since 31.05.2022
9 * @author S.Zharko <s.zharko@gsi.de>
10 ***************************************************************************************************/
11
12#ifndef CbmMuchTrackingInterface_h
13#define CbmMuchTrackingInterface_h 1
14
15#include "CbmHit.h"
16#include "CbmMuchGeoScheme.h"
17#include "CbmMuchModuleGem.h"
18#include "CbmMuchPad.h"
19#include "CbmMuchStation.h"
21
22#include "FairTask.h"
23
24#include "TMath.h"
25#include "TString.h"
26
27#include <iostream>
28#include <vector>
29
30class CbmMuchLayer;
31
39public:
42
45
48
51
54
57
59 InitStatus Init() override;
60
62 InitStatus ReInit() override;
63
66
68 std::string GetDetectorName() const override { return "MuCh"; }
69
73 int GetTrackingStationIndex(const CbmHit* hit) const override { return GetTrackingStationIndex(hit->GetAddress()); }
74
78 int GetTrackingStationIndex(int address) const override
79 {
82 }
83
87 int GetTrackingStationIndex(const FairMCPoint* point) const override
88 {
89 return GetTrackingStationIndex(point->GetDetectorID());
90 }
91
95 bool IsTimeInfoProvided(int /*stationId*/) const override { return true; }
96
101 std::tuple<double, double> GetStereoAnglesSensor(int /*address*/) const override
102 {
103 return std::tuple(0., TMath::Pi() * 0.5);
104 }
105
107 void SetParContainers() override;
108
109 private:
113 __attribute__((always_inline)) CbmMuchLayer* GetMuchLayer(int traStationId) const
114 {
115 auto [muchSta, muchLayer] = ConvTrackingStationId2MuchId(traStationId);
116 return fGeoScheme->GetLayer(muchSta, muchLayer);
117 }
118
121 std::pair<int, int> ConvTrackingStationId2MuchId(int traStationId) const;
122
123 inline static CbmMuchTrackingInterface* fpInstance{nullptr};
124
126
127 std::vector<int> fFirstTrackingStation {};
128
130};
131
132
133#endif // CbmMuchTrackingInterface
Base abstract class for tracking detector interface to L1 (implementation of Checker)
int32_t GetAddress() const
Definition CbmHit.h:74
static Int_t GetStationIndex(Int_t address)
CbmMuchLayer * GetLayer(Int_t iStation, Int_t iLayer) const
static Int_t GetLayerIndex(Int_t address)
A CbmL1 subtask, which provides necessary methods for L1 tracker to access the geometry and dataflow ...
CbmMuchTrackingInterface & operator=(CbmMuchTrackingInterface &&)=delete
Move assignment operator.
static CbmMuchTrackingInterface * fpInstance
Instance of the class.
CbmMuchTrackingInterface(CbmMuchTrackingInterface &&)=delete
Move constructor.
int GetTrackingStationIndex(int address) const override
Gets a tracking station by the address of element.
CbmMuchGeoScheme * fGeoScheme
MuCh geometry scheme instance.
bool IsTimeInfoProvided(int) const override
Check if station provides time measurements.
ClassDefOverride(CbmMuchTrackingInterface, 0)
std::pair< int, int > ConvTrackingStationId2MuchId(int traStationId) const
Calculates MuCh station ID from tracker station ID.
InitStatus ReInit() override
FairTask: ReInit method.
CbmMuchTrackingInterface()
Default constructor.
CbmMuchTrackingInterface & operator=(const CbmMuchTrackingInterface &)=delete
Copy assignment operator.
CbmMuchTrackingInterface(const CbmMuchTrackingInterface &)=delete
Copy constructor.
static CbmMuchTrackingInterface * Instance()
Gets pointer to the instance of the CbmMuchTrackingInterface.
void SetParContainers() override
FairTask: sets parameter containers up.
std::tuple< double, double > GetStereoAnglesSensor(int) const override
Gets stereo angles of the two independent measured coordinates.
int GetTrackingStationIndex(const FairMCPoint *point) const override
Gets a tracking station of a FairMCPoint.
__attribute__((always_inline)) CbmMuchLayer *GetMuchLayer(int traStationId) const
Gets pointer to the TRD module.
InitStatus Init() override
FairTask: Init method.
int GetTrackingStationIndex(const CbmHit *hit) const override
Gets a tracking station of a CbmHit.
std::string GetDetectorName() const override
Gets name of this subsystem.
Abstract class, which should be inherited by every detecting subsystem tracking interface class.