ApaChannelGroups.h
Go to the documentation of this file.
1 // ApaChannelGroups.h
2 //
3 // David Adams
4 // July 2018
5 //
6 // Tool to return channel range groups for a detector with NAPA APAs
7 // assigned to TPC sets 0, 1, ..., NAPA-1.
8 // Name Label Meaning
9 // tpss APAs All TPC sets (set = pair of TPCs for one APA)
10 // apas APAs All APAs
11 // tppPs TPC P planes All TPC planes for view P
12 // apaPs APA P planes All APA planes for view P
13 // fembAFF FEMB AFF All channels in the FEMB (i.e. u, v and x)
14 //
15 // In the above
16 // S is the TPC set (offline APA) number in range [0, NAPA-1]
17 // A is the APA number in range [1,6]
18 // P is the wire plane: u, v, z (TPC-side collection) or c (cryostat-side collection)
19 // or the wire plane pair x for (z, c) or i for (u, v)
20 // FF is the FEMB number in an APA in range [01,20]
21 // V is a wire orientation: u, v or x (collection)
22 //
23 // Where relevant, the ranges are assigned a second label location as one of:
24 // US-RaS, US-DaS, MS-RaS, MS-DaS, DS-RaS, DS-DaS
25 // and a third label indication the APA, e.g. APA3.
26 //
27 // Configuration parameters:
28 // LogLevel: Logging level (0=none, 1=ctor, 2=every call)
29 // ApaNumbers: Mapping from TPS to APA numbers. Size is NAPA.
30 // IndexRangeTool: Tool that maps names here to channel ranges.
31 //
32 // Updates May 2018:
33 // If ApaNumbers is empty, the detector consists of one unnumbered APA,
34 // i.e. expected ranges are apau, apaz, etc.
35 // Add P = z1, z2.
36 
37 #ifndef ApaChannelGroups_H
38 #define ApaChannelGroups_H
39 
41 #include "fhiclcpp/ParameterSet.h"
43 #include <map>
44 
45 class IndexRangeTool;
46 
48 
49 public:
50 
51  using Name = std::string;
52  using NameVector = std::vector<Name>;
54  using IndexVector = std::vector<Index>;
55  using GroupMap = std::map<Name, NameVector>;
56 
57  // Ctor.
59 
60  // Dtor.
61  ~ApaChannelGroups() override =default;
62 
63  // Return a range.
64  IndexRangeGroup get(Name nam) const override;
65 
66 private:
67 
68  // Configuration parameters.
72 
73  // Derived from configuration.
77 
78 };
79 
80 
81 #endif
const IndexRangeTool * m_pIndexRangeTool
std::string string
Definition: nybbler.cc:12
IndexRangeGroup::Index Index
ApaChannelGroups(fhicl::ParameterSet const &ps)
std::vector< Index > IndexVector
std::map< Name, NameVector > GroupMap
IndexVector m_ApaNumbers
static constexpr double ps
Definition: Units.h:99
std::vector< Name > NameVector
~ApaChannelGroups() override=default
unsigned int Index
IndexRangeGroup::Name Name