LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
geo::TPCID Struct Reference

The data type to uniquely identify a TPC. More...

#include "geo_types.h"

Inheritance diagram for geo::TPCID:
geo::CryostatID geo::PlaneID geo::WireID

Public Types

using TPCID_t = unsigned int
 Type for the ID number. More...
 
using ParentID_t = CryostatID
 Type of the parent ID. More...
 
using CryostatID_t = unsigned int
 Type for the ID number. More...
 

Public Member Functions

constexpr TPCID ()=default
 Default constructor: an invalid TPC ID. More...
 
constexpr TPCID (CryostatID const &cryoid, TPCID_t t)
 Constructor: TPC with index t in the cryostat identified by cryoid. More...
 
constexpr TPCID (CryostatID_t c, TPCID_t t)
 Constructor: TPC with index t in the cryostat index c. More...
 
TPCID next () const
 
constexpr auto const & deepestIndex () const
 Returns the value of the deepest ID available (TPC's). More...
 
auto & deepestIndex ()
 Returns the deepest ID available (TPC's). More...
 
constexpr ParentID_t const & parentID () const
 Return the parent ID of this one (a cryostat ID). More...
 
constexpr ParentID_tparentID ()
 
template<std::size_t Index>
constexpr auto getIndex () const
 Returns the index level Index of this type. More...
 
constexpr CryostatID const & asCryostatID () const
 Conversion to TPCID (for convenience of notation). More...
 
constexpr CryostatIDasCryostatID ()
 
std::string toString () const
 Human-readable representation of the TPC ID. More...
 
 operator std::string () const
 Human-readable representation of the TPC ID. More...
 
ID validity
constexpr operator bool () const
 Returns true if the ID is valid. More...
 
void setValidity (bool valid)
 Sets the validity of the ID. More...
 
void markValid ()
 Sets the ID as valid. More...
 
void markInvalid ()
 Sets the ID as invalid. More...
 

Static Public Member Functions

static constexpr auto first ()
 
static constexpr auto first (CryostatID const &id)
 
static constexpr TPCID_t getInvalidID ()
 Return the value of the invalid TPC ID as a r-value. More...
 

Public Attributes

TPCID_t TPC = InvalidID
 Index of the TPC within its cryostat. More...
 
bool isValid = false
 Whether this ID points to a valid element. More...
 
CryostatID_t Cryostat = InvalidID
 Index of cryostat. More...
 

Static Public Attributes

static constexpr TPCID_t InvalidID = std::numeric_limits<TPCID_t>::max()
 Special code for an invalid ID. More...
 
static constexpr auto Level = details::index_for<TPCID>()
 Level of this element. More...
 

Detailed Description

The data type to uniquely identify a TPC.

Definition at line 306 of file geo_types.h.

Member Typedef Documentation

using geo::CryostatID::CryostatID_t = unsigned int
inherited

Type for the ID number.

Definition at line 188 of file geo_types.h.

Type of the parent ID.

Definition at line 309 of file geo_types.h.

using geo::TPCID::TPCID_t = unsigned int

Type for the ID number.

Definition at line 307 of file geo_types.h.

Constructor & Destructor Documentation

constexpr geo::TPCID::TPCID ( )
default

Default constructor: an invalid TPC ID.

Referenced by tca::MakePFParticles(), and tca::PFPVertexCheck().

constexpr geo::TPCID::TPCID ( CryostatID const &  cryoid,
TPCID_t  t 
)
inline

Constructor: TPC with index t in the cryostat identified by cryoid.

Definition at line 321 of file geo_types.h.

321 : CryostatID(cryoid), TPC(t) {}
constexpr CryostatID()=default
Default constructor: an invalid cryostat.
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:315
constexpr geo::TPCID::TPCID ( CryostatID_t  c,
TPCID_t  t 
)
inline

Constructor: TPC with index t in the cryostat index c.

Definition at line 324 of file geo_types.h.

324 : CryostatID(c), TPC(t) {}
constexpr CryostatID()=default
Default constructor: an invalid cryostat.
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:315

Member Function Documentation

constexpr CryostatID const& geo::TPCID::asCryostatID ( ) const
inline

Conversion to TPCID (for convenience of notation).

Definition at line 352 of file geo_types.h.

352 { return parentID(); }
constexpr ParentID_t const & parentID() const
Return the parent ID of this one (a cryostat ID).
Definition: geo_types.h:345
constexpr CryostatID& geo::TPCID::asCryostatID ( )
inline

Definition at line 353 of file geo_types.h.

353 { return parentID(); }
constexpr ParentID_t const & parentID() const
Return the parent ID of this one (a cryostat ID).
Definition: geo_types.h:345
constexpr auto const& geo::TPCID::deepestIndex ( ) const
inline

Returns the value of the deepest ID available (TPC's).

Definition at line 341 of file geo_types.h.

341 { return TPC; }
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:315
auto& geo::TPCID::deepestIndex ( )
inline

Returns the deepest ID available (TPC's).

Definition at line 343 of file geo_types.h.

343 { return TPC; }
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:315
static constexpr auto geo::TPCID::first ( )
inlinestatic

Definition at line 328 of file geo_types.h.

References geo::CryostatID::first().

Referenced by geo::details::GeometryIterationPolicy::EndTPCID(), shower::EMShowerAlg::FindInitialTrackHits(), geo::PlaneID::first(), reco3d::TripletFinder::Triplets(), and reco3d::TripletFinder::TripletsTwoView().

328 { return TPCID{CryostatID::first(), 0}; }
static constexpr auto first()
Definition: geo_types.h:206
constexpr TPCID()=default
Default constructor: an invalid TPC ID.
static constexpr auto geo::TPCID::first ( CryostatID const &  id)
inlinestatic

Definition at line 329 of file geo_types.h.

References geo::details::writeToString().

329 { return TPCID{id, 0}; }
constexpr TPCID()=default
Default constructor: an invalid TPC ID.
template<std::size_t Index>
constexpr auto geo::TPCID::getIndex ( ) const

Returns the index level Index of this type.

Definition at line 658 of file geo_types.h.

659 {
660  static_assert(Index <= Level, "This ID type does not have the requested Index level.");
661  return details::getAbsIDindex<Index>(*this);
662 }
static constexpr auto Level
Level of this element.
Definition: geo_types.h:356
static constexpr TPCID_t geo::TPCID::getInvalidID ( )
inlinestatic

Return the value of the invalid TPC ID as a r-value.

Definition at line 359 of file geo_types.h.

References InvalidID.

Referenced by detsim::SimDriftElectrons::produce().

359 { return TPCID::InvalidID; }
static constexpr TPCID_t InvalidID
Special code for an invalid ID.
Definition: geo_types.h:313
void geo::CryostatID::markInvalid ( )
inlineinherited

Sets the ID as invalid.

Definition at line 220 of file geo_types.h.

References geo::details::writeToString().

220 { setValidity(false); }
void setValidity(bool valid)
Sets the validity of the ID.
Definition: geo_types.h:214
void geo::CryostatID::markValid ( )
inlineinherited

Sets the ID as valid.

Definition at line 217 of file geo_types.h.

217 { setValidity(true); }
void setValidity(bool valid)
Sets the validity of the ID.
Definition: geo_types.h:214
TPCID geo::TPCID::next ( ) const
inline

Definition at line 326 of file geo_types.h.

326 { return {Cryostat, TPC + 1}; }
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:195
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:315
constexpr geo::CryostatID::operator bool ( ) const
inlineexplicitinherited

Returns true if the ID is valid.

Definition at line 211 of file geo_types.h.

211 { return isValid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:194
geo::TPCID::operator std::string ( ) const
inlineexplicit

Human-readable representation of the TPC ID.

Definition at line 336 of file geo_types.h.

336 { return toString(); }
std::string toString() const
Human-readable representation of the TPC ID.
Definition: geo_types.h:335
constexpr ParentID_t const& geo::TPCID::parentID ( ) const
inline

Return the parent ID of this one (a cryostat ID).

Definition at line 345 of file geo_types.h.

Referenced by geo::operator<<().

345 { return *this; }
constexpr ParentID_t& geo::TPCID::parentID ( )
inline

Definition at line 346 of file geo_types.h.

346 { return *this; }
void geo::CryostatID::setValidity ( bool  valid)
inlineinherited

Sets the validity of the ID.

Definition at line 214 of file geo_types.h.

214 { isValid = valid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:194
std::string geo::TPCID::toString ( ) const
inline

Human-readable representation of the TPC ID.

Definition at line 335 of file geo_types.h.

335 { return details::writeToString(*this); }
std::string writeToString(T const &value)
Write the argument into a string.
Definition: geo_types.h:627

Member Data Documentation

CryostatID_t geo::CryostatID::Cryostat = InvalidID
inherited

Index of cryostat.

Definition at line 195 of file geo_types.h.

Referenced by detsim::WienerFilterAna::analyze(), trkf::SpacePointAna::analyze(), pma::ProjectionMatchingAlg::buildShowerSeg(), mvapid::MVAAlg::CalcSegmentdEdxDist(), tca::ChgFracBetween(), tca::ChgFracNearEnd(), lar_cluster3d::StandardHit3DBuilder::CollectArtHits(), lar_cluster3d::SnippetHit3DBuilder::CollectArtHits(), trkf::SpacePointAlg::compatible(), tca::CompleteIncomplete3DVerticesInGaps(), ems::MultiEMShowers::convCluster(), detinfo::DetectorPropertiesData::ConvertTicksToX(), detinfo::DetectorPropertiesData::ConvertXToTicks(), geo::GeometryCore::Cryostat(), geo::GeometryCore::CryostatPtr(), cluster::ClusterCrawlerAlg::EncodeCTP(), tca::EncodeCTP(), ems::EndPoint::EndPoint(), trkf::SpacePointAlg::fillComplexSpacePoint(), tca::FillmAllTraj(), lar_pandora::PFParticleHitDumper::FillRecoWires(), trkf::SpacePointAlg::fillSpacePoint(), tca::FillWireHitRange(), tca::FillWireIntersections(), tca::Find3DVertices(), apa::DisambigAlg::FindChanTimeEndPts(), hit::HitCheater::FindHitsOnChannel(), larg4::LArVoxelReadoutGeometry::FindNestedVolume(), tca::FindParent(), tca::FitTP3Ds(), ems::EMShower3D::GetCloseHits(), geo::GeometryCore::GetClosestOpDet(), calo::GnocchiCalorimetry::GetPitch(), pma::Track3D::GetUnconstrainedProj3D(), detinfo::DetectorPropertiesData::GetXTicksOffset(), cluster::MergeClusterAlg::GlobalWire(), cluster::BlurredClusteringAlg::GlobalWire(), shower::EMShowerAlg::GlobalWire_(), geo::GeometryCore::HasCryostat(), tss::Hit2D::Hit2D(), pma::Hit3D::Hit3D(), lar_cluster3d::SpacePointHit3DBuilder::Hit3DBuilder(), hit::DisambigCheater::InitHitToWids(), trkf::KHitWireLine::KHitWireLine(), trkf::KHitWireX::KHitWireX(), lar_cluster3d::StandardHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::SnippetHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::StandardHit3DBuilder::makeHitPair(), lar_cluster3d::SnippetHit3DBuilder::makeHitPair(), lar_cluster3d::StandardHit3DBuilder::makeHitTriplet(), lar_cluster3d::SnippetHit3DBuilder::makeHitTriplet(), tca::MakePFPTjs(), trkf::SpacePointAlg::makeSpacePoints(), trkf::CosmicTrackerAlg::MakeSPT(), tca::Match2Planes(), evd::SimulationDrawer::MCTruthOrtho(), apa::APAGeometryAlg::NearestWireIDOnChan(), geo::WireReadoutStandardGeom::NTPCsets(), geo::operator<(), anab::operator<<(), recob::operator<<(), geo::operator<<(), geo::operator==(), lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_2D(), tca::Print3S(), tca::Print3V(), tca::PrintAllTraj(), tca::PrintTP3Ds(), cluster::LineCluster::produce(), cluster::TrajCluster::produce(), hit::DPRawHitFinder::produce(), detsim::SimDriftElectrons::produce(), calo::Calorimetry::produce(), calo::GnocchiCalorimetry::produce(), trkf::SpacePointAlg::separation(), tca::SignalAtTp(), cheat::BackTracker::SpacePointHitsToWeightedXYZ(), apa::DisambigAlg::TrivialDisambig(), tca::ValidTwoPlaneMatch(), trkf::VertexFitAlg::VertexFit(), cluster::ClusterCrawlerAlg::Vtx3ClusterMatch(), cluster::ClusterCrawlerAlg::Vtx3ClusterSplit(), cluster::ClusterCrawlerAlg::VtxMatch(), tca::WireHitRangeOK(), and lar_cluster3d::SnippetHit3DBuilder::WireIDsIntersect().

constexpr TPCID_t geo::TPCID::InvalidID = std::numeric_limits<TPCID_t>::max()
static

Special code for an invalid ID.

Definition at line 313 of file geo_types.h.

Referenced by getInvalidID().

constexpr auto geo::TPCID::Level = details::index_for<TPCID>()
static

Level of this element.

Definition at line 356 of file geo_types.h.

TPCID_t geo::TPCID::TPC = InvalidID

Index of the TPC within its cryostat.

Definition at line 315 of file geo_types.h.

Referenced by ClusteringValidation::ClusterAnalyser::Analyse(), detsim::WienerFilterAna::analyze(), hit::MagDriftAna::analyze(), trkf::SpacePointAna::analyze(), apa::APAGeometryAlg::APAGeometryAlg(), trkf::TrajectoryMCSFitter::breakTrajInSegments(), pma::ProjectionMatchingAlg::buildShowerSeg(), mvapid::MVAAlg::CalcSegmentdEdxDist(), ShowerRecoTools::ShowerTrajPointdEdx::CalculateElement(), tca::ChgFracBetween(), tca::ChgFracNearEnd(), lar_cluster3d::StandardHit3DBuilder::CollectArtHits(), lar_cluster3d::SnippetHit3DBuilder::CollectArtHits(), trkf::SpacePointAlg::compatible(), tca::CompleteIncomplete3DVerticesInGaps(), ems::MultiEMShowers::convCluster(), detinfo::DetectorPropertiesData::ConvertTicksToX(), detinfo::DetectorPropertiesData::ConvertXToTicks(), cluster::ClusterCrawlerAlg::EncodeCTP(), tca::EncodeCTP(), ems::EndPoint::EndPoint(), trkf::SpacePointAlg::fillComplexSpacePoint(), tca::FillmAllTraj(), lar_pandora::PFParticleHitDumper::FillRecoWires(), trkf::SpacePointAlg::fillSpacePoint(), tca::FillWireHitRange(), tca::FillWireIntersections(), tca::Find3DVertices(), apa::DisambigAlg::FindChanTimeEndPts(), hit::HitCheater::FindHitsOnChannel(), shower::EMShowerAlg::FindInitialTrackHits(), larg4::LArVoxelReadoutGeometry::FindNestedVolume(), tca::FindParent(), tca::FitTP3Ds(), ems::EMShower3D::GetCloseHits(), cluster::TrajCluster::GetHits(), calo::Calorimetry::GetPitch(), calo::GnocchiCalorimetry::GetPitch(), pma::Track3D::GetUnconstrainedProj3D(), detinfo::DetectorPropertiesData::GetXTicksOffset(), cluster::MergeClusterAlg::GlobalWire(), cluster::BlurredClusteringAlg::GlobalWire(), shower::EMShowerAlg::GlobalWire_(), geo::CryostatGeo::HasTPC(), tss::Hit2D::Hit2D(), pma::Hit3D::Hit3D(), lar_cluster3d::SpacePointHit3DBuilder::Hit3DBuilder(), hit::DisambigCheater::InitHitToWids(), trkf::KHitWireLine::KHitWireLine(), trkf::KHitWireX::KHitWireX(), trkf::TrajectoryMCSFitter::linearRegression(), apa::DisambigAlg::MakeCloseHits(), lar_cluster3d::StandardHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::SnippetHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::StandardHit3DBuilder::makeHitPair(), lar_cluster3d::SnippetHit3DBuilder::makeHitPair(), lar_cluster3d::StandardHit3DBuilder::makeHitTriplet(), lar_cluster3d::SnippetHit3DBuilder::makeHitTriplet(), tca::MakePFPTjs(), trkf::SpacePointAlg::makeSpacePoints(), trkf::CosmicTrackerAlg::MakeSPT(), tca::Match2Planes(), tca::Match3PlanesSpt(), evd::SimulationDrawer::MCTruthOrtho(), tca::NearbySrcHit(), apa::APAGeometryAlg::NearestWireIDOnChan(), anab::operator<<(), recob::operator<<(), geo::operator<<(), shower::EMShowerAlg::OrderShowerHits_(), lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_2D(), tca::Print3S(), tca::Print3V(), tca::PrintAllTraj(), tca::PrintTP3Ds(), cluster::LineCluster::produce(), sce::SCECorrection::produce(), cluster::TrajCluster::produce(), hit::DPRawHitFinder::produce(), detsim::SimDriftElectrons::produce(), calo::Calorimetry::produce(), calo::GnocchiCalorimetry::produce(), shower::EMShowerAlg::Project3DPointOntoPlane_(), trkf::SpacePointAlg::separation(), tca::SignalAtTp(), cheat::BackTracker::SpacePointHitsToWeightedXYZ(), geo::CryostatGeo::TPC(), geo::CryostatGeo::TPCPtr(), apa::DisambigAlg::TrivialDisambig(), tca::ValidTwoPlaneMatch(), trkf::VertexFitAlg::VertexFit(), cluster::ClusterCrawlerAlg::Vtx3ClusterMatch(), cluster::ClusterCrawlerAlg::Vtx3ClusterSplit(), cluster::ClusterCrawlerAlg::VtxMatch(), tca::WireHitRangeOK(), lar_cluster3d::SnippetHit3DBuilder::WireIDsIntersect(), geo::WireReadoutGeom::WireIDsIntersect(), and calo::GnocchiCalorimetry::WireToTrajectoryPosition().


The documentation for this struct was generated from the following file: