LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
geo::GeoObjectSorterStandard Class Reference

#include "GeoObjectSorterStandard.h"

Inheritance diagram for geo::GeoObjectSorterStandard:
geo::GeoObjectSorter

Public Member Functions

 GeoObjectSorterStandard (fhicl::ParameterSet const &p)
 
void SortAuxDets (std::vector< geo::AuxDetGeo > &adgeo) const override
 
void SortAuxDetSensitive (std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const override
 
void SortCryostats (std::vector< geo::CryostatGeo > &cgeo) const override
 
void SortTPCs (std::vector< geo::TPCGeo > &tgeo) const override
 
void SortPlanes (std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const override
 
void SortWires (std::vector< geo::WireGeo > &wgeo) const override
 
virtual void SortOpDets (std::vector< geo::OpDetGeo > &opdet) const
 

Detailed Description

Definition at line 27 of file GeoObjectSorterStandard.h.

Constructor & Destructor Documentation

geo::GeoObjectSorterStandard::GeoObjectSorterStandard ( fhicl::ParameterSet const &  p)

Definition at line 114 of file GeoObjectSorterStandard.cxx.

114 {}

Member Function Documentation

void geo::GeoObjectSorterStandard::SortAuxDets ( std::vector< geo::AuxDetGeo > &  adgeo) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 117 of file GeoObjectSorterStandard.cxx.

References geo::sortAuxDetStandard().

118  {
119  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetStandard);
120  }
static bool sortAuxDetStandard(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void geo::GeoObjectSorterStandard::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo > &  adsgeo) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 123 of file GeoObjectSorterStandard.cxx.

References geo::sortAuxDetSensitiveStandard().

125  {
126  std::sort(adsgeo.begin(), adsgeo.end(), sortAuxDetSensitiveStandard);
127  }
static bool sortAuxDetSensitiveStandard(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
void geo::GeoObjectSorterStandard::SortCryostats ( std::vector< geo::CryostatGeo > &  cgeo) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 130 of file GeoObjectSorterStandard.cxx.

References geo::sortCryoStandard().

131  {
132  std::sort(cgeo.begin(), cgeo.end(), sortCryoStandard);
133  }
static bool sortCryoStandard(const CryostatGeo &c1, const CryostatGeo &c2)
void geo::GeoObjectSorter::SortOpDets ( std::vector< geo::OpDetGeo > &  opdet) const
virtualinherited

Definition at line 28 of file GeoObjectSorter.cxx.

Referenced by geo::CryostatGeo::SortSubVolumes().

29  {
30  std::sort(opdet.begin(), opdet.end(), sortorderOpDets);
31  }
void geo::GeoObjectSorterStandard::SortPlanes ( std::vector< geo::PlaneGeo > &  pgeo,
geo::DriftDirection_t  driftDir 
) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 142 of file GeoObjectSorterStandard.cxx.

References geo::kNegX, geo::kPosX, geo::kUnknownDrift, and geo::sortPlaneStandard().

144  {
145  // sort the planes to increase in drift direction
146  // The drift direction has to be set before this method is called. It is set when
147  // the CryostatGeo objects are sorted by the CryostatGeo::SortSubVolumes method
148  if (driftDir == geo::kPosX)
149  std::sort(pgeo.rbegin(), pgeo.rend(), sortPlaneStandard);
150  else if (driftDir == geo::kNegX)
151  std::sort(pgeo.begin(), pgeo.end(), sortPlaneStandard);
152  else if (driftDir == geo::kUnknownDrift)
153  throw cet::exception("TPCGeo") << "Drift direction is unknown, can't sort the planes\n";
154  }
Drift direction is unknown.
Definition: geo_types.h:163
Drift towards negative X values.
Definition: geo_types.h:167
static bool sortPlaneStandard(const PlaneGeo &p1, const PlaneGeo &p2)
Drift towards positive X values.
Definition: geo_types.h:166
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void geo::GeoObjectSorterStandard::SortTPCs ( std::vector< geo::TPCGeo > &  tgeo) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 136 of file GeoObjectSorterStandard.cxx.

References geo::sortTPCStandard().

137  {
138  std::sort(tgeo.begin(), tgeo.end(), sortTPCStandard);
139  }
static bool sortTPCStandard(const TPCGeo &t1, const TPCGeo &t2)
void geo::GeoObjectSorterStandard::SortWires ( std::vector< geo::WireGeo > &  wgeo) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 157 of file GeoObjectSorterStandard.cxx.

References geo::sortWireStandard().

158  {
159  std::sort(wgeo.begin(), wgeo.end(), sortWireStandard);
160  }
static bool sortWireStandard(WireGeo const &w1, WireGeo const &w2)

The documentation for this class was generated from the following files: