80 std::vector<SmTypeInfo_t> smTypeRpcMap(
fDigiBdfPar->GetNbSmTypes());
82 for (uint16_t iSmType = 0; iSmType < smTypeRpcMap.size(); ++iSmType) {
83 auto& smt = smTypeRpcMap[iSmType];
86 nRpcTot += smt.nSm * smt.nRpc;
90 for (uint16_t iSmtThis = 0, iSmtNext = iSmtThis + 1; iSmtNext < smTypeRpcMap.size(); ++iSmtThis, ++iSmtNext) {
91 const auto smtThis{smTypeRpcMap[iSmtThis]};
92 smTypeRpcMap[iSmtNext].offset = smtThis.offset + smtThis.nSm * smtThis.nRpc;
97 std::vector<int> trkStationId;
98 trkStationId.reserve(nRpcTot);
99 for (uint16_t iSmType = 0; iSmType < smTypeRpcMap.size(); ++iSmType) {
100 const auto smt{smTypeRpcMap[iSmType]};
101 for (uint16_t iSm = 0; iSm < smt.nSm; ++iSm) {
102 for (uint16_t iRpc = 0; iRpc < smt.nRpc; ++iRpc) {
103 trkStationId.push_back(
fDigiBdfPar->GetTrackingStation(iSmType, iSm, iRpc));
115 int nStations =
fDigiBdfPar->GetNbTrackingStations();
116 if (nStations == 0) {
120 std::vector<algo::GeoVolume> fullVolumes(nStations);
121 std::vector<algo::GeoVolume> activeVolumes(nStations);
123 std::regex rpcPattern{
"module_(\\d+)_(\\d+)/gas_box_(\\d+)/counter_(\\d+)"};
125 for (
const auto& rpcPath : vRpcPaths) {
127 std::string line{rpcPath.Data()};
128 if (std::regex_search(line, match, rpcPattern)) {
129 int iSmType{std::stoi(match[1])};
130 int iSm{std::stoi(match[2])};
131 int iRpc{std::stoi(match[4])};
132 int iStation{
fDigiBdfPar->GetTrackingStation(iSmType, iSm, iRpc)};
135 fullVolumes[iStation] += rpcVol;
136 gGeoManager->cd(rpcPath);
138 gGeoManager->GetCurrentNode())};
139 if (vCellPaths.empty()) {
140 throw std::runtime_error(
"Could not find nodes containing \"Cell\" in their paths");
143 for (
const auto& cellPath : vCellPaths) {
150 return {std::move(fullVolumes), std::move(activeVolumes)};
static std::vector< TString > CollectNodes(const TString &detector, const std::regex &component, const TString &path, TGeoNode *pNode)
Collects paths of the components.