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

#include <TGCElectronicsSystem.h>

Collaboration diagram for LVL1TGCTrigger::TGCElectronicsSystem:

Public Member Functions

 TGCElectronicsSystem (TGCArguments *, TGCDatabaseManager *database)
 
virtual ~TGCElectronicsSystem ()
 
void distributeSignal (TGCEvent *event)
 
int getNumberOfSector () const
 
int getNumberOfOctant () const
 
int getNumberOfModule () const
 
TGCRegionType getRegionType (int mod) const
 
TGCForwardBackwardType getForwardBackward (int side, int oct, int mod) const
 
int getSectorId (int side, int oct, int mod) const
 
TGCSectorgetSector (const TGCReadoutIndex &index) const
 
TGCSectorgetSector (int side, int oct, int mod) const
 
std::shared_ptr< LVL1TGC::TGCTMDBgetTMDB () const
 
std::shared_ptr< LVL1TGC::TGCNSWgetNSW () const
 
std::shared_ptr< LVL1TGC::TGCBIS78getBIS78 () const
 
TGCArgumentstgcArgs ()
 
const TGCArgumentstgcArgs () const
 

Private Member Functions

 TGCElectronicsSystem ()
 
 TGCElectronicsSystem (const TGCElectronicsSystem &right)=delete
 
TGCElectronicsSystemoperator= (const TGCElectronicsSystem &right)=delete
 

Private Attributes

TGCDatabaseManagerm_DB
 
TGCSectorm_sector [LVL1TGC::kNSide][NumberOfOctant][NumberOfModule]
 
std::shared_ptr< LVL1TGC::TGCTMDBm_tmdb {nullptr}
 
std::shared_ptr< LVL1TGC::TGCNSWm_nsw {nullptr}
 
std::shared_ptr< LVL1TGC::TGCBIS78m_bis78 {nullptr}
 
TGCArgumentsm_tgcArgs
 

Detailed Description

Definition at line 29 of file TGCElectronicsSystem.h.

Constructor & Destructor Documentation

◆ TGCElectronicsSystem() [1/3]

LVL1TGCTrigger::TGCElectronicsSystem::TGCElectronicsSystem ( TGCArguments tgcargs,
TGCDatabaseManager database 
)

Definition at line 50 of file TGCElectronicsSystem.cxx.

52 : m_DB(database),
53  m_tgcArgs(tgcargs)
54 {
55  // TMDB
56  m_tmdb.reset(new LVL1TGC::TGCTMDB());
57 
58  // NSW
59  if(tgcargs->USE_NSW()){
60  m_nsw.reset(new LVL1TGC::TGCNSW());
61  }
62 
63  // RPC BIS78
64  if(tgcargs->USE_BIS78()){
65  m_bis78.reset(new LVL1TGC::TGCBIS78());
66  }
67 
68  int SectorId;
71  for (int side=0; side < LVL1TGC::kNSide; side++) {
72  for(int oct=0; oct < NumberOfOctant; oct++){
73  for(int mod=0; mod < NumberOfModule; mod++){
74  SectorId = getSectorId(side,oct,mod);
75  RegionType = getRegionType(mod);
76  forwardBackward = getForwardBackward(side,oct,mod);
77  m_sector[side][oct][mod] = new TGCSector(tgcArgs(),SectorId, RegionType,
78  forwardBackward,
79  m_DB,
80  m_tmdb,
81  m_nsw,
82  m_bis78);
83  } // loop module
84  } // loop octant
85  } //loop side
86 }

◆ ~TGCElectronicsSystem()

LVL1TGCTrigger::TGCElectronicsSystem::~TGCElectronicsSystem ( )
virtual

Definition at line 185 of file TGCElectronicsSystem.cxx.

186 {
187  for (int i=0; i < LVL1TGC::kNSide; i++) {
188  for (int j=0; j < NumberOfOctant; j++) {
189  for (int k=0; k < NumberOfModule; k++) {
190  if(m_sector[i][j][k]!=0) delete m_sector[i][j][k];
191  m_sector[i][j][k]=0;
192  } // loop module
193  } // loop octant
194  } // loop side
195 }

◆ TGCElectronicsSystem() [2/3]

LVL1TGCTrigger::TGCElectronicsSystem::TGCElectronicsSystem ( )
private

Definition at line 36 of file TGCElectronicsSystem.cxx.

