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())
49 return doExtractGeometryObjects<
64 extractAuxDetSensitive(path)
73 return doExtractGeometryObjects<
95 return doExtractGeometryObjects<
120 return doExtractGeometryObjects<
140 return doExtractGeometryObjects<
163 return doExtractGeometryObjects<
186 return doExtractGeometryObjects<
207 using namespace std::literals;
208 return starts_with(node.GetName(),
"volAuxDet"sv);
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);
230 return starts_with(node.GetName(), fOpDetGeoName);
237 using namespace std::literals;
238 return starts_with(node.GetName(),
"volTPC"sv);
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));
280 if (path.
depth() >= fMaxDepth)
return objs;
282 TGeoVolume
const& volume = *(path.
current().GetVolume());
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)
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.
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.
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics 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.
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.
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.
bool isPlaneNode(TGeoNode const &node) const
Returns whether the specified node is recognised as a wire plane.
bool isAuxDetSensitiveNode(TGeoNode const &node) const
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().
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)