CbmRoot
Loading...
Searching...
No Matches
CbmLitDetectorSetup.h
Go to the documentation of this file.
1/* Copyright (C) 2012-2017 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
11#ifndef CBMLITDETECTORSETUP_H_
12#define CBMLITDETECTORSETUP_H_
13
14#include "CbmDefs.h"
15
16#include <map>
17#include <string>
18using std::map;
19using std::string;
20
28 public:
33
37 virtual ~CbmLitDetectorSetup();
38
44 void SetDet(ECbmModuleId detId, bool isDet);
45
51 bool GetDet(ECbmModuleId detId) const;
52
57 void SetElectronSetup(bool isElectronSetup) { fIsElectronSetup = isElectronSetup; }
58
63 bool GetElectronSetup() const { return fIsElectronSetup; }
64
69 void SetMuonSetup(bool isMuonSetup) { fIsMuonSetup = isMuonSetup; }
70
75 bool GetMuonSetup() const { return fIsMuonSetup; }
76
80 void DetermineSetup();
81
86 string ToString() const;
87
88 private:
94 bool CheckDetectorPresence(const std::string& name) const;
95
96 bool fIsElectronSetup; // If "electron" setup detected than true
97 bool fIsMuonSetup; // If "muon" setup detected than true
98 map<ECbmModuleId, bool> fDet; // Map DetectorId to detector presence
99};
100
101#endif /* CBMLITDETECTORSETUP_H_ */
ECbmModuleId
Definition CbmDefs.h:39
Helper class to access detector presence.
bool CheckDetectorPresence(const std::string &name) const
Check detector presence using TGeoManager.
void SetElectronSetup(bool isElectronSetup)
Set electron setup of detector.
void SetDet(ECbmModuleId detId, bool isDet)
Set detector presence manually.
void DetermineSetup()
Determines detector presence using TGeoManager.
bool GetElectronSetup() const
Return true if electron setup is detected.
map< ECbmModuleId, bool > fDet
string ToString() const
Return string representation of class.
virtual ~CbmLitDetectorSetup()
Destructor.
bool GetMuonSetup() const
Return true if muon setup is detected.
CbmLitDetectorSetup()
Constructor.
void SetMuonSetup(bool isMuonSetup)
Set muon setup of detector.
bool GetDet(ECbmModuleId detId) const
Return detector presence in setup.