ATLAS Offline Software
Loading...
Searching...
No Matches
TGC::TgcHit Class Reference

#include <TgcHit.h>

Inheritance diagram for TGC::TgcHit:
Collaboration diagram for TGC::TgcHit:

Public Member Functions

 TgcHit (double x, double y, double z, double shortWidth, double longWidth, double length, bool isStrip, int gasGap, int channel, int eta, int phi, int station, int bcmask)
const double & X () const
const double & Y () const
const double & Z () const
const double & shortWidth () const
const double & longWidth () const
const double & length () const
const bool & isStrip () const
const int & gasGap () const
const int & channel () const
const int & stationEta () const
const int & stationPhi () const
const int & stationName () const
const int & bcmask () const
const std::string & gap_name () const
const std::string & type_name () const
const std::string & channel_name () const
const std::map< const xAOD::Muon *, const double > & residuals () const
void addResidual (const xAOD::Muon *m, const double v)
void initChamber (const std::string &chamber_name)
void initChamber (TGCSIDE side, int sec, int m, int phi, int eta)
void initChamber (TGCSIDE side, int stationEta, int stationPhi, int stationName)
void initChamber (int stationEta, int stationPhi, int stationName)
const std::string & cham_name () const
const TGCSIDEiSide () const
const TGCDETECTORDetId () const
const int & iSec () const
const int & iM () const
const int & iPhi () const
const int & iEta () const
const int & StationName () const
const int & StationEta () const
const int & StationPhi () const

Private Attributes

double m_x {}
double m_y {}
double m_z {}
double m_shortWidth {}
double m_longWidth {}
double m_length {}
bool m_isStrip {}
int m_gasGap {}
int m_channel {}
int m_stationEta {}
int m_stationPhi {}
int m_stationName {}
int m_bcmask {}
std::map< const xAOD::Muon *, const double > m_residuals {}
std::string m_gap_name {"none"}
std::string m_type_name {"none"}
std::string m_channel_name {"none"}
std::string m_cham_name
TGCSIDE m_iSide {}
TGCDETECTOR m_detId {}
int m_iSec {}
int m_iM {}
int m_iPhi {}
int m_iEta {}

Detailed Description

Definition at line 11 of file TgcHit.h.

Constructor & Destructor Documentation

◆ TgcHit()

TGC::TgcHit::TgcHit ( double x,
double y,
double z,
double shortWidth,
double longWidth,
double length,
bool isStrip,
int gasGap,
int channel,
int eta,
int phi,
int station,
int bcmask )

Definition at line 7 of file TgcHit.cxx.

9 :
10 m_x{x},
11 m_y{y},
12 m_z{z},
24{
26 m_gap_name = Form("%sL%02d",cham_name().data(),m_gasGap);
27 m_type_name = Form("%s%s",m_gap_name.data(),(m_isStrip)?("S"):("W"));
28 m_channel_name = Form("%sCh%03d",m_type_name.data(),m_channel);
29}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
#define y
#define x
#define z
void initChamber(const std::string &chamber_name)
Definition TgcChamber.cxx:8
const std::string & cham_name() const
Definition TgcChamber.h:43
const int & gasGap() const
Definition TgcHit.h:63
int m_stationEta
Definition TgcHit.h:46
double m_y
Definition TgcHit.h:38
const double & longWidth() const
Definition TgcHit.h:60
const bool & isStrip() const
Definition TgcHit.h:62
double m_length
Definition TgcHit.h:42
bool m_isStrip
Definition TgcHit.h:43
const double & shortWidth() const
Definition TgcHit.h:59
int m_stationPhi
Definition TgcHit.h:47
double m_shortWidth
Definition TgcHit.h:40
double m_z
Definition TgcHit.h:39
int m_bcmask
Definition TgcHit.h:49
std::string m_type_name
Definition TgcHit.h:52
int m_stationName
Definition TgcHit.h:48
const int & bcmask() const
Definition TgcHit.h:68
std::map< const xAOD::Muon *, const double > m_residuals
Definition TgcHit.h:50
const double & length() const
Definition TgcHit.h:61
const int & stationEta() const
Definition TgcHit.h:65
std::string m_channel_name
Definition TgcHit.h:53
std::string m_gap_name
Definition TgcHit.h:51
int m_gasGap
Definition TgcHit.h:44
const int & channel() const
Definition TgcHit.h:64
double m_x
Definition TgcHit.h:37
int m_channel
Definition TgcHit.h:45
const int & stationPhi() const
Definition TgcHit.h:66
const int & stationName() const
Definition TgcHit.h:67
double m_longWidth
Definition TgcHit.h:41

