Software for Liquid Argon time projection chambers
Detailed information is available on the Geometry Package and at important concepts
geo::PlaneID
, that also includes information about the cryostat and TPC the plane belongs to, rather than the simple plane index in the TPC; complete ID types are defined in SimpleTypesAndConstants/geo_types.h
in larcore
geo::GeometryCore::Nplanes(geo::TPCID const&)
to geo::GeometryCore::Nplanes()
, as the latter will use a very specific TPC, and the choice of which one is beyond your controlgeo::GeometryCore
; some more advanced iterations haven’t been implemented yet simply for lack of request, but they can be implemented on demand (e.g. iterate on all the wires in a given TPC)geo::PlaneID::PlaneID_t
), std::vector<DataClass>
, may be replaced by a std::map<geo::PlaneID, DataClass>
geo::TPCID
together with the vector, so that reconstituting the original ID is easygeo::GeometryCore
for geometry information; e.g.,
geo::GeometryCore::Nplanes(tpcid)
to find how manygeo::TPCGeo
(using e.g. geo::TPCGeo::MinX()
, geo::TPCGeo::MaxX()
, etc.) rather than compute it yourselfGeometryCore
can be extended to do them for you)GeometryCore
insteadSome of the steps you should consider to review your (or others’) code:
geo::Geometry
service; among other things, look for:
Geometry
when you expect it would: it might have geometry information cached, and in that case one should verify that they are cached correctly, or there might be assumptionsgeo::GeometryCore::NearestWireID()
without checking if the returned ID .isValid
)try
/@catch@ blocks to make sure errors are correctly dealt with as well; if some code ignores an exception, it must explain why!geo::GeometryCore::DetectorName()
automatically triggers a red alert, as it implies detector dependencyTimeService
and DetectorProperties
servicesEvery time you find you need to check, consider also adding a comment that explains why the core is correct as is.