CbmRoot
Loading...
Searching...
No Matches
CbmTrackingDetectorInterfaceInit.cxx
Go to the documentation of this file.
1/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov, Sergei Zharko [committer] */
4
5/***************************************************************************************************
6 * @file CbmTrackingDetectorInterfaceInit.cxx
7 * @brief FairTask for the tracker detector interfaces initialization (implementation)
8 * @since 31.05.2022
9 * @author S.Zharko <s.zharko@gsi.de>
10 ***************************************************************************************************/
11
13
16#include "CbmSetup.h"
20
22
24
25// ---------------------------------------------------------------------------------------------------------------------
26//
27CbmTrackingDetectorInterfaceInit::CbmTrackingDetectorInterfaceInit() : FairTask("CbmTrackingDetectorInterfaceInit")
28{
29 if (!fpInstance) {
30 fpInstance = this;
31
32 // Check presence of the desired detectors
38
39 // Invoke the detector interfaces
40 if (fbUseMvd) {
41 fpMvdTrackingInterface = new CbmMvdTrackingInterface();
42 }
43 if (fbUseSts) {
44 fpStsTrackingInterface = new CbmStsTrackingInterface();
45 }
46 if (fbUseMuch) {
47 fpMuchTrackingInterface = new CbmMuchTrackingInterface();
48 }
49 if (fbUseTrd) {
50 fpTrdTrackingInterface = new CbmTrdTrackingInterface();
51 }
52 if (fbUseTof) {
53 fpTofTrackingInterface = new CbmTofTrackingInterface();
54 }
55
56 // Add subtasks - tracker detector interfaces
57 if (fbUseMvd) {
58 this->Add(fpMvdTrackingInterface);
59 }
60 if (fbUseSts) {
61 this->Add(fpStsTrackingInterface);
62 }
63 if (fbUseMuch) {
64 this->Add(fpMuchTrackingInterface);
65 }
66 if (fbUseTrd) {
67 this->Add(fpTrdTrackingInterface);
68 }
69 if (fbUseTof) {
70 this->Add(fpTofTrackingInterface);
71 }
72 }
73}
74
75// ---------------------------------------------------------------------------------------------------------------------
76//
83
84// ---------------------------------------------------------------------------------------------------------------------
85//
86std::vector<const CbmTrackingDetectorInterfaceBase*> CbmTrackingDetectorInterfaceInit::GetActiveInterfaces() const
87{
88 std::vector<const CbmTrackingDetectorInterfaceBase*> vRes;
89 for (const TObject* pTask : *(this->GetListOfTasks())) {
90 vRes.push_back(dynamic_cast<const CbmTrackingDetectorInterfaceBase*>(pTask));
91 }
92 return vRes;
93}
ClassImp(CbmConverterManager)
@ kMvd
Micro-Vertex Detector.
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
bool Add(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
A CbmL1 subtask, which provides necessary methods for L1 tracker to access the geometry and dataflow ...
CbmMvdTrackingInterface.
Bool_t IsActive(ECbmModuleId moduleId)
Definition CbmSetup.cxx:169
static CbmSetup * Instance()
Definition CbmSetup.cxx:160
A CbmL1 subtask, which provides necessary methods for CA tracker to access the geometry and dataflow ...
Abstract class, which should be inherited by every detecting subsystem tracking interface class.
static CbmTrackingDetectorInterfaceInit * fpInstance
Instance of the class.
std::vector< const CbmTrackingDetectorInterfaceBase * > GetActiveInterfaces() const
Returns a vector of pointers to the tracking detector interfaces, included into the setup.
CbmTrackingDetectorInterfaceInit()
Default constructor (only sts and mvd will be initialized)
A CbmL1 subtask, which provides necessary methods for CA tracker to access the geometry and dataflow ...