Public Member Functions | List of all members
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
 
- Public Member Functions inherited from geo::GeoObjectSorter
virtual ~GeoObjectSorter ()=default
 
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 128 of file GeoObjectSorterStandard.cxx.

129  {}

Member Function Documentation

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

Implements geo::GeoObjectSorter.

Definition at line 132 of file GeoObjectSorterStandard.cxx.

133  {
134  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetStandard);
135  }
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 138 of file GeoObjectSorterStandard.cxx.

139  {
140  std::sort(adsgeo.begin(), adsgeo.end(), sortAuxDetSensitiveStandard);
141  }
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 144 of file GeoObjectSorterStandard.cxx.

145  {
146  std::sort(cgeo.begin(), cgeo.end(), sortCryoStandard);
147  }
static bool sortCryoStandard(const CryostatGeo &c1, const CryostatGeo &c2)
void geo::GeoObjectSorterStandard::SortPlanes ( std::vector< geo::PlaneGeo > &  pgeo,
geo::DriftDirection_t  driftDir 
) const
overridevirtual

Implements geo::GeoObjectSorter.

Definition at line 156 of file GeoObjectSorterStandard.cxx.

158  {
159  // sort the planes to increase in drift direction
160  // The drift direction has to be set before this method is called. It is set when
161  // the CryostatGeo objects are sorted by the CryostatGeo::SortSubVolumes method
162  if (driftDir == geo::kPosX) std::sort(pgeo.rbegin(), pgeo.rend(), sortPlaneStandard);
163  else if(driftDir == geo::kNegX) std::sort(pgeo.begin(), pgeo.end(), sortPlaneStandard);
164  else if(driftDir == geo::kUnknownDrift)
165  throw cet::exception("TPCGeo") << "Drift direction is unknown, can't sort the planes\n";
166  }
Drift direction is unknown.
Definition: geo_types.h:158
Drift towards negative X values.
Definition: geo_types.h:162
static bool sortPlaneStandard(const PlaneGeo &p1, const PlaneGeo &p2)
Drift towards positive X values.
Definition: geo_types.h:161
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 150 of file GeoObjectSorterStandard.cxx.

151  {
152  std::sort(tgeo.begin(), tgeo.end(), sortTPCStandard);
153  }
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 169 of file GeoObjectSorterStandard.cxx.

170  {
171  std::sort(wgeo.begin(), wgeo.end(), sortWireStandard);
172  }
static bool sortWireStandard(WireGeo const &w1, WireGeo const &w2)

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