LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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

typedef unsigned int TPCID_t
 Type for the ID number. More...
 
typedef unsigned int CryostatID_t
 Type for the ID number. More...
 

Public Member Functions

 TPCID ()=default
 Default constructor: an invalid TPC ID. More...
 
 TPCID (CryostatID const &cryoid, TPCID_t t)
 Constructor: TPC with index t in the cryostat identified by cryoid. More...
 
 TPCID (CryostatID_t c, TPCID_t t)
 Constructor: TPC with index t in the cryostat index c. More...
 
 operator std::string () const
 Human-readable representation of the TPC ID. More...
 
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...
 
TPCID const & asTPCID () const
 Conversion to TPCID (for convenience of notation). More...
 
TPCIDasTPCID ()
 Conversion to TPCID (for convenience of notation). More...
 
TPCID const & asConstTPCID ()
 Conversion to TPCID (for convenience of notation). More...
 
int cmp (TPCID const &other) const
 Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger. More...
 
int cmp (CryostatID const &other) const
 Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger. More...
 
CryostatID const & asCryostatID () const
 Conversion to CryostatID (for convenience of notation). More...
 
CryostatIDasCryostatID ()
 Conversion to CryostatID (for convenience of notation). More...
 
CryostatID const & asConstCryostatID ()
 Conversion to CryostatID (for convenience of notation). More...
 
ID validity
 operator bool () const
 Returns true if the ID is valid. More...
 
bool operator! () const
 Returns true if the ID is not 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 TPCID_t getInvalidID ()
 Return the value of the invalid TPC ID as a r-value. More...
 
template<typename T >
static int ThreeWayComparison (T a, T b)
 Returns < 0 if a < b, 0 if a == b, > 0 if a > b. 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 const TPCID_t InvalidID = std::numeric_limits<TPCID_t>::max()
 Special code for an invalid ID. More...
 

Detailed Description

The data type to uniquely identify a TPC.

Definition at line 195 of file geo_types.h.

Member Typedef Documentation

typedef unsigned int geo::CryostatID::CryostatID_t
inherited

Type for the ID number.

Definition at line 121 of file geo_types.h.

typedef unsigned int geo::TPCID::TPCID_t

Type for the ID number.

Definition at line 196 of file geo_types.h.

Constructor & Destructor Documentation

geo::TPCID::TPCID ( )
default

Default constructor: an invalid TPC ID.

Referenced by tca::PFPVertexCheck().

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

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

Definition at line 209 of file geo_types.h.

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

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

Definition at line 212 of file geo_types.h.

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

Member Function Documentation

CryostatID const& geo::CryostatID::asConstCryostatID ( )
inlineinherited

Conversion to CryostatID (for convenience of notation).

Definition at line 181 of file geo_types.h.

181 { return *this; }
TPCID const& geo::TPCID::asConstTPCID ( )
inline

Conversion to TPCID (for convenience of notation).

Definition at line 231 of file geo_types.h.

231 { return *this; }
CryostatID const& geo::CryostatID::asCryostatID ( ) const
inlineinherited

Conversion to CryostatID (for convenience of notation).

Definition at line 177 of file geo_types.h.

Referenced by readout::operator!=(), readout::operator<(), readout::operator<<(), and readout::operator==().

177 { return *this; }
CryostatID& geo::CryostatID::asCryostatID ( )
inlineinherited

Conversion to CryostatID (for convenience of notation).

Definition at line 179 of file geo_types.h.

179 { return *this; }
TPCID const& geo::TPCID::asTPCID ( ) const
inline

Conversion to TPCID (for convenience of notation).

Definition at line 227 of file geo_types.h.

Referenced by geo::GeometryCore::CheckIndependentPlanesOnSameTPC(), geo::GeometryCore::PlanePitch(), and geo::GeometryCore::WireIDIntersectionCheck().

227 { return *this; }
TPCID& geo::TPCID::asTPCID ( )
inline

Conversion to TPCID (for convenience of notation).

Definition at line 229 of file geo_types.h.

229 { return *this; }
int geo::CryostatID::cmp ( CryostatID const &  other) const
inlineinherited

Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.

Definition at line 173 of file geo_types.h.

References geo::CryostatID::deepestIndex().

Referenced by readout::TPCsetID::cmp(), cmp(), and readout::operator<().

174  { return ThreeWayComparison(deepestIndex(), other.deepestIndex()); }
auto const & deepestIndex() const
Returns the value of the deepest ID available (cryostat&#39;s).
Definition: geo_types.h:168
static int ThreeWayComparison(T a, T b)
Returns < 0 if a < b, 0 if a == b, > 0 if a > b.
Definition: geo_types.h:188
int geo::TPCID::cmp ( TPCID const &  other) const
inline

Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.

Definition at line 234 of file geo_types.h.

References geo::CryostatID::cmp(), and deepestIndex().

Referenced by geo::PlaneID::cmp().

235  {
236  int cmp_res = CryostatID::cmp(other);
237  if (cmp_res == 0) // same cryostat: compare TPC
238  return ThreeWayComparison(deepestIndex(), other.deepestIndex());
239  else // return the order of cryostats
240  return cmp_res;
241  } // cmp()
auto const & deepestIndex() const
Returns the value of the deepest ID available (TPC&#39;s).
Definition: geo_types.h:222
static int ThreeWayComparison(T a, T b)
Returns < 0 if a < b, 0 if a == b, > 0 if a > b.
Definition: geo_types.h:188
int cmp(CryostatID const &other) const
Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.
Definition: geo_types.h:173
auto const& geo::TPCID::deepestIndex ( ) const
inline

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

Definition at line 222 of file geo_types.h.

Referenced by cmp().

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

Returns the deepest ID available (TPC's).

Definition at line 224 of file geo_types.h.

224 { return TPC; }
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:203
static TPCID_t geo::TPCID::getInvalidID ( )
inlinestatic

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

Definition at line 244 of file geo_types.h.

References InvalidID.

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

Sets the ID as invalid.

Definition at line 157 of file geo_types.h.

Referenced by geo::PlaneGeo::ClosestWireID(), and geo::GeometryCore::FindTPCAtPosition().

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

Sets the ID as valid.

Definition at line 154 of file geo_types.h.

154 { setValidity(true); }
void setValidity(bool valid)
Sets the validity of the ID.
Definition: geo_types.h:151
geo::CryostatID::operator bool ( ) const
inlineexplicitinherited

Returns true if the ID is valid.

Definition at line 145 of file geo_types.h.

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

Human-readable representation of the TPC ID.

Definition at line 217 of file geo_types.h.

References geo::details::writeToString().

218  { return details::writeToString(*this); }
std::string writeToString(T const &value)
Write the argument into a string.
Definition: geo_types.h:514
bool geo::CryostatID::operator! ( ) const
inlineinherited

Returns true if the ID is not valid.

Definition at line 148 of file geo_types.h.

148 { return !isValid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:129
void geo::CryostatID::setValidity ( bool  valid)
inlineinherited

Sets the validity of the ID.

Definition at line 151 of file geo_types.h.

151 { isValid = valid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:129
template<typename T >
static int geo::CryostatID::ThreeWayComparison ( a,
b 
)
inlinestaticinherited

Returns < 0 if a < b, 0 if a == b, > 0 if a > b.

Definition at line 188 of file geo_types.h.

189  { return (a == b)? 0: ((a < b)? -1: +1); }

Member Data Documentation

CryostatID_t geo::CryostatID::Cryostat = InvalidID
inherited

Index of cryostat.

Definition at line 130 of file geo_types.h.

Referenced by detsim::WienerFilterAna::analyze(), hit::GausHitFinderAna::analyze(), mvapid::MVAAlg::CalcSegmentdEdxDist(), tca::TruthMatcher::CanReconstruct(), tca::ChgFracBetween(), tca::ChgFracNearEnd(), trkf::SpacePointAlg::compatible(), tca::CompleteIncomplete3DVerticesInGaps(), geo::ChannelMapStandardAlg::ConvertROPtoWirePlane(), util::DetectorPropertiesServiceArgoNeuT::ConvertTicksToX(), detinfo::DetectorPropertiesStandard::ConvertTicksToX(), geo::ChannelMapStandardAlg::ConvertTPCsetToTPC(), geo::ChannelMapStandardAlg::ConvertTPCtoTPCset(), geo::ChannelMapStandardAlg::ConvertWirePlaneToROP(), util::DetectorPropertiesServiceArgoNeuT::ConvertXToTicks(), detinfo::DetectorPropertiesStandard::ConvertXToTicks(), trkf::SpacePointAlg::correctedTime(), tss::Hit2D::Cryo(), geo::GeometryCore::Cryostat(), geo::GeometryCore::CryostatPtr(), cluster::ClusterCrawlerAlg::EncodeCTP(), tca::EncodeCTP(), cluster::EndPointAlg::EndPoint(), ems::EndPoint::EndPoint(), trkf::SpacePointAlg::fillComplexSpacePoint(), tca::FillmAllTraj(), lar_pandora::PFParticleHitDumper::FillRecoWires(), trkf::SpacePointAlg::fillSpacePoint(), tca::FillWireHitRange(), tca::Find3DVertices(), apa::DisambigAlg::FindChanTimeEndPts(), tca::FindCompleteness(), geo::GeometryCore::FindCryostatAtPosition(), hit::HitCheater::FindHitsOnChannel(), tca::FindMissedTjsInTp3s(), tca::TrajClusterAlg::FindMissedVxTjs(), tca::FindParent(), tca::FindPFParticles(), tca::FindShowers3D(), geo::GeometryCore::FindTPCAtPosition(), tca::FindXMatches(), tca::FitTp3(), tca::FitTp3s(), cluster::ClusterCrawlerAlg::FitVtx(), tca::FollowTp3s(), ems::EMShower3D::GetCloseHits(), trkf::BezierTrack::GetClosestApproach(), trkf::BezierTrack::GetClosestApproaches(), geo::GeometryCore::GetClosestOpDet(), geo::GeometryCore::GetEndTPCID(), geo::GeometryCore::GetEndTPCsetID(), lar_cluster3d::PrincipalComponentsAlg::getHit2DPocaToAxis(), cluster::ClusterCrawlerAlg::GetHitRange(), calo::Calorimetry::GetPitch(), nnet::TrainingDataAlg::getProjection(), lar_pandora::LArPandoraInput::GetTrueStartAndEndPoints(), pma::Track3D::GetUnconstrainedProj3D(), lar_pandora::PFParticleHitDumper::GetUVW(), util::DetectorPropertiesServiceArgoNeuT::GetXTicksCoefficient(), detinfo::DetectorPropertiesStandard::GetXTicksCoefficient(), util::DetectorPropertiesServiceArgoNeuT::GetXTicksOffset(), detinfo::DetectorPropertiesStandard::GetXTicksOffset(), cluster::MergeClusterAlg::GlobalWire(), cluster::BlurredClusteringAlg::GlobalWire(), shower::EMShowerAlg::GlobalWire(), geo::TPCDataContainer< T >::hasCryostat(), geo::PlaneDataContainer< T >::hasCryostat(), geo::GeometryCore::HasCryostat(), ems::Hit2D::Hit2D(), tss::Hit2D::Hit2D(), pma::Hit3D::Hit3D(), hit::DisambigCheater::InitHitToWids(), trkf::KHitWireLine::KHitWireLine(), trkf::KHitWireX::KHitWireX(), lar_cluster3d::PCASeedFinderAlg::LineFit2DHits(), lar_cluster3d::HoughSeedFinderAlg::LineFit2DHits(), geo::details::cryostat_id_iterator_base< GEOID >::localID(), apa::DisambigAlg::MakeCloseHits(), lar_cluster3d::StandardHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::StandardHit3DBuilder::makeHitPair(), trkf::SpacePointAlg::makeSpacePoints(), trkf::CosmicTrackerAlg::MakeSPT(), evd::SimulationDrawer::MCTruth3D(), tca::MergePFPTjs(), geo::ChannelMapAlg::NearestWireID(), geo::ChannelMapStandardAlg::NTPCsets(), geo::operator!=(), geo::operator<(), anab::operator<<(), recob::operator<<(), geo::operator<<(), geo::operator==(), lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_2D(), geo::ChannelMapAlg::PlaneWireToChannel(), tca::PosInPlane(), geo::GeometryCore::PositionToCryostat(), geo::GeometryCore::PositionToTPC(), tca::Print3S(), tca::Print3V(), tca::PrintAllTraj(), cluster::LineCluster::produce(), cluster::ClusterCheater::produce(), cluster::TrajCluster::produce(), cluster::SmallClusterFinder::produce(), hit::DPRawHitFinder::produce(), calo::Calorimetry::produce(), evd::GraphCluster::produce(), trkf::SpacePointAlg::separation(), cheat::BackTracker::SpacePointHitsToWeightedXYZ(), lar::util::TrackPitchInView(), apa::DisambigAlg::TrivialDisambig(), cluster::ClusterCrawlerAlg::Vtx3ClusterMatch(), cluster::ClusterCrawlerAlg::Vtx3ClusterSplit(), cluster::ClusterCrawlerAlg::VtxMatch(), geo::ChannelMapAlg::WireCoordinate(), and tca::WireHitRangeOK().

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

Special code for an invalid ID.

Definition at line 200 of file geo_types.h.

Referenced by geo::CryostatGeo::FindTPCAtPosition(), getInvalidID(), and geo::GeometryCore::IntersectSegments().

TPCID_t geo::TPCID::TPC = InvalidID

Index of the TPC within its cryostat.

Definition at line 203 of file geo_types.h.

Referenced by ClusteringValidation::ClusterAnalyser::Analyse(), trkf::SpacePointAna::analyze(), hit::MagDriftAna::analyze(), detsim::WienerFilterAna::analyze(), hit::GausHitFinderAna::analyze(), pma::ProjectionMatchingAlg::buildShowerSeg(), mvapid::MVAAlg::CalcSegmentdEdxDist(), tca::TruthMatcher::CanReconstruct(), tca::ChgFracBetween(), tca::ChgFracNearEnd(), trkf::SpacePointAlg::compatible(), tca::CompleteIncomplete3DVerticesInGaps(), ems::MultiEMShowers::convCluster(), util::DetectorPropertiesServiceArgoNeuT::ConvertTicksToX(), detinfo::DetectorPropertiesStandard::ConvertTicksToX(), geo::ChannelMapStandardAlg::ConvertTPCtoTPCset(), geo::ChannelMapStandardAlg::ConvertWirePlaneToROP(), util::DetectorPropertiesServiceArgoNeuT::ConvertXToTicks(), detinfo::DetectorPropertiesStandard::ConvertXToTicks(), trkf::SpacePointAlg::correctedTime(), cluster::ClusterCrawlerAlg::EncodeCTP(), tca::EncodeCTP(), cluster::EndPointAlg::EndPoint(), ems::EndPoint::EndPoint(), trkf::SpacePointAlg::fillComplexSpacePoint(), tca::FillmAllTraj(), lar_pandora::PFParticleHitDumper::FillRecoWires(), trkf::SpacePointAlg::fillSpacePoint(), tca::FillWireHitRange(), tca::Find3DVertices(), apa::DisambigAlg::FindChanTimeEndPts(), tca::FindCompleteness(), hit::HitCheater::FindHitsOnChannel(), shower::EMShowerAlg::FindInitialTrackHits(), tca::FindMissedTjsInTp3s(), tca::TrajClusterAlg::FindMissedVxTjs(), tca::FindParent(), tca::FindPFParticles(), tca::FindShowers3D(), geo::CryostatGeo::FindTPCAtPosition(), tca::FindXMatches(), tca::FitTp3(), tca::FitTp3s(), cluster::ClusterCrawlerAlg::FitVtx(), tca::FollowTp3s(), ems::EMShower3D::GetCloseHits(), trkf::BezierTrack::GetClosestApproach(), trkf::BezierTrack::GetClosestApproaches(), lar_cluster3d::PrincipalComponentsAlg::getHit2DPocaToAxis(), cluster::ClusterCrawlerAlg::GetHitRange(), calo::Calorimetry::GetPitch(), nnet::TrainingDataAlg::getProjection(), lar_pandora::LArPandoraInput::GetTrueStartAndEndPoints(), pma::Track3D::GetUnconstrainedProj3D(), lar_pandora::PFParticleHitDumper::GetUVW(), util::DetectorPropertiesServiceArgoNeuT::GetXTicksCoefficient(), detinfo::DetectorPropertiesStandard::GetXTicksCoefficient(), util::DetectorPropertiesServiceArgoNeuT::GetXTicksOffset(), detinfo::DetectorPropertiesStandard::GetXTicksOffset(), cluster::MergeClusterAlg::GlobalWire(), cluster::BlurredClusteringAlg::GlobalWire(), shower::EMShowerAlg::GlobalWire(), geo::CryostatGeo::HasTPC(), ems::Hit2D::Hit2D(), tss::Hit2D::Hit2D(), pma::Hit3D::Hit3D(), apa::APAGeometryAlg::Init(), hit::DisambigCheater::InitHitToWids(), geo::GeometryCore::IntersectSegments(), trkf::KHitWireLine::KHitWireLine(), trkf::KHitWireX::KHitWireX(), lar_cluster3d::PCASeedFinderAlg::LineFit2DHits(), lar_cluster3d::HoughSeedFinderAlg::LineFit2DHits(), apa::DisambigAlg::MakeCloseHits(), lar_cluster3d::StandardHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::StandardHit3DBuilder::makeHitPair(), trkf::SpacePointAlg::makeSpacePoints(), trkf::CosmicTrackerAlg::MakeSPT(), tca::TruthMatcher::MatchAndSum(), evd::SimulationDrawer::MCTruthOrtho(), tca::MergePFPTjs(), geo::ChannelMapAlg::NearestWireID(), geo::operator!=(), geo::operator<(), anab::operator<<(), recob::operator<<(), geo::operator<<(), geo::operator==(), shower::EMShowerAlg::OrderShowerHits(), lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_2D(), geo::ChannelMapAlg::PlaneWireToChannel(), tca::PosInPlane(), geo::GeometryCore::PositionToTPC(), tca::Print3S(), tca::Print3V(), tca::PrintAllTraj(), cluster::LineCluster::produce(), cluster::ClusterCheater::produce(), cluster::TrajCluster::produce(), cluster::SmallClusterFinder::produce(), calo::Calorimetry::produce(), hit::DPRawHitFinder::produce(), evd::GraphCluster::produce(), shower::EMShowerAlg::Project3DPointOntoPlane(), trkf::SpacePointAlg::separation(), cheat::BackTracker::SpacePointHitsToWeightedXYZ(), tss::Hit2D::TPC(), geo::CryostatGeo::TPC(), geo::CryostatGeo::TPCPtr(), lar::util::TrackPitchInView(), apa::DisambigAlg::TrivialDisambig(), cluster::ClusterCrawlerAlg::Vtx3ClusterMatch(), cluster::ClusterCrawlerAlg::Vtx3ClusterSplit(), cluster::ClusterCrawlerAlg::VtxMatch(), geo::ChannelMapAlg::WireCoordinate(), and tca::WireHitRangeOK().


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