ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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},
23  m_residuals{}
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 }

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;}

◆ 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;}

◆ 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
10  TGCSIDE iSide = (cham_name.substr(0,1).compare("A")==0)?(TGC::TGCSIDE::TGCASIDE):(TGC::TGCSIDE::TGCCSIDE);
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 }

◆ 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 }

◆ 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 }

◆ 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 & TGC::TgcHit::stationEta ( ) const
inline

Definition at line 65 of file TgcHit.h.

65 {return m_stationEta;}

◆ StationEta()

const int & TgcChamber::StationEta ( ) const
inlineinherited

Definition at line 51 of file TgcChamber.h.

51 {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 & TGC::TgcHit::stationPhi ( ) const
inline

Definition at line 66 of file TgcHit.h.

66 {return m_stationPhi;}

◆ StationPhi()

const int & TgcChamber::StationPhi ( ) const
inlineinherited

Definition at line 52 of file TgcChamber.h.

52 {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.

◆ 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.

◆ m_channel_name

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

Definition at line 53 of file TgcHit.h.

◆ m_detId

TGCDETECTOR TGC::TgcChamber::m_detId {}
privateinherited

Definition at line 33 of file TgcChamber.h.

◆ m_gap_name

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

Definition at line 51 of file TgcHit.h.

◆ m_gasGap

int TGC::TgcHit::m_gasGap {}
private

Definition at line 44 of file TgcHit.h.

◆ m_iEta

int TGC::TgcChamber::m_iEta {}
privateinherited

Definition at line 37 of file TgcChamber.h.

◆ m_iM

int TGC::TgcChamber::m_iM {}
privateinherited

Definition at line 35 of file TgcChamber.h.

◆ m_iPhi

int TGC::TgcChamber::m_iPhi {}
privateinherited

Definition at line 36 of file TgcChamber.h.

◆ m_iSec

int TGC::TgcChamber::m_iSec {}
privateinherited

Definition at line 34 of file TgcChamber.h.

◆ m_iSide

TGCSIDE TGC::TgcChamber::m_iSide {}
privateinherited

Definition at line 32 of file TgcChamber.h.

◆ m_isStrip

bool TGC::TgcHit::m_isStrip {}
private

Definition at line 43 of file TgcHit.h.

◆ m_length

double TGC::TgcHit::m_length {}
private

Definition at line 42 of file TgcHit.h.

◆ m_longWidth

double TGC::TgcHit::m_longWidth {}
private

Definition at line 41 of file TgcHit.h.

◆ m_residuals

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

Definition at line 50 of file TgcHit.h.

◆ m_shortWidth

double TGC::TgcHit::m_shortWidth {}
private

Definition at line 40 of file TgcHit.h.

◆ m_stationEta

int TGC::TgcHit::m_stationEta {}
private

Definition at line 46 of file TgcHit.h.

◆ m_stationName

int TGC::TgcHit::m_stationName {}
private

Definition at line 48 of file TgcHit.h.

◆ m_stationPhi

int TGC::TgcHit::m_stationPhi {}
private

Definition at line 47 of file TgcHit.h.

◆ m_type_name

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

Definition at line 52 of file TgcHit.h.

◆ m_x

double TGC::TgcHit::m_x {}
private

Definition at line 37 of file TgcHit.h.

◆ m_y

double TGC::TgcHit::m_y {}
private

Definition at line 38 of file TgcHit.h.

◆ m_z

double TGC::TgcHit::m_z {}
private

Definition at line 39 of file TgcHit.h.


The documentation for this class was generated from the following files:
TGC::TgcHit::isStrip
const bool & isStrip() const
Definition: TgcHit.h:62
TGC::TgcChamber::initChamber
void initChamber(const std::string &chamber_name)
Definition: TgcChamber.cxx:8
TGC::TgcHit::stationEta
const int & stationEta() const
Definition: TgcHit.h:65
test_pyathena.eta
eta
Definition: test_pyathena.py:10
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:158
TGC::TgcChamber::m_stationName
int m_stationName
Definition: TgcChamber.h:38
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TGC::TgcChamber::cham_name
const std::string & cham_name() const
Definition: TgcChamber.h:43
TGC::TgcChamber::iSec
const int & iSec() const
Definition: TgcChamber.h:46
TGC::TgcHit::stationName
const int & stationName() const
Definition: TgcHit.h:67
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TGC::TgcHit::bcmask
const int & bcmask() const
Definition: TgcHit.h:68
TGC::TgcHit::m_channel
int m_channel
Definition: TgcHit.h:45
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
TGC::TgcChamber::m_iPhi
int m_iPhi
Definition: TgcChamber.h:36
TGC::TGCDETECTOR::TGCM2
@ TGCM2
TGC::TgcHit::m_x
double m_x
Definition: TgcHit.h:37
TGC::TgcHit::longWidth
const double & longWidth() const
Definition: TgcHit.h:60
TGC::TgcHit::m_stationEta
int m_stationEta
Definition: TgcHit.h:46
TGC::TGCDETECTOR::TGCFI
@ TGCFI
TGC::TgcChamber::m_stationEta
int m_stationEta
Definition: TgcChamber.h:39
TGC::TgcHit::m_gasGap
int m_gasGap
Definition: TgcHit.h:44
x
#define x
TGC::TgcHit::gasGap
const int & gasGap() const
Definition: TgcHit.h:63
TGC::TGCSIDE::TGCSIDEUNDEF
@ TGCSIDEUNDEF
TRT::Hit::side
@ side
Definition: HitInfo.h:83
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
TGC::TgcHit::m_stationPhi
int m_stationPhi
Definition: TgcHit.h:47
TGC::TgcChamber::m_stationPhi
int m_stationPhi
Definition: TgcChamber.h:40
TGC::TgcHit::m_z
double m_z
Definition: TgcHit.h:39
TGC::TgcHit::m_stationName
int m_stationName
Definition: TgcHit.h:48
z
#define z
TGC::TgcHit::length
const double & length() const
Definition: TgcHit.h:61
TGC::TgcHit::m_residuals
std::map< const xAOD::Muon *, const double > m_residuals
Definition: TgcHit.h:50
TGC::TgcHit::m_y
double m_y
Definition: TgcHit.h:38
TGC::TgcChamber::m_iM
int m_iM
Definition: TgcChamber.h:35
TGC::TgcHit::m_channel_name
std::string m_channel_name
Definition: TgcHit.h:53
TGC::TgcHit::channel
const int & channel() const
Definition: TgcHit.h:64
TGC::TgcHit::m_length
double m_length
Definition: TgcHit.h:42
TGC::TgcChamber::m_detId
TGCDETECTOR m_detId
Definition: TgcChamber.h:33
TGC::TgcHit::m_bcmask
int m_bcmask
Definition: TgcHit.h:49
TGC::TgcHit::m_isStrip
bool m_isStrip
Definition: TgcHit.h:43
TGC::TgcChamber::m_cham_name
std::string m_cham_name
Definition: TgcChamber.h:31
TGC::TgcChamber::m_iEta
int m_iEta
Definition: TgcChamber.h:37
TGC::TGCSIDE
TGCSIDE
Definition: TgcBase.h:10
TGC::TgcChamber::iPhi
const int & iPhi() const
Definition: TgcChamber.h:48
TGC::TGCDETECTOR::TGCEI
@ TGCEI
TGC::TGCSIDE::TGCCSIDE
@ TGCCSIDE
TGC::TgcHit::m_shortWidth
double m_shortWidth
Definition: TgcHit.h:40
TGC::TgcHit::shortWidth
const double & shortWidth() const
Definition: TgcHit.h:59
TGC::TGCDETECTOR::TGCM3
@ TGCM3
TGC::TgcChamber::iM
const int & iM() const
Definition: TgcChamber.h:47
python.PyAthena.v
v
Definition: PyAthena.py:154
TGC::TgcChamber::m_iSide
TGCSIDE m_iSide
Definition: TgcChamber.h:32
TGC::TgcChamber::m_iSec
int m_iSec
Definition: TgcChamber.h:34
y
#define y
TGC::TGCDETECTOR::TGCM1
@ TGCM1
TGC::TgcHit::m_gap_name
std::string m_gap_name
Definition: TgcHit.h:51
TGC::TgcHit::m_type_name
std::string m_type_name
Definition: TgcHit.h:52
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:156
TGC::TgcHit::m_longWidth
double m_longWidth
Definition: TgcHit.h:41
TGC::TgcHit::stationPhi
const int & stationPhi() const
Definition: TgcHit.h:66
TGC::TgcChamber::iSide
const TGCSIDE & iSide() const
Definition: TgcChamber.h:44
TGC::TGCSIDE::TGCASIDE
@ TGCASIDE
TGC::TgcChamber::iEta
const int & iEta() const
Definition: TgcChamber.h:49