Description of geometry of one set of auxiliary detectors. More...
#include <AuxDetGeometryCore.h>
Public Types | |
using | AuxDetList_t = AuxDetGeometryData_t::AuxDetList_t |
Type of list of auxiliary detectors. More... | |
Public Member Functions | |
AuxDetGeometryCore (fhicl::ParameterSet const &pset) | |
Initialize geometry from a given configuration. More... | |
AuxDetGeometryCore (AuxDetGeometryCore const &)=delete | |
AuxDetGeometryCore (AuxDetGeometryCore &&)=delete | |
AuxDetGeometryCore & | operator= (AuxDetGeometryCore const &)=delete |
AuxDetGeometryCore & | operator= (AuxDetGeometryCore &&)=delete |
std::string | ROOTFile () const |
Returns the full directory path to the geometry file source. More... | |
std::string | GDMLFile () const |
Returns the full directory path to the GDML file source. More... | |
std::string | DetectorName () const |
Returns a string with the name of the detector, as configured. More... | |
unsigned int | NAuxDets () const |
Returns the number of auxiliary detectors. More... | |
unsigned int | NAuxDetSensitive (size_t const &aid) const |
Returns the number of sensitive components of auxiliary detector. More... | |
std::vector< AuxDetGeo > const & | AuxDetGeoVec () const |
Returns the full list of pointer to the auxiliary detectors. More... | |
AuxDetGeo const & | AuxDet (unsigned int const ad=0) const |
Returns the specified auxiliary detector. More... | |
unsigned int | FindAuxDetAtPosition (double const worldLoc[3], double tolerance=0) const |
Returns the index of the auxiliary detector at specified location. More... | |
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. More... | |
AuxDetGeo const & | PositionToAuxDet (double const worldLoc[3], unsigned int &ad, double tolerance=0) const |
Returns the auxiliary detector at specified location. More... | |
const AuxDetSensitiveGeo & | PositionToAuxDetSensitive (double const worldLoc[3], size_t &ad, size_t &sv, double tolerance=0) const |
Returns the auxiliary detector at specified location. More... | |
uint32_t | PositionToAuxDetChannel (double const worldLoc[3], size_t &ad, size_t &sv) const |
TVector3 | AuxDetChannelToPosition (uint32_t const &channel, std::string const &auxDetName) const |
const AuxDetGeo & | ChannelToAuxDet (std::string const &auxDetName, uint32_t const &channel) const |
const AuxDetSensitiveGeo & | ChannelToAuxDetSensitive (std::string const &auxDetName, uint32_t const &channel) const |
Geometry initialization | |
void | LoadGeometryFile (std::string gdmlfile, std::string rootfile) |
Loads the geometry information from the specified files. More... | |
bool | hasAuxDetChannelMap () const |
Returns whether we have a channel map. More... | |
void | ApplyChannelMap (std::unique_ptr< geo::AuxDetChannelMapAlg > pChannelMap) |
Initializes the geometry to work with this channel map. More... | |
Protected Member Functions | |
geo::AuxDetChannelMapAlg const * | AuxDetChannelMap () const |
Returns the object handling the channel map. More... | |
AuxDetList_t & | AuxDets () |
Return the internal auxiliary detectors list. More... | |
AuxDetList_t const & | AuxDets () const |
Private Member Functions | |
void | ClearGeometry () |
Deletes the detector geometry structures. More... | |
Private Attributes | |
AuxDetGeometryData_t | fGeoData |
The detector description data. More... | |
std::string | fDetectorName |
Name of the detector. More... | |
std::string | fGDMLfile |
path to geometry file used for Geant4 simulation More... | |
std::string | fROOTfile |
path to geometry file for geometry in GeometryCore More... | |
fhicl::ParameterSet | fBuilderParameters |
Configuration of geometry builder. More... | |
std::unique_ptr< const geo::AuxDetChannelMapAlg > | fChannelMapAlg |
Object containing the channel to wire mapping. More... | |
Description of geometry of one set of auxiliary detectors.
Instantiation is a multi-step procedure:
Step 3 (creation of the channel mapping algorithm object) can be performed at any time before step 4, provided that no GeometryCore instance is needed for it.
Definition at line 91 of file AuxDetGeometryCore.h.
Type of list of auxiliary detectors.
Definition at line 95 of file AuxDetGeometryCore.h.
geo::AuxDetGeometryCore::AuxDetGeometryCore | ( | fhicl::ParameterSet const & | pset | ) |
Initialize geometry from a given configuration.
pset | configuration parameters |
This constructor does not load any geometry description. The next step is to do exactly that, by GeometryCore::LoadGeometryFile().
Definition at line 41 of file AuxDetGeometryCore.cxx.
|
delete |
|
delete |
void geo::AuxDetGeometryCore::ApplyChannelMap | ( | std::unique_ptr< geo::AuxDetChannelMapAlg > | pChannelMap | ) |
Initializes the geometry to work with this channel map.
pChannelMap | a pointer to the channel mapping algorithm to be used |
The specified channel mapping is used with this geometry. The algorithm object is asked and allowed to make the necessary modifications to the geometry description. These modifications typically involve some resorting of the objects.
The ownership of the algorithm object is shared, usually with a calling framework: we maintain it alive as long as we need it (and no other code can delete it), and we delete it only if no other code is sharing the ownership.
This method needs to be called after LoadGeometryFile() to complete the geometry initialization.
Definition at line 49 of file AuxDetGeometryCore.cxx.
const AuxDetGeo & geo::AuxDetGeometryCore::AuxDet | ( | unsigned int const | ad = 0 | ) | const |
Returns the specified auxiliary detector.
ad | the auxiliary detector index |
what happens if it does not exist?
remove the default parameter?
Definition at line 127 of file AuxDetGeometryCore.cxx.
|
inlineprotected |
Returns the object handling the channel map.
Definition at line 301 of file AuxDetGeometryCore.h.
TVector3 geo::AuxDetGeometryCore::AuxDetChannelToPosition | ( | uint32_t const & | channel, |
std::string const & | auxDetName | ||
) | const |
Definition at line 185 of file AuxDetGeometryCore.cxx.
|
inline |
Returns the full list of pointer to the auxiliary detectors.
Definition at line 168 of file AuxDetGeometryCore.h.
|
inlineprotected |
Return the internal auxiliary detectors list.
Definition at line 305 of file AuxDetGeometryCore.h.
|
inlineprotected |
Definition at line 306 of file AuxDetGeometryCore.h.
const AuxDetGeo & geo::AuxDetGeometryCore::ChannelToAuxDet | ( | std::string const & | auxDetName, |
uint32_t const & | channel | ||
) | const |
Definition at line 192 of file AuxDetGeometryCore.cxx.
const AuxDetSensitiveGeo & geo::AuxDetGeometryCore::ChannelToAuxDetSensitive | ( | std::string const & | auxDetName, |
uint32_t const & | channel | ||
) | const |
Definition at line 200 of file AuxDetGeometryCore.cxx.
|
private |
Deletes the detector geometry structures.
Definition at line 102 of file AuxDetGeometryCore.cxx.
|
inline |
Returns a string with the name of the detector, as configured.
Definition at line 133 of file AuxDetGeometryCore.h.
unsigned int geo::AuxDetGeometryCore::FindAuxDetAtPosition | ( | double const | worldLoc[3], |
double | tolerance = 0 |
||
) | const |
Returns the index of the auxiliary detector at specified location.
worldLoc | 3D coordinates of the point (world reference frame) |
Definition at line 139 of file AuxDetGeometryCore.cxx.
void geo::AuxDetGeometryCore::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.
worldLoc | 3D coordinates of the point (world reference frame) |
adg | (output) auxiliary detector index |
sv | (output) sensitive volume index |
tolerance | tolerance (cm) for matches. Default 0. |
Definition at line 156 of file AuxDetGeometryCore.cxx.
|
inline |
Returns the full directory path to the GDML file source.
This is the full path of the source of the detector geometry handed to the detector simulation (GEANT).
Definition at line 129 of file AuxDetGeometryCore.h.
|
inline |
Returns whether we have a channel map.
Definition at line 273 of file AuxDetGeometryCore.h.
void geo::AuxDetGeometryCore::LoadGeometryFile | ( | std::string | gdmlfile, |
std::string | rootfile | ||
) |
Loads the geometry information from the specified files.
gdmlfile | path to file to be used for Geant4 simulation |
rootfile | path to file for internal geometry representation |
Both paths must directly resolve to an available file, as no search is performed for them.
The gdmlfile parameter does not have to necessarily be in GDML format, as long as it's something supported by Geant4. This file is not used by the geometry, but its path is provided on request by the simulation modules (see LArSoft LArG4
module). The rootfile also does not need to be a ROOT file, but just anything that TGeoManager::Import() supports. This file is parsed immediately and the internal geometry representation is built out of it.
Definition at line 56 of file AuxDetGeometryCore.cxx.
|
inline |
Returns the number of auxiliary detectors.
This method returns the total number of scintillator paddles (Auxiliary Detectors aka AuxDet) outside of the cryostat
Definition at line 153 of file AuxDetGeometryCore.h.
unsigned int geo::AuxDetGeometryCore::NAuxDetSensitive | ( | size_t const & | aid | ) | const |
Returns the number of sensitive components of auxiliary detector.
aid | ID of the auxiliary detector |
cet::exception | (category "Geometry") if aid does not exist |
Definition at line 109 of file AuxDetGeometryCore.cxx.
|
delete |
|
delete |
const AuxDetGeo & geo::AuxDetGeometryCore::PositionToAuxDet | ( | double const | worldLoc[3], |
unsigned int & | ad, | ||
double | tolerance = 0 |
||
) | const |
Returns the auxiliary detector at specified location.
worldLoc | 3D coordinates of the point (world reference frame) |
ad | (output) the auxiliary detector index |
tolerance | tolerance (cm) for matches. Default 0 |
Definition at line 145 of file AuxDetGeometryCore.cxx.
uint32_t geo::AuxDetGeometryCore::PositionToAuxDetChannel | ( | double const | worldLoc[3], |
size_t & | ad, | ||
size_t & | sv | ||
) | const |
Definition at line 177 of file AuxDetGeometryCore.cxx.
const AuxDetSensitiveGeo & geo::AuxDetGeometryCore::PositionToAuxDetSensitive | ( | double const | worldLoc[3], |
size_t & | ad, | ||
size_t & | sv, | ||
double | tolerance = 0 |
||
) | const |
Returns the auxiliary detector at specified location.
worldLoc | 3D coordinates of the point (world reference frame |
tolerance | tolerance (cm) for matches. Default 0. |
ad | (output) the auxiliary detector index |
sv | (output) the auxiliary detector sensitive volume index |
Definition at line 166 of file AuxDetGeometryCore.cxx.
|
inline |
Returns the full directory path to the geometry file source.
This is the full path of the source of the detector geometry GeometryCore relies on.
Definition at line 120 of file AuxDetGeometryCore.h.
|
private |
Configuration of geometry builder.
Definition at line 319 of file AuxDetGeometryCore.h.
|
private |
Object containing the channel to wire mapping.
Definition at line 320 of file AuxDetGeometryCore.h.
|
private |
Name of the detector.
Definition at line 316 of file AuxDetGeometryCore.h.
|
private |
path to geometry file used for Geant4 simulation
Definition at line 317 of file AuxDetGeometryCore.h.
|
private |
The detector description data.
Definition at line 314 of file AuxDetGeometryCore.h.
|
private |
path to geometry file for geometry in GeometryCore
Definition at line 318 of file AuxDetGeometryCore.h.