All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
geo::CRTGeoObjectSorter Class Reference

#include <CRTGeoObjectSorter.h>

Inheritance diagram for geo::CRTGeoObjectSorter:
geo::AuxDetGeoObjectSorter geo::AuxDetGeoObjectSorter

Public Member Functions

 CRTGeoObjectSorter (fhicl::ParameterSet const &p)
 
void SortAuxDets (std::vector< geo::AuxDetGeo > &adgeo) const
 
void SortAuxDetSensitive (std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const
 
void SortCRTs (std::vector< geo::AuxDetGeo > &adgeo) const
 
void SortCRTSensitive (std::vector< std::pair< int, geo::AuxDetSensitiveGeo > > &adsgeo) const
 
 CRTGeoObjectSorter (fhicl::ParameterSet const &p)
 
void SortAuxDets (std::vector< geo::AuxDetGeo > &adgeo) const
 
void SortAuxDetSensitive (std::vector< geo::AuxDetSensitiveGeo > &adsgeo) const
 
- Public Member Functions inherited from geo::AuxDetGeoObjectSorter
virtual ~AuxDetGeoObjectSorter ()=default
 

Detailed Description

Definition at line 23 of file icaruscode/icaruscode/CRT/CRTGeoObjectSorter.h.

Constructor & Destructor Documentation

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

Definition at line 115 of file icaruscode/icaruscode/CRT/CRTGeoObjectSorter.cxx.

116  {}
geo::CRTGeoObjectSorter::CRTGeoObjectSorter ( fhicl::ParameterSet const &  p)

Member Function Documentation

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

Implements geo::AuxDetGeoObjectSorter.

Definition at line 119 of file icaruscode/icaruscode/CRT/CRTGeoObjectSorter.cxx.

119  {
120  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetICARUS);
121  }
static bool sortAuxDetICARUS(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void geo::CRTGeoObjectSorter::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo > &  adsgeo) const
virtual
void geo::CRTGeoObjectSorter::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo > &  adsgeo) const
virtual

Implements geo::AuxDetGeoObjectSorter.

Definition at line 124 of file icaruscode/icaruscode/CRT/CRTGeoObjectSorter.cxx.

124  {
125  std::sort(adsgeo.begin(), adsgeo.end(), sortAuxDetSensitiveICARUS);
126  }
static bool sortAuxDetSensitiveICARUS(const AuxDetSensitiveGeo &ad1, const AuxDetSensitiveGeo &ad2)
void geo::CRTGeoObjectSorter::SortCRTs ( std::vector< geo::AuxDetGeo > &  adgeo) const

Definition at line 132 of file icaruscode/icaruscode/CRT/CRTGeoObjectSorter.cxx.

132  {
133 
134  // 3. stable sort by increasing drift direction (_x_)
135  std::stable_sort (adgeo.begin(), adgeo.end(), CRTIncreaseX);
136 
137 
138  // 2. stable sort by increasing beam coordinate (_z_)
139  std::stable_sort (adgeo.begin(), adgeo.end(), CRTIncreaseZ);
140 
141  // 1. sort by decreasing vertical coordinate (_y_)
142  std::stable_sort (adgeo.begin(), adgeo.end(), CRTDecreaseY);
143  }
static bool CRTIncreaseX(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
static bool CRTIncreaseZ(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
static bool CRTDecreaseY(const AuxDetGeo &ad1, const AuxDetGeo &ad2)
void geo::CRTGeoObjectSorter::SortCRTSensitive ( std::vector< std::pair< int, geo::AuxDetSensitiveGeo > > &  adsgeo) const

Definition at line 150 of file icaruscode/icaruscode/CRT/CRTGeoObjectSorter.cxx.

150  {
151 
152  // 3. stable sort by increasing drift direction (_x_)
153  std::stable_sort (adsgeo.begin(), adsgeo.end(), CRTSensitiveIncreaseX);
154 
155 
156  // 2. stable sort by increasing beam coordinate (_z_)
157  std::stable_sort (adsgeo.begin(), adsgeo.end(), CRTSensitiveIncreaseZ);
158 
159  // 1. sort by decreasing vertical coordinate (_y_)
160  std::stable_sort (adsgeo.begin(), adsgeo.end(), CRTSensitiveDecreaseY);
161  }
static bool CRTSensitiveIncreaseX(std::pair< int, geo::AuxDetSensitiveGeo > ads1, std::pair< int, geo::AuxDetSensitiveGeo > ads2)
static bool CRTSensitiveIncreaseZ(std::pair< int, geo::AuxDetSensitiveGeo > ads1, std::pair< int, geo::AuxDetSensitiveGeo > ads2)
static bool CRTSensitiveDecreaseY(std::pair< int, geo::AuxDetSensitiveGeo > ads1, std::pair< int, geo::AuxDetSensitiveGeo > ads2)

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