IcebergChannelGeo.h
Go to the documentation of this file.
1 // IcebergChannelGeo.h
2 //
3 // David Adams
4 // May 2020
5 //
6 // Return geometry info for a channel using the current
7 // geometry service.
8 //
9 // This is a special vertion that fixes the bottom limit of the wires
10 // required for the May 2020 Iceberg geometry.
11 
12 #ifndef IcebergChannelGeo_H
13 #define IcebergChannelGeo_H
14 
15 #include <utility>
16 #include <vector>
17 #include "TVector3.h"
18 
19 namespace geo {
20  class GeometryCore;
21 }
22 
24 
25 public:
26 
27  using Index = unsigned int;
28  using Point = TVector3;
29  using EndPoints = std::pair<Point, Point>;
30  using EndPointsVector = std::vector<EndPoints>;
31 
32  // Ctor from channel number and geometry service.
33  IcebergChannelGeo(Index icha, const geo::GeometryCore* pgeo);
34 
35  // Ctor from channel number using the current geometry service.
37 
38  // Return the channel number.
39  Index channel() const { return m_icha; }
40 
41  // Is this a valid channel?
42  bool isValid() const { return m_valid; }
43 
44  // Return the number of wires (wire segments).
45  Index nWires() const { return m_ends.size(); }
46 
47  // Return the wire endpoints for this channel.
48  const EndPointsVector& wires() const { return m_ends; }
49 
50  // Return the top or bottom endpoint for this channel.
51  const Point& top() const { return m_top; }
52  const Point& bottom() const { return m_bot; }
53 
54 private:
55 
57  bool m_valid;
61 
62 };
63 
64 #endif
Index channel() const
Index nWires() const
const Point & bottom() const
Description of geometry of one entire detector.
const EndPointsVector & wires() const
std::vector< EndPoints > EndPointsVector
EndPointsVector m_ends
std::pair< Point, Point > EndPoints
LArSoft geometry interface.
Definition: ChannelGeo.h:16
bool isValid() const
const Point & top() const