LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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
 Namespace collecting geometry-related classes utilities.
 

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::GeometryCore
 Description of geometry of one entire detector. 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...
 
std::unique_ptr< geo::GeometryCorelar::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::GeometryCorelar::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>());

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:
cet::filepath_lookup_after1 policy("FHICL_FILE_PATH");
pset = fhicl::_ParameterSet::make(configPath, policy);
// set up message facility
(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 141 of file StandaloneGeometrySetup.h.

References fhicl::ParameterSet::get(), and lar::standalone::SetupGeometryWithChannelMapping().

Referenced by testing::GeometryTesterEnvironment< ConfigurationClass >::RegisterGeometry(), and testing::GeometryTesterEnvironment< ConfigurationClass >::Setup().

143 {
144  auto const SortingParameters = pset.get<fhicl::ParameterSet>("SortingParameters", {});
145  auto channelMap =
146  std::make_unique<ChannelMapClass>(SortingParameters, std::forward<Args>(args)...);
147  return SetupGeometryWithChannelMapping(pset, move(channelMap));
148 } // lar::standalone::SetupGeometry()
std::unique_ptr< geo::GeometryCore > SetupGeometryWithChannelMapping(fhicl::ParameterSet const &pset, std::unique_ptr< geo::ChannelMapAlg > channelMap)
Initializes a LArSoft geometry object.
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 27 of file StandaloneGeometrySetup.cxx.

References fhicl::ParameterSet::get().

Referenced by lar::standalone::SetupGeometry().

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