19 #ifndef LARCOREALG_GEOMETRY_GEOMETRYCORE_H 20 #define LARCOREALG_GEOMETRY_GEOMETRYCORE_H 56 #include <type_traits> 122 template <
typename Po
int>
123 struct Segment :
public std::pair<Point, Point> {
126 using std::pair<Point, Point>::pair;
230 void WorldBox(
double* xlo,
double* xhi,
double* ylo,
double* yhi,
double* zlo,
double* zhi)
289 std::vector<TGeoNode const*>
FindAllVolumes(std::set<std::string>
const& vol_names)
const;
305 std::set<std::string>
const& vol_names)
const;
341 template <
typename Stream>
342 void Print(Stream&& out, std::string
indent =
" ")
const;
346 std::string
Info(std::string
indent =
" ")
const;
356 template <
typename GeoID>
370 template <
typename GeoID>
384 template <
typename GeoID>
399 template <
typename GeoID,
typename ContextID>
411 template <
typename GeoID,
typename ContextID>
412 GeoID
GetEndID(ContextID
const&
id)
const;
528 template <
typename T>
534 template <
typename T>
540 template <
typename T>
546 template <
typename T,
typename BaseID>
552 template <
typename T,
typename BaseID>
558 template <
typename T,
typename ID>
644 template <
typename T>
669 template <
typename T>
702 return pCryo ? pCryo->
HasTPC(tpcid) :
false;
738 return pCryo ? pCryo->
TPCPtr(tpcid) :
nullptr;
936 template <
typename T>
960 template <
typename T>
997 unsigned int Nviews()
const;
1014 return pTPC ? pTPC->
HasPlane(planeid) :
false;
1050 return pTPC ? pTPC->
PlanePtr(planeid) :
nullptr;
1154 return pPlane ? pPlane->
NElements() : 0;
1178 return pPlane ? pPlane->
HasWire(wireid) :
false;
1195 return pPlane ? pPlane->
WirePtr(wireid) :
nullptr;
1546 PlaneID const& output_plane)
const;
1568 double slope2)
const;
1590 TPCID const& tpcid)
const 1616 PlaneID const& output_plane)
const;
1638 double slope2)
const;
1655 double angle_target);
1679 double angle_target,
1680 double pitch_target);
1820 double tolerance = 0)
const;
1833 double tolerance = 0)
const;
1848 double tolerance = 0)
const;
1851 std::string
const& auxDetName,
1852 uint32_t
const& channel)
const;
1856 std::string
const& auxDetName,
1857 uint32_t
const& channel)
const;
2025 template <
typename T>
2045 template <
typename T>
2163 template <
typename T>
2183 template <
typename T>
2346 unsigned int OpChannel(
int detNum,
int hardwareChannel)
const;
2355 unsigned int OpDetFromCryo(
unsigned int o,
unsigned int c)
const;
2391 std::string rootfile,
2393 bool bForceReload =
false);
2406 void LoadGeometryFile(std::string gdmlfile, std::string rootfile,
bool bForceReload =
false);
2451 std::string
const& name =
"volDetEnclosure")
const;
2453 bool FindFirstVolume(std::string
const& name, std::vector<const TGeoNode*>& path)
const;
2490 unsigned int const nTPCsInCryo =
NTPC(
id);
2491 if (++
id.
TPC < nTPCsInCryo)
return bool(
id);
2501 unsigned int const nPlanesInTPC =
Nplanes(
id);
2502 if (++
id.
Plane < nPlanesInTPC)
return bool(
id);
2512 unsigned int const nWiresInPlane =
Nwires(
id);
2513 if (++
id.
Wire < nWiresInPlane)
return bool(
id);
2521 unsigned int const nTPCsetsInCryo =
NTPCsets(
id);
2522 if (++
id.TPCset < nTPCsetsInCryo)
return bool(
id);
2532 unsigned int const nROPinTPC =
NROPs(
id);
2533 if (++
id.ROP < nROPinTPC)
return bool(
id);
2568 inline PlaneID GeometryCore::GetBeginID<PlaneID, TPCID>(
TPCID const& id)
const 2580 inline PlaneID GeometryCore::GetEndID<PlaneID, TPCID>(
TPCID const& id)
const 2593 inline WireID GeometryCore::GetBeginID<WireID, TPCID>(
TPCID const& id)
const 2599 inline WireID GeometryCore::GetBeginID<WireID, PlaneID>(
PlaneID const& id)
const 2611 inline WireID GeometryCore::GetEndID<WireID, TPCID>(
TPCID const& id)
const 2669 WireID const& wireid)
const 2676 template <
typename Stream>
2681 <<
" auxiliary detectors:";
2685 << indent <<
"Detector enclosure: " << detEnclosureBox.Min() <<
" -- " 2686 << detEnclosureBox.Max() <<
" cm => ( " << detEnclosureBox.SizeX() <<
" x " 2687 << detEnclosureBox.SizeY() <<
" x " << detEnclosureBox.SizeZ() <<
" ) cm^3";
2689 for (
auto const& cryostat : Iterate<CryostatGeo>()) {
2691 cryostat.PrintCryostatInfo(std::forward<Stream>(out), indent +
" ", cryostat.MaxVerbosity);
2693 const unsigned int nTPCs = cryostat.NTPC();
2694 for (
unsigned int t = 0; t < nTPCs; ++t) {
2695 const TPCGeo& tpc = cryostat.TPC(t);
2697 out <<
"\n" << indent <<
" ";
2700 const unsigned int nPlanes = tpc.
Nplanes();
2701 for (
unsigned int p = 0; p < nPlanes; ++p) {
2703 const unsigned int nWires = plane.
Nwires();
2705 out <<
"\n" << indent <<
" ";
2710 <<
"signal type: " <<
SignalTypeName(sigType) <<
" (" <<
static_cast<int>(sigType)
2713 for (
unsigned int w = 0;
w < nWires; ++
w) {
2719 out <<
"\n" << indent <<
" " << wireID <<
" ";
2725 unsigned int nOpDets = cryostat.NOpDet();
2726 for (
unsigned int iOpDet = 0; iOpDet < nOpDets; ++iOpDet) {
2727 OpDetGeo const& opDet = cryostat.OpDet(iOpDet);
2728 out <<
"\n" << indent <<
" [OpDet #" << iOpDet <<
"] ";
2733 unsigned int const nAuxDets =
NAuxDets();
2734 for (
unsigned int iDet = 0; iDet < nAuxDets; ++iDet) {
2737 out <<
"\n" << indent <<
"[#" << iDet <<
"] ";
2741 switch (nSensitive) {
2745 out <<
"\n" << indent <<
" ";
2750 for (
unsigned int iSens = 0; iSens < nSensitive; ++iSens) {
2751 out <<
"\n" << indent <<
"[#" << iSens <<
"] ";
2764 #endif // LARCOREALG_GEOMETRY_GEOMETRYCORE_H
unsigned int NAuxDetSensitive(size_t const &aid) const
Returns the number of sensitive components of auxiliary detector.
CryostatGeo const * PositionToCryostatPtr(Point_t const &point) const
Returns the cryostat at specified location.
WireID GetBeginWireID(CryostatID const &id) const
Returns the ID of the first wire in the specified cryostat.
geo::WirePtr WirePtr(unsigned int iwire) const
Returns the wire number iwire from this plane.
unsigned int NElements() const
Number of wires in this plane.
details::range_type< T > Iterate() const
Initializes the specified ID with the ID of the first cryostat.
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
bool HasElement(readout::TPCsetID const &tpcsetid) const
Returns whether we have the specified TPC set.
bool HasElement(PlaneID const &planeid) const
Returns whether we have the specified plane.
GeoID GetEndID() const
Returns the (possibly invalid) ID after the last subelement of the detector.
std::string GetLArTPCVolumeName(TPCID const &tpcid=tpc_zero) const
Return the name of specified LAr TPC volume.
bool HasPlane(unsigned int iplane) const
Returns whether a plane with index iplane is present in this TPC.
readout::TPCsetDataContainer< T > makeTPCsetData(T const &defValue) const
Returns a container with one entry per TPC set.
IDparameter< geo::CryostatID > CryostatID
Member type of validated geo::CryostatID parameter.
void LoadGeometryFile(std::string gdmlfile, std::string rootfile, GeometryBuilder &builder, bool bForceReload=false)
Loads the geometry information from the specified files.
unsigned int NTPC(CryostatID const &cryoid=cryostat_zero) const
Returns the total number of TPCs in the specified cryostat.
Length_t WireCoordinate(Point_t const &pos, PlaneID const &planeid) const
Returns the index of the nearest wire to the specified position.
void PrintWireInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this wire.
OpDetGeo const & OpDetGeoFromOpDet(unsigned int OpDet) const
Returns the geo::OpDetGeo object for the given detector number.
WireGeo const & WireIDToWireGeo(WireID const &wireid) const
Returns the specified wire.
void PrintTPCInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this TPC.
void GetBeginID(CryostatID &id) const
Initializes the specified ID with the ID of the first cryostat.
void SortGeometry(GeoObjectSorter const &sorter)
Runs the sorting of geometry with the sorter provided by channel mapping.
unsigned int TotalNTPC() const
Returns the total number of TPCs in the detector.
GeometryData_t fGeoData
The detector description data.
Container with one element per readout TPC set.
unsigned int NElements(TPCID const &tpcid) const
Returns the largest number of planes among all TPCs in this detector.
std::vector< PlaneID > ROPtoWirePlanes(readout::ROPID const &ropid) const
Returns a list of ID of planes belonging to the specified ROP.
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
bool HasPlane(PlaneID const &planeid) const
Returns whether we have the specified plane.
Encapsulate the construction of a single cyostat.
double Length_t
Type used for coordinates and distances. They are measured in centimeters.
Encapsulate the geometry of the sensitive portion of an auxiliary detector.
GeoID GetBeginID() const
Returns the ID of the first element of the detector.
bool HasWire(WireID const &wireid) const
Returns whether we have the specified wire.
Classes identifying readout-related concepts.
unsigned int FindAuxDetAtPosition(Point_t const &point, double tolerance=0) const
Returns the index of the auxiliary detector at specified location.
WireGeo const * GetElementPtr(WireID const &wireid) const
Returns the specified wire.
void Print(Stream &&out, std::string indent=" ") const
Prints geometry information with maximum verbosity.
WireGeo const & Wire(unsigned int iwire) const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
void BuildGeometry(GeometryBuilder &builder)
readout::TPCsetID GetBeginTPCsetID(CryostatID const &id) const
Returns the ID of the first TPC set in the specified cryostat.
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
unsigned int Nplanes() const
Number of planes in this tpc.
PlaneGeo const * PlanePtr(PlaneID const &planeid) const
Returns the specified plane.
Container with one element per readout plane.
double ThirdPlaneSlope(PlaneID::PlaneID_t plane1, double slope1, PlaneID::PlaneID_t plane2, double slope2, TPCID const &tpcid) const
Returns the slope on the third plane, given it in the other two.
static double ComputeThirdPlane_dTdW(double angle1, double pitch1, double dTdW1, double angle2, double pitch2, double dTdW2, double angle_target, double pitch_target)
Returns the slope on the third plane, given it in the other two.
Length_t DetHalfWidth(TPCID const &tpcid=tpc_zero) const
Returns the half width of the active volume of the specified TPC.
AuxDetList_t auxDets
The auxiliary detectors.
readout::ROPDataContainer< T > makeROPdata() const
Returns a container with one entry per readout plane.
Simple data structure holding the data of the geometry.
unsigned int PlaneID_t
Type for the ID number.
PlaneGeo const & GetElement(PlaneID const &planeid) const
Returns the specified wire.
unsigned int GetClosestOpDet(Point_t const &point) const
Find the nearest OpChannel to some point.
CryostatGeo const * GetElementPtr(CryostatID const &cryoid) const
Returns the specified cryostat.
The data type to uniquely identify a Plane.
Geometry information for a single TPC.
Length_t CryostatHalfWidth(CryostatID const &cid=cryostat_zero) const
Returns the half width of the cryostat (x direction)
bool WireIDsIntersect(WireID const &wid1, WireID const &wid2, Point_t &intersection) const
Computes the intersection between two wires.
std::vector< TPCID > TPCsetToTPCs(readout::TPCsetID const &tpcsetid) const
Returns a list of ID of TPCs belonging to the specified TPC set.
readout::ROPDataContainer< T > makeROPdata(T const &defValue) const
Returns a container with one entry per readout plane.
unsigned int MaxROPs() const
Returns the largest number of ROPs a TPC set in the detector has.
std::set< View_t > allViews
All views in the detector.
Class identifying a set of TPC sharing readout channels.
BoxBoundedGeo DetectorEnclosureBox(std::string const &name="volDetEnclosure") const
const std::string GetWorldVolumeName() const
Return the name of the world volume (needed by Geant4 simulation)
Point const & start() const
std::vector< TGeoNode const * > FindDetectorEnclosure(std::string const &name="volDetEnclosure") const
unsigned int NOpHardwareChannels(int opDet) const
Number of electronics channels for all the optical detectors.
bool ChannelsIntersect(raw::ChannelID_t c1, raw::ChannelID_t c2, double &y, double &z) const
Returns an intersection point of two channels.
std::vector< geo::CryostatGeo > CryostatList_t
Type of list of cryostats.
std::string const & ROOTFile() const
Returns the full directory path to the geometry file source.
double fSurfaceY
The point where air meets earth for this detector.
TGeoVolume const * WorldVolume() const
Returns a pointer to the world volume.
Interface for geometry extractor classes.
CryostatID_t Cryostat
Index of cryostat.
details::begin_type< T > begin() const
Initializes the specified ID with the ID of the first cryostat.
unsigned int MaxWires() const
Returns the largest number of wires among all planes in this detector.
WireID GetBeginWireID(PlaneID const &id) const
Returns the ID of the first wire of the specified wire plane.
TPCID GetEndTPCID(CryostatID const &id) const
readout::TPCsetID FindTPCsetAtPosition(Point_t const &worldLoc) const
Returns the ID of the TPC set at specified location.
bool WireIDIntersectionCheck(const WireID &wid1, const WireID &wid2) const
Wire ID check for WireIDsIntersect methods.
const AuxDetSensitiveGeo & ChannelToAuxDetSensitive(std::string const &auxDetName, uint32_t const &channel) const
Returns the number of auxiliary detectors.
static constexpr std::size_t MaxWireDepthInGDML
readout::ROPID GetEndROPID(CryostatID const &id) const
Point const & end() const
CryostatList_t cryostats
The detector cryostats.
bool FindFirstVolume(std::string const &name, std::vector< const TGeoNode * > &path) const
Container with one element per geometry wire plane.
details::range_type< T > Iterate(ID const &id) const
Initializes the specified ID with the ID of the first cryostat.
bool HasElement(WireID const &wireid) const
Returns whether we have the specified wire.
TGeoMaterial const * Material(Point_t const &point) const
Returns the material at the specified position.
Geometry information for a single cryostat.
WireGeo const & Wire(WireID const &wireid) const
Returns the specified wire.
CryostatGeo const & GetElement(CryostatID const &cryoid) const
Returns the specified cryostat.
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
CryostatGeo const & Cryostat(CryostatID const &cryoid=cryostat_zero) const
Returns the specified cryostat.
CryostatGeo const & PositionToCryostat(Point_t const &point) const
Returns the cryostat at specified location.
Point_t GetStart() const
Returns the world coordinate of one end of the wire [cm].
Point_t GetEnd() const
Returns the world coordinate of one end of the wire [cm].
unsigned int NOpChannels() const
Number of electronics channels for all the optical detectors.
Length_t CryostatHalfHeight(CryostatID const &cid=cryostat_zero) const
Returns the height of the cryostat (y direction)
void GetBeginID(readout::TPCsetID &id) const
Initializes the specified ID with the ID of the first TPC set.
TGeoManager * ROOTGeoManager() const
Access to the ROOT geometry description manager.
unsigned int NElements(PlaneID const &planeid) const
Returns the total number of wires in the specified plane.
Length_t DetLength(TPCID const &tpcid=tpc_zero) const
Returns the length of the active volume of the specified TPC.
Length_t SurfaceY() const
The position of the detector respect to earth surface.
static end_type create_end(Geom const *geom)
Class for approximate comparisons.
unsigned int OpDetFromCryo(unsigned int o, unsigned int c) const
Get unique opdet number from cryo and internal count.
std::string OpDetGeoName(CryostatID const &cid=cryostat_zero) const
Returns gdml string which gives sensitive opdet name.
unsigned int NSiblingElements(readout::TPCsetID const &tpcsetid) const
Returns the total number of TPC sets in the specified cryostat.
unsigned int NElements() const
Returns the number of cryostats in the detector.
TPCGeo const & GetElement(TPCID const &tpcid) const
Returns the specified TPC.
unsigned int OpDetFromOpChannel(int opChannel) const
Convert unique channel to detector number.
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
PlaneDataContainer< T > makePlaneData(T const &defValue) const
Returns a container with one entry per wire plane.
unsigned int NSiblingElements(TPCID const &tpcid) const
Returns the largest number of TPCs a cryostat in the detector has.
void GetBeginID(TPCID &id) const
Initializes the specified ID with the ID of the first TPC.
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
double TotalMass() const
Returns the total mass [kg] of the specified volume (default: world).
void GetBeginID(readout::ROPID &id) const
Initializes the specified ID with the ID of the first readout plane.
CryostatList_t const & Cryostats() const
Interface to algorithm class for sorting geo::XXXGeo objects.
std::vector< TPCID > ROPtoTPCs(readout::ROPID const &ropid) const
Returns a list of ID of TPCs the specified ROP spans.
bool HasElement(CryostatID const &cryoid) const
Returns whether we have the specified cryostat.
bool HasElement(readout::ROPID const &ropid) const
AuxDetList_t const & AuxDets() const
Containers to hold one datum per TPC or plane.
PlaneGeo const & Plane(PlaneID const &planeid) const
Returns the specified wire.
bool HasROP(readout::ROPID const &ropid) const
double WireAngleToVertical(View_t view, TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
std::string VolumeName(Point_t const &point) const
Returns the name of the deepest volume containing specified point.
Container with one element per geometry TPC.
TPCID FindTPCAtPosition(Point_t const &point) const
Returns the ID of the TPC at specified location.
std::unique_ptr< const ChannelMapAlg > fChannelMapAlg
Object containing the channel to wire mapping.
unsigned int MaxPlanes() const
Returns the largest number of planes among all TPCs in this detector.
void GetEndID(readout::TPCsetID &id) const
Initializes the specified ID with the invalid ID after the last TPC set.
readout::ROPID GetBeginROPID(readout::TPCsetID const &id) const
Returns the ID of the first readout plane of the specified TPC set.
void GetBeginID(WireID &id) const
Initializes the specified ID with the ID of the first wire.
GeometryData_t::CryostatList_t CryostatList_t
Type of list of cryostats.
TPCGeo const * GetElementPtr(TPCID const &tpcid) const
Returns the specified TPC.
typename IteratorMaker< T >::begin_type begin_type
const AuxDetSensitiveGeo & PositionToAuxDetSensitive(Point_t const &point, size_t &ad, size_t &sv, double tolerance=0) const
Returns the auxiliary detector at specified location.
Definitions of geometry vector data types.
raw::ChannelID_t FirstChannelInROP(readout::ROPID const &ropid) const
Returns the ID of the first channel in the specified readout plane.
void ClearGeometry()
Deletes the detector geometry structures.
unsigned int HardwareChannelFromOpChannel(int opChannel) const
Convert unique channel to hardware channel.
GeometryCore(fhicl::ParameterSet const &pset)
Initialize geometry from a given configuration.
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
TPCGeo const & PositionToTPC(Point_t const &point) const
Returns the TPC at specified location.
CryostatGeo const * CryostatPtr(CryostatID const &cryoid) const
Returns the specified cryostat.
void FindAuxDetSensitiveAtPosition(Point_t const &point, std::size_t &adg, std::size_t &sv, double tolerance=0) const
Fills the indices of the sensitive auxiliary detector at location.
WireID GetBeginWireID(TPCID const &id) const
Returns the ID of the first wire of the specified TPC.
std::string MaterialName(Point_t const &point) const
Name of the deepest material containing the point xyz.
std::string indent(std::size_t const i)
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
unsigned int NElements() const
Alias for NTPC().
unsigned int NSiblingElements(WireID const &wireid) const
Returns the total number of wires in the specified plane.
void PrintOpDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this optical detector.
Utilities to extend the interface of geometry vectors.
TPCGeo const * TPCPtr(unsigned int itpc) const
Returns the TPC number itpc from this cryostat.
bool IncrementID(CryostatID &id) const
TPCDataContainer< T > makeTPCData(T const &defValue) const
Returns a container with one entry per TPC.
TPCID GetBeginTPCID(CryostatID const &id) const
Returns the ID of the first TPC in the specified cryostat.
PlaneID GetBeginPlaneID(CryostatID const &id) const
Returns the ID of the first plane of the specified cryostat.
unsigned int MaxOpChannel() const
Largest optical channel number.
unsigned int NSiblingElements(CryostatID const &) const
Returns the number of cryostats in the detector.
size_t NSensitiveVolume() const
PlaneID GetBeginPlaneID(TPCID const &id) const
Returns the ID of the first plane of the specified TPC.
bool HasCryostat(CryostatID const &cryoid) const
Returns whether we have the specified cryostat.
std::string Info(std::string indent=" ") const
Returns a string with complete geometry information.
The data type to uniquely identify a TPC.
Description of geometry of one entire detector.
details::end_type< T > end() const
Initializes the specified ID with the ID of the first cryostat.
static begin_type create_begin(Geom const *geom)
void UpdateAfterSorting()
Performs all the updates needed after sorting.
Definition of data types for geometry description.
void GetEndID(CryostatID &id) const
Initializes the specified ID with the invalid ID after the last cryostat.
TPCDataContainer< T > makeTPCData() const
Returns a container with one entry per TPC.
readout::ROPID WirePlaneToROP(PlaneID const &planeid) const
Returns the ID of the ROP planeid belongs to.
AuxDetList_t & AuxDets()
Return the internal auxdet list.
double DefaultWiggle() const
Returns the tolerance used in looking for positions.
Class identifying a set of planes sharing readout channels.
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
void PrintAuxDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=0) const
Prints information about this auxiliary sensitive detector.
unsigned int NOpDets() const
Number of OpDets in the whole detector.
Provides a base class aware of world box coordinates.
double fPositionWiggle
accounting for rounding errors when testing positions
Encapsulate the geometry of an auxiliary detector.
Encapsulate the geometry of a wire.
GeometryData_t::AuxDetList_t AuxDetList_t
Type of list of auxiliary detectors.
std::vector< TGeoNode const * > FindAllVolumes(std::set< std::string > const &vol_names) const
Returns all the nodes with volumes with any of the specified names.
GeometryCore & operator=(GeometryCore const &)=delete
readout::ROPID ChannelToROP(raw::ChannelID_t channel) const
unsigned int OpChannel(int detNum, int hardwareChannel) const
Convert detector number and hardware channel to unique channel.
AuxDetGeo const & PositionToAuxDet(Point_t const &point, unsigned int &ad, double tolerance=0) const
Returns the auxiliary detector at specified location.
Encapsulate the geometry of an optical detector.
std::string fGDMLfile
path to geometry file used for Geant4 simulation
typename IteratorMaker< T >::end_type end_type
details::end_type< T > end(BaseID const &id) const
Initializes the specified ID with the ID of the first cryostat.
BoxBoundedGeo WorldBox() const
CryostatID PositionToCryostatID(Point_t const &point) const
Returns the ID of the cryostat at specified location.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
unsigned int NSiblingElements(PlaneID const &planeid) const
Returns the largest number of planes among all TPCs in this detector.
double MassBetweenPoints(Point_t const &p1, Point_t const &p2) const
Returns the column density between two points.
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
SigType_t SignalType(PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
unsigned int NTPCsets(geo::CryostatID const &cryoid) const
Returns the total number of TPC sets in the specified cryostat.
WireID NearestWireID(Point_t const &point, PlaneID const &planeid) const
Returns the ID of wire closest to position in the specified TPC.
WireGeo const & GetElement(WireID const &wireid) const
Returns the specified wire.
readout::TPCsetDataContainer< T > makeTPCsetData() const
Returns a container with one entry per TPC set.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintAuxDetInfo().
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Encapsulate the construction of a single detector plane.
static double ComputeThirdPlaneSlope(double angle1, double slope1, double angle2, double slope2, double angle_target)
Returns the slope on the third plane, given it in the other two.
readout::ROPID GetEndROPID(readout::TPCsetID const &id) const
bool HasWire(unsigned int iwire) const
Returns whether a wire with index iwire is present in this plane.
void PrintPlaneInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Returns a volume including all the wires in the plane.
PlaneGeo const * PlanePtr(unsigned int iplane) const
Returns the plane number iplane from this TPC.
double ThirdPlane_dTdW(PlaneID const &pid1, double slope1, PlaneID const &pid2, double slope2, PlaneID const &output_plane) const
Returns dT/dW on the third plane, given it in the other two.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
void GetEndID(readout::ROPID &id) const
Initializes the specified ID with the invalid ID after the last ROP.
Length_t CryostatLength(CryostatID const &cid=cryostat_zero) const
Returns the length of the cryostat (z direction)
TPCGeo const * TPCPtr(TPCID const &tpcid) const
Returns the specified TPC.
void ApplyChannelMap(std::unique_ptr< ChannelMapAlg > pChannelMap)
Initializes the geometry to work with this channel map.
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintOpDetInfo().
geo::PlaneID const & ID() const
Returns the identifier of this plane.
Length_t PlanePitch(TPCID const &tpcid, PlaneID::PlaneID_t p1=0, PlaneID::PlaneID_t p2=1) const
Returns the distance between two planes.
bool HasElement(TPCID const &tpcid) const
Returns whether we have the specified TPC.
unsigned int MaxTPCsets() const
Returns the largest number of TPC sets any cryostat in the detector has.
View_t View(PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintAuxDetInfo().
unsigned int Nwires() const
Number of wires in this plane.
double ThirdPlaneSlope(PlaneID const &pid1, double slope1, PlaneID const &pid2, double slope2, PlaneID const &output_plane) const
Returns the slope on the third plane, given it in the other two.
unsigned int NElements() const
Number of planes in this tpc.
CryostatList_t & Cryostats()
Return the internal cryostat list.
Simple class with two points (a pair with aliases).
unsigned int Nwires(PlaneID const &planeid) const
Returns the total number of wires in the specified plane.
PlaneID ThirdPlane(PlaneID const &pid1, PlaneID const &pid2) const
Returns the plane that is not in the specified arguments.
details::begin_type< T > begin(BaseID const &id) const
Initializes the specified ID with the ID of the first cryostat.
readout::TPCsetID TPCtoTPCset(TPCID const &tpcid) const
Returns the ID of the TPC set tpcid belongs to.
const AuxDetGeo & ChannelToAuxDet(std::string const &auxDetName, uint32_t const &channel) const
Returns the number of auxiliary detectors.
raw::ChannelID_t NearestChannel(Point_t const &worldLoc, PlaneID const &planeid) const
Returns the ID of the channel nearest to the specified position.
std::string const & GDMLFile() const
Returns the full directory path to the GDML file source.
std::string fDetectorName
Name of the detector.
std::set< View_t > const & Views() const
Returns a list of possible views in the detector.
Manages the extraction of LArSoft geometry information from ROOT.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintWireInfo().
Point_t GetTPCFrontFaceCenter(TPCID const &tpcid) const
Returns the center of side of the detector facing the beam.
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
std::vector< std::vector< TGeoNode const * > > FindAllVolumePaths(std::set< std::string > const &vol_names) const
Returns paths of all nodes with volumes with the specified names.
Length_t DetHalfHeight(TPCID const &tpcid=tpc_zero) const
Returns the half height of the active volume of the specified TPC.
unsigned int NROPs(readout::TPCsetID const &tpcsetid) const
Returns the total number of ROP in the specified TPC set.
std::vector< geo::AuxDetGeo > AuxDetList_t
Type of list of auxiliary detectors.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
bool HasTPC(unsigned int itpc) const
Returns whether a TPC with index itpc is present in this cryostat.
std::string const & DetectorName() const
Returns a string with the name of the detector, as configured.
Interface to algorithm class for a specific detector channel mapping.
bool IntersectionPoint(WireID const &wid1, WireID const &wid2, double &y, double &z) const
Returns the intersection point of two wires.
Data in the geometry description.
unsigned int NElements(CryostatID const &cryoid) const
Returns the largest number of TPCs a cryostat in the detector has.
unsigned int Nviews() const
Returns the number of views (different wire orientations)
static constexpr TPCID tpc_zero
Returns the specified TPC.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
void GetBeginID(PlaneID &id) const
Initializes the specified ID with the ID of the first plane.
readout::TPCsetID GetEndTPCsetID(CryostatID const &id) const
WireGeo const * WirePtr(WireID const &wireid) const
Returns the specified wire.
GeoID GetNextID(GeoID const &id) const
Returns the ID next to the specified one.
WireID GetEndWireID(CryostatID const &id) const
Containers to hold one datum per TPC set or readout plane.
second_as<> second
Type of time stored in seconds, in double precision.
static constexpr unsigned int MaxVerbosity
Maximum value for print verbosity.
unsigned int NSiblingElements(readout::ROPID const &ropid) const
Returns the total number of ROP in the specified TPC set.
TPCGeo const * PositionToTPCptr(Point_t const &point) const
Returns the TPC at specified location.
static constexpr unsigned int MaxVerbosity
Maximum verbosity supported by PrintTPCInfo().
Namespace collecting geometry-related classes utilities.
fhicl::ParameterSet fBuilderParameters
typename IteratorMaker< T >::range_type range_type
OpDetGeo const & OpDetGeoFromOpChannel(unsigned int OpChannel) const
Returns the geo::OpDetGeo object for the given channel number.
unsigned int MaxTPCs() const
Returns the largest number of TPCs a cryostat in the detector has.
std::string fROOTfile
path to geometry file for geometry in GeometryCore
std::string GetCryostatVolumeName(CryostatID const &cid) const
Return the name of LAr TPC volume.
Length_t WirePitch(PlaneID const &planeid=plane_zero) const
Returns the distance between two consecutive wires.
bool IsValidOpChannel(int opChannel) const
Is this a valid OpChannel number?
readout::ROPID GetBeginROPID(CryostatID const &id) const
Returns the ID of the first readout plane of the specified cryostat.
TPCID PositionToTPCID(Point_t const &point) const
Returns the ID of the TPC at specified location.
bool HasTPC(TPCID const &tpcid) const
Returns whether we have the specified TPC.
geo::Point_t GetFrontFaceCenter() const
Returns the center of the active TPC volume side facing negative z.
void PrintAuxDetInfo(Stream &&out, std::string indent="", unsigned int verbosity=1) const
Prints information about this auxiliary detector.
std::vector< raw::ChannelID_t > ChannelsInTPCs() const
Returns an std::vector<ChannelID_t> in all TPCs in a TPCSet.
bool HasChannel(raw::ChannelID_t channel) const
Returns whether the specified channel exists and is valid.
std::string SignalTypeName(geo::SigType_t sigType)
Returns the name of the specified signal type.
unsigned int NAuxDets() const
Returns the number of auxiliary detectors.
void WireEndPoints(WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
Encapsulate the construction of a single detector plane.
The data type to uniquely identify a cryostat.
PlaneGeo const * GetElementPtr(PlaneID const &planeid) const
Returns the specified plane.
static constexpr CryostatID cryostat_zero
Returns the specified cryostat.
static constexpr PlaneID plane_zero
Returns the distance between two consecutive wires.
static range_type create_range(Geom const *geom)
bool HasTPCset(readout::TPCsetID const &tpcsetid) const
PlaneDataContainer< T > makePlaneData() const
Returns a container with one entry per wire plane.
PlaneID GetEndPlaneID(CryostatID const &id) const