All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Files | Namespaces | Classes
Detector geometry information

Files

file  ChannelMapAlg.h
 Interface to algorithm class for a specific detector channel mapping.
 
file  AuxDetGeo.h
 Encapsulate the geometry of an auxiliary detector.
 
file  AuxDetGeometryCore.h
 Access the description of auxiliary detector geometry.
 
file  GeoObjectSorter.h
 Interface to algorithm class for sorting geo::XXXGeo objects.
 
file  AuxDetSensitiveGeo.h
 Encapsulate the geometry of the sensitive portion of an auxiliary detector.
 
file  BoxBoundedGeo.h
 Provides a base class aware of world box coordinates.
 
file  ChannelMapAlg.h
 Interface to algorithm class for a specific detector channel mapping.
 
file  CryostatGeo.h
 Encapsulate the construction of a single cyostat.
 
file  Decomposer.h
 Classes to project and compose a vector on a plane.
 
file  DriftPartitions.h
 Data structures and algorithms to partition a cryostat volume.
 
file  geo_vectors_fhicl.h
 Helpers for reading vectors from FHiCL files.
 
file  geo_vectors_utils.h
 Utilities to extend the interface of geometry vectors.
 
file  geo_vectors_utils_TVector.h
 Specializations of geo_vectors_utils.h for ROOT old vector types.
 
file  GeometryCore.h
 Access the description of detector geometry.
 
file  GeometryData.h
 Simple data structure holding the data of the geometry.
 
file  GeometryDataContainers.h
 Containers to hold one datum per TPC or plane.
 
file  GeometryIDmapper.h
 Mapping between geometry/readout ID and flat index.
 
file  GeoObjectSorter.h
 Interface to algorithm class for sorting geo::XXXGeo objects.
 
file  GeoObjectSorterStandard.h
 Interface to algorithm class for standard sorting of geo::XXXGeo objects.
 
file  GeoVectorLocalTransformation.cxx
 Specialization of local-to-world transformations for ROOT GenVector.
 
file  GeoVectorLocalTransformation.h
 Specialization of local-to-world transformations for ROOT GenVector.
 
file  LocalTransformation.h
 Class containing local-to-world transformations.
 
file  OpDetGeo.h
 Encapsulate the geometry of an optical detector.
 
file  PlaneGeo.h
 Encapsulate the construction of a single detector plane.
 
file  ReadoutDataContainers.h
 Containers to hold one datum per TPC set or readout plane.
 
file  ReadoutIDmapper.h
 Mapping between geometry/readout ID and flat index.
 
file  SimpleGeo.h
 Some simple functions to represent geometry entities.
 
file  StandaloneGeometrySetup.h
 Utilities for one-line geometry initialization.
 
file  TPCGeo.h
 Encapsulate the construction of a single detector plane.
 
file  TransformationMatrix.h
 Selection of the type of transformation matrix used in geometry.
 
file  WireGeo.h
 Encapsulate the geometry of a wire.
 
file  geo_optical_vectors.h
 Definitions of vector data types for optical detectors.
 
file  geo_types.cxx
 Definition of data types for geometry description (implementation).
 
file  geo_types.h
 Definition of data types for geometry description.
 
file  geo_vectors.h
 Definitions of geometry vector data types.
 

Namespaces

 geo::vect
 Utilities to manipulate geometry vectors.The utilities include generic vector interface facilities allowing to use different vector types via templates.
 
 geo::vect::extra
 Convenience utilities not directly related to vectors.
 
 lar::util::simple_geo
 Simple class definitions for geometry concepts.
 
 geo
 Verifies that the geometry check information is available.
 

Classes

class  geo::AuxDetChannelMapAlg
 
class  geo::AuxDetGeo
 
struct  geo::AuxDetGeometryData_t
 
class  geo::AuxDetGeometryCore
 Description of geometry of one set of auxiliary detectors. More...
 
class  geo::AuxDetGeoObjectSorter
 
class  geo::AuxDetSensitiveGeo
 
class  geo::BoxBoundedGeo
 A base class aware of world box coordinatesAn object describing a simple shape can inherit from this one to gain access to a common boundary checking interface. More...
 
class  geo::ChannelMapAlg
 Interface for a class providing readout channel mapping to geometry. More...
 
class  geo::CryostatGeo
 Geometry information for a single cryostat. More...
 
class  geo::DriftPartitions
 Set of drift volumes. More...
 
class  geo::GeoObjectSorter
 
class  geo::GeoObjectSorterStandard
 
class  geo::LocalTransformation< StoredMatrix >
 Class to transform between world and local coordinates. More...
 
class  geo::OpDetGeo
 
class  geo::PlaneGeo
 Geometry information for a single wire plane.The plane is represented in the geometry by a solid which contains wires. Currently, only box solids are well supported. The box which is representation of the plane has some thickness, and it should not be assumed that the wires are in the median section of it, that is, the center of the box may not lie on the plane defined by the wires. More...
 
class  geo::TPCGeo
 Geometry information for a single TPC. More...
 
class  geo::WireGeo
 Geometry description of a TPC wireThe wire is a single straight segment on a wire plane. Different wires may be connected to the same readout channel. That is of no relevance for the geometry description. More...
 
using geo::cryostat_id_iterator = details::cryostat_id_iterator_base< geo::CryostatID >
 Forward iterator browsing all cryostats in the detector. More...
 
using geo::cryostat_iterator = details::geometry_element_iterator< cryostat_id_iterator >
 Forward iterator browsing all cryostats in the detector. More...
 
using geo::TPC_id_iterator = details::TPC_id_iterator_base< geo::TPCID >
 Forward iterator browsing all TPCs in the detector. More...
 
using geo::TPC_iterator = details::geometry_element_iterator< TPC_id_iterator >
 Forward iterator browsing all TPCs in the detector. More...
 
using geo::plane_id_iterator = details::plane_id_iterator_base< geo::PlaneID >
 Forward iterator browsing all planes in the detector. More...
 
using geo::plane_iterator = details::geometry_element_iterator< plane_id_iterator >
 Forward iterator browsing all planes in the detector. More...
 
using geo::wire_id_iterator = details::wire_id_iterator_base< geo::WireID >
 Forward iterator browsing all wires in the detector. More...
 
using geo::wire_iterator = details::geometry_element_iterator< wire_id_iterator >
 Forward iterator browsing all wires in the detector. More...
 
using geo::TPCset_id_iterator = details::TPCset_id_iterator_base< readout::TPCsetID >
 Forward iterator browsing all TPC sets in the detector. More...
 
using geo::ROP_id_iterator = details::ROP_id_iterator_base< readout::ROPID >
 Forward iterator browsing all readout planes in the detector. More...
 
std::unique_ptr
< geo::GeometryCore
lar::standalone::SetupGeometryWithChannelMapping (fhicl::ParameterSet const &pset, std::unique_ptr< geo::ChannelMapAlg > channelMap)
 Initializes a LArSoft geometry object. More...
 
template<typename ChannelMapClass , typename... Args>
std::unique_ptr
< geo::GeometryCore
lar::standalone::SetupGeometry (fhicl::ParameterSet const &pset, Args &&...args)
 Initializes a LArSoft geometry object. More...
 

Detailed Description

See Also
geo::GeometryCore

The description of the detector as seen by LArSoft is accessed via LArSoft "geometry system".

A high level explanation of the geometry description is present in the official LArSoft collaboration web site, at the bottom of which further sources are detailed.

The geometry system revolves around the geo::GeometryCore service provider, which is the hub to access all the geometry information. The information accessible via this interface include:

The service provider can be obtained including larcore/Geometry/Geometry.h header and calling:

auto const& geom = *(lar::providerFrom<geo::Geometry>());

Typedef Documentation

using geo::cryostat_id_iterator = typedef details::cryostat_id_iterator_base<geo::CryostatID>

Forward iterator browsing all cryostats in the detector.

Prefer asking GeometryCore object for iterators rather than constructing them anew: see geo::GeometryCore::cryostat_id_iterator for the recommended usage. Stand-alone example (not recommended):

for (iCryostat = cbegin; iCryostat != cend; ++iCryostat) {
geo::CryostatID const& cid = *iCryostat;
geo::CryostatGeo const* pCryo = iCryostat.get();
std::cout << "We are at: " << cid << std::endl;
// ...
} // for

Definition at line 1236 of file GeometryCore.h.

using geo::cryostat_iterator = typedef details::geometry_element_iterator<cryostat_id_iterator>

Forward iterator browsing all cryostats in the detector.

The comments from cryostat_id_iterator are valid here as well. This object has a different dereferenciation operator that obtains the plane directly, or throws on failure.

Definition at line 1246 of file GeometryCore.h.

using geo::plane_id_iterator = typedef details::plane_id_iterator_base<geo::PlaneID>

Forward iterator browsing all planes in the detector.

Prefer asking the geometry object for iterators rather than constructing them anew: see geo::GeometryCore::plane_id_iterator for the recommended usage. Stand-alone example (not recommended):

for (iPlane = pbegin; iPlane != pend; ++iPlane) {
geo::PlaneID const& pid = *iPlane;
geo::PlaneGeo const* pPlane = iPlane.get();
std::cout << "We are at: " << pid << std::endl;
// ...
} // for

Definition at line 1299 of file GeometryCore.h.

using geo::plane_iterator = typedef details::geometry_element_iterator<plane_id_iterator>

Forward iterator browsing all planes in the detector.

The comments from plane_id_iterator are valid here as well. This object has a different dereferenciation operator that obtains the plane directly, or throws on failure.

Definition at line 1308 of file GeometryCore.h.

using geo::ROP_id_iterator = typedef details::ROP_id_iterator_base<readout::ROPID>

Forward iterator browsing all readout planes in the detector.

Prefer asking the geometry object for iterators rather than constructing them anew: see geo::GeometryCore::ROP_id_iterator for the recommended usage. Stand-alone example (not recommended):

for (iROP = rbegin; iROP != rend; ++iROP) {
readout::ROPID const& rid = *iROP;
std::cout << "We are at: " << rid << std::endl;
// ...
} // for

Definition at line 1381 of file GeometryCore.h.

using geo::TPC_id_iterator = typedef details::TPC_id_iterator_base<geo::TPCID>

Forward iterator browsing all TPCs in the detector.

Prefer asking the geometry object for iterators rather than constructing them anew: see geo::GeometryCore::TPC_id_iterator for the recommended usage. Stand-alone example (not recommended):

for (iTPC = tbegin; iTPC != tend; ++iTPC) {
geo::TPCID const& tid = *iTPC;
geo::TPCGeo const* pTPC = iTPC.get();
std::cout << "We are at: " << tid << std::endl;
// ...
} // for

Definition at line 1268 of file GeometryCore.h.

using geo::TPC_iterator = typedef details::geometry_element_iterator<TPC_id_iterator>

Forward iterator browsing all TPCs in the detector.

The comments from TPC_id_iterator are valid here as well. This object has a different dereferenciation operator that obtains the TPC directly, or throws on failure.

Definition at line 1277 of file GeometryCore.h.

using geo::TPCset_id_iterator = typedef details::TPCset_id_iterator_base<readout::TPCsetID>

Forward iterator browsing all TPC sets in the detector.

Prefer asking the geometry object for iterators rather than constructing them anew: see geo::GeometryCore::TPCset_id_iterator for the recommended usage. Stand-alone example (not recommended):

for (iTPCset = tbegin; iTPCset != tend; ++iTPCset) {
readout::TPCsetID const& tid = *iTPCset;
std::cout << "We are at: " << tid << std::endl;
// ...
} // for

Definition at line 1360 of file GeometryCore.h.

using geo::wire_id_iterator = typedef details::wire_id_iterator_base<geo::WireID>

