20 #include "cetlib_except/exception.h" 25 #include "TGeoManager.h" 40 std::unique_ptr<AuxDetGeoObjectSorter> sorter,
41 std::unique_ptr<AuxDetInitializer> initializer)
42 : fSorter{std::move(sorter)}
45 pset.get<std::string>(
"GDML"))}
51 return std::tolower(c);
61 fReadoutGeom = std::make_unique<AuxDetReadoutGeom>(std::move(initializers));
69 throw cet::exception(
"AuxDetGeometryCore") <<
"No GDML Geometry file specified!\n";
81 TGeoManager::LockDefaultUnits(
false);
82 TGeoManager::SetDefaultUnits(TGeoManager::kRootUnits);
83 TGeoManager::LockDefaultUnits(
true);
85 gGeoManager->LockGeometry();
112 throw cet::exception(
"AuxDetGeometryCore") <<
"AuxDet " << ad <<
" does not exist\n";
122 <<
"Requested AuxDet index " << aid <<
" is out of range: " <<
NAuxDets();
124 return fAuxDets[aid].NSensitiveVolume();
135 double tolerance)
const 144 double tolerance)
const 152 uint32_t
const channel)
const 159 std::string
const& auxDetName,
160 uint32_t
const channel)
const 162 auto idx =
fReadoutGeom->ChannelToSensitiveAuxDet(auxDetName, channel);
AuxDetGeo const & AuxDet(std::size_t const ad=0) const
Returns the specified auxiliary detector.
std::size_t FindAuxDetAtPosition(Point_t const &point, double tolerance=0) const
Returns the index of the auxiliary detector at specified location.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
std::string fDetectorName
std::size_t NAuxDetSensitive(size_t ad) const
Returns the number of sensitive components of auxiliary detector.
Interface for geometry extractor classes.
Class representing a path in ROOT geometry.
Point_t AuxDetChannelToPosition(std::string const &auxDetName, uint32_t channel) const
std::size_t NAuxDets() const
Returns the number of auxiliary detectors.
std::unique_ptr< AuxDetReadoutGeom const > fReadoutGeom
Object containing the channel to wire mapping.
Access the description of auxiliary detector geometry.
std::string searchPathPlusRelative(std::string relativePath, std::string fileName)
AuxDets_t extractAuxiliaryDetectors(Path_t path) const
Looks for all auxiliary detectors under the specified path.
std::unique_ptr< AuxDetGeoObjectSorter > fSorter
fhicl::ParameterSet fBuilderParameters
Configuration of geometry builder.
Encapsulate the geometry of an auxiliary detector.
void FindAuxDetSensitiveAtPosition(Point_t const &point, std::size_t &adg, std::size_t &sv, double tolerance=0) const
Fills the indices of the sensitive auxiliary detector at location.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
std::string maybe_default_detector_name(fhicl::ParameterSet const &pset, std::string const &filename)
std::vector< AuxDetGeo > fAuxDets
AuxDetGeometryCore(fhicl::ParameterSet const &pset, std::unique_ptr< AuxDetGeoObjectSorter > sorter=nullptr, std::unique_ptr< AuxDetInitializer > initializer=nullptr)
Initialize geometry from a given configuration.
std::string fGDMLfile
path to geometry file used for Geant4 simulation
AuxDetGeo const & PositionToAuxDet(Point_t const &point, double tolerance=0.) const
Returns the auxiliary detector at specified location.
Representation of a node and its ancestry.
Extracts of LArSoft geometry information from ROOT.
Interface to auxiliary-detector geometry for wire readouts. .
cet::coded_exception< error, detail::translate > exception
std::unique_ptr< AuxDetInitializer > fInitializer
AuxDetSensitiveGeo const & ChannelToAuxDetSensitive(std::string const &auxDetName, uint32_t channel) const