ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TGC::TgcChamber Class Reference

#include <TgcChamber.h>

Inheritance diagram for TGC::TgcChamber:
Collaboration diagram for TGC::TgcChamber:

Public Member Functions

 TgcChamber ()=default
 
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

std::string m_cham_name
 
TGCSIDE m_iSide {}
 
TGCDETECTOR m_detId {}
 
int m_iSec {}
 
int m_iM {}
 
int m_iPhi {}
 
int m_iEta {}
 
int m_stationName {}
 
int m_stationEta {}
 
int m_stationPhi {}
 

Detailed Description

Definition at line 10 of file TgcChamber.h.

Constructor & Destructor Documentation

◆ TgcChamber()

TGC::TgcChamber::TgcChamber ( )
default

Member Function Documentation

◆ cham_name()

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

Definition at line 43 of file TgcChamber.h.

43 {return m_cham_name;}

◆ DetId()

const TGCDETECTOR & TgcChamber::DetId ( ) const
inline

Definition at line 45 of file TgcChamber.h.

45 {return m_detId;}

◆ iEta()

const int & TgcChamber::iEta ( ) const
inline

Definition at line 49 of file TgcChamber.h.

49 {return m_iEta;}

◆ iM()

const int & TgcChamber::iM ( ) const
inline

Definition at line 47 of file TgcChamber.h.

47 {return m_iM;}

◆ initChamber() [1/4]

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

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 
)

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 
)

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 
)

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
inline

Definition at line 48 of file TgcChamber.h.

48 {return m_iPhi;}

◆ iSec()

const int & TgcChamber::iSec ( ) const
inline

Definition at line 46 of file TgcChamber.h.

46 {return m_iSec;}

◆ iSide()

const TGCSIDE & TgcChamber::iSide ( ) const
inline

Definition at line 44 of file TgcChamber.h.

44 {return m_iSide;}

◆ StationEta()

const int & TgcChamber::StationEta ( ) const
inline

Definition at line 51 of file TgcChamber.h.

51 {return m_stationEta;}

◆ StationName()

const int & TgcChamber::StationName ( ) const
inline

Definition at line 50 of file TgcChamber.h.

50 {return m_stationName;}

◆ StationPhi()

const int & TgcChamber::StationPhi ( ) const
inline

Definition at line 52 of file TgcChamber.h.

52 {return m_stationPhi;}

Member Data Documentation

◆ m_cham_name

std::string TGC::TgcChamber::m_cham_name
private

Definition at line 31 of file TgcChamber.h.

◆ m_detId

TGCDETECTOR TGC::TgcChamber::m_detId {}
private

Definition at line 33 of file TgcChamber.h.

◆ m_iEta

int TGC::TgcChamber::m_iEta {}
private

Definition at line 37 of file TgcChamber.h.

◆ m_iM

int TGC::TgcChamber::m_iM {}
private

Definition at line 35 of file TgcChamber.h.

◆ m_iPhi

int TGC::TgcChamber::m_iPhi {}
private

Definition at line 36 of file TgcChamber.h.

◆ m_iSec

int TGC::TgcChamber::m_iSec {}
private

Definition at line 34 of file TgcChamber.h.

◆ m_iSide

TGCSIDE TGC::TgcChamber::m_iSide {}
private

Definition at line 32 of file TgcChamber.h.

◆ m_stationEta

int TGC::TgcChamber::m_stationEta {}
private

Definition at line 39 of file TgcChamber.h.

◆ m_stationName

int TGC::TgcChamber::m_stationName {}
private

Definition at line 38 of file TgcChamber.h.

◆ m_stationPhi

int TGC::TgcChamber::m_stationPhi {}
private

Definition at line 40 of file TgcChamber.h.


The documentation for this class was generated from the following files:
TGC::TgcChamber::initChamber
void initChamber(const std::string &chamber_name)
Definition: TgcChamber.cxx:8
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:129
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
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
TGC::TgcChamber::m_iPhi
int m_iPhi
Definition: TgcChamber.h:36
TGC::TGCDETECTOR::TGCM2
@ TGCM2
TGC::TGCDETECTOR::TGCFI
@ TGCFI
TGC::TgcChamber::m_stationEta
int m_stationEta
Definition: TgcChamber.h:39
TGC::TGCSIDE::TGCSIDEUNDEF
@ TGCSIDEUNDEF
TRT::Hit::side
@ side
Definition: HitInfo.h:83
TGC::TgcChamber::m_stationPhi
int m_stationPhi
Definition: TgcChamber.h:40
TGC::TgcChamber::m_iM
int m_iM
Definition: TgcChamber.h:35
TGC::TgcChamber::m_detId
TGCDETECTOR m_detId
Definition: TgcChamber.h:33
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::TGCDETECTOR::TGCM3
@ TGCM3
TGC::TgcChamber::iM
const int & iM() const
Definition: TgcChamber.h:47
TGC::TgcChamber::m_iSide
TGCSIDE m_iSide
Definition: TgcChamber.h:32
TGC::TgcChamber::m_iSec
int m_iSec
Definition: TgcChamber.h:34
TGC::TGCDETECTOR::TGCM1
@ TGCM1
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
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