19 #include <string_view> 25 template <
typename Dest,
typename Src>
26 Dest& extendCollection(Dest&
dest, Src&& src) {
27 std::move(src.begin(), src.end(), std::back_inserter(dest));
40 : fMaxDepth(config.maxDepth())
41 , fOpDetGeoName(config.opDetGeoName())
207 using namespace std::literals;
214 (TGeoNode
const& node)
const 216 return std::string_view(node.GetName()).find(
"Sensitive")
217 != std::string_view::npos;
223 using namespace std::literals;
224 return starts_with(node.GetName(),
"volCryostat"sv);
237 using namespace std::literals;
244 using namespace std::literals;
245 return starts_with(node.GetName(),
"volTPCPlane"sv);
251 using namespace std::literals;
252 return starts_with(node.GetName(),
"volTPCWire"sv);
272 if ((this->*IsObj)(path.
current())) {
273 objs.push_back((this->*MakeObj)(path));
283 int const n = volume.GetNdaughters();
284 for (
int i = 0; i <
n; ++i) {
285 path.
append(*(volume.GetNode(i)));
286 extendCollection(objs, doExtractGeometryObjects<ObjGeo, IsObj, MakeObj>(path));
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
virtual OpDets_t doExtractOpDets(Path_t &path)
TPCs_t extractTPCs(Path_t &path)
Looks for all TPCs under the specified path.
Planes_t extractPlanes(Path_t &path)
Looks for all wire planes under the specified path.
virtual geo::PlaneGeo doMakePlane(Path_t &path)
Core implementation of makePlanes().
virtual geo::AuxDetSensitiveGeo doMakeAuxDetSensitive(Path_t &path)
Core implementation of makeAuxDetSensitive().
virtual geo::TPCGeo doMakeTPC(Path_t &path)
Core implementation of makeTPC().
geo::TPCGeo makeTPC(Path_t &path)
Constructs a geo::TPCGeo from the current node of the path.
GeometryBuilderStandard(Config const &config)
GeoColl_t< geo::AuxDetSensitiveGeo > AuxDetSensitive_t
Geometry information for a single TPC.
bool isCryostatNode(TGeoNode const &node) const
Returns whether the specified node is recognised as a cryostat.
static const std::string volume[nvol]
GeoColl_t< geo::TPCGeo > TPCs_t
virtual geo::CryostatGeo doMakeCryostat(Path_t &path)
Core implementation of extractAuxDetSensitive().
virtual AuxDetSensitive_t doExtractAuxDetSensitive(Path_t &path)
Geometry information for a single cryostat.
void append(Node_t const &node)
Adds a node to the current path.
virtual geo::AuxDetGeo doMakeAuxDet(Path_t &path)
Core implementation of extractAuxiliaryDetectors().
GeoColl_t< geo::AuxDetGeo > AuxDets_t
Collection of auxiliary detector information objects.
OpDets_t extractOpDets(Path_t &path)
Looks for all optical detectors under the specified path.
virtual Cryostats_t doExtractCryostats(Path_t &path) override
GeoColl_t< ObjGeo > doExtractGeometryObjects(Path_t &path)
Boilerplate implementation of doExtractXxxx() methods.
virtual AuxDets_t doExtractAuxiliaryDetectors(Path_t &path) override
bool isTPCNode(TGeoNode const &node) const
Returns whether the specified node is recognised as a TPC.
GeoColl_t< geo::WireGeo > Wires_t
void pop()
Removes the current node from the path, moving the current one up.
bool isOpDetNode(TGeoNode const &node) const
Returns whether the specified node is recognised as a optical detector.
std::string fOpDetGeoName
Name of the optical detector nodes.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
virtual TPCs_t doExtractTPCs(Path_t &path)
Configuration parameters.
GeoColl_t< geo::CryostatGeo > Cryostats_t
Collection of cryostat information objects.
bool isWireNode(TGeoNode const &node) const
Returns whether the specified node is recognised as a wire.
Path_t::Depth_t fMaxDepth
Maximum level to descend into in the path.
Matrix currentTransformation() const
Returns the total transformation to the current node, as a Matrix.
virtual geo::OpDetGeo doMakeOpDet(Path_t &path)
Core implementation of makeOpDet().
GeoColl_t< geo::PlaneGeo > Planes_t
GeoColl_t< geo::OpDetGeo > OpDets_t
Standard implementation of geometry extractor.
Wires_t extractWires(Path_t &path)
Looks for all wires under the specified path.
bool isPlaneNode(TGeoNode const &node) const
Returns whether the specified node is recognised as a wire plane.
bool isAuxDetSensitiveNode(TGeoNode const &node) const
AuxDetSensitive_t extractAuxDetSensitive(Path_t &path)
Looks for all auxiliary detectors under the specified path.
virtual Wires_t doExtractWires(Path_t &path)
geo::OpDetGeo makeOpDet(Path_t &path)
Constructs a geo::OpDetGeo from the current node of the path.
Representation of a node and its ancestry.
Node_t const & current() const
Returns the current node. Undefined if the path is empty.
geo::PlaneGeo makePlane(Path_t &path)
Constructs a geo::PlaneGeo from the current node of the path.
virtual Planes_t doExtractPlanes(Path_t &path)
Extracts of LArSoft geometry information from ROOT.
Depth_t depth() const
Returns the depth of the path (elements including up to the current).
ROOT::Math::Transform3D TransformationMatrix
Type of transformation matrix used in geometry.
std::vector< GeoObj > GeoColl_t
Type of direct collection of geometry objects.
geo::CryostatGeo makeCryostat(Path_t &path)
Constructs a geo::CryostatGeo from the current node of the path.
virtual geo::WireGeo doMakeWire(Path_t &path)
Core implementation of makeWire().
static bool starts_with(std::string_view const &s, std::string_view const &key)
bool isAuxDetNode(TGeoNode const &node) const
geo::WireGeo makeWire(Path_t &path)
Constructs a geo::WireGeo from the current node of the path.
geo::AuxDetSensitiveGeo makeAuxDetSensitive(Path_t &path)