ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1TGCTrigger::TGCSSCControllerOut Class Reference

#include <TGCSSCControllerOut.h>

Collaboration diagram for LVL1TGCTrigger::TGCSSCControllerOut:

Public Types

enum  { MaxNumberOfPhiInSSC = 4 }
 
enum  { MaxNumberOfChamberInR = 5 }
 

Public Member Functions

 TGCSSCControllerOut (TGCRegionType region=TGCRegionType::ENDCAP)
 
bool hasChamberBoundary (int ssc) const
 
bool hasUpperChamber (int ssc) const
 
int getOredChamberNumber (int ssc) const
 
int getR (int ssc) const
 
int getDR (int ssc) const
 
int getPtR (int ssc) const
 
int getPhi (int ssc, int phipos, bool ored=false) const
 
int getDPhi (int ssc, int phipos, bool ored=false) const
 
int getPtPhi (int ssc, int phipos, bool ored=false) const
 
void setR (unsigned int ssc, int rIn)
 
void setDR (unsigned int ssc, int dRIn)
 
void setPtR (unsigned int ssc, int ptLvl)
 
void setHitR (unsigned int ssc, bool hit)
 
void setPhi (int chamberNo, int phiPos, int phiIn)
 
void setDPhi (int chamberNo, int phiPos, int dPhiIn)
 
void setPtPhi (int chamberNo, int phiPos, int ptLvl)
 
void setHitPhi (int chamberNo, int phiPos, bool hit)
 
bool hasHit (int ssc, bool ored=false) const
 
bool hasHit (int ssc, int phiposInSSC, bool ored=false) const
 
bool hasHitPhi (int chamberNo, int phiPos) const
 
void clear ()
 
void print () const
 

Protected Member Functions

int getChamberNumber (int ssc) const
 
int getNumberOfChamberInR () const
 
int getNumberOfSubSectorCluster () const
 

Private Attributes

TGCRegionType m_regionType
 