Forward iterator browsing all wires in the detector.

Prefer asking the geometry object for iterators rather than constructing them anew: see geo::GeometryCore::wire_id_iterator for the recommended usage. Stand-alone example (not recommended):

for (iWire = wbegin; iWire != wend; ++iWire) {
geo::WireID const& wid = *iWire;
geo::WireGeo const* pWire = iWire.get();
std::cout << "We are at: " << wid << std::endl;
// ...
} // for

Definition at line 1329 of file GeometryCore.h.

using geo::wire_iterator = typedef details::geometry_element_iterator<wire_id_iterator>

Forward iterator browsing all wires in the detector.

The comments from wire_id_iterator are valid here as well. This object has a different dereferenciation operator that obtains the wire directly, or throws on failure.

Definition at line 1338 of file GeometryCore.h.

Function Documentation

template<typename ChannelMapClass , typename... Args>
std::unique_ptr< geo::GeometryCore > lar::standalone::SetupGeometry ( fhicl::ParameterSet const &  pset,
Args &&...  args 
)

Initializes a LArSoft geometry object.

Template Parameters
ChannelMapClasstype of geo::ChannelMapAlg to be used
Args(optional) arguments for the construction of channel mapping
Parameters
psetcomplete set of parameters for geometry configuration
argsarguments to the channel mapping object constructor
Returns
the geometry object, fully initialized

This function creates, sets up and returns a geometry object using the specified channel mapping. This is a simplified version of SetupGeometryWithChannelMapping(), that can be used if no special treatment is needed for the channel mapping after construction and before it is made to interact with the geometry.

// read FHiCL configuration from a configuration file:
fhicl::ParameterSet pset;
cet::filepath_lookup_after1 policy("FHICL_FILE_PATH");
pset = fhicl::_ParameterSet::make(configPath, policy);
// set up message facility
mf::StartMessageFacility
(pset.get<fhicl::ParameterSet>("services.message"));
// geometry setup
std::unique_ptr<geo::GeometryCore> geom
= SetupGeometry<geo::StandardChannelMapAlg>(pset);

Note that this function constructs the channel mapping object using a constructor with arguments a parameter set and in addition, optionally, any other argument specified in args.

Definition at line 145 of file StandaloneGeometrySetup.h.

146 {
147  auto const SortingParameters = pset.get<fhicl::ParameterSet>("SortingParameters", {});
148  auto channelMap = std::make_unique<ChannelMapClass>(SortingParameters,
149  std::forward<Args>(args)...);
150  return SetupGeometryWithChannelMapping(pset, move(channelMap));
151 } // lar::standalone::SetupGeometry()
std::unique_ptr< geo::GeometryCore > SetupGeometryWithChannelMapping(fhicl::ParameterSet const &pset, std::unique_ptr< geo::ChannelMapAlg > channelMap)
Initializes a LArSoft geometry object.
BEGIN_PROLOG vertical distance to the surface table::sbnd_geo_source SortingParameters
std::unique_ptr< geo::GeometryCore > lar::standalone::SetupGeometryWithChannelMapping ( fhicl::ParameterSet const &  pset,
std::unique_ptr< geo::ChannelMapAlg channelMap 
)

Initializes a LArSoft geometry object.

Parameters
psetparameters for geometry configuration
channelMapchannel mapping object to be used, already constructed
Returns
the geometry object, fully initialized
See Also
SetupGeometry()

This function creates, sets up and returns a geometry object using the specified channel mapping.

// create a channel mapping algorithm
std::make_unique<geo::StandardChannelMapAlg> channelMap
(pset.get<fhicl::ParameterSet>("SortingParameters"));
std::unique_ptr<geo::GeometryCore> geom
= SetupGeometryWithChannelMapping(pset, channelMap);

If no set up is required for channel mapping after construction, the use of SetupGeometry() is preferred over this function.

Configuration parameters

It is expected that a standard geo::Geometry service configuration will correctly set up the geometry.