Member Function Documentation

◆ addResidual()

void TGC::TgcHit::addResidual ( const xAOD::Muon * m,
const double v )
inline

Definition at line 73 of file TgcHit.h.

73{m_residuals.insert(std::make_pair(m,v));}

◆ bcmask()

const int & TGC::TgcHit::bcmask ( ) const
inline

Definition at line 68 of file TgcHit.h.

68{return m_bcmask;}

◆ cham_name()

const std::string & TgcChamber::cham_name ( ) const
inlineinherited

Definition at line 43 of file TgcChamber.h.

43{return m_cham_name;}
std::string m_cham_name
Definition TgcChamber.h:31

◆ channel()

const int & TGC::TgcHit::channel ( ) const
inline

Definition at line 64 of file TgcHit.h.

64{return m_channel;}

◆ channel_name()

const std::string & TGC::TgcHit::channel_name ( ) const
inline

Definition at line 71 of file TgcHit.h.

71{return m_channel_name;}

◆ DetId()

const TGCDETECTOR & TgcChamber::DetId ( ) const
inlineinherited

Definition at line 45 of file TgcChamber.h.

45{return m_detId;}
TGCDETECTOR m_detId
Definition TgcChamber.h:33

◆ gap_name()

const std::string & TGC::TgcHit::gap_name ( ) const
inline

Definition at line 69 of file TgcHit.h.

69{return m_gap_name;}

◆ gasGap()

const int & TGC::TgcHit::gasGap ( ) const
inline

Definition at line 63 of file TgcHit.h.

63{return m_gasGap;}

◆ iEta()

const int & TgcChamber::iEta ( ) const
inlineinherited

Definition at line 49 of file TgcChamber.h.

49{return m_iEta;}

◆ iM()

const int & TgcChamber::iM ( ) const
inlineinherited

Definition at line 47 of file TgcChamber.h.

47{return m_iM;}

◆ initChamber() [1/4]

void TgcChamber::initChamber ( const std::string & chamber_name)
inherited

Definition at line 8 of file TgcChamber.cxx.

8 {
9 // example: A01M01f01E01
11 int iSec = std::stoi(cham_name.substr(1,2));
12 int iM = std::stoi(cham_name.substr(4,2));
13 int iPhi = std::stoi(cham_name.substr(7,2));
14 int iEta = std::stoi(cham_name.substr(10,2));
16}
@ TGC
Definition RegSelEnums.h:33
const int & iM() const
Definition TgcChamber.h:47
const int & iSec() const
Definition TgcChamber.h:46
const TGCSIDE & iSide() const
Definition TgcChamber.h:44
const int & iEta() const
Definition TgcChamber.h:49
const int & iPhi() const
Definition TgcChamber.h:48
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...
TGCSIDE
Definition TgcBase.h:10

◆ initChamber() [2/4]

void TgcChamber::initChamber ( int stationEta,
int stationPhi,
int stationName )
inherited

Definition at line 93 of file TgcChamber.cxx.