int m_phi [MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
 
int m_dPhi [MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
 
int m_ptPhi [MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
 
bool m_hitPhi [MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
 
int m_r [LVL1TGC::kNMaxSSC]
 
int m_dR [LVL1TGC::kNMaxSSC]
 
int m_ptR [LVL1TGC::kNMaxSSC]
 
bool m_hitR [LVL1TGC::kNMaxSSC]
 

Static Private Attributes

static const int s_chamber [NumberOfRegionType][LVL1TGC::kNMaxSSC]
 

Detailed Description

Definition at line 12 of file TGCSSCControllerOut.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxNumberOfPhiInSSC 

Definition at line 15 of file TGCSSCControllerOut.h.

◆ anonymous enum

anonymous enum
Enumerator
MaxNumberOfChamberInR 

Definition at line 16 of file TGCSSCControllerOut.h.

Constructor & Destructor Documentation

◆ TGCSSCControllerOut()

LVL1TGCTrigger::TGCSSCControllerOut::TGCSSCControllerOut ( TGCRegionType  region = TGCRegionType::ENDCAP)

Definition at line 15 of file TGCSSCControllerOut.cxx.

15  :
16  m_regionType(region)
17 {
18  for(int i=0; i<MaxNumberOfChamberInR; i++ ){
19  for(int j=0; j<MaxNumberOfPhiInSSC; j++) {
20  m_phi[i][j] =0;
21  m_dPhi[i][j] = 0;
22  m_ptPhi[i][j] =0;
23  m_hitPhi[i][j] = false;
24  }
25  }
26 
27  for (size_t i=0; i < LVL1TGC::kNMaxSSC; i++ ){
28  m_r[i] = 0;
29  m_dR[i] = 0;
30  m_ptR[i] = 0;
31  m_hitR[i] = false;
32  }
33 }

Member Function Documentation

◆ clear()

void LVL1TGCTrigger::TGCSSCControllerOut::clear ( )

Definition at line 83 of file TGCSSCControllerOut.cxx.

84 {
85  int i, j;
86  for( i=0; i<getNumberOfChamberInR(); i+=1)
87  for( j=0; j<MaxNumberOfPhiInSSC; j++)
88  m_hitPhi[i][j]=false;
89 
90  for( i=0; i<getNumberOfSubSectorCluster(); i+=1)
91  m_hitR[i]=false;
92 }

◆ getChamberNumber()

int LVL1TGCTrigger::TGCSSCControllerOut::getChamberNumber ( int  ssc) const
inlineprotected

Definition at line 106 of file TGCSSCControllerOut.h.

107 {
108  if (m_regionType == TGCRegionType::FORWARD) return s_chamber[0][ssc];
109  else return s_chamber[1][ssc];
110 }

◆ getDPhi()

int LVL1TGCTrigger::TGCSSCControllerOut::getDPhi ( int  ssc,
int  phipos,
bool  ored = false 
) const
inline

Definition at line 159 of file TGCSSCControllerOut.h.

160 {
161  if(!ored) {
162  return m_dPhi[getChamberNumber(ssc)][phipos];
163  } else {
164  int idx =getOredChamberNumber(ssc);
165  if (idx>=0 ) return m_dPhi[idx][phipos];
166  else {
167  std::cerr << "internal error in TGCSSCControllerOut::getDPhi()"
168  << std::endl;
169  return 0;
170  }
171  }
172  return 0;
173 }

◆ getDR()

int LVL1TGCTrigger::TGCSSCControllerOut::getDR ( int  ssc) const
inline

Definition at line 129 of file TGCSSCControllerOut.h.

130 {
131  return m_dR[ssc];
132 }

◆ getNumberOfChamberInR()

int LVL1TGCTrigger::TGCSSCControllerOut::getNumberOfChamberInR ( ) const
inlineprotected

Definition at line 112 of file TGCSSCControllerOut.h.

113 {
114  if (m_regionType == TGCRegionType::FORWARD) return 1;
115  else return 5;
116 }

◆ getNumberOfSubSectorCluster()

int LVL1TGCTrigger::TGCSSCControllerOut::getNumberOfSubSectorCluster ( ) const
inlineprotected

Definition at line 118 of file TGCSSCControllerOut.h.

119 {
120  return (m_regionType == TGCRegionType::FORWARD) ? 8 : LVL1TGC::kNMaxSSC;
121 }

◆ getOredChamberNumber()

int LVL1TGCTrigger::TGCSSCControllerOut::getOredChamberNumber ( int  ssc) const
inline

Definition at line 93 of file TGCSSCControllerOut.h.

94 {
95  if(hasChamberBoundary(ssc)){
96  if(hasUpperChamber(ssc)) return getChamberNumber(ssc)-1;
97  else return getChamberNumber(ssc)+1;
98  } else {
99  std::cerr << "internal error: ssc " << ssc
100  << " don't has chamber boundary" << std::endl;
101  return -1;
102  }
103 }

◆ getPhi()

int LVL1TGCTrigger::TGCSSCControllerOut::getPhi ( int  ssc,
int  phipos,
bool  ored = false 
) const
inline

Definition at line 142 of file TGCSSCControllerOut.h.

143 {
144  if(!ored) {
145  return m_phi[getChamberNumber(ssc)][phipos];
146  } else {
147  int idx =getOredChamberNumber(ssc);
148  if (idx>=0 ) return m_phi[idx][phipos];
149  else {
150  std::cerr << "internal error in TGCSSCControllerOut::getPhi()"
151  << std::endl;
152  return 0;
153  }
154  }
155  return 0;
156 }

◆ getPtPhi()

int LVL1TGCTrigger::TGCSSCControllerOut::getPtPhi ( int  ssc,
int  phipos,
bool  ored = false 
) const
inline

Definition at line 177 of file TGCSSCControllerOut.h.

178 {
179  if(!ored) {
180  return m_ptPhi[getChamberNumber(ssc)][phipos];
181  } else {
182  int idx =getOredChamberNumber(ssc);
183  if (idx>=0 ) return m_ptPhi[idx][phipos];
184  else {
185  std::cerr << "internal error in TGCSSCControllerOut::getPtPhi()"
186  << std::endl;
187  return 0;
188  }
189  }
190  return 0;
191 }

◆ getPtR()

int LVL1TGCTrigger::TGCSSCControllerOut::getPtR ( int  ssc) const
inline

Definition at line 135 of file TGCSSCControllerOut.h.

136 {
137  return m_ptR[ssc];
138 }

◆ getR()

int LVL1TGCTrigger::TGCSSCControllerOut::getR ( int  ssc) const
inline

Definition at line 123 of file TGCSSCControllerOut.h.

124 {
125  return m_r[ssc];
126 }

◆ hasChamberBoundary()

bool LVL1TGCTrigger::TGCSSCControllerOut::hasChamberBoundary ( int  ssc) const
inline

Definition at line 71 of file TGCSSCControllerOut.h.

72 {
74  if(ssc==2||ssc==4||ssc==6||ssc==12) return true;
75 
76  return false;
77 }

◆ hasHit() [1/2]

bool LVL1TGCTrigger::TGCSSCControllerOut::hasHit ( int  ssc,
bool  ored = false 
) const

Definition at line 35 of file TGCSSCControllerOut.cxx.

36 {
37  for(int phiposInSSC = 0; phiposInSSC < MaxNumberOfPhiInSSC; phiposInSSC++){
38  if(!ored){
39  if(m_hitR[ssc]&&m_hitPhi[getChamberNumber(ssc)][phiposInSSC]) return true;
40  } else if(hasChamberBoundary(ssc)){
41  int idx =getOredChamberNumber(ssc);
42  if( m_hitR[ssc] && (idx>=0) &&
43  m_hitPhi[idx][phiposInSSC]) return true;
44  }
45  }
46  return false;
47 }

◆ hasHit() [2/2]

bool LVL1TGCTrigger::TGCSSCControllerOut::hasHit ( int  ssc,
int  phiposInSSC,
bool  ored = false 
) const

Definition at line 49 of file TGCSSCControllerOut.cxx.

50 {
51  if(!ored){
52  if(m_hitR[ssc]&&m_hitPhi[getChamberNumber(ssc)][phiposInSSC]) return true;
53  } else if(hasChamberBoundary(ssc)){
54  int idx =getOredChamberNumber(ssc);
55  if( m_hitR[ssc] && (idx>=0) &&
56  m_hitPhi[idx][phiposInSSC]) return true;
57  }
58  return false;
59 }

◆ hasHitPhi()

bool LVL1TGCTrigger::TGCSSCControllerOut::hasHitPhi ( int  chamberNo,
int  phiPos 
) const
inline

Definition at line 274 of file TGCSSCControllerOut.h.

275 {
276  if((0 <= chamberNo)&&(chamberNo < MaxNumberOfChamberInR)&&(0 <= phiPos)&&(phiPos < MaxNumberOfPhiInSSC)){
277  return m_hitPhi[chamberNo][phiPos];
278  }
279  return false;
280 }

◆ hasUpperChamber()

bool LVL1TGCTrigger::TGCSSCControllerOut::hasUpperChamber ( int  ssc) const
inline

Definition at line 80 of file TGCSSCControllerOut.h.

81 {
82  if(hasChamberBoundary(ssc)){
83  if(ssc==4||ssc==6) return true;
84  else return false;
85  } else {
86  std::cerr << "internal error: ssc " << ssc
87  << " don't has chamber boundary" << std::endl;
88  return false;
89  }
90 }

◆ print()

void LVL1TGCTrigger::TGCSSCControllerOut::print ( ) const

Definition at line 61 of file TGCSSCControllerOut.cxx.

62 {
63 #ifdef TGCCOUT
64  int i,j,k;
65  std::cout<<std::endl;
66  std::cout<<"TGCSSCControllerOut::print() begin"<<std::endl;
67 
68  for( j=0; j<getNumberOfChamberInR(); j+=1)
69  for( k=0; k<MaxNumberOfPhiInSSC; k++)
70  if(m_hitPhi[j][k]) std::cout<<"#Chamber= "<< j << " Phi" << k
71  <<" phi= "<<m_phi[j][k]<<" dPhi= "<<m_dPhi[j][k]
72  <<" H/L= "<<m_ptPhi[j][k]<<std::endl;
73 
74  for( i=0; i<getNumberOfSubSectorCluster(); i+=1)
75  if(m_hitR[i]) std::cout<<"#SSC= "<<i
76  <<" r= "<<m_r[i]<<" dR= "<<m_dR[i]
77  <<" H/L= "<<m_ptR[i]<<std::endl;
78 
79  std::cout<<"TGCSSCControllerOut::print() end"<<std::endl;
80 #endif
81 }

◆ setDPhi()

void LVL1TGCTrigger::TGCSSCControllerOut::setDPhi ( int  chamberNo,
int  phiPos,
int  dPhiIn 
)
inline

Definition at line 244 of file TGCSSCControllerOut.h.

245 {
246  if((0 <= chamberNo)&&(chamberNo < MaxNumberOfChamberInR)&&(0 <= phiPos)&&(phiPos < MaxNumberOfPhiInSSC)){
247  m_dPhi[chamberNo][phiPos]=dPhiIn;
248  }else{
249  std::cerr << "internal error in TGCSSCControllerOut::setDPhi() chamberNo:" << chamberNo << " phiPos:" << phiPos << " dPhiIn:" << dPhiIn << std::endl;
250  }
251 }

◆ setDR()

void LVL1TGCTrigger::TGCSSCControllerOut::setDR ( unsigned int  ssc,
int  dRIn 
)
inline

Definition at line 204 of file TGCSSCControllerOut.h.

205 {
206  if (ssc < LVL1TGC::kNMaxSSC) {
207  m_dR[ssc]=dRIn;
208  } else {
209  std::cerr << "internal error in TGCSSCControllerOut::setDR() sscid:" << ssc << " 0 < SSCId < " << LVL1TGC::kNMaxSSC << std::endl;
210  }
211 }

◆ setHitPhi()

void LVL1TGCTrigger::TGCSSCControllerOut::setHitPhi ( int  chamberNo,
int  phiPos,
bool  hit 
)
inline

Definition at line 264 of file TGCSSCControllerOut.h.

265 {
266  if((0 <= chamberNo)&&(chamberNo < MaxNumberOfChamberInR)&&(0 <= phiPos)&&(phiPos < MaxNumberOfPhiInSSC)){
267  m_hitPhi[chamberNo][phiPos]=hit;
268  }else{
269  std::cerr << "internal error in TGCSSCControllerOut::setHitPhi() chamberNo:" << chamberNo << " phiPos:" << phiPos << " hit:" << hit << std::endl;
270  }
271 }

◆ setHitR()

void LVL1TGCTrigger::TGCSSCControllerOut::setHitR ( unsigned int  ssc,
bool  hit 
)
inline

Definition at line 224 of file TGCSSCControllerOut.h.

225 {
226  if (ssc < LVL1TGC::kNMaxSSC) {
227  m_hitR[ssc]=hit;
228  } else {
229  std::cerr << "internal error in TGCSSCControllerOut::setHitR() sscid:" << ssc << " 0 < SSCId < " << LVL1TGC::kNMaxSSC << std::endl;
230  }
231 }

◆ setPhi()

void LVL1TGCTrigger::TGCSSCControllerOut::setPhi ( int  chamberNo,
int  phiPos,
int  phiIn 
)
inline

Definition at line 234 of file TGCSSCControllerOut.h.

235 {
236  if((0 <= chamberNo)&&(chamberNo < MaxNumberOfChamberInR)&&(0 <= phiPos)&&(phiPos < MaxNumberOfPhiInSSC)){
237  m_phi[chamberNo][phiPos]=phiIn;
238  }else{
239  std::cerr << "internal error in TGCSSCControllerOut::setPhi() chamberNo:" << chamberNo << " phiPos:" << phiPos << " phiIn:" << phiIn << std::endl;
240  }
241 }

◆ setPtPhi()

void LVL1TGCTrigger::TGCSSCControllerOut::setPtPhi ( int  chamberNo,
int  phiPos,
int  ptLvl 
)
inline

Definition at line 254 of file TGCSSCControllerOut.h.

255 {
256  if((0 <= chamberNo)&&(chamberNo < MaxNumberOfChamberInR)&&(0 <= phiPos)&&(phiPos < MaxNumberOfPhiInSSC)){
257  m_ptPhi[chamberNo][phiPos]=ptLvl;
258  }else{
259  std::cerr << "internal error in TGCSSCControllerOut::setPtPhi() chamberNo:" << chamberNo << " phiPos:" << phiPos << " ptLvl:" << ptLvl << std::endl;
260  }
261 }

◆ setPtR()

void LVL1TGCTrigger::TGCSSCControllerOut::setPtR ( unsigned int  ssc,
int  ptLvl 
)
inline

Definition at line 214 of file TGCSSCControllerOut.h.

215 {
216  if (ssc < LVL1TGC::kNMaxSSC) {
217  m_ptR[ssc] = ptLvl;
218  } else{
219  std::cerr << "internal error in TGCSSCControllerOut::setPtR() sscid:" << ssc << " 0 < SSCId < " << LVL1TGC::kNMaxSSC << std::endl;
220  }
221 }

◆ setR()

void LVL1TGCTrigger::TGCSSCControllerOut::setR ( unsigned int  ssc,
int  rIn 
)
inline

Definition at line 194 of file TGCSSCControllerOut.h.

195 {
196  if (ssc < LVL1TGC::kNMaxSSC){
197  m_r[ssc]=rIn;
198  }else{
199  std::cerr << "internal error in TGCSSCControllerOut::setR() sscid:" << ssc << " 0 < SSCId < " << LVL1TGC::kNMaxSSC << std::endl;
200  }
201 }

Member Data Documentation

◆ m_dPhi

int LVL1TGCTrigger::TGCSSCControllerOut::m_dPhi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
private

Definition at line 60 of file TGCSSCControllerOut.h.

◆ m_dR

int LVL1TGCTrigger::TGCSSCControllerOut::m_dR[LVL1TGC::kNMaxSSC]
private

Definition at line 65 of file TGCSSCControllerOut.h.

◆ m_hitPhi

bool LVL1TGCTrigger::TGCSSCControllerOut::m_hitPhi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
private

Definition at line 62 of file TGCSSCControllerOut.h.

◆ m_hitR

bool LVL1TGCTrigger::TGCSSCControllerOut::m_hitR[LVL1TGC::kNMaxSSC]
private

Definition at line 67 of file TGCSSCControllerOut.h.

◆ m_phi

int LVL1TGCTrigger::TGCSSCControllerOut::m_phi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
private

Definition at line 59 of file TGCSSCControllerOut.h.

◆ m_ptPhi

int LVL1TGCTrigger::TGCSSCControllerOut::m_ptPhi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
private

Definition at line 61 of file TGCSSCControllerOut.h.

◆ m_ptR

int LVL1TGCTrigger::TGCSSCControllerOut::m_ptR[LVL1TGC::kNMaxSSC]
private

Definition at line 66 of file TGCSSCControllerOut.h.

◆ m_r

int LVL1TGCTrigger::TGCSSCControllerOut::m_r[LVL1TGC::kNMaxSSC]
private

Definition at line 64 of file TGCSSCControllerOut.h.

◆ m_regionType

TGCRegionType LVL1TGCTrigger::TGCSSCControllerOut::m_regionType
private

Definition at line 57 of file TGCSSCControllerOut.h.

◆ s_chamber

const int LVL1TGCTrigger::TGCSSCControllerOut::s_chamber
staticprivate
Initial value:
= {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4 }
}

Definition at line 55 of file TGCSSCControllerOut.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCRegionType::ENDCAP
@ ENDCAP
LVL1TGCTrigger::TGCSSCControllerOut::MaxNumberOfPhiInSSC
@ MaxNumberOfPhiInSSC
Definition: TGCSSCControllerOut.h:15
LVL1TGCTrigger::TGCSSCControllerOut::m_dR
int m_dR[LVL1TGC::kNMaxSSC]
Definition: TGCSSCControllerOut.h:65
LVL1TGCTrigger::TGCRegionType::FORWARD
@ FORWARD
LVL1TGCTrigger::TGCSSCControllerOut::m_ptR
int m_ptR[LVL1TGC::kNMaxSSC]
Definition: TGCSSCControllerOut.h:66
LVL1TGCTrigger::TGCSSCControllerOut::m_r
int m_r[LVL1TGC::kNMaxSSC]
Definition: TGCSSCControllerOut.h:64
LVL1TGCTrigger::TGCSSCControllerOut::hasChamberBoundary
bool hasChamberBoundary(int ssc) const
Definition: TGCSSCControllerOut.h:71
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1TGCTrigger::TGCSSCControllerOut::m_hitPhi
bool m_hitPhi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
Definition: TGCSSCControllerOut.h:62
LVL1TGCTrigger::TGCSSCControllerOut::hasUpperChamber
bool hasUpperChamber(int ssc) const
Definition: TGCSSCControllerOut.h:80
LVL1TGCTrigger::TGCSSCControllerOut::getNumberOfChamberInR
int getNumberOfChamberInR() const
Definition: TGCSSCControllerOut.h:112
LVL1TGCTrigger::TGCSSCControllerOut::getChamberNumber
int getChamberNumber(int ssc) const
Definition: TGCSSCControllerOut.h:106
LVL1TGCTrigger::TGCSSCControllerOut::MaxNumberOfChamberInR
@ MaxNumberOfChamberInR
Definition: TGCSSCControllerOut.h:16
LVL1TGCTrigger::TGCSSCControllerOut::getNumberOfSubSectorCluster
int getNumberOfSubSectorCluster() const
Definition: TGCSSCControllerOut.h:118
LVL1TGCTrigger::TGCSSCControllerOut::s_chamber
static const int s_chamber[NumberOfRegionType][LVL1TGC::kNMaxSSC]
Definition: TGCSSCControllerOut.h:55
LVL1TGCTrigger::TGCSSCControllerOut::getOredChamberNumber
int getOredChamberNumber(int ssc) const
Definition: TGCSSCControllerOut.h:93
LVL1TGCTrigger::TGCSSCControllerOut::m_regionType
TGCRegionType m_regionType
Definition: TGCSSCControllerOut.h:57
LVL1TGCTrigger::TGCSSCControllerOut::m_hitR
bool m_hitR[LVL1TGC::kNMaxSSC]
Definition: TGCSSCControllerOut.h:67
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LVL1TGCTrigger::TGCSSCControllerOut::m_ptPhi
int m_ptPhi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
Definition: TGCSSCControllerOut.h:61
LVL1TGCTrigger::TGCSSCControllerOut::m_dPhi
int m_dPhi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
Definition: TGCSSCControllerOut.h:60
fitman.k
k
Definition: fitman.py:528
LVL1TGCTrigger::TGCSSCControllerOut::m_phi
int m_phi[MaxNumberOfChamberInR][MaxNumberOfPhiInSSC]
Definition: TGCSSCControllerOut.h:59