23 std::string ad1name = (ad1.
TotalVolume())->GetName();
24 std::string ad2name = (ad2.
TotalVolume())->GetName();
26 std::string modulePrefix =
"module_";
28 int ad1Num = atoi( ad1name.substr(ad1name.find(modulePrefix)+modulePrefix.length(),3).c_str() );
29 int ad2Num = atoi( ad2name.substr(ad2name.find(modulePrefix)+modulePrefix.length(), 3).c_str() );
31 return ad1Num < ad2Num;
40 std::string ad1name = (ad1.
TotalVolume())->GetName();
41 std::string ad2name = (ad2.
TotalVolume())->GetName();
43 std::string modulePrefix =
"module_";
44 std::string stripPrefix =
"strip_";
46 int ad1Num = atoi( ad1name.substr(ad1name.find(modulePrefix)+modulePrefix.length(), 3).c_str() );
47 int ad2Num = atoi( ad2name.substr(ad2name.find(modulePrefix)+modulePrefix.length(), 3).c_str() );
49 if(ad1Num!=ad2Num)
return ad1Num < ad2Num;
51 ad1Num = atoi( ad1name.substr(ad1name.find(stripPrefix)+stripPrefix.length(), 2).c_str() );
52 ad2Num = atoi( ad2name.substr(ad2name.find(stripPrefix)+stripPrefix.length(), 2).c_str() );
54 return ad1Num < ad2Num;
62 double xyz1[3] = {0.};
63 double xyz2[3] = {0.};
65 return xyz1[0] < xyz2[0];
69 double xyz1[3] = {0.};
70 double xyz2[3] = {0.};
72 return xyz1[1] > xyz2[1];
76 double xyz1[3] = {0.};
77 double xyz2[3] = {0.};
80 return xyz1[2] < xyz2[2];
88 std::pair<int , geo::AuxDetSensitiveGeo> ads2){
89 double xyz1[3] = {0.};
90 double xyz2[3] = {0.};
91 ads1.second.GetCenter(xyz1); ads2.second.GetCenter(xyz2);
92 return xyz1[0] < xyz2[0];
97 std::pair<int , geo::AuxDetSensitiveGeo> ads2){
98 double xyz1[3] = {0.};
99 double xyz2[3] = {0.};
100 ads1.second.GetCenter(xyz1); ads2.second.GetCenter(xyz2);
101 return xyz1[1] > xyz2[1];
105 std::pair<int , geo::AuxDetSensitiveGeo> ads2){
106 double xyz1[3] = {0.};
107 double xyz2[3] = {0.};
109 ads1.second.GetCenter(xyz1); ads2.second.GetCenter(xyz2);
110 return xyz1[2] < xyz2[2];
116 fhicl::ParameterSet
const&) {}
135 std::stable_sort (adgeo.begin(), adgeo.end(),
CRTIncreaseX);
139 std::stable_sort (adgeo.begin(), adgeo.end(),
CRTIncreaseZ);
142 std::stable_sort (adgeo.begin(), adgeo.end(),
CRTDecreaseY);
void SortCRTSensitive(std::vector< std::pair< int, geo::AuxDetSensitiveGeo > > &adsgeo) const
static bool sortAuxDetICARUS(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
void SortAuxDets(std::vector< geo::AuxDetGeo > &adgeo) const
static bool CRTIncreaseX(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void SortCRTs(std::vector< geo::AuxDetGeo > &adgeo) const
const TGeoVolume * TotalVolume() const
Encapsulate the geometry of an auxiliary detector.
const TGeoVolume * TotalVolume() const
static bool CRTIncreaseZ(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
static bool CRTSensitiveIncreaseX(std::pair< int, geo::AuxDetSensitiveGeo > ads1, std::pair< int, geo::AuxDetSensitiveGeo > ads2)
static bool CRTSensitiveIncreaseZ(std::pair< int, geo::AuxDetSensitiveGeo > ads1, std::pair< int, geo::AuxDetSensitiveGeo > ads2)
CRTGeoObjectSorter(fhicl::ParameterSet const &p)
static bool sortAuxDetSensitiveICARUS(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
void SortAuxDetSensitive(std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const
void GetCenter(double *xyz, double localz=0.0) const
Return the center position of an AuxDet.
static bool CRTSensitiveDecreaseY(std::pair< int, geo::AuxDetSensitiveGeo > ads1, std::pair< int, geo::AuxDetSensitiveGeo > ads2)
static bool CRTDecreaseY(const AuxDetGeo &ad1, const AuxDetGeo &ad2)