20 #include "cetlib_except/exception.h"
21 #include "fhiclcpp/types/Table.h"
22 #include "messagefacility/MessageLogger/MessageLogger.h"
25 #include <TGeoManager.h>
42 : fDetectorName(pset.
get<
std::string >(
"Name"))
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);
79 TGeoManager::Import(rootfile.c_str());
80 gGeoManager->LockGeometry();
84 fhicl::Table<geo::GeometryBuilderStandard::Config>
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();
130 throw cet::exception(
"AuxDetGeometryCore") <<
"AuxDet "
132 <<
" does not exist\n";
186 std::string
const& auxDetName)
const
193 uint32_t
const& channel)
const
196 return this->
AuxDet(adIdx);
201 uint32_t
const& channel)
const
void LoadGeometryFile(std::string gdmlfile, std::string rootfile)
Loads the geometry information from the specified files.
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
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.
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
Access the description of auxiliary detector geometry.
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
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.
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.
Encapsulate the geometry of an auxiliary detector.
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.
AuxDetGeo const & PositionToAuxDet(double const worldLoc[3], unsigned int &ad, double tolerance=0) const
Returns the auxiliary detector at specified location.
TVector3 AuxDetChannelToPosition(uint32_t const &channel, std::string const &auxDetName) const
Extracts of LArSoft geometry information from ROOT.