ATLAS Offline Software
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 
9 namespace 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 */
20 class 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} {}
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 
103 using WireGroupDesignSet = std::set<WireDesignPtr, WireDesignSorter>;
104 
105 }
107 #endif
MuonGMR4::WireGroupDesign::print
void print(std::ostream &ostr) const override final
Dump properties to the ostr.
Definition: WireGroupDesign.cxx:8
GeoModel::TransientConstSharedPtr< WireGroupDesign >
MuonGMR4::WireGroupDesign::defineWireCutout
void defineWireCutout(const double wireCutout)
Define the wirelength available for digitization in a gasGap.
Definition: WireGroupDesign.cxx:61
MuonGMR4::StripDesign
Definition: StripDesign.h:30
MuonGMR4::WireDesignSorter
Definition: WireGroupDesign.h:94
MuonGMR4::WireGroupDesign::m_groups
wireGrpVector m_groups
Definition: WireGroupDesign.h:87
MuonGMR4::WireGroupDesign
Definition: WireGroupDesign.h:23
MuonGMR4::WireGroupDesign::wireCutout
double wireCutout() const
Extract the wireCutout for a wireGroup layer.
Definition: WireGroupDesign.cxx:59
MuonGMR4::WireGroupDesign::wireGrpVectorItr
wireGrpVector::const_iterator wireGrpVectorItr
Definition: WireGroupDesign.h:86
MuonGMR4::WireGroupDesign::rightWireEdge
CheckVector2D rightWireEdge(unsigned int groupNum, unsigned int wireNum) const
Returns the edge point at positive y.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGMR4::WireGroupDesign::WireGroupDesign
WireGroupDesign()=default
MuonGMR4::WireGroupDesign::wireGroup
helper construct to cache the number of wires in each group as well as the accumulated number of wire...
Definition: WireGroupDesign.h:77
StripDesign.h
MuonGMR4::WireGroupDesign::numWiresInGroup
unsigned int numWiresInGroup(unsigned int groupNum) const
Returns the number of wires in a given group.
Definition: WireGroupDesign.cxx:39
MuonGMR4::WireGroupDesign::nAllWires
unsigned int nAllWires() const
Returns the number of all wires.
Definition: WireGroupDesign.cxx:35
MuonGMR4::WireDesignSorter::operator()
bool operator()(const WireDesignPtr &a, const WireDesignPtr &b) const
Definition: WireGroupDesign.h:95
x
#define x
MuonGMR4::WireGroupDesign::declareGroup
void declareGroup(const unsigned int x)
Adds a new group of wires to the design.
Definition: WireGroupDesign.cxx:32
MuonGMR4::WireGroupDesign::leftWireEdge
CheckVector2D leftWireEdge(unsigned int groupNum, unsigned int wireNum) const
Returns the edge point at negative y.
MuonGMR4
A muon chamber is a collection of readout elements belonging to the same station.
Definition: ChamberAssembleTool.h:16
MuonGMR4::WireGroupDesign::wireNumber
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...
MuonGMR4::WireGroupDesign::wirePosition
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...
MuonGMR4::WireGroupDesign::m_wireCutout
double m_wireCutout
Wire length available for digitization in a gas Gap.
Definition: WireGroupDesign.h:89
MuonGMR4::WireGroupDesign::wireGrpVector
std::vector< wireGroup > wireGrpVector
Definition: WireGroupDesign.h:85
WireGroupDesign.icc
MuonGMR4::WireGroupDesign::stripNumber
int stripNumber(const Amg::Vector2D &pos) const override
Calculates the number of the strip whose center is closest to the given point.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonGMR4::WireGroupDesign::numPitchesToGroup
unsigned int numPitchesToGroup(unsigned int groupNum) const
Returns the number of wire pitches to reach the given group.
Definition: WireGroupDesign.cxx:49
MuonGMR4::WireDesignSorter::operator()
bool operator()(const WireGroupDesign &a, const WireGroupDesign &b) const
Definition: WireGroupDesign.h:98
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonGMR4::WireGroupDesign::wireGroup::numWires
unsigned int numWires
Number of wires in this group.
Definition: WireGroupDesign.h:81
MuonGMR4::WireGroupDesignSet
std::set< WireDesignPtr, WireDesignSorter > WireGroupDesignSet
Definition: WireGroupDesign.h:103
MuonGMR4::WireGroupDesign::wireGroup::accumlWires
unsigned int accumlWires
Number of all wires in the previous groups.
Definition: WireGroupDesign.h:83
MuonGMR4::WireGroupDesign::wireGroup::wireGroup
wireGroup(unsigned int nWires, unsigned int accWires)
Definition: WireGroupDesign.h:78
MuonGMR4::WireGroupDesign::operator<
bool operator<(const WireGroupDesign &other) const
set sorting operator
Definition: WireGroupDesign.cxx:21
MuonGMR4::WireGroupDesign::wireLength
double wireLength(unsigned int groupNum, unsigned int wireNum) const
Returns the length of the i-th wire in group j.
MuonGMR4::WireGroupDesign::stripPosition
Amg::Vector2D stripPosition(int stripNum) const override final
Returns the center of the wire group.
MuonGMR4::StripDesign::CheckVector2D
std::optional< Amg::Vector2D > CheckVector2D
Definition: StripDesign.h:82