20 #include "cetlib_except/exception.h" 25 #include <TGeoManager.h> 43 , fBuilderParameters(pset.
get<
fhicl::ParameterSet>(
"Builder",
fhicl::ParameterSet()))
59 if (gdmlfile.empty()) {
60 throw cet::exception(
"AuxDetGeometryCore") <<
"No GDML Geometry file specified!\n";
63 if (rootfile.empty()) {
64 throw cet::exception(
"AuxDetGeometryCore") <<
"No ROOT Geometry file specified!\n";
76 TGeoManager::LockDefaultUnits(
false);
77 TGeoManager::SetDefaultUnits(TGeoManager::kRootUnits);
78 TGeoManager::LockDefaultUnits(
true);
80 gGeoManager->LockGeometry();
95 mf::LogInfo(
"AuxDetGeometryCore") <<
"New detector geometry loaded from " 112 throw cet::exception(
"Geometry") <<
"Requested AuxDet index " << aid
113 <<
" is out of range: " <<
NAuxDets();
115 return AuxDets()[aid].NSensitiveVolume();
132 <<
" does not exist\n";
196 return this->
AuxDet(adIdx);
void LoadGeometryFile(std::string gdmlfile, std::string rootfile)
Loads the geometry information from the specified files.
void ApplyChannelMap(std::unique_ptr< geo::AuxDetChannelMapAlg > pChannelMap)
Initializes the geometry to work with this channel map.
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
AuxDetGeometryData_t fGeoData
The detector description data.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
const AuxDetSensitiveGeo & PositionToAuxDetSensitive(double const worldLoc[3], size_t &ad, size_t &sv, double tolerance=0) const
Returns the auxiliary detector at specified location.
std::string fDetectorName
Name of the detector.
uint32_t PositionToAuxDetChannel(double const worldLoc[3], size_t &ad, size_t &sv) const
Interface for geometry extractor classes.
const AuxDetGeo & ChannelToAuxDet(std::string const &auxDetName, uint32_t const &channel) const
unsigned int NAuxDetSensitive(size_t const &aid) const
Returns the number of sensitive components of auxiliary detector.
Class representing a path in ROOT geometry.
std::unique_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
virtual void Initialize(AuxDetGeometryData_t &geodata)=0
unsigned int NAuxDets() const
Returns the number of auxiliary detectors.
const AuxDetSensitiveGeo & ChannelToAuxDetSensitive(std::string const &auxDetName, uint32_t const &channel) const
AuxDets_t extractAuxiliaryDetectors(Path_t const &path)
Looks for all auxiliary detectors under the specified path.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
Encapsulate the geometry of an auxiliary detector.
unsigned int FindAuxDetAtPosition(double const worldLoc[3], double tolerance=0) const
Returns the index of the auxiliary detector at specified location.
fhicl::ParameterSet fBuilderParameters
Configuration of geometry builder.
Standard implementation of geometry extractor.
std::string fROOTfile
path to geometry file for geometry in GeometryCore
AuxDetGeometryCore(fhicl::ParameterSet const &pset)
Initialize geometry from a given configuration.
void ClearGeometry()
Deletes the detector geometry structures.
void FindAuxDetSensitiveAtPosition(double const worldLoc[3], size_t &adg, size_t &sv, double tolerance=0) const
Fills the indices of the sensitive auxiliary detector at location.
std::string fGDMLfile
path to geometry file used for Geant4 simulation
Representation of a node and its ancestry.
auto const & get(AssnsNode< L, R, D > const &r)
AuxDetGeo const & PositionToAuxDet(double const worldLoc[3], unsigned int &ad, double tolerance=0) const
Returns the auxiliary detector at specified location.
LArSoft geometry interface.
TVector3 AuxDetChannelToPosition(uint32_t const &channel, std::string const &auxDetName) const
Extracts of LArSoft geometry information from ROOT.
cet::coded_exception< error, detail::translate > exception