LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
geo::AuxDetGeometryCore Class Reference

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 ()
 Destructor. More...
 
 AuxDetGeometryCore (AuxDetGeometryCore const &)=delete
 
 AuxDetGeometryCore (AuxDetGeometryCore &&)=delete
 
AuxDetGeometryCoreoperator= (AuxDetGeometryCore const &)=delete
 
AuxDetGeometryCoreoperator= (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]) const
 Returns the index of the auxiliary detector at specified location. More...
 
void FindAuxDetSensitiveAtPosition (double const worldLoc[3], size_t &adg, size_t &sv) const
 Fills the indices of the sensitive auxiliary detector at location. More...
 
AuxDetGeo const & PositionToAuxDet (double const worldLoc[3], unsigned int &ad) const
 Returns the auxiliary detector at specified location. More...
 
const AuxDetSensitiveGeoPositionToAuxDetSensitive (double const worldLoc[3], size_t &ad, size_t &sv) 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 AuxDetGeoChannelToAuxDet (std::string const &auxDetName, uint32_t const &channel) const
 
const AuxDetSensitiveGeoChannelToAuxDetSensitive (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::shared_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_tAuxDets ()
 Return the internal auxiliary detectors list. More...
 
AuxDetList_t const & AuxDets () const
 Return the internal auxiliary detectors list. More...
 

Private Member Functions

void FindAuxDet (std::vector< const TGeoNode * > &path, unsigned int depth)
 
void MakeAuxDet (std::vector< const TGeoNode * > &path, int depth)
 
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...
 
std::shared_ptr< const geo::AuxDetChannelMapAlgfChannelMapAlg
 Object containing the channel to wire mapping. More...
 

Detailed Description

Description of geometry of one set of auxiliary detectors.


Note
All lengths are specified in centimetres

How to correctly instantiate a GeometryCore object

Instantiation is a multi-step procedure:

  1. construct a GeometryCore object (the "service provider"), with the full configuration; at this step, configuration is just stored
  2. load a geometry with GeometryCore::LoadGeometryFile(); this loads the detector geometry information
  3. prepare a channel map algorithm object (might use for example GeometryCore::DetectorName() or the detector geometry from the newly created object, but any use of channel mapping related functions is forbidden and it would yield undefined behaviour (expected to be catastrophic)
  4. acquire the channel mapping algorithm with GeometryCore::ApplyChannelMap(); at this point, the ChannelMapAlg object is asked to initialize itself and to perform whatever modifications to the geometry provider is needed.

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.

Configuration parameters

  • Name (string; mandatory): string identifying the detector; it can be different from the base name of the file used to initialize the geometry; standard names are recommended by each experiment. This name can be used, for example, to select which channel mapping algorithm to use.
  • SurfaceY (real; mandatory): depth of the detector, in centimetrs; see SurfaceY() for details
  • MinWireZDist (real; default: 3)
  • PositionEpsilon (real; default: 0.01%) set the default tolerance (see DefaultWiggle())

Definition at line 100 of file AuxDetGeometryCore.h.

Member Typedef Documentation

Type of list of auxiliary detectors.

Definition at line 104 of file AuxDetGeometryCore.h.

Constructor & Destructor Documentation

geo::AuxDetGeometryCore::AuxDetGeometryCore ( fhicl::ParameterSet const &  pset)

Initialize geometry from a given configuration.

Parameters
psetconfiguration parameters

This constructor does not load any geometry description. The next step is to do exactly that, by GeometryCore::LoadGeometryFile().

Definition at line 43 of file AuxDetGeometryCore.cxx.

References fDetectorName.

44  : fDetectorName(pset.get< std::string >("Name"))
45  {
46  std::transform(fDetectorName.begin(), fDetectorName.end(), fDetectorName.begin(), ::tolower);
47  } // AuxDetGeometryCore::AuxDetGeometryCore()
std::string fDetectorName
Name of the detector.
geo::AuxDetGeometryCore::~AuxDetGeometryCore ( )

Destructor.

Definition at line 51 of file AuxDetGeometryCore.cxx.

References ClearGeometry().

52  {
53  ClearGeometry();
54  } // AuxDetGeometryCore::~AuxDetGeometryCore()
void ClearGeometry()
Deletes the detector geometry structures.
geo::AuxDetGeometryCore::AuxDetGeometryCore ( AuxDetGeometryCore const &  )
delete
geo::AuxDetGeometryCore::AuxDetGeometryCore ( AuxDetGeometryCore &&  )
delete

Member Function Documentation

void geo::AuxDetGeometryCore::ApplyChannelMap ( std::shared_ptr< geo::AuxDetChannelMapAlg pChannelMap)

Initializes the geometry to work with this channel map.

Parameters
pChannelMapa pointer to the channel mapping algorithm to be used
See also
LoadGeometryFile()

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 58 of file AuxDetGeometryCore.cxx.

References fChannelMapAlg, and fGeoData.

59  {
60  pChannelMap->Initialize(fGeoData);
61  fChannelMapAlg = pChannelMap;
62  } // AuxDetGeometryCore::ApplyChannelMap()
AuxDetGeometryData_t fGeoData
The detector description data.
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
const AuxDetGeo & geo::AuxDetGeometryCore::AuxDet ( unsigned int const  ad = 0) const

Returns the specified auxiliary detector.

Parameters
adthe auxiliary detector index
Returns
a constant reference to the specified auxiliary detector
Todo:

what happens if it does not exist?

remove the default parameter?

Definition at line 129 of file AuxDetGeometryCore.cxx.

References AuxDets(), and NAuxDets().

Referenced by ChannelToAuxDet(), ChannelToAuxDetSensitive(), PositionToAuxDet(), and PositionToAuxDetSensitive().

130  {
131  if(ad >= NAuxDets())
132  throw cet::exception("AuxDetGeometryCore") << "AuxDet "
133  << ad
134  << " does not exist\n";
135 
136  return *(AuxDets()[ad]);
137  }
unsigned int NAuxDets() const
Returns the number of auxiliary detectors.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
geo::AuxDetChannelMapAlg const* geo::AuxDetGeometryCore::AuxDetChannelMap ( ) const
inlineprotected

Returns the object handling the channel map.

Definition at line 306 of file AuxDetGeometryCore.h.

306 { return fChannelMapAlg.get(); }
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
TVector3 geo::AuxDetGeometryCore::AuxDetChannelToPosition ( uint32_t const &  channel,
std::string const &  auxDetName 
) const

Definition at line 186 of file AuxDetGeometryCore.cxx.

References AuxDets(), and fChannelMapAlg.

188  {
189  return fChannelMapAlg->AuxDetChannelToPosition(channel, auxDetName, AuxDets());
190  }
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
std::vector<AuxDetGeo*> const& geo::AuxDetGeometryCore::AuxDetGeoVec ( ) const
inline

Returns the full list of pointer to the auxiliary detectors.

Definition at line 180 of file AuxDetGeometryCore.h.

180 { return AuxDets(); }
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
AuxDetList_t& geo::AuxDetGeometryCore::AuxDets ( )
inlineprotected

Return the internal auxiliary detectors list.

Definition at line 310 of file AuxDetGeometryCore.h.

Referenced by AuxDet(), AuxDetChannelToPosition(), ChannelToAuxDet(), ChannelToAuxDetSensitive(), ClearGeometry(), FindAuxDetAtPosition(), FindAuxDetSensitiveAtPosition(), MakeAuxDet(), NAuxDetSensitive(), and PositionToAuxDetChannel().

310 { return fGeoData.auxDets; }
AuxDetGeometryData_t fGeoData
The detector description data.
AuxDetList_t auxDets
The auxiliary detectors.
AuxDetList_t const& geo::AuxDetGeometryCore::AuxDets ( ) const
inlineprotected

Return the internal auxiliary detectors list.

Definition at line 311 of file AuxDetGeometryCore.h.

311 { return fGeoData.auxDets; }
AuxDetGeometryData_t fGeoData
The detector description data.
AuxDetList_t auxDets
The auxiliary detectors.
const AuxDetGeo & geo::AuxDetGeometryCore::ChannelToAuxDet ( std::string const &  auxDetName,
uint32_t const &  channel 
) const

Definition at line 193 of file AuxDetGeometryCore.cxx.

References AuxDet(), AuxDets(), and fChannelMapAlg.

195  {
196  size_t adIdx = fChannelMapAlg->ChannelToAuxDet(AuxDets(), auxDetName, channel);
197  return this->AuxDet(adIdx);
198  }
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
const AuxDetSensitiveGeo & geo::AuxDetGeometryCore::ChannelToAuxDetSensitive ( std::string const &  auxDetName,
uint32_t const &  channel 
) const

Definition at line 201 of file AuxDetGeometryCore.cxx.

References AuxDet(), AuxDets(), fChannelMapAlg, and geo::AuxDetGeo::SensitiveVolume().

203  {
204  auto idx = fChannelMapAlg->ChannelToSensitiveAuxDet(AuxDets(), auxDetName, channel);
205  return this->AuxDet(idx.first).SensitiveVolume(idx.second);
206  }
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
Definition: AuxDetGeo.h:159
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
void geo::AuxDetGeometryCore::ClearGeometry ( )
private

Deletes the detector geometry structures.

Definition at line 101 of file AuxDetGeometryCore.cxx.

References AuxDets(), evd::details::begin(), and evd::details::end().

Referenced by LoadGeometryFile(), and ~AuxDetGeometryCore().

102  {
103  // auxiliary detectors
104  std::for_each(AuxDets().begin(), AuxDets().end(), std::default_delete<AuxDetGeo>());
105  AuxDets().clear();
106 
107  } // AuxDetGeometryCore::ClearGeometry()
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
std::string geo::AuxDetGeometryCore::DetectorName ( ) const
inline

Returns a string with the name of the detector, as configured.

Definition at line 145 of file AuxDetGeometryCore.h.

145 { return fDetectorName; }
std::string fDetectorName
Name of the detector.
void geo::AuxDetGeometryCore::FindAuxDet ( std::vector< const TGeoNode * > &  path,
unsigned int  depth 
)
private

Definition at line 209 of file AuxDetGeometryCore.cxx.

References MakeAuxDet().

Referenced by LoadGeometryFile().

211  {
212  const char* nm = path[depth]->GetName();
213  if( (strncmp(nm, "volAuxDet", 9) == 0) ){
214  this->MakeAuxDet(path, depth);
215  return;
216  }
217 
218  //explore the next layer down
219  unsigned int deeper = depth+1;
220  if(deeper >= path.size()){
221  throw cet::exception("AuxDetGeometryCore") << "exceeded maximum TGeoNode depth\n";
222  }
223 
224  const TGeoVolume *v = path[depth]->GetVolume();
225  int nd = v->GetNdaughters();
226  for(int i = 0; i < nd; ++i){
227  path[deeper] = v->GetNode(i);
228  this->FindAuxDet(path, deeper);
229  }
230 
231  }
void MakeAuxDet(std::vector< const TGeoNode * > &path, int depth)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void FindAuxDet(std::vector< const TGeoNode * > &path, unsigned int depth)
unsigned int geo::AuxDetGeometryCore::FindAuxDetAtPosition ( double const  worldLoc[3]) const

Returns the index of the auxiliary detector at specified location.

Parameters
worldLoc3D coordinates of the point (world reference frame)
Returns
the index of the detector, or UINT_MAX if no detector is there
Todo:
replace with numeric_limits<>?

Definition at line 141 of file AuxDetGeometryCore.cxx.

References AuxDets(), and fChannelMapAlg.

Referenced by FindAuxDetSensitiveAtPosition(), and PositionToAuxDet().

142  {
143  return fChannelMapAlg->NearestAuxDet(worldPos, AuxDets());
144  } // AuxDetGeometryCore::FindAuxDetAtPosition()
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
void geo::AuxDetGeometryCore::FindAuxDetSensitiveAtPosition ( double const  worldLoc[3],
size_t &  adg,
size_t &  sv 
) const

Fills the indices of the sensitive auxiliary detector at location.

Parameters
worldLoc3D coordinates of the point (world reference frame)
adg(output) auxiliary detector index
sv(output) sensitive volume index

Definition at line 157 of file AuxDetGeometryCore.cxx.

References AuxDets(), fChannelMapAlg, and FindAuxDetAtPosition().

Referenced by PositionToAuxDetSensitive().

160  {
161  adg = this->FindAuxDetAtPosition(worldPos);
162  sv = fChannelMapAlg->NearestSensitiveAuxDet(worldPos, AuxDets(), adg);
163 
164  return;
165  } // AuxDetGeometryCore::FindAuxDetAtPosition()
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
unsigned int FindAuxDetAtPosition(double const worldLoc[3]) const
Returns the index of the auxiliary detector at specified location.
std::string geo::AuxDetGeometryCore::GDMLFile ( ) const
inline

Returns the full directory path to the GDML file source.

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 141 of file AuxDetGeometryCore.h.

141 { return fGDMLfile; }
std::string fGDMLfile
path to geometry file used for Geant4 simulation
bool geo::AuxDetGeometryCore::hasAuxDetChannelMap ( ) const
inline

Returns whether we have a channel map.

Definition at line 278 of file AuxDetGeometryCore.h.

Referenced by geo::AuxDetGeometry::InitializeChannelMap().

278 { return bool(fChannelMapAlg); }
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
void geo::AuxDetGeometryCore::LoadGeometryFile ( std::string  gdmlfile,
std::string  rootfile 
)

Loads the geometry information from the specified files.

Parameters
gdmlfilepath to file to be used for Geant4 simulation
rootfilepath to file for internal geometry representation
See also
ApplyChannelMap()

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.

Note
After calling this method, the detector geometry information can be considered complete, but the geometry service provider is not fully initialized yet, since it's still necessary to provide or update the channel mapping.

Definition at line 65 of file AuxDetGeometryCore.cxx.

References ClearGeometry(), fGDMLfile, FindAuxDet(), and fROOTfile.

Referenced by geo::AuxDetGeometry::LoadNewGeometry().

66  {
67 
68  if (gdmlfile.empty()) {
69  throw cet::exception("AuxDetGeometryCore") << "No GDML Geometry file specified!\n";
70  }
71 
72  if (rootfile.empty()) {
73  throw cet::exception("AuxDetGeometryCore") << "No ROOT Geometry file specified!\n";
74  }
75 
76  ClearGeometry();
77 
78  // Open the GDML file, and convert it into ROOT TGeoManager format.
79  // try to be efficient - if the GeometryCore object already imported
80  // the file, then the gGeoManager will be non-null. If not, import it.
81  // Then lock the gGeoManager to prevent future imports.
82  if( !gGeoManager ){
83  TGeoManager::Import(rootfile.c_str());
84  gGeoManager->LockGeometry();
85  }
86 
87  std::vector<const TGeoNode*> path(8);
88  path[0] = gGeoManager->GetTopNode();
89  FindAuxDet(path, 0);
90 
91  fGDMLfile = gdmlfile;
92  fROOTfile = rootfile;
93 
94  mf::LogInfo("AuxDetGeometryCore") << "New detector geometry loaded from "
95  << "\n\t" << fROOTfile
96  << "\n\t" << fGDMLfile << "\n";
97 
98  } // AuxDetGeometryCore::LoadGeometryFile()
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::string fROOTfile
path to geometry file for geometry in GeometryCore
void ClearGeometry()
Deletes the detector geometry structures.
std::string fGDMLfile
path to geometry file used for Geant4 simulation
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void FindAuxDet(std::vector< const TGeoNode * > &path, unsigned int depth)
void geo::AuxDetGeometryCore::MakeAuxDet ( std::vector< const TGeoNode * > &  path,
int  depth 
)
private

Definition at line 234 of file AuxDetGeometryCore.cxx.

References AuxDets().

Referenced by FindAuxDet().

235  {
236  AuxDets().push_back(new AuxDetGeo(path, depth));
237  }
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
unsigned int geo::AuxDetGeometryCore::NAuxDets ( ) const
inline

Returns the number of auxiliary detectors.

Todo:
use a AutDetID_t instead of unsigned int?

This method returns the total number of scintillator paddles (Auxiliary Detectors aka AuxDet) outside of the cryostat

Todo:
Change return type to size_t

Definition at line 165 of file AuxDetGeometryCore.h.

Referenced by AuxDet(), and NAuxDetSensitive().

165 { return AuxDets().size(); }
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
unsigned int geo::AuxDetGeometryCore::NAuxDetSensitive ( size_t const &  aid) const

Returns the number of sensitive components of auxiliary detector.

Parameters
aidID of the auxiliary detector
Returns
number of sensitive components in the auxiliary detector aid
Exceptions
cet::exception(category "Geometry") if aid does not exist

Definition at line 111 of file AuxDetGeometryCore.cxx.

References AuxDets(), and NAuxDets().

112  {
113  if( aid > NAuxDets() - 1)
114  throw cet::exception("Geometry") << "Requested AuxDet index " << aid
115  << " is out of range: " << NAuxDets();
116 
117  return AuxDets()[aid]->NSensitiveVolume();
118  }
unsigned int NAuxDets() const
Returns the number of auxiliary detectors.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
AuxDetGeometryCore& geo::AuxDetGeometryCore::operator= ( AuxDetGeometryCore const &  )
delete
AuxDetGeometryCore& geo::AuxDetGeometryCore::operator= ( AuxDetGeometryCore &&  )
delete
const AuxDetGeo & geo::AuxDetGeometryCore::PositionToAuxDet ( double const  worldLoc[3],
unsigned int &  ad 
) const

Returns the auxiliary detector at specified location.

Parameters
worldLoc3D coordinates of the point (world reference frame)
ad(output) the auxiliary detector index
Returns
constant reference to AuxDetGeo object of the auxiliary detector
Todo:
what happens if it does not exist?

Definition at line 147 of file AuxDetGeometryCore.cxx.

References AuxDet(), and FindAuxDetAtPosition().

149  {
150  // locate the desired Auxiliary Detector
151  ad = this->FindAuxDetAtPosition(worldLoc);
152 
153  return this->AuxDet(ad);
154  }
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
unsigned int FindAuxDetAtPosition(double const worldLoc[3]) const
Returns the index of the auxiliary detector at specified location.
uint32_t geo::AuxDetGeometryCore::PositionToAuxDetChannel ( double const  worldLoc[3],
size_t &  ad,
size_t &  sv 
) const

Definition at line 178 of file AuxDetGeometryCore.cxx.

References AuxDets(), and fChannelMapAlg.

181  {
182  return fChannelMapAlg->PositionToAuxDetChannel(worldLoc, AuxDets(), ad, sv);
183  }
std::shared_ptr< const geo::AuxDetChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
AuxDetList_t & AuxDets()
Return the internal auxiliary detectors list.
const AuxDetSensitiveGeo & geo::AuxDetGeometryCore::PositionToAuxDetSensitive ( double const  worldLoc[3],
size_t &  ad,
size_t &  sv 
) const

Returns the auxiliary detector at specified location.

Parameters
worldLoc3D coordinates of the point (world reference frame)
ad(output) the auxiliary detector index
sv(output) the auxiliary detector sensitive volume index
Returns
reference to AuxDetSensitiveGeo object of the auxiliary detector
Todo:
what happens if it does not exist?

Definition at line 168 of file AuxDetGeometryCore.cxx.

References AuxDet(), FindAuxDetSensitiveAtPosition(), and geo::AuxDetGeo::SensitiveVolume().

171  {
172  // locate the desired Auxiliary Detector
173  this->FindAuxDetSensitiveAtPosition(worldLoc, ad, sv);
174  return this->AuxDet(ad).SensitiveVolume(sv);
175  }
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
Definition: AuxDetGeo.h:159
void FindAuxDetSensitiveAtPosition(double const worldLoc[3], size_t &adg, size_t &sv) const
Fills the indices of the sensitive auxiliary detector at location.
std::string geo::AuxDetGeometryCore::ROOTFile ( ) const
inline

Returns the full directory path to the geometry file source.

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 132 of file AuxDetGeometryCore.h.

132 { return fROOTfile; }
std::string fROOTfile
path to geometry file for geometry in GeometryCore

Member Data Documentation

std::shared_ptr<const geo::AuxDetChannelMapAlg> geo::AuxDetGeometryCore::fChannelMapAlg
private
std::string geo::AuxDetGeometryCore::fDetectorName
private

Name of the detector.

Definition at line 325 of file AuxDetGeometryCore.h.

Referenced by AuxDetGeometryCore().

std::string geo::AuxDetGeometryCore::fGDMLfile
private

path to geometry file used for Geant4 simulation

Definition at line 326 of file AuxDetGeometryCore.h.

Referenced by LoadGeometryFile().

AuxDetGeometryData_t geo::AuxDetGeometryCore::fGeoData
private

The detector description data.

Definition at line 323 of file AuxDetGeometryCore.h.

Referenced by ApplyChannelMap().

std::string geo::AuxDetGeometryCore::fROOTfile
private

path to geometry file for geometry in GeometryCore

Definition at line 327 of file AuxDetGeometryCore.h.

Referenced by LoadGeometryFile().


The documentation for this class was generated from the following files: