All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ChannelMapSBNDAlg.h
Go to the documentation of this file.
1 /**
2  * @file ChannelMapSBNDAlg.h
3  * @brief Channel mapping for SBND.
4  * @date April 5, 2017
5  * @author Gianluca Petrillo (petrillo@fnal.gov)
6  *
7  * The channel mapping is derived from the standard one, with the
8  * exception of the sorting algorithm which is still custom.
9  *
10  */
11 
12 #ifndef SBNDCODE_GEOMETRY_CHANNELMAPSBNDALG_H
13 #define SBNDCODE_GEOMETRY_CHANNELMAPSBNDALG_H
14 
15 // SBND libraries
17 
18 // LArSoft libraries
20 
21 
22 namespace geo {
23 
24  /**
25  * @brief Custom channel mapping algorithm for SBND.
26  *
27  * This uses the standard channel mapping, and the custom sorter
28  * `GeoObjectSortersbnd`.
29  *
30  *
31  */
33 
34  geo::GeoObjectSorterSBND fSBNDsorter; ///< Sorts geo::XXXGeo objects.
35 
36  public:
37 
38  ChannelMapSBNDAlg(fhicl::ParameterSet const& p)
40  , fSBNDsorter(p)
41  {}
42 
43  /// Returns a custom SBND sorter.
44  virtual geo::GeoObjectSorter const& Sorter() const override
45  { return fSBNDsorter; }
46 
47  /// Returns the auxiliary detector closest to the specified point
48  virtual size_t NearestAuxDet
49  (const double* point, std::vector<geo::AuxDetGeo> const& auxDets, double tolerance = 0) const override;
50 
51  /// Returns sensitive auxiliary detector closest to specified point
52  virtual size_t NearestSensitiveAuxDet
53  (const double* point, std::vector<geo::AuxDetGeo> const& auxDets, double tolerance = 0) const override;
54 
55  }; // class ChannelMapSBNDAlg
56 
57 } // namespace geo
58 
59 #endif // SBNDCODE_GEOMETYR_CHANNELMAPSBNDALG_H
ChannelMapSBNDAlg(fhicl::ParameterSet const &p)
auto const tolerance
pdgs p
Definition: selectors.fcl:22
virtual geo::GeoObjectSorter const & Sorter() const override
Returns a custom SBND sorter.
virtual size_t NearestSensitiveAuxDet(const double *point, std::vector< geo::AuxDetGeo > const &auxDets, double tolerance=0) const override
Returns sensitive auxiliary detector closest to specified point.
geo::GeoObjectSorterSBND fSBNDsorter
Sorts geo::XXXGeo objects.
Interface to algorithm class for a specific detector channel mapping.
Custom channel mapping algorithm for SBND.
virtual size_t NearestAuxDet(const double *point, std::vector< geo::AuxDetGeo > const &auxDets, double tolerance=0) const override
Returns the auxiliary detector closest to the specified point.