93 {
95 int iSec = 0;
96 int iM = 0;
97 int iPhi = 0;
98 int iEta = 0;
100 iM = 0;
101 if (stationName == 41 || stationName == 42) iM = 1;
102 else if (stationName == 43 || stationName == 44) iM = 2;
103 else if (stationName == 45 || stationName == 46) iM = 3;
104 else if (stationName == 47 || stationName == 48) iM = 4; // EIFI
105
106 if (iM != 4) { // Big Wheel, (M1,M2,M3)
107 if (stationName % 2 == 0) { // Endcap
108 int iphi2 = stationPhi + 1; // 2,3,4,..,49
109 if (iphi2 >= 48) iphi2 -= 48; // 0,1,2,3 ..., 47
110 iSec = int(iphi2 / 4) + 1; // 1,2,3,,,12
111 iPhi = iphi2 - (iSec - 1) * 4; // 0,1,2,3
112 iEta = (iM == 1) ? (5 - std::abs(stationEta)) : (6 - std::abs(stationEta));
113 } else { // Forward
114 int iphi2 = stationPhi; // 1,2,3,4,..,25
115 if (iphi2 >= 24) iphi2 -= 24; // 0,1,2,3 ...,23
116 iSec = int(iphi2 / 2) + 1; // 1,2,3,,,12
117 iPhi = iphi2 - (iSec - 1) * 2; // 0,1
118 if (iPhi == 1) iPhi = 2; //0,2
119 iEta = 0; // F
120 }
121 } else { // Small Wheel (M4)
122 if (stationName == 47) { // FI
123 iSec = 0;
124 iPhi = stationPhi; // 1,2,3..24
125 iEta = 0;
126 } else if (stationName == 48) { // EI
127 int iphi2 = (stationPhi >= 21) ? (stationPhi - 21) : (stationPhi); // 0,1,2,..,20
128 if (iphi2 >= 0 && iphi2 <= 2) {
129 iSec = 1;
130 iPhi = iphi2; // 0,1,2
131 } else if (iphi2 >= 3 && iphi2 <= 5) {
132 iSec = 3;
133 iPhi = iphi2 - 3; // 0,1,2
134 } else if (iphi2 >= 6 && iphi2 <= 8) {
135 iSec = 5;
136 iPhi = iphi2 - 6; // 0,1,2
137 } else if (iphi2 >= 9 && iphi2 <= 10) {
138 iSec = 7;
139 iPhi = iphi2 - 9 + 1; // 1,2
140 } else if (iphi2 >= 11 && iphi2 <= 13) {
141 iSec = 9;
142 iPhi = iphi2 - 11; // 0,1,2
143 } else if (iphi2 >= 14 && iphi2 <= 15) {
144 iSec = 11;
145 iPhi = iphi2 - 13; // 1,2
146 } else if (iphi2 >= 16 && iphi2 <= 18) {
147 iSec = 13;
148 iPhi = iphi2 - 16; // 0,1,2
149 } else if (iphi2 >= 19 && iphi2 <= 20) {
150 iSec = 15;
151 iPhi = iphi2 - 19 + 1; // 1,2
152 }
153 iEta = 1;
154 }
155 }
157}
constexpr uint8_t stationPhi
station Phi 1 to 8

◆ initChamber() [3/4]

void TgcChamber::initChamber ( TGCSIDE side,
int sec,
int m,
int phi,
int eta )
inherited

Definition at line 17 of file TgcChamber.cxx.

18{
19 m_iSide = side;
20 m_iSec = sec;
21 m_iM = m;
22 m_iPhi = phi;
23 m_iEta = eta;
24 if(m_iM==1 && m_iEta==0){
25 m_stationName = 41;
27 m_stationPhi = (m_iSec-1)*2 + m_iPhi/2+1 - 1;
28 if( m_stationPhi <= 0 ) m_stationPhi += 24;
30 }else if(m_iM==1 && m_iEta!=0){
31 m_stationName = 42;
32 m_stationEta = ((m_iSide==TGC::TGCSIDE::TGCASIDE)?(+1):(-1)) * (5 - m_iEta);
33 m_stationPhi = (m_iSec-1)*4 + m_iPhi - 1;
34 if( m_stationPhi <= 0 ) m_stationPhi += 48;
36 }else if(m_iM==2 && m_iEta==0){
37 m_stationName = 43;
39 m_stationPhi = (m_iSec-1)*2 + m_iPhi/2+1 - 1;
40 if( m_stationPhi <= 0 ) m_stationPhi += 24;
42 }else if(m_iM==2 && m_iEta!=0){
43 m_stationName = 44;
44 m_stationEta = ((m_iSide==TGC::TGCSIDE::TGCASIDE)?(+1):(-1)) * (6 - m_iEta);
45 m_stationPhi = (m_iSec-1)*4 + m_iPhi - 1;
46 if( m_stationPhi <= 0 ) m_stationPhi += 48;
48 }else if(m_iM==3 && m_iEta==0){
49 m_stationName = 45;
51 m_stationPhi = (m_iSec-1)*2 + m_iPhi/2+1 - 1;
52 if( m_stationPhi <= 0 ) m_stationPhi += 24;
54 }else if(m_iM==3 && m_iEta!=0){
55 m_stationName = 46;
56 m_stationEta = ((m_iSide==TGC::TGCSIDE::TGCASIDE)?(+1):(-1)) * (6 - m_iEta);
57 m_stationPhi = (m_iSec-1)*4 + m_iPhi - 1;
58 if( m_stationPhi <= 0 ) m_stationPhi += 48;
60 }else if(m_iM==4 && m_iEta==0){
61 m_stationName = 47;
65 }else if(m_iM==4 && m_iEta!=0){
66 m_stationName = 48;
68 if(m_iSec==1){
70 }else if(m_iSec==3){
71 m_stationPhi = m_iPhi + 3;
72 }else if(m_iSec==5){
73 m_stationPhi = m_iPhi + 6;
74 }else if(m_iSec==7){
75 m_stationPhi = m_iPhi + 8;
76 }else if(m_iSec==9){
77 m_stationPhi = m_iPhi + 11;
78 }else if(m_iSec==11){
79 m_stationPhi = m_iPhi + 13;
80 }else if(m_iSec==13){
81 m_stationPhi = m_iPhi + 16;
82 }else if(m_iSec==15){
83 m_stationPhi = m_iPhi + 18;
84 }
85 if( m_stationPhi <= 0 ) m_stationPhi += 21;
87 }
88 m_cham_name = Form("%s%02dM%02df%02d%s%02d",(m_iSide==TGC::TGCSIDE::TGCASIDE)?("A"):("C"),m_iSec,m_iM,m_iPhi,(m_iEta==0)?("F"):("E"),m_iEta);
89}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
TGCSIDE m_iSide
Definition TgcChamber.h:32

