ATLAS Offline Software
Loading...
Searching...
No Matches
TgcReadoutParams.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONREADOUTGEOMETRY_TGCREADOUTPARAMS_H
6#define MUONREADOUTGEOMETRY_TGCREADOUTPARAMS_H
7
8// ******************************************************************************
9// class TgcReadoutParams
10// ******************************************************************************
11//
12// Description
13// -----------
14// Provides access to the TGC readout parameters. Created from one of the
15// "sources": TGC_ZebraDetDescrSource, TGC_NovaDetDescrSource, etc. One
16// object is instantiated per chamber type and is pointed to by the
17// TGC_DetDescriptor object corresponding to that type.
18//
19// Inheritance
20// -----------
21// None.
22//
23// Dependencies
24// ------------
25// None.
26//
27// ******************************************************************************
30#include <GaudiKernel/SystemOfUnits.h>
31#include <array>
32#include <string>
33#include <vector>
34
35
36namespace MuonGM {
37
39 public:
40
41 // Readout array sizes
43 using GasGapIntArray = std::array<int, MaxNGaps>;
44 using GasGapFloatArray = std::array<double, MaxNGaps>;
45 using WiregangArray = std::array<int, MaxNGangs>;
46 using StripArray = std::array<double, MaxNStrips>;
62 TgcReadoutParams(const std::string& name,
63 int iCh,
64 double WireSp,
65 const int NCHRNG,
66 GasGapIntArray && numWireGangs,
67 WiregangArray&& IWGS1,
68 WiregangArray&& IWGS2,
69 WiregangArray&& IWGS3,
70 double PDIST,
71 std::vector<StripArray>&& SLARGE,
72 std::vector<StripArray>&& SSHORT,
73 GasGapIntArray&& numStrips);
74
76
77 inline const std::string& GetName() const;
78 int chamberType() const;
79 int nPhiChambers() const;
80 int nGaps() const;
81
83 double wirePitch() const;
85 inline double gangThickness() const;
87 int nWireGangs(int gasGap) const;
89 int totalWires(int gasGap) const;
91 int nWires(int gasGap, int gang) const;
93 int nSummedWires(int gasGap, int gang) const;
95 double nPitchesToGang(int gasGap, int gang) const;
96
97 // Access to strip parameters
98 inline double stripThickness() const;
99 int nStrips(int gasGap) const;
100
101 double physicalDistanceFromBase() const;
104 double stripPositionOnLargeBase(int strip, int gasGap) const;
107 double stripPositionOnShortBase(int strip, int gasGap) const;
110 double stripCenter(int strip , int gasGap) const;
112 int nStripLayers() const { return m_stripPositionCenter.size(); }
113 private:
114 // Data members
115 std::string m_chamberName{};
117 double m_wirePitch{0.};
119
121 std::array<std::vector<int>, MaxNGaps> m_nWires{};
123 std::array<std::vector<int>, MaxNGaps> m_nAccWires{};
124
127
128
129 // strip postion on the bases for the first layer in +Z
134 std::vector<StripArray> m_stripPositionOnLargeBase{};
135 std::vector<StripArray> m_stripPositionOnShortBase{};
138 std::vector<StripArray> m_stripPositionCenter{};
139
140 inline bool invalidGasGap(int gasGap) const{ return gasGap<1 or gasGap>MaxNGaps;}
141 inline bool invalidGang(int gang) const{ return gang<1 or gang>MaxNGangs;}
142 // Hard-coded data
143 static constexpr double m_gangThickness = 0.05 * Gaudi::Units::mm;
144 static constexpr double m_stripThickness = 0.03 * Gaudi::Units::mm;
145 };
148
149 const std::string& TgcReadoutParams::GetName() const { return m_chamberName; }
150} // namespace MuonGM
151
152#endif // MUONREADOUTGEOMETRY_TGCREADOUTPARAMS_H
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
int nWires(int gasGap, int gang) const
Returns the number of wires in a given gang.
double stripPositionOnLargeBase(int strip, int gasGap) const
Returns the signed distance of the i-th's strip's left edge w.r.t the center of the bottom chamber ed...
int totalWires(int gasGap) const
Returns the total number of wires in a given gang.
double stripPositionOnShortBase(int strip, int gasGap) const
Returns the signed distance of the i-th's strip's left edge w.r.t.
std::array< double, MaxNStrips > StripArray
static constexpr double m_stripThickness
std::array< int, MaxNGangs > WiregangArray
const std::string & GetName() const
std::array< std::vector< int >, MaxNGaps > m_nAccWires
Map describing the number of all wires up to gang i in gasgap j.
int nStripLayers() const
Returns the number of defined strip layers.
double wirePitch() const
Returns the wire pitch.
int nWireGangs(int gasGap) const
Returns the number of wire gangs.
TgcReadoutParams()
Default constructor used by the MuonTPCnv tests.
std::vector< StripArray > m_stripPositionCenter
The position of the strip center is defined as the intersector of the large and short edge strip posi...
std::array< std::vector< int >, MaxNGaps > m_nWires
Map of number of wires in a given wire gang & gas gap.
double physicalDistanceFromBase() const
std::vector< StripArray > m_stripPositionOnLargeBase
These 2 arrays represent the left edges of the i-th strip in a Tgc chamber The numbers are given as t...
static constexpr double m_gangThickness
double stripCenter(int strip, int gasGap) const
Returns the signed distance along the chamber edge of the strip expressed at the chamber center.
std::array< double, MaxNGaps > GasGapFloatArray
int nSummedWires(int gasGap, int gang) const
Returns the sum of all wires from gang [1 - i)
bool invalidGasGap(int gasGap) const
std::array< int, MaxNGaps > GasGapIntArray
double nPitchesToGang(int gasGap, int gang) const
Returns the number of wire pitches that have to be travelled to reach gang i.
int nStrips(int gasGap) const
bool invalidGang(int gang) const
std::vector< StripArray > m_stripPositionOnShortBase
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27