5#include "BmnGeoTemplate.h"
22 SetName(
"BmnNdetGeo");
41 static std::pair<BoxFace, Direction>
GetEnteredFace(
const TVector3& globalPos,
const TVector3& globalMom);
50 LOG(debug4) << GetName() <<
": address from path " << spath;
52 if (std::regex_search(spath,
m, kNdetRegex) &&
m.size() == 5) {
53 int det = std::stoi(
m[1]);
54 int row = std::stoi(
m[2]);
55 int col = std::stoi(
m[3]);
56 int layer = std::stoi(
m[4]);
60 LOG(error) << GetName() <<
": no address for " << spath;
66 LOG(debug4) << GetName() <<
": address from path " << spath;
68 if (std::regex_search(spath,
m, kArmRegex) &&
m.size() == 2) {
69 return static_cast<uint32_t
>(std::stoi(
m[1].str()));
72 LOG(error) << GetName() <<
": no address for " << spath;
static uint32_t GetAddress(uint32_t ArmId, uint32_t RowId, uint32_t ColumnId, uint32_t LayerId)
Return address.
static const TString fDetectorVolumeName
static const TString fPathBeforeLocalSystem
static const std::regex fArmPattern
static bool CheckIfSensitive(std::string name)
static const std::regex fElementPattern
static const TString fTopVolumeName
uint8_t GetArmFromPath(const std::string &spath) const
static bool CheckIfSensitive(const std::string &vol)
static const char * PathBeforeLocalSystem()
static std::pair< BoxFace, Direction > GetEnteredFace(const TVector3 &globalPos, const TVector3 &globalMom)
static const char * TopVolumeName()
uint32_t GetAddressFromPath(const std::string &spath) const
static const char * DetectorVolumeName()