|
CbmRoot
|
#include "CbmEnumDict.h"#include <iosfwd>#include <string>#include <type_traits>#include <xpu/defines.h>Go to the source code of this file.
Namespaces | |
| namespace | cbm |
| namespace | cbm::algo |
| namespace | cbm::algo::ca |
| TODO: SZh 8.11.2022: add selection of parameterisation. | |
Enumerations | |
| enum class | ECbmModuleId { kRef = 0 , kMvd = 1 , kSts = 2 , kRich = 3 , kMuch = 4 , kTrd = 5 , kTof = 6 , kMust = 7 , kPsd = 8 , kHodo = 9 , kDummyDet = 10 , kBmon = 11 , kTrd2d = 12 , kFsd = 13 , kNofSystems = 14 , kMagnet = 17 , kTarget = 18 , kPipe = 19 , kShield = 20 , kPlatform = 21 , kCave = 22 , kLastModule = 23 , kNotExist = -1 } |
| Enumerator for module Identifiers. More... | |
| enum class | ECbmDataType { kUnknown = -1 , kMCTrack = 0 , kMvdPoint = ToIntegralType(ECbmModuleId::kMvd) * 100 , kMvdDigi , kMvdCluster , kMvdHit , kStsPoint = ToIntegralType(ECbmModuleId::kSts) * 100 , kStsDigi , kStsCluster , kStsHit , kStsTrack , kRichPoint = ToIntegralType(ECbmModuleId::kRich) * 100 , kRichDigi , kRichHit , kRichRing , kRichTrackParamZ , kRichTrackProjection , kMuchPoint = ToIntegralType(ECbmModuleId::kMuch) * 100 , kMuchDigi , kMuchCluster , kMuchPixelHit , kMuchStrawHit , kMuchTrack , kMustPoint = ToIntegralType(ECbmModuleId::kMust) * 100 , kMustDigi , kMustCluster , kMustPixelHit , kMustStrawHit , kMustTrack , kTrdPoint = ToIntegralType(ECbmModuleId::kTrd) * 100 , kTrdDigi , kTrdCluster , kTrdHit , kTrdTrack , kTofPoint = ToIntegralType(ECbmModuleId::kTof) * 100 , kTofDigi , kTofCalDigi , kTofHit , kTofTrack , kTofUHit , kTofTracklet , kPsdPoint = ToIntegralType(ECbmModuleId::kPsd) * 100 , kPsdDigi , kPsdHit , kBmonPoint = ToIntegralType(ECbmModuleId::kBmon) * 100 , kBmonDigi , kBmonCalDigi , kBmonHit , kFsdPoint = ToIntegralType(ECbmModuleId::kFsd) * 100 , kFsdDigi , kFsdHit , kGlobalTrack = 2000 } |
| Enumerator for CBM data types. More... | |
| enum class | ECbmTreeAccess { kRegular , kRepeat , kRandom } |
| enum class | ECbmRecoMode { Timeslice , EventByEvent , Undefined } |
| Reconstruct the full time slice or event-by-event. More... | |
| enum class | cbm::algo::ca::EDetectorID { cbm::algo::ca::kMvd = 0 , cbm::algo::ca::kSts , cbm::algo::ca::kMuch , cbm::algo::ca::kTrd , cbm::algo::ca::kTof , cbm::algo::ca::END } |
| Enumeration for the tracking detector subsystems in CBM-CA. More... | |
Functions | |
| template<typename T> | |
| XPU_D constexpr auto | ToIntegralType (T enumerator) -> typename std::underlying_type< T >::type |
| Converts an element of enum class to its underlying integral type. | |
| CBM_ENUM_DICT (ECbmModuleId, {"Ref", ECbmModuleId::kRef}, {"Mvd", ECbmModuleId::kMvd}, {"Sts", ECbmModuleId::kSts}, {"Rich", ECbmModuleId::kRich}, {"Much", ECbmModuleId::kMuch}, {"Trd", ECbmModuleId::kTrd}, {"Tof", ECbmModuleId::kTof}, {"Must", ECbmModuleId::kMust}, {"Psd", ECbmModuleId::kPsd}, {"Hodo", ECbmModuleId::kHodo}, {"DummyDet", ECbmModuleId::kDummyDet}, {"Bmon", ECbmModuleId::kBmon}, {"Trd2d", ECbmModuleId::kTrd2d}, {"Fsd", ECbmModuleId::kFsd}, {"NofSystems", ECbmModuleId::kNofSystems}, {"Magnet", ECbmModuleId::kMagnet}, {"Target", ECbmModuleId::kTarget}, {"Pipe", ECbmModuleId::kPipe}, {"Shield", ECbmModuleId::kShield}, {"Platform", ECbmModuleId::kPlatform}, {"Cave", ECbmModuleId::kCave}, {"LastModule", ECbmModuleId::kLastModule}, {"NotExist", ECbmModuleId::kNotExist}) | |
| A dictionary for ECbmModuleId. | |
| ECbmModuleId & | operator++ (ECbmModuleId &) |
| operator ++ for ECbmModuleId for convenient usage in loops | |
| std::ostream & | operator<< (std::ostream &, const ECbmDataType &) |
| operator << for convenient output to std::ostream. | |
| constexpr ECbmModuleId | cbm::algo::ca::ToCbmModuleId (EDetectorID detID) |
| Conversion map from EDetectorID to ECbmModuleId. | |
| constexpr EDetectorID | cbm::algo::ca::ToCaDetectorID (ECbmModuleId modId) |
| Conversion map from EDetectorID to ECbmModuleId. | |
| double | CbmProtonMass () |
| double | CbmNeutronMass () |
| double | CbmElectronMass () |
|
strong |
Enumerator for CBM data types.
|
strong |
Enumerator for module Identifiers.
Modules can be active (detector systems) or passive (magnet, beam pipe, target etc.) In order to loop over all detectors, loop until kNofSystems.
|
strong |
|
strong |
| CBM_ENUM_DICT | ( | ECbmModuleId | , |
| {"Ref", ECbmModuleId::kRef} | , | ||
| {"Mvd", ECbmModuleId::kMvd} | , | ||
| {"Sts", ECbmModuleId::kSts} | , | ||
| {"Rich", ECbmModuleId::kRich} | , | ||
| {"Much", ECbmModuleId::kMuch} | , | ||
| {"Trd", ECbmModuleId::kTrd} | , | ||
| {"Tof", ECbmModuleId::kTof} | , | ||
| {"Must", ECbmModuleId::kMust} | , | ||
| {"Psd", ECbmModuleId::kPsd} | , | ||
| {"Hodo", ECbmModuleId::kHodo} | , | ||
| {"DummyDet", ECbmModuleId::kDummyDet} | , | ||
| {"Bmon", ECbmModuleId::kBmon} | , | ||
| {"Trd2d", ECbmModuleId::kTrd2d} | , | ||
| {"Fsd", ECbmModuleId::kFsd} | , | ||
| {"NofSystems", ECbmModuleId::kNofSystems} | , | ||
| {"Magnet", ECbmModuleId::kMagnet} | , | ||
| {"Target", ECbmModuleId::kTarget} | , | ||
| {"Pipe", ECbmModuleId::kPipe} | , | ||
| {"Shield", ECbmModuleId::kShield} | , | ||
| {"Platform", ECbmModuleId::kPlatform} | , | ||
| {"Cave", ECbmModuleId::kCave} | , | ||
| {"LastModule", ECbmModuleId::kLastModule} | , | ||
| {"NotExist", ECbmModuleId::kNotExist} | ) |
A dictionary for ECbmModuleId.
The dictionary provides streaming operators, conversion into std::string and back and a rule for automatic parsing of yaml configuration files.
References kRef.
|
inline |
Global functions for particle masses
Definition at line 259 of file CbmDefs.h.
Referenced by CbmMCTrack::GetMass(), and TEST().
| ECbmModuleId & operator++ | ( | ECbmModuleId & | e | ) |
operator ++ for ECbmModuleId for convenient usage in loops
This operator is tuned for ECbmModuleID. It takes into account non continuous values for the enum. Since the detectorID which is stored in the generated output has only 4 bit the maximum number of detectors can be 16 (0-15). To avoid that the enum class has to be changed again the values 11-15 are reserved for future detectors. The ids of the passive modules are only relevant at run time so they can be shifted easily The opeartor takes care about the non continuous values for the enum When it reaches the last detector it automatically continuous with the first passive module
Definition at line 24 of file CbmDefs.cxx.
References kLastModule, kMagnet, and kNofSystems.
| std::ostream & operator<< | ( | std::ostream & | strm, |
| const ECbmDataType & | dataType ) |
operator << for convenient output to std::ostream.
Converts the enum value to a string which is put in the stream
Definition at line 40 of file CbmDefs.cxx.
References ToIntegralType().
|
constexpr |
Converts an element of enum class to its underlying integral type.
Starting with C++11, the return type cannot be deduced automatically, so it has to be put explicitly; constexpr should result in a compile time evaluation of the function call where possible. E.g. ToIntegralType(ECbmModuleId::KSts) should be evaluated at compile time and should not affect the run time performance at all
Definition at line 33 of file CbmDefs.h.
Referenced by CbmLitFindGlobalTracks::CalculateLength(), CbmFsdMC::CbmFsdMC(), CbmMustPoint::CbmMustPoint(), CbmMvd::CbmMvd(), CbmMvd::CbmMvd(), CbmPsdMC::CbmPsdMC(), CbmRich::CbmRich(), CbmRich::CbmRich(), CbmStsMC::CbmStsMC(), CbmStsPoint::CbmStsPoint(), CbmStsSetup::CbmStsSetup(), CbmTof::CbmTof(), CbmTof::CbmTof(), CbmTofDetectorInfo::CbmTofDetectorInfo(), CbmTofDetectorInfo::CbmTofDetectorInfo(), CbmTrd::CbmTrd(), CbmTrd::CbmTrd(), comparePsdAddressDataMembers(), CbmBmonDigitize::Exec(), PairAnalysisCutQa::Fill(), PairAnalysisCutQa::FillAll(), PairAnalysisVarManager::FillVarMuchTrack(), PairAnalysisVarManager::FillVarPairAnalysisTrack(), CbmFsdAddress::GetAddress(), CbmMuchAddress::GetAddress(), CbmMuchAddress::GetAddress(), CbmMustAddress::GetAddress(), CbmMustAddress::GetAddress(), CbmMvdAddress::GetAddress(), CbmMvdAddress::GetAddress(), CbmPsdAddress::GetAddress(), CbmRichAddress::GetAddress(), CbmStsAddress::GetAddress(), CbmStsAddress::GetAddress(), CbmTrdAddress::GetAddress(), CbmMvdAddress::GetAddressFromSensorNrAndPixelXY(), CbmTofAddress::GetUniqueAddress(), PairAnalysisEvent::Init(), operator<<(), PairAnalysisTrack::PairAnalysisTrack(), CbmRecoSts::ProcessData(), CbmRecoStsPixel::ProcessData(), TEST(), TEST(), and CbmStsAddress::UnpackDigiAddress().