37  : m_DB(0),
38  m_tgcArgs(nullptr)
39 {
40  for (int side=0; side < LVL1TGC::kNSide; side++) {
41  for (int oct=0; oct < NumberOfOctant; oct++) {
42  for (int mod=0; mod < NumberOfModule; mod++) {
43  m_sector[side][oct][mod]=0;
44  } // loop module
45  } // loop octant
46  } //loop side
47 
48 }

◆ TGCElectronicsSystem() [3/3]

LVL1TGCTrigger::TGCElectronicsSystem::TGCElectronicsSystem ( const TGCElectronicsSystem right)
privatedelete

Member Function Documentation

◆ distributeSignal()

void LVL1TGCTrigger::TGCElectronicsSystem::distributeSignal ( LVL1TGCTrigger::TGCEvent event)

Definition at line 16 of file TGCElectronicsSystem.cxx.

17 {
18  const std::vector<LVL1TGCTrigger::TGCASDOut*>& vecASDOut= event->GetASDOutVector();
19  event=0;
20  size_t i;
21  for( i=0; i< vecASDOut.size(); i++) {
22  const LVL1TGCTrigger::TGCASDOut* asd= vecASDOut[i];
23  int side = asd->GetTGCReadoutIndex().GetSideNumber();
24  int octant = asd->GetTGCReadoutIndex().GetOctantNumber();
26 
27  if (getSector(side, octant, module)) {
28  if (side < LVL1TGC::kNSide && octant < NumberOfOctant)
29  getSector(side, octant, module)->distributeSignal(asd);
30  }
31  asd = 0;
32  }
33 
34 }

◆ getBIS78()

std::shared_ptr<LVL1TGC::TGCBIS78> LVL1TGCTrigger::TGCElectronicsSystem::getBIS78 ( ) const
inline

Definition at line 49 of file TGCElectronicsSystem.h.

49 {return m_bis78;}

◆ getForwardBackward()

TGCForwardBackwardType LVL1TGCTrigger::TGCElectronicsSystem::getForwardBackward ( int  side,
int  oct,
int  mod 
) const

Definition at line 109 of file TGCElectronicsSystem.cxx.

110 {
111  bool isEndcap = false;
112  bool isInner = false;
113  int sec=-1;
114  if(mod<9){
115  if(mod%3==2)
116  sec = mod/3+oct*3;
117  if(mod%3==0||mod%3==1){
118  sec = mod-mod/3+oct*6;
119  isEndcap = true;
120  }
121  } else if(mod<12){
122  isEndcap = true;
123  isInner = true;
124  sec = mod%3+oct*3;
125  } else {
126  isInner = true;
127  sec = mod%3+oct*3;
128  }
129 
130  TGCForwardBackwardType forwardBackward = ForwardSector;
131 
132  // for new cabling service
133  // A-side : side == 0
134  // C-side : side == 1
135  bool isAside = (side ==0);
136 
137  // backward/Forward definition is same
138  // because strip layer is swapped in default
139  if ( isEndcap ){
140  if (!isInner){
141  if(isAside) {
142  if (sec%2==0) forwardBackward = ForwardSector;
143  else forwardBackward = BackwardSector;
144  } else {
145  if (sec%2==1) forwardBackward = ForwardSector;
146  else forwardBackward = BackwardSector;
147  }
148  } else {
149  // EI
150  // Special case of EI11
151  if (sec == 15) {
152  if(isAside ) forwardBackward = ForwardSector;
153  else forwardBackward = BackwardSector;
154  } else if (sec == 16) {
155  if(isAside ) forwardBackward = BackwardSector;
156  else forwardBackward = ForwardSector;
157  } else {
158  if (isAside) {
159  if (sec%3==2) forwardBackward = BackwardSector;
160  else forwardBackward = ForwardSector;
161  } else {
162  if (sec%3!=2) forwardBackward = BackwardSector;
163  else forwardBackward = ForwardSector;
164  }
165  }
166  }
167  } else {
168  if (isAside) forwardBackward = BackwardSector; // all Backward
169  else forwardBackward = ForwardSector; // all Forward
170  }
171  return forwardBackward;
172 }

◆ getNSW()

std::shared_ptr<LVL1TGC::TGCNSW> LVL1TGCTrigger::TGCElectronicsSystem::getNSW ( ) const
inline

Definition at line 48 of file TGCElectronicsSystem.h.

48 {return m_nsw;}

◆ getNumberOfModule()

int LVL1TGCTrigger::TGCElectronicsSystem::getNumberOfModule ( ) const
inline

Definition at line 37 of file TGCElectronicsSystem.h.

37 { return NumberOfModule; }

◆ getNumberOfOctant()

int LVL1TGCTrigger::TGCElectronicsSystem::getNumberOfOctant ( ) const
inline

Definition at line 36 of file TGCElectronicsSystem.h.

36 { return NumberOfOctant; }

◆ getNumberOfSector()

int LVL1TGCTrigger::TGCElectronicsSystem::getNumberOfSector ( ) const
inline

Definition at line 35 of file TGCElectronicsSystem.h.

◆ getRegionType()

LVL1TGCTrigger::TGCRegionType LVL1TGCTrigger::TGCElectronicsSystem::getRegionType ( int  mod) const

Definition at line 88 of file TGCElectronicsSystem.cxx.

89 {
90  // Module:
91  // <----phi-----
92  // 7 6 4 3 1 0 Endcap
93  // 8 5 2 Forward
94  //
95  // Inner
96  // <----phi-----
97  // 11 10 9 Endcap
98  // 14 13 12 Forward
99 
100  if(mod<9)
103  else if(mod<12)
105  else
107 }

◆ getSector() [1/2]

TGCSector * LVL1TGCTrigger::TGCElectronicsSystem::getSector ( const TGCReadoutIndex index) const

Definition at line 179 of file TGCElectronicsSystem.cxx.

180 {
181  if (index.GetSideNumber()<0) return 0;
182  return m_sector[index.GetSideNumber()][index.GetOctantNumber()][index.GetModuleNumber()];
183 }

◆ getSector() [2/2]

TGCSector* LVL1TGCTrigger::TGCElectronicsSystem::getSector ( int  side,
int  oct,
int  mod 
) const
inline

Definition at line 43 of file TGCElectronicsSystem.h.

43  {
44  if ( (side<0) || (oct<0) || (mod<0) ) return 0;
45  return m_sector[side][oct][mod];
46  };

◆ getSectorId()

int LVL1TGCTrigger::TGCElectronicsSystem::getSectorId ( int  side,
int  oct,
int  mod 
) const

Definition at line 174 of file TGCElectronicsSystem.cxx.

175 {
177 }

◆ getTMDB()

std::shared_ptr<LVL1TGC::TGCTMDB> LVL1TGCTrigger::TGCElectronicsSystem::getTMDB ( ) const
inline

Definition at line 47 of file TGCElectronicsSystem.h.

47 {return m_tmdb;}

◆ operator=()

TGCElectronicsSystem& LVL1TGCTrigger::TGCElectronicsSystem::operator= ( const TGCElectronicsSystem right)
privatedelete

◆ tgcArgs() [1/2]

TGCArguments* LVL1TGCTrigger::TGCElectronicsSystem::tgcArgs ( )
inline

Definition at line 51 of file TGCElectronicsSystem.h.

51 { return m_tgcArgs;}

◆ tgcArgs() [2/2]

const TGCArguments* LVL1TGCTrigger::TGCElectronicsSystem::tgcArgs ( ) const
inline

Definition at line 52 of file TGCElectronicsSystem.h.

52 { return m_tgcArgs;}

Member Data Documentation

◆ m_bis78

std::shared_ptr<LVL1TGC::TGCBIS78> LVL1TGCTrigger::TGCElectronicsSystem::m_bis78 {nullptr}
private

Definition at line 66 of file TGCElectronicsSystem.h.

◆ m_DB

TGCDatabaseManager* LVL1TGCTrigger::TGCElectronicsSystem::m_DB
private

Definition at line 61 of file TGCElectronicsSystem.h.

◆ m_nsw

std::shared_ptr<LVL1TGC::TGCNSW> LVL1TGCTrigger::TGCElectronicsSystem::m_nsw {nullptr}
private

Definition at line 65 of file TGCElectronicsSystem.h.

◆ m_sector

TGCSector* LVL1TGCTrigger::TGCElectronicsSystem::m_sector[LVL1TGC::kNSide][NumberOfOctant][NumberOfModule]
private

Definition at line 62 of file TGCElectronicsSystem.h.

◆ m_tgcArgs

TGCArguments* LVL1TGCTrigger::TGCElectronicsSystem::m_tgcArgs
private

Definition at line 68 of file TGCElectronicsSystem.h.

◆ m_tmdb

std::shared_ptr<LVL1TGC::TGCTMDB> LVL1TGCTrigger::TGCElectronicsSystem::m_tmdb {nullptr}
private