◆ initChamber() [4/4]

void TgcChamber::initChamber ( TGCSIDE side,
int stationEta,
int stationPhi,
int stationName )
inherited

Definition at line 90 of file TgcChamber.cxx.

90 {
91 initChamber(std::abs(stationEta) * ((side==TGC::TGCSIDE::TGCASIDE) ? (+1.0) : (-1.0)) , stationPhi, stationName);
92}

◆ iPhi()

const int & TgcChamber::iPhi ( ) const
inlineinherited

Definition at line 48 of file TgcChamber.h.

48{return m_iPhi;}

◆ iSec()

const int & TgcChamber::iSec ( ) const
inlineinherited

Definition at line 46 of file TgcChamber.h.

46{return m_iSec;}

◆ iSide()

const TGCSIDE & TgcChamber::iSide ( ) const
inlineinherited

Definition at line 44 of file TgcChamber.h.

44{return m_iSide;}

◆ isStrip()

const bool & TGC::TgcHit::isStrip ( ) const
inline

Definition at line 62 of file TgcHit.h.

62{return m_isStrip;}

◆ length()

const double & TGC::TgcHit::length ( ) const
inline

Definition at line 61 of file TgcHit.h.

61{return m_length;}

◆ longWidth()

const double & TGC::TgcHit::longWidth ( ) const
inline

Definition at line 60 of file TgcHit.h.

60{return m_longWidth;}

◆ residuals()

const std::map< const xAOD::Muon *, const double > & TGC::TgcHit::residuals ( ) const
inline

Definition at line 72 of file TgcHit.h.

72{return m_residuals;}

◆ shortWidth()

const double & TGC::TgcHit::shortWidth ( ) const
inline

Definition at line 59 of file TgcHit.h.

59{return m_shortWidth;}

◆ StationEta()

const int & TgcChamber::StationEta ( ) const
inlineinherited

Definition at line 51 of file TgcChamber.h.

51{return m_stationEta;}

◆ stationEta()

const int & TGC::TgcHit::stationEta ( ) const
inline

Definition at line 65 of file TgcHit.h.

65{return m_stationEta;}

◆ StationName()

const int & TgcChamber::StationName ( ) const
inlineinherited

Definition at line 50 of file TgcChamber.h.

50{return m_stationName;}

◆ stationName()

const int & TGC::TgcHit::stationName ( ) const
inline

Definition at line 67 of file TgcHit.h.

67{return m_stationName;}

◆ StationPhi()

const int & TgcChamber::StationPhi ( ) const
inlineinherited

Definition at line 52 of file TgcChamber.h.

52{return m_stationPhi;}

◆ stationPhi()

const int & TGC::TgcHit::stationPhi ( ) const
inline

Definition at line 66 of file TgcHit.h.

66{return m_stationPhi;}

◆ type_name()

const std::string & TGC::TgcHit::type_name ( ) const
inline

Definition at line 70 of file TgcHit.h.

70{return m_type_name;}

◆ X()

const double & TGC::TgcHit::X ( ) const
inline

Definition at line 56 of file TgcHit.h.

56{return m_x;}

◆ Y()

const double & TGC::TgcHit::Y ( ) const
inline

Definition at line 57 of file TgcHit.h.

57{return m_y;}

◆ Z()

const double & TGC::TgcHit::Z ( ) const
inline

Definition at line 58 of file TgcHit.h.

58{return m_z;}

Member Data Documentation

◆ m_bcmask

int TGC::TgcHit::m_bcmask {}
private

Definition at line 49 of file TgcHit.h.

49{};

◆ m_cham_name

std::string TGC::TgcChamber::m_cham_name
privateinherited

Definition at line 31 of file TgcChamber.h.

◆ m_channel

int TGC::TgcHit::m_channel {}
private

Definition at line 45 of file TgcHit.h.

45{};

◆ m_channel_name

std::string TGC::TgcHit::m_channel_name {"none"}
private

Definition at line 53 of file TgcHit.h.

53{"none"};

◆ m_detId

TGCDETECTOR TGC::TgcChamber::m_detId {}
privateinherited

Definition at line 33 of file TgcChamber.h.

33{};

◆ m_gap_name

std::string TGC::TgcHit::m_gap_name {"none"}
private

Definition at line 51 of file TgcHit.h.

51{"none"};

◆ m_gasGap

int TGC::TgcHit::m_gasGap {}
private

Definition at line 44 of file TgcHit.h.

44{};

◆ m_iEta

int TGC::TgcChamber::m_iEta {}
privateinherited

Definition at line 37 of file TgcChamber.h.

37{};

◆ m_iM

int TGC::TgcChamber::m_iM {}
privateinherited

Definition at line 35 of file TgcChamber.h.

35{};

◆ m_iPhi

int TGC::TgcChamber::m_iPhi {}
privateinherited

Definition at line 36 of file TgcChamber.h.

36{};

◆ m_iSec

int TGC::TgcChamber::m_iSec {}
privateinherited

Definition at line 34 of file TgcChamber.h.

34{};

◆ m_iSide

TGCSIDE TGC::TgcChamber::m_iSide {}
privateinherited

Definition at line 32 of file TgcChamber.h.

32{};

◆ m_isStrip

bool TGC::TgcHit::m_isStrip {}
private

Definition at line 43 of file TgcHit.h.

43{};

◆ m_length

double TGC::TgcHit::m_length {}
private

Definition at line 42 of file TgcHit.h.

42{};

◆ m_longWidth

double TGC::TgcHit::m_longWidth {}
private

Definition at line 41 of file TgcHit.h.

41{};

◆ m_residuals

std::map<const xAOD::Muon*,const double> TGC::TgcHit::m_residuals {}
private

Definition at line 50 of file TgcHit.h.

50{};

◆ m_shortWidth

double TGC::TgcHit::m_shortWidth {}
private

Definition at line 40 of file TgcHit.h.

40{};

◆ m_stationEta

int TGC::TgcHit::m_stationEta {}
private

Definition at line 46 of file TgcHit.h.

46{};

◆ m_stationName

int TGC::TgcHit::m_stationName {}
private

Definition at line 48 of file TgcHit.h.

48{};

◆ m_stationPhi

int TGC::TgcHit::m_stationPhi {}
private

Definition at line 47 of file TgcHit.h.

47{};

◆ m_type_name

std::string TGC::TgcHit::m_type_name {"none"}
private

Definition at line 52 of file TgcHit.h.

52{"none"};

◆ m_x

double TGC::TgcHit::m_x {}
private

Definition at line 37 of file TgcHit.h.

37{};

◆ m_y

double TGC::TgcHit::m_y {}
private

Definition at line 38 of file TgcHit.h.

38{};

◆ m_z

double TGC::TgcHit::m_z {}
private

Definition at line 39 of file TgcHit.h.

39{};

The documentation for this class was generated from the following files: