26 bool AuxDetStandardSortingRule
30 std::string type1 =
"", type2 =
"";
32 case 20 : type1 =
"MINOS";
break;
33 case 16 : type1 =
"CERN";
break;
34 case 64 : type1 =
"DC";
break;
37 case 20 : type2 =
"MINOS";
break;
38 case 16 : type2 =
"CERN";
break;
39 case 64 : type2 =
"DC";
break;
43 std::string ad1name = (ad1.
TotalVolume())->GetName();
44 std::string ad2name = (ad2.
TotalVolume())->GetName();
46 std::string base1 =
"volAuxDet_"+type1+
"_module_";
47 std::string base2 =
"volAuxDet_"+type2+
"_module_";
49 int ad1Num = std::atoi( ad1name.substr( base1.size(), 3).c_str() );
50 int ad2Num = std::atoi( ad2name.substr( base2.size(), 3).c_str() );
52 return ad1Num < ad2Num;
59 bool AuxDetSensitiveStandardSortingRule
62 std::string type1 =
"", type2 =
"";
65 std::string ad1name = (ad1.
TotalVolume())->GetName();
66 std::string ad2name = (ad2.
TotalVolume())->GetName();
68 if ( ad1name.find(
"MINOS") != std::string::npos ) type1 =
"MINOS";
69 if ( ad1name.find(
"CERN") != std::string::npos ) type1 =
"CERN";
70 if ( ad1name.find(
"DC") != std::string::npos ) type1 =
"DC";
71 if ( ad2name.find(
"MINOS") != std::string::npos ) type2 =
"MINOS";
72 if ( ad2name.find(
"CERN") != std::string::npos ) type2 =
"CERN";
73 if ( ad2name.find(
"DC") != std::string::npos ) type2 =
"DC";
76 std::string baseMod1 =
"volAuxDetSensitive_"+type1+
"module_";
77 std::string baseStr1 =
"volAuxDetSensitive_"+type1+
"module_###_strip_";
78 std::string baseMod2 =
"volAuxDetSensitive_"+type2+
"module_";
79 std::string baseStr2 =
"volAuxDetSensitive_"+type2+
"module_###_strip_";
81 int ad1Num = atoi( ad1name.substr( baseMod1.size(), 3).c_str() );
82 int ad2Num = atoi( ad2name.substr( baseMod2.size(), 3).c_str() );
84 if(ad1Num!=ad2Num)
return ad1Num < ad2Num;
86 ad1Num = std::atoi( ad1name.substr( baseStr1.size(), 2).c_str() );
87 ad2Num = std::atoi( ad2name.substr( baseStr2.size(), 2).c_str() );
90 return ad1Num < ad2Num;
102 std::sort(adgeo.begin(), adgeo.end(), AuxDetStandardSortingRule);
108 (std::vector<geo::AuxDetSensitiveGeo>& adsgeo)
110 std::sort(adsgeo.begin(), adsgeo.end(), AuxDetSensitiveStandardSortingRule);
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
Functions for sorting ICARUS CRT modules (auxiliary detectors).
void SortAuxDetsStandard(std::vector< geo::AuxDetGeo > &adgeo)
Sorts ICARUS CRT modules in standard configuration.
const TGeoVolume * TotalVolume() const
size_t NSensitiveVolume() const
Encapsulate the geometry of an auxiliary detector.
const TGeoVolume * TotalVolume() const
void SortAuxDetSensitiveStandard(std::vector< geo::AuxDetSensitiveGeo > &adsgeo)
Sorts ICARUS CRT submodules in standard configuration.