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

#include <GeoObjectSorterCRM.h>

Inheritance diagram for geo::GeoObjectSorterCRM:
geo::GeoObjectSorter

Public Member Functions

 GeoObjectSorterCRM (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 GeoObjectSorterCRM.h.

Constructor & Destructor Documentation

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

Definition at line 128 of file GeoObjectSorterCRM.cxx.

129  {
130  }

Member Function Documentation

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

Implements geo::GeoObjectSorter.

Definition at line 133 of file GeoObjectSorterCRM.cxx.

134  {
135  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetCRM);
136  }
static bool sortAuxDetCRM(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void geo::GeoObjectSorterCRM::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo > &  adsgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 139 of file GeoObjectSorterCRM.cxx.

140  {
141  std::sort(adsgeo.begin(), adsgeo.end(), sortAuxDetSensitiveCRM);
142  }
static bool sortAuxDetSensitiveCRM(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
void geo::GeoObjectSorterCRM::SortCryostats ( std::vector< geo::CryostatGeo > &  cgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 145 of file GeoObjectSorterCRM.cxx.

146  {
147  std::sort(cgeo.begin(), cgeo.end(), sortCryoCRM);
148  }
static bool sortCryoCRM(const CryostatGeo &c1, const CryostatGeo &c2)
void geo::GeoObjectSorterCRM::SortOpDets ( std::vector< geo::OpDetGeo > &  opdet) const
virtual

Reimplemented from geo::GeoObjectSorter.

Definition at line 176 of file GeoObjectSorterCRM.cxx.

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

Implements geo::GeoObjectSorter.

Definition at line 157 of file GeoObjectSorterCRM.cxx.

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

Implements geo::GeoObjectSorter.

Definition at line 151 of file GeoObjectSorterCRM.cxx.

152  {
153  std::sort(tgeo.begin(), tgeo.end(), sortTPCCRM);
154  }
static bool sortTPCCRM(const TPCGeo &t1, const TPCGeo &t2)
void geo::GeoObjectSorterCRM::SortWires ( std::vector< geo::WireGeo > &  wgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 170 of file GeoObjectSorterCRM.cxx.

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

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