14 NamespaceImp(DetectorID)
namespace DetectorID {
15 UInt_t GetDetectorID(TString pattern) {
16 if (pattern.Length() > 6)
return 0;
17 TString newPattern = pattern;
18 for (
int i = pattern.Length(); i < 6; i++) {
19 newPattern =
"0" + newPattern;
21 ULong_t detectorID = 0;
22 for (
int i = 0; i < newPattern.Length(); i++) {
23 Char_t x = newPattern[i];
32 UInt_t power = (UInt_t) TMath::Power(36, 5 - i);
33 detectorID = detectorID + base * power;