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

#include <GeoObjectSorterAPA.h>

Inheritance diagram for geo::GeoObjectSorterAPA:
geo::GeoObjectSorter

Public Member Functions

 GeoObjectSorterAPA (fhicl::ParameterSet const &p)
 
void SortAuxDets (std::vector< geo::AuxDetGeo > &adgeo) const
 
void SortAuxDetSensitive (std::vector< geo::AuxDetSensitiveGeo > &adgeo) 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 GeoObjectSorterAPA.h.

Constructor & Destructor Documentation

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

Definition at line 155 of file GeoObjectSorterAPA.cxx.

156  {
157  }

Member Function Documentation

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

Implements geo::GeoObjectSorter.

Definition at line 160 of file GeoObjectSorterAPA.cxx.

161  {
162  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetAPA);
163  }
static bool sortAuxDetAPA(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void geo::GeoObjectSorterAPA::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo > &  adgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 166 of file GeoObjectSorterAPA.cxx.

167  {
168  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetSensitiveAPA);
169  }
static bool sortAuxDetSensitiveAPA(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
void geo::GeoObjectSorterAPA::SortCryostats ( std::vector< geo::CryostatGeo > &  cgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 172 of file GeoObjectSorterAPA.cxx.

173  {
174  std::sort(cgeo.begin(), cgeo.end(), sortCryoAPA);
175  }
static bool sortCryoAPA(const CryostatGeo &c1, const CryostatGeo &c2)
void geo::GeoObjectSorterAPA::SortOpDets ( std::vector< geo::OpDetGeo > &  opdet) const
virtual

Reimplemented from geo::GeoObjectSorter.

Definition at line 203 of file GeoObjectSorterAPA.cxx.

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

Implements geo::GeoObjectSorter.

Definition at line 184 of file GeoObjectSorterAPA.cxx.

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

Implements geo::GeoObjectSorter.

Definition at line 178 of file GeoObjectSorterAPA.cxx.

179  {
180  std::sort(tgeo.begin(), tgeo.end(), sortTPCAPA);
181  }
static bool sortTPCAPA(const TPCGeo &t1, const TPCGeo &t2)
void geo::GeoObjectSorterAPA::SortWires ( std::vector< geo::WireGeo > &  wgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 197 of file GeoObjectSorterAPA.cxx.

198  {
199  std::sort(wgeo.begin(), wgeo.end(), sortWireAPA);
200  }
bool sortWireAPA(WireGeo &w1, WireGeo &w2)

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