Definition at line 64 of file TGCElectronicsSystem.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCRegionType::ENDCAP
@ ENDCAP
LVL1TGCTrigger::TGCElectronicsSystem::getForwardBackward
TGCForwardBackwardType getForwardBackward(int side, int oct, int mod) const
Definition: TGCElectronicsSystem.cxx:109
LVL1TGC::TGCTMDB
Definition: TGCTMDB.h:19
LVL1TGCTrigger::TGCElectronicsSystem::getSectorId
int getSectorId(int side, int oct, int mod) const
Definition: TGCElectronicsSystem.cxx:174
LVL1TGCTrigger::TGCElectronicsSystem::m_bis78
std::shared_ptr< LVL1TGC::TGCBIS78 > m_bis78
Definition: TGCElectronicsSystem.h:66
index
Definition: index.py:1
LVL1TGC::TGCBIS78
Definition: TGCBIS78.h:20
LVL1TGCTrigger::TGCElectronicsSystem::m_tgcArgs
TGCArguments * m_tgcArgs
Definition: TGCElectronicsSystem.h:68
LVL1TGCTrigger::TGCElectronicsSystem::getSector
TGCSector * getSector(const TGCReadoutIndex &index) const
Definition: TGCElectronicsSystem.cxx:179
LVL1TGCTrigger::TGCRegionType::FORWARD
@ FORWARD
LVL1TGCTrigger::TGCForwardBackwardType
TGCForwardBackwardType
Definition: TGCNumbering.h:59
LVL1TGC::TGCNSW
Definition: TGCNSW.h:21
LVL1TGCTrigger::TGCElectronicsSystem::m_nsw
std::shared_ptr< LVL1TGC::TGCNSW > m_nsw
Definition: TGCElectronicsSystem.h:65
LVL1TGCTrigger::TGCASDOut::GetTGCReadoutIndex
const TGCReadoutIndex & GetTGCReadoutIndex() const
Definition: TGCASDOut.h:33
TRT::Hit::side
@ side
Definition: HitInfo.h:83
LVL1TGCTrigger::TGCElectronicsSystem::m_DB
TGCDatabaseManager * m_DB
Definition: TGCElectronicsSystem.h:61
python.PyAthena.module
module
Definition: PyAthena.py:131
LVL1TGCTrigger::NumberOfOctant
const int NumberOfOctant
Definition: TGCElectronicsSystem.h:19
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1TGCTrigger::BackwardSector
@ BackwardSector
Definition: TGCNumbering.h:59
python.subdetectors.mmg.database
database
Definition: mmg.py:6
LVL1TGCTrigger::TGCASDOut
Definition: TGCASDOut.h:12
LVL1TGCTrigger::TGCReadoutIndex::GetOctantNumber
int GetOctantNumber() const
Definition: TGCReadoutIndex.h:55
LVL1TGCTrigger::TGCReadoutIndex::GetModuleNumber
int GetModuleNumber() const
Definition: TGCReadoutIndex.h:56
LVL1TGCTrigger::TGCReadoutIndex::GetSideNumber
int GetSideNumber() const
Definition: TGCReadoutIndex.h:52
LVL1TGCTrigger::TGCElectronicsSystem::m_sector
TGCSector * m_sector[LVL1TGC::kNSide][NumberOfOctant][NumberOfModule]
Definition: TGCElectronicsSystem.h:62
LVL1TGCTrigger::TGCElectronicsSystem::m_tmdb
std::shared_ptr< LVL1TGC::TGCTMDB > m_tmdb
Definition: TGCElectronicsSystem.h:64
LVL1TGCTrigger::TGCRegionType
TGCRegionType
Definition: TGCNumbering.h:49
LVL1TGCTrigger::TGCElectronicsSystem::getRegionType
TGCRegionType getRegionType(int mod) const
Definition: TGCElectronicsSystem.cxx:88
LVL1TGC::kNSide
@ kNSide
Definition: TGCNumbering.h:16
LVL1TGCTrigger::NumberOfModule
const int NumberOfModule
Definition: TGCElectronicsSystem.h:20
LVL1TGCTrigger::TGCSector::distributeSignal
int distributeSignal(const TGCASDOut *asdOut)
Definition: TGCSector.cxx:31
LVL1TGCTrigger::ForwardSector
@ ForwardSector
Definition: TGCNumbering.h:59
LVL1TGCTrigger::TGCElectronicsSystem::tgcArgs
TGCArguments * tgcArgs()
Definition: TGCElectronicsSystem.h:51
fitman.k
k
Definition: fitman.py:528