Introducing IDs for photon detector geometry
I would like to request standardized IDs for OpChannels and OpDets
analogous to what the TPC geometry elements have (WireID, ChannelID, etc.).
It would be nice to standardize everything else in the optical detector code as well
(use ADC_counts, ticks, and so on everywhere instead of shorts, unsigned ints, etc.),
but that is probably a separate issue.
#4 Updated by Gianluca Petrillo about 4 years ago
The hierarchy of IDs for TPC geometry is in larcoreobj:source:larcoreobj/SimpleTypesAndConstants/geo_types.h:
geo::WireID is the most derived object, that encapsulates the others.
geo::CryostatID is basically an integer.
The presence of the boolean
isValid is something I would not recommend, since it wastes bytes, it is almost never set by users and if it were really needed it could be implemented as a member function
valid() checking against a magic value of the ID (e.g.
std::numeric_limits<unsigned short int>::max(). Using
unsigned short instead of
int is not a bad idea either, since the total structure made of two IDs would well fit in 4 bytes.