In addition to the parameters documented in geo::GeometryCore, the following parameters are supported:

  • RelativePath (string, default: no path): this path is prepended to the geometry file names before searching from them; the path string does not affect the file name
  • GDML (string, mandatory): path of the GDML file to be served to GEANT4 * for detector simulation. The full file is composed out of the optional relative path specified by RelativePath path and the base name specified in GDML parameter; this path is searched for in the directories configured in the FW_SEARCH_PATH environment variable;
  • ROOT (string, mandatory): currently overridden by GDML parameter, whose value is used instead; this path is assembled in the same way as the one for GDML parameter, except that no alternative (wireless) geometry is used even if DisableWiresInG4 is specified (see below); this file is used to load the geometry used in the internal simulation and reconstruction, basically everywhere except for the GEANT4 simulation
  • DisableWiresInG4 (boolean, default: false): if true, GEANT4 is loaded with an alternative geometry from a file with the standard name as configured with the /GDML/ parameter, but with an additional _nowires appended before the .gdml suffix
  • SortingParameters (a parameter set; default: empty): this configuration is directly passed to the channel mapping algorithm (see geo::ChannelMapAlg); its content is dependent on the chosen implementation of geo::ChannelMapAlg

Definition at line 30 of file StandaloneGeometrySetup.cxx.

34 {
35  auto const bForceReload = true;
36 
37  //
38  // create the geometry object
39  //
40  auto geom = std::make_unique<geo::GeometryCore>(pset);
41 
42  //
43  // extract of relevant configuration parameters
44  //
45  std::string relPath = pset.get<std::string>("RelativePath", "" );
46  const bool disableWiresInG4 = pset.get<bool> ("DisableWiresInG4", false);
47  const std::string GDMLFileName = pset.get<std::string>("GDML" );
48 // const std::string ROOTFileName = pset.get<std::string>("ROOT" );
49 
50  // add a final directory separator ("/") to relPath if not already there
51  if (!relPath.empty() && (relPath.back() != '/')) relPath += '/';
52 
53  // We are going to find files now.
54  // cet::search_path constructor decides if the constructor argument is a path
55  // or an environment variable (in this case, the latter)
56  cet::search_path sp("FW_SEARCH_PATH");
57 
58  //
59  // "GDML" file (for GEANT4)
60  //
61  // this is our hint for the path; start with the relative path:
62  std::string GDMLFilePathHint = relPath + GDMLFileName;
63 
64  // special if geometry with no wires is used for GEANT4 simulation
65  if(disableWiresInG4) {
66  GDMLFilePathHint.insert(
67  std::min(GDMLFilePathHint.rfind(".gdml"), GDMLFilePathHint.length()),
68  "_nowires"
69  );
70  } // if disable wires
71 
72  std::string GDMLFilePath;
73  if( !sp.find_file(GDMLFilePathHint, GDMLFilePath) ) {
74  throw cet::exception("StaticLoadGeometry")
75  << "Can't find geometry file '" << GDMLFilePathHint
76  << "' (for GEANT4)!\n";
77  }
78 
79  //
80  // "ROOT" file (for geometry)
81  //
82  // this is our hint for the path; start with the relative path:
83  std::string ROOTFilePathHint = relPath + GDMLFileName;
84 
85  std::string ROOTFilePath;
86  if( !sp.find_file(ROOTFilePathHint, ROOTFilePath) ) {
87  throw cet::exception("StaticLoadGeometry")
88  << "Can't find geometry file '" << ROOTFilePathHint
89  << "' (for geometry)!\n";
90  }
91 
92  //
93  // initialize the geometry with the files we have found
94  //
95  geom->LoadGeometryFile(GDMLFilePath, ROOTFilePath, bForceReload);
96 
97  //
98  // create and apply channel mapping
99  //
100 
101  geom->ApplyChannelMap(move(channelMap));
102 
103  return geom;
104 } // lar::standalone::SetupGeometryWithChannelMapping()
std::string GDMLFileName