ATLAS Offline Software
Loading...
Searching...
No Matches
WireGroupDesign.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONREADOUTGEOMETRYR4_WIREGROUPDESIGN_H
5#define MUONREADOUTGEOMETRYR4_WIREGROUPDESIGN_H
6
8
9namespace MuonGMR4{
10
11/* The phi readout channels of the Tgc chambers are an essamble of wires that are readout
12 * together. The wires are equi-distant, but not every wire group in a gas gap contains the
13 * same number of wires. Hence, the channel width & pitch vary across the board. The wire group
14 * design accounts for this detector design feature. It inherits from the StripDesign class and
15 * overloads the stripPosition feature to place the measurement onto the middle wire of each group.
16 * Nevertheless, it's important to know about the position and the lenghts of each wire seperately
17 * as these quantities are fed into the digitization. Therefore, extra methods are added to the design
18 * to provide this information as well.
19*/
20class WireGroupDesign;
22
24 public:
25 WireGroupDesign() = default;
27 bool operator<(const WireGroupDesign& other) const;
29 void declareGroup(const unsigned int x);
31 unsigned int numWiresInGroup(unsigned int groupNum) const;
33 unsigned int numPitchesToGroup(unsigned int groupNum) const;
35 unsigned int nAllWires() const;
39 CheckVector2D wirePosition(unsigned int groupNum,
40 unsigned int wireNum) const;
41
46 CheckVector2D leftWireEdge(unsigned int groupNum,
47 unsigned int wireNum) const;
48
53 CheckVector2D rightWireEdge(unsigned int groupNum,
54 unsigned int wireNum) const;
55
56 int stripNumber(const Amg::Vector2D& pos) const override;
57
60 std::pair<int, int> wireNumber(const Amg::Vector2D& extPos) const;
61
63 double wireLength(unsigned int groupNum,
64 unsigned int wireNum) const;
65
67 double wireCutout() const;
69 void defineWireCutout(const double wireCutout);
70
71 private:
72 void print(std::ostream& ostr) const override final;
74 Amg::Vector2D stripPosition(int stripNum) const override final;
77 struct wireGroup{
78 wireGroup(unsigned int nWires, unsigned int accWires):
79 numWires{nWires}, accumlWires{accWires} {}
80
81 unsigned int numWires{0};
83 unsigned int accumlWires{0};
84 };
85 using wireGrpVector = std::vector<wireGroup>;
86 using wireGrpVectorItr = wireGrpVector::const_iterator;
89 double m_wireCutout{0};
90
91
92};
93
95 bool operator()(const WireDesignPtr&a, const WireDesignPtr& b) const {
96 return (*a) < (*b);
97 }
98 bool operator()(const WireGroupDesign&a ,const WireGroupDesign& b) const {
99 return a < b;
100 }
101};
102
103using WireGroupDesignSet = std::set<WireDesignPtr, WireDesignSorter>;
104
105}
107#endif
static Double_t a
#define x
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
std::optional< Amg::Vector2D > CheckVector2D
Definition StripDesign.h:82
void declareGroup(const unsigned int x)
Adds a new group of wires to the design.
bool operator<(const WireGroupDesign &other) const
set sorting operator
int stripNumber(const Amg::Vector2D &pos) const override
Calculates the number of the strip whose center is closest to the given point.
double m_wireCutout
Wire length available for digitization in a gas Gap.
unsigned int numWiresInGroup(unsigned int groupNum) const
Returns the number of wires in a given group.
unsigned int numPitchesToGroup(unsigned int groupNum) const
Returns the number of wire pitches to reach the given group.
double wireCutout() const
Extract the wireCutout for a wireGroup layer.
CheckVector2D leftWireEdge(unsigned int groupNum, unsigned int wireNum) const
Returns the edge point at negative y.
CheckVector2D wirePosition(unsigned int groupNum, unsigned int wireNum) const
Returns the positition of the i-th wire in the g-th group groupNum [1; numStrips() wire number [1; nu...
void print(std::ostream &ostr) const override final
Dump properties to the ostr.
std::pair< int, int > wireNumber(const Amg::Vector2D &extPos) const
Returns a pair where the first component indicate the wire group number and the second one returns th...
unsigned int nAllWires() const
Returns the number of all wires.
double wireLength(unsigned int groupNum, unsigned int wireNum) const
Returns the length of the i-th wire in group j.
CheckVector2D rightWireEdge(unsigned int groupNum, unsigned int wireNum) const
Returns the edge point at positive y.
void defineWireCutout(const double wireCutout)
Define the wirelength available for digitization in a gasGap.
Amg::Vector2D stripPosition(int stripNum) const override final
Returns the center of the wire group.
wireGrpVector::const_iterator wireGrpVectorItr
std::vector< wireGroup > wireGrpVector
Eigen::Matrix< double, 2, 1 > Vector2D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
std::set< WireDesignPtr, WireDesignSorter > WireGroupDesignSet
GeoModel::TransientConstSharedPtr< WireGroupDesign > WireDesignPtr
bool operator()(const WireGroupDesign &a, const WireGroupDesign &b) const
bool operator()(const WireDesignPtr &a, const WireDesignPtr &b) const
unsigned int accumlWires
Number of all wires in the previous groups.
unsigned int numWires
Number of wires in this group.
wireGroup(unsigned int nWires, unsigned int accWires)