Public Member Functions | List of all members
geo::GeoObjectSorterCRU Class Reference

#include <GeoObjectSorterCRU.h>

Inheritance diagram for geo::GeoObjectSorterCRU:
geo::GeoObjectSorter

Public Member Functions

 GeoObjectSorterCRU (fhicl::ParameterSet const &p)
 
void SortAuxDets (std::vector< geo::AuxDetGeo > &adgeo) const
 
void SortAuxDetSensitive (std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const
 
void SortCryostats (std::vector< geo::CryostatGeo > &cgeo) const
 
void SortTPCs (std::vector< geo::TPCGeo > &tgeo) const
 
void SortPlanes (std::vector< geo::PlaneGeo > &pgeo, geo::DriftDirection_t driftDir) const
 
void SortWires (std::vector< geo::WireGeo > &wgeo) const
 
void SortOpDets (std::vector< geo::OpDetGeo > &opdet) const
 
- Public Member Functions inherited from geo::GeoObjectSorter
virtual ~GeoObjectSorter ()=default
 

Detailed Description

Definition at line 18 of file GeoObjectSorterCRU.h.

Constructor & Destructor Documentation

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

Definition at line 160 of file GeoObjectSorterCRU.cxx.

161  {}

Member Function Documentation

void geo::GeoObjectSorterCRU::SortAuxDets ( std::vector< geo::AuxDetGeo > &  adgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 164 of file GeoObjectSorterCRU.cxx.

165  {
166  std::sort(adgeo.begin(), adgeo.end(), CRU::sortAuxDet);
167  }
static bool sortAuxDet(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void geo::GeoObjectSorterCRU::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo > &  adsgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 170 of file GeoObjectSorterCRU.cxx.

171  {
172  std::sort(adsgeo.begin(), adsgeo.end(), CRU::sortAuxDetSensitive);
173  }
static bool sortAuxDetSensitive(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
void geo::GeoObjectSorterCRU::SortCryostats ( std::vector< geo::CryostatGeo > &  cgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 176 of file GeoObjectSorterCRU.cxx.

177  {
178  std::sort(cgeo.begin(), cgeo.end(), CRU::sortCryo);
179  }
static bool sortCryo(const CryostatGeo &c1, const CryostatGeo &c2)
void geo::GeoObjectSorterCRU::SortOpDets ( std::vector< geo::OpDetGeo > &  opdet) const
virtual

Reimplemented from geo::GeoObjectSorter.

Definition at line 207 of file GeoObjectSorterCRU.cxx.

207  {
208  std::sort(opdet.begin(), opdet.end(), sortorderOpDet);
209  }
bool sortorderOpDet(const OpDetGeo &t1, const OpDetGeo &t2)
Definition: OpDetSorter.h:10
void geo::GeoObjectSorterCRU::SortPlanes ( std::vector< geo::PlaneGeo > &  pgeo,
geo::DriftDirection_t  driftDir 
) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 188 of file GeoObjectSorterCRU.cxx.

190  {
191  // sort the planes to increase in drift direction
192  // The drift direction has to be set before this method is called. It is set when
193  // the CryostatGeo objects are sorted by the CryostatGeo::SortSubVolumes method
194  if (driftDir == geo::kPosX) std::sort(pgeo.rbegin(), pgeo.rend(), CRU::sortPlane);
195  else if(driftDir == geo::kNegX) std::sort(pgeo.begin(), pgeo.end(), CRU::sortPlane);
196  else if(driftDir == geo::kUnknownDrift)
197  throw cet::exception("TPCGeo") << "Drift direction is unknown, can't sort the planes\n";
198  }
Drift direction is unknown.
Definition: geo_types.h:158
Drift towards negative X values.
Definition: geo_types.h:162
static bool sortPlane(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::GeoObjectSorterCRU::SortTPCs ( std::vector< geo::TPCGeo > &  tgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 182 of file GeoObjectSorterCRU.cxx.

183  {
184  std::sort(tgeo.begin(), tgeo.end(), CRU::sortTPC);
185  }
static bool sortTPC(const TPCGeo &t1, const TPCGeo &t2)
void geo::GeoObjectSorterCRU::SortWires ( std::vector< geo::WireGeo > &  wgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 201 of file GeoObjectSorterCRU.cxx.

202  {
203  std::sort(wgeo.begin(), wgeo.end(), CRU::sortWire);
204  }
bool sortWire(WireGeo const &w1, WireGeo const &w2)

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