36 std::vector<geo::AuxDetGeo>& adgeo = geodata.auxDets;
37 std::vector<geo::AuxDetGeo*> adgeo_copy;
38 for (
size_t i=0; i<adgeo.size(); i++) adgeo_copy.push_back(&adgeo[i]);
99 for (
size_t a=0;
a<adgeo.size();
a++){
101 std::string volName(adgeo[
a].TotalVolume()->GetName());
106 std::vector<std::pair<int, geo::AuxDetSensitiveGeo> > adslist;
109 size_t nsv = adgeo[
a].NSensitiveVolume();
112 for(
int isv = 0; isv < (int)nsv; isv++ ){
113 adslist.push_back(std::make_pair(isv,adgeo[
a].SensitiveVolume(isv)));
127 if (nsv != 20 && nsv !=16 && nsv != 64) {
128 throw cet::exception(
"CRTChannelMap")
129 <<
"Wrong number of sensitive volumes for CRT volume "
130 << volName <<
" (got " << nsv <<
", expected 20, 16 or 64)" << std::endl;
140 std::string str = volName;
144 for ( ; i < str.length(); i++ ){
if ( std::isdigit(str[i]) )
break; }
147 str = str.substr(i, str.length() - i );
150 int id = std::atoi(str.c_str());
156 if (volName.find(
"volAuxDet_") != std::string::npos) {
162 for (
size_t svID=0; svID<16; svID++) {
165 for (
size_t ich=0; ich<2; ich++) {
175 for (
size_t svID=0; svID<64; svID++) {
185 for (
size_t svID=0; svID<20; svID+=2) {
193 if (adslist[svID].
second.Length() == 800){
214 std::cout <<
" " <<
a <<
" \t" << volName <<
"\t "<<
id <<
" \t" << chID << std::endl;
217 throw cet::exception(
"CRTChannelMap")
218 <<
"Unrecognized volume found: " << volName << std::endl;
std::map< std::string, size_t > fNameToADGeo
map the names to the AuxDetGeo index
void SortCRTSensitive(std::vector< std::pair< int, geo::AuxDetSensitiveGeo > > &adsgeo) const
std::map< size_t, std::vector< chanAndSV > > fADGeoToChannelAndSV
void SortCRTs(std::vector< geo::AuxDetGeo > &adgeo) const
geo::CRTGeoObjectSorter fSorter
Class to sort geo objects.
std::map< size_t, std::string > fADGeoToName
map the AuxDetGeo index to the name
BEGIN_PROLOG could also be cout
void Uninitialize() override