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

#include <TGCDoubletSB.h>

Inheritance diagram for LVL1TGCTrigger::TGCDoubletSB:
Collaboration diagram for LVL1TGCTrigger::TGCDoubletSB:

Public Member Functions

 TGCDoubletSB ()
 
virtual ~TGCDoubletSB ()
 
void clockIn (int bidIn)
 
TGCSlaveBoardOutgetOutput ()
 
void eraseOutput ()
 
int getId () const
 
void setId (int idIn)
 
void setPatchPanel (TGCPatchPanel *PPIn)
 
int getIdHighPtBoard () const
 
void setIdHighPtBoard (int m_id)
 
int getType () const
 
void setType (int typeIn)
 
TGCRegionType getRegion () const
 
void setRegion (TGCRegionType regionIn)
 
void showResult () const
 
std::string getTypeName (int typeIn) const
 
void setPatchPanelOut (TGCPatchPanelOut *PPOut)
 
void storeSlbIn ()
 
const std::bitset< 200 > & GetSlbIn (void) const
 

Protected Member Functions

virtual void doCoincidence ()
 
virtual void createSlaveBoardOut ()
 
TGCHitPattern ** doLocalCoincidence (const TGCPatchPanelOut *PPOut)
 
void do3outof4Coincedence (TGCHitPattern **LCOut)
 
virtual void doCoincidenceInSubMatrix (const int block, TGCHitPattern **LCOut)
 
bool element (bool A, bool B, bool C, bool D)
 
void collectInput ()
 
void doMaskOperation ()
 
void doDecluster ()
 
void deletePatchPanelOut ()
 

Protected Attributes

int m_priorSign
 
int m_numberOfData
 
int m_nChInBlock
 
int m_maxDev
 
int m_posMaxDev
 
int m_negMaxDev
 
int m_nChAdj
 
int m_iChBase
 
int m_MatrixOverlap
 
TGCSignalType m_SType
 
int m_lengthOfCoincidenceOut
 
TGCHitPatternm_coincidenceOut
 
TGCSlaveBoardOutm_slaveBoardOut
 
int m_id
 
int m_bid
 
int m_idHighPtBoard
 
int m_type
 
TGCRegionType m_region
 
TGCPatchPanelm_patchPanel
 
TGCPatchPanelOutm_patchPanelOut
 
std::bitset< 200 > m_slbin
 

Static Private Attributes

static constexpr int s_pOffset [6] = {0,0,2,2,2,2}
 
static constexpr int s_iOffset [6] = {4,0,6,6,6,6}
 
static constexpr int s_pLength [6] = {36,36,32,32,32,32}
 
static constexpr int s_iLength [6] = {36,44,32,32,32,32}
 

Detailed Description

Definition at line 18 of file TGCDoubletSB.h.

Constructor & Destructor Documentation

◆ TGCDoubletSB()

LVL1TGCTrigger::TGCDoubletSB::TGCDoubletSB ( )

Definition at line 15 of file TGCDoubletSB.cxx.

16  : TGCSlaveBoard(),
20 {
21 }

◆ ~TGCDoubletSB()

LVL1TGCTrigger::TGCDoubletSB::~TGCDoubletSB ( )
virtual

Definition at line 23 of file TGCDoubletSB.cxx.

24 {
25 }

Member Function Documentation

◆ clockIn()

void LVL1TGCTrigger::TGCSlaveBoard::clockIn ( int  bidIn)
inherited

Definition at line 37 of file TGCSlaveBoard.cxx.

38 {
39  m_bid = bidIn;
40  collectInput();
41 
42  m_slbin.reset();
43 
44 #ifdef TGCDEBUG
45  int i;
46  std::cout << "#SB: BID= " << m_bid;
47  std::cout << " Rgn= " << m_region;
48  std::cout << " Typ= " << getTypeName(m_type);
49  std::cout << " ID= " << m_id << std::endl;
50  if(m_patchPanelOut!=0){
51  for( i=0; i<NumberOfConnectorPerPPOut; i+=1)
53  std::cout<<"#SB I: BID= "<<m_bid;
54  if(m_patchPanelOut->getOrigin()!=0){
55  std::cout << " Typ= " <<m_patchPanelOut->getOrigin()->getType();
56  std::cout << " Rgn= " <<m_patchPanelOut->getOrigin()->getRegion();
57  std::cout << " PPID= "<<m_patchPanelOut->getOrigin()->getId()<<" ";
58  std::cout << " port= "<<i;
59  std::cout << "" <<m_id;
60  }
61  std::cout << ":";
63  }
64  } else {
65  std::cout << "NO PP IN" << std::endl;
66  }
67 #endif
68 
69  // delete m_slaveBoardOut and m_coincidenceOut
70  if( m_coincidenceOut!=0) delete m_coincidenceOut;
71  if( m_slaveBoardOut!=0) delete m_slaveBoardOut;
72  m_coincidenceOut = 0;
73  m_slaveBoardOut = 0;
74 
75  if(m_patchPanelOut!=0){
77 
78  storeSlbIn();
79 
80  doCoincidence();
81  if(m_coincidenceOut!=0) {
82 #ifdef TGCDEBUG_VISUAL
83  std::cout << "TGCSlaveBoard::clockIn: after doCoincidence()\n";
85 #endif
86 #ifdef TGCDEBUG
87  std::cout << "#SB C: BID= " << m_bid << ":";
89 #endif
90  }
91  doDecluster();
92 #ifdef TGCDEBUG_VISUAL
93  if(m_coincidenceOut!=0) {
94  std::cout << "TGCSlaveBoard::clockIn: after doDecluster()\n";
96  }
97 #endif
99 
100 #ifdef TGCDEBUG
101  showResult();
102 #endif
103 
105  if(m_coincidenceOut!=0){
106  delete m_coincidenceOut;
108  }
109  }
110 }

◆ collectInput()

void LVL1TGCTrigger::TGCSlaveBoard::collectInput ( )
protectedinherited

Definition at line 240 of file TGCSlaveBoard.cxx.

241 {
242 #ifdef TGCDEBUG
243  std::cout << "#SB: BID= " << m_bid;
244  std::cout << " Rgn= " << m_region;
245  std::cout << " Typ= " << getTypeName(m_type);
246  std::cout << " ID= " << m_id << std::endl;
248 #endif
249 
250  if(m_patchPanel!=0){
252 #ifdef TGCDEBUG
254 #endif
256 
257  }
258 }

◆ createSlaveBoardOut()

void LVL1TGCTrigger::TGCDoubletSB::createSlaveBoardOut ( )
protectedvirtual

Implements LVL1TGCTrigger::TGCSlaveBoard.

Definition at line 27 of file TGCDoubletSB.cxx.

28 {
29  if(m_coincidenceOut!=0){
30  int i,block;
31  for( block=0; block<NumberOfDoubletSBData; block+=1){
32  if(m_slaveBoardOut->getHit(block)){
33  m_slaveBoardOut->setHit(block,false);
34  for( i=0; i<m_nChInBlock; i+=1){
36  m_slaveBoardOut->setPos(block,i);
37  m_slaveBoardOut->setHit(block,true);
38  break;
39  }
40  }// block 0:A 1:B
42 #ifdef TGCCOUT
43  std::cout << " " << block << std::endl;
44  m_slaveBoardOut->getbPos(block)->printb();
45 #endif
46  }
47  }
48  }
49 }

◆ deletePatchPanelOut()

void LVL1TGCTrigger::TGCSlaveBoard::deletePatchPanelOut ( )
protectedinherited

Definition at line 184 of file TGCSlaveBoard.cxx.

185 {
186  if( m_patchPanelOut!=0 ) delete m_patchPanelOut;
187  m_patchPanelOut=0;
188 }

◆ do3outof4Coincedence()

void LVL1TGCTrigger::TGCDoubletSB::do3outof4Coincedence ( TGCHitPattern **  LCOut)
protected

Definition at line 205 of file TGCDoubletSB.cxx.

206 {
207  if(((LCOut[0]!=0)||(LCOut[1]!=0))&&((LCOut[2]!=0)||(LCOut[3]!=0))){
208  if ( m_coincidenceOut != 0 ) delete m_coincidenceOut;
209  m_coincidenceOut = new TGCHitPattern;
210 #ifdef TGCDEBUG
211  std::cout << "# DoubletSB [do3outof4Coincedence]" <<std::endl;
212  std::cout<<"#SB LCOut[0]: inner 2hit";LCOut[0]->print();
213  std::cout<<"#SB LCOut[1]: inner 1hit";LCOut[1]->print();
214  std::cout<<"#SB LCOut[2]: pivot 1hit";LCOut[2]->print();
215  std::cout<<"#SB LCOut[3]: pivot 2hit";LCOut[3]->print();
216 #endif
217  m_coincidenceOut->setLength(LCOut[2]->getLength());
219  int i;
220  for( i=0; i<NumberOfDoubletSBData; i+=1)
221  // select tracks in each submatrix.
223  }
224 }

◆ doCoincidence()

void LVL1TGCTrigger::TGCDoubletSB::doCoincidence ( )
protectedvirtual

Implements LVL1TGCTrigger::TGCSlaveBoard.

Definition at line 51 of file TGCDoubletSB.cxx.

52 {
53  // Local coincidence
54  TGCHitPattern** LCOut = doLocalCoincidence(m_patchPanelOut);
55 
56  if ( m_slaveBoardOut!= 0 ) delete m_slaveBoardOut;
57  m_slaveBoardOut = new TGCSlaveBoardOut(this,m_bid);
60 
61  if(LCOut!=0){
62  // Coincidence matrix
63  do3outof4Coincedence(LCOut);
64 
65  delete LCOut[0];
66  delete LCOut[1];
67  delete LCOut[2];
68  delete LCOut[3];
69  delete [] LCOut;
70  }
71 }

◆ doCoincidenceInSubMatrix()

void LVL1TGCTrigger::TGCDoubletSB::doCoincidenceInSubMatrix ( const int  block,
TGCHitPattern **  LCOut 
)
protectedvirtual

Definition at line 226 of file TGCDoubletSB.cxx.

227 {
228  bool oredHit = false;
229  bool hit = false;
230  bool A, B, C, D;
231 
232  m_slaveBoardOut->setHit(block,false);
233  int dev,pCh,iCh;
234  for( dev=0; ( dev<=m_maxDev ) && !oredHit; dev+=1){
235  int i;
236  for(i = 0; i < m_nChAdj + m_nChInBlock + m_MatrixOverlap; i++){
237  pCh = (m_nChAdj + m_nChInBlock - m_MatrixOverlap)*block + i;
238  iCh = pCh + m_priorSign*dev + m_iChBase;
239  if(0 <= iCh){
240  if((0 <= iCh)&&(iCh < LCOut[0]->getLength())){
241  A = LCOut[0]->getChannel(iCh);
242  }else{A = false;}
243  if((0 <= iCh)&&(iCh < LCOut[1]->getLength())){
244  B = LCOut[1]->getChannel(iCh);
245  }else{B = false;}
246  if((0 <= pCh)&&(pCh < LCOut[2]->getLength())){
247  C = LCOut[2]->getChannel(pCh);
248  }else{C = false;}
249  if((0 <= pCh)&&(pCh < LCOut[3]->getLength())){
250  D = LCOut[3]->getChannel(pCh);
251  }else{D = false;}
252  hit = element(A, B, C, D);
253  if(hit){
254  if(block == 0){ //block A
255  if((0 <= i) && (i < m_nChAdj+m_nChInBlock)){
257  }
258  }else{//block B
261  }
262  }
263  }
264  oredHit |= hit;
265  }
266  }
267  if(oredHit){
268  if((m_priorSign*dev>=m_negMaxDev)&&(m_priorSign*dev<=m_posMaxDev)){
269  m_slaveBoardOut->setDev(block, m_priorSign*dev);
270  m_slaveBoardOut->setbDev(block, m_priorSign, dev);
271  m_slaveBoardOut->setHit(block, true);
272 #ifdef TGCDEBUG
273  std::cout << "# DoubletSB : delta =" << m_priorSign*dev
274  << " @pivot=" << pCh << " @onner="<< iCh << std::endl;
275 #endif
276  return;
277  } else {
278  oredHit = false;
279  }
280  } else if(dev!=0) {
281  // Opposite sign of dr,dphi
282  for(i = 0; i < m_nChAdj + m_nChInBlock + m_MatrixOverlap; i++){
283  pCh = (m_nChAdj + m_nChInBlock - m_MatrixOverlap)*block + i;
284  iCh = pCh - m_priorSign*dev + m_iChBase;
285  if(iCh>=0){
286  if((0 <= iCh)&&(iCh < LCOut[0]->getLength())){
287  A = LCOut[0]->getChannel(iCh);
288  }else{A = false;}
289  if((0 <= iCh)&&(iCh < LCOut[1]->getLength())){
290  B = LCOut[1]->getChannel(iCh);
291  }else{B = false;}
292  if((0 <= pCh)&&(pCh < LCOut[2]->getLength())){
293  C = LCOut[2]->getChannel(pCh);
294  }else{C = false;}
295  if((0 <= pCh)&&(pCh < LCOut[3]->getLength())){
296  D = LCOut[3]->getChannel(pCh);
297  }else{D = false;}
298  hit = element(A, B, C, D);
299  if(hit){
300  if(block == 0){ //block A
301  if((0 <= i) && (i < m_nChAdj+m_nChInBlock)){
303  }
304  }else{//block B
307  }
308  }
309  }
310  oredHit |= hit;
311  }
312  }
313  if(oredHit){
314  if((-m_priorSign*dev>=m_negMaxDev)&&(-m_priorSign*dev<=m_posMaxDev)){
315  m_slaveBoardOut->setDev(block,-m_priorSign*dev);
316  m_slaveBoardOut->setbDev(block, -m_priorSign, dev);
317  m_slaveBoardOut->setHit(block,true);
318 #ifdef TGCDEBUG
319  std::cout << "# DoubletSB : delta =" << -m_priorSign*dev
320  << " @pivot=" << pCh << " @onner="<< iCh << std::endl;
321 #endif
322  return;
323  } else {
324  oredHit = false;
325  }
326  }
327  }
328  }
329 }

◆ doDecluster()

void LVL1TGCTrigger::TGCSlaveBoard::doDecluster ( )
protectedinherited

Definition at line 190 of file TGCSlaveBoard.cxx.

191 {
192  int i;
193  bool A, B, C, D;
194 
195  if(m_coincidenceOut!=0){
196  TGCHitPattern* out = new TGCHitPattern (m_coincidenceOut->getLength());
197  int length = out->getLength();
198  for( i=2; i<length-1; i+=1) {
202  D = m_coincidenceOut->getChannel(i+1);
203  out->setChannel(i,( !B & C & !D )|( !A & B & C ));
204  }
205 
206  A = false;
207  B = false;
210  out->setChannel(0,( !B & C & !D )|( !A & B & C ));
211 
212  A = false;
216  out->setChannel(1,( !B & C & !D )|( !A & B & C ));
217 
221  D = false;
222  out->setChannel(length-1,( !B & C & !D )|( !A & B & C ));
223 
224  delete m_coincidenceOut;
226  out=0;
227  }
228 }

◆ doLocalCoincidence()

TGCHitPattern ** LVL1TGCTrigger::TGCDoubletSB::doLocalCoincidence ( const TGCPatchPanelOut PPOut)
protected

Definition at line 73 of file TGCDoubletSB.cxx.

74 {
75  TGCHitPattern** LCOut = 0;
76  const TGCHitPattern* inner = PPOut->getHitPattern(0); // layer3,layer4
77  const TGCHitPattern* pivot = PPOut->getHitPattern(1); // layer5,lyaer6
78 
79  if((inner!=0)&&(pivot!=0)){
80  int iLength = inner->getLength();
81  int pLength = pivot->getLength();
82 
83  // rearrange bit pattern for coincidence.
84  bool* bi = new bool [iLength];
85  bool* bp = new bool [pLength];
86  int i;
87  for( i=0; i<iLength/2; i+=1){
88  bi[2*i]=inner->getChannel(i); // smaller in eta [i:Layer3]
89  bi[2*i+1]=inner->getChannel(i+iLength/2); // smaller in phi [i+iLength/2:Layer4]
90  }
91  for( i=0; i<pLength/2; i+=1){
92  bp[2*i]=pivot->getChannel(i); // smallest in eta [i:Layer5]
93  bp[2*i+1]=pivot->getChannel(i+pLength/2); // smaller in phi [i+pLength/2:Layer6]
94  }
95 
96  // LCOut[0:3] are correspond to A,B,C,D in L1Trigger TDR Fig 12-12 respectively.
97  LCOut = new TGCHitPattern* [4];
98  LCOut[0] = new TGCHitPattern (iLength); // inner 2 hit
99  LCOut[1] = new TGCHitPattern (iLength); // inner 1 hit
100  LCOut[2] = new TGCHitPattern (pLength); // pivot 1 hit
101  LCOut[3] = new TGCHitPattern (pLength); // pivot 2 hit
102  /*
103  Wire Strip bi[1] 0 bi[3] 1 bi[iLength-1]
104  C L4 L3 ┌──┐┌──┐┌──┐ ┌──┐ ->eta
105  └false └──┘└──┘ └──┘
106  D L3 L4 ┌──┐┌──┐ ┌──┐┌false [inner]
107  └──┘└──┘ └──┘└──┘
108  bi[0] 0 bi[2] 1 bi[iLength-2]
109  ^
110  ┌┐┌┐┌┐┌┐ ┌┐┌┐┌┐┌┐ |
111  └┘└┘└┘└┘ └┘└┘└┘└┘
112  0 1 2 3 iLength-1
113  */
114  i=0;
115  LCOut[0]->setChannel(i,false);
116  LCOut[1]->setChannel(i,(bi[i] & !bi[i+1]));
117 
118  for(i = 1; i<iLength-1; i+=1){
119  LCOut[0]->setChannel(i,(bi[i-1] & bi[i]));
120  LCOut[1]->setChannel(i,((!bi[i-1] & bi[i] & !bi[i+1]) |
121  (bi[i-1] & !bi[i] & bi[i+1])));
122  }
123  i=iLength-1;
124  LCOut[0]->setChannel(i,(bi[i-1] & bi[i]));
125  LCOut[1]->setChannel(i,(!bi[i-1] & bi[i]));
126 
127 #ifdef TGCDEBUG
128  int j ;
129  std::cout << "C,D i";
130  for(j = 0; j<iLength; j++){
131  if((j%10)+1==10){
132  std::cout << "-";
133  }else{
134  std::cout << (j%10)+1;
135  }
136  }
137  std::cout << std::endl << "2hit ";
138  LCOut[0]->printb();
139  std::cout << std::endl << "1hit ";
140  LCOut[1]->printb();
141  std::cout << std::endl;
142 #endif
143 
144  /*
145  L5 B A L6 ← ─── Wire [pivot]
146  L6 B A L5 ← Strip │
147  ┌┐ │ │
148  │false ↓ ↓
149  ┌┐││ ┌┐0
150  bp[0]││└┘ └┘
151  0 ││┌┐ ┌┐1┌┐0
152  └┘││bp[1] └┘ └┘
153  ┌┐││ 0 ┌┐2┌┐1
154  bp[2]││└┘ └┘ └┘
155  1 ││┌┐ ┌┐3┌┐2
156  └┘││bp[4] └┘ └┘
157  ││ 1
158  └┘
159  ┌┐
160  ││
161  ││┌┐ ┌┐ pLength-2
162  └┘││ └┘
163  ┌┐││ ┌┐ pLength-1
164  false│└┘ └┘
165  ││ ↑
166  └┘ └─ bp[pLength-1]
167 
168  */
169  LCOut[2]->setChannel(0, bp[0] & !bp[1]);
170  LCOut[3]->setChannel(0, bp[0] & bp[1]);
171  for( i=1; i<pLength-1; i+=1){
172  LCOut[2]->setChannel(i,((!bp[i-1] & bp[i] & !bp[i+1]) |
173  ( bp[i-1] & !bp[i] & bp[i+1])));
174  LCOut[3]->setChannel(i,(bp[i] & bp[i+1]));
175  }
176 
177  i=pLength-1;
178  LCOut[2]->setChannel(i,!bp[i-1] & bp[i]);
179  LCOut[3]->setChannel(i,false);
180 
181 #ifdef TGCDEBUG
182  std::cout << "A,B p";
183  for(j = 0; j<pLength; j++){
184  if((j%10)+1==10){
185  std::cout << "-";
186  }else{
187  std::cout << (j%10)+1;
188  }
189  }
190  std::cout << std::endl << "1hit ";
191  LCOut[2]->printb();
192  std::cout << std::endl << "2hit ";
193  LCOut[3]->printb();
194  std::cout << std::endl;
195 #endif
196 
197  delete [] bi;
198  delete [] bp;
199 
200  }
201 
202  return LCOut;
203 }

◆ doMaskOperation()

void LVL1TGCTrigger::TGCSlaveBoard::doMaskOperation ( )
inlineprotectedinherited

Definition at line 65 of file TGCSlaveBoard.h.

65 {};

◆ element()

bool LVL1TGCTrigger::TGCDoubletSB::element ( bool  A,
bool  B,
bool  C,
bool  D 
)
protected

Definition at line 332 of file TGCDoubletSB.cxx.

333 {
334  return ((A & C)|( A & D)|( B & D));
335 }

◆ eraseOutput()

void LVL1TGCTrigger::TGCSlaveBoard::eraseOutput ( )
inherited

Definition at line 230 of file TGCSlaveBoard.cxx.

231 {
232  m_slaveBoardOut=0;
233 }

◆ getId()

int LVL1TGCTrigger::TGCSlaveBoard::getId ( ) const
inlineinherited

Definition at line 41 of file TGCSlaveBoard.h.

41 { return m_id;};

◆ getIdHighPtBoard()

int LVL1TGCTrigger::TGCSlaveBoard::getIdHighPtBoard ( ) const
inherited

Definition at line 260 of file TGCSlaveBoard.cxx.

261 {
262  return m_idHighPtBoard;
263 }

◆ getOutput()

TGCSlaveBoardOut* LVL1TGCTrigger::TGCSlaveBoard::getOutput ( )
inlineinherited

Definition at line 38 of file TGCSlaveBoard.h.

38 { return m_slaveBoardOut; }

◆ getRegion()

TGCRegionType LVL1TGCTrigger::TGCSlaveBoard::getRegion ( ) const
inlineinherited

Definition at line 52 of file TGCSlaveBoard.h.

52 { return m_region;};

◆ GetSlbIn()

const std::bitset<200>& LVL1TGCTrigger::TGCSlaveBoard::GetSlbIn ( void  ) const
inlineinherited

Definition at line 61 of file TGCSlaveBoard.h.

61 { return m_slbin; } // for readout

◆ getType()

int LVL1TGCTrigger::TGCSlaveBoard::getType ( ) const
inlineinherited

Definition at line 49 of file TGCSlaveBoard.h.

49 { return m_type;};

◆ getTypeName()

std::string LVL1TGCTrigger::TGCSlaveBoard::getTypeName ( int  typeIn) const
inherited

Definition at line 173 of file TGCSlaveBoard.cxx.

174 {
175  if(m_type==WTSB) return "WT";//0
176  if(m_type==WDSB) return "WD";//1
177  if(m_type==STSB) return "ST";//2
178  if(m_type==SDSB) return "SD";//3
179  if(m_type==WISB) return "WI";//4
180  if(m_type==SISB) return "SI";//5
181  return "";
182 }

◆ setId()

void LVL1TGCTrigger::TGCSlaveBoard::setId ( int  idIn)
inlineinherited

Definition at line 42 of file TGCSlaveBoard.h.

42 { m_id=idIn;};

◆ setIdHighPtBoard()

void LVL1TGCTrigger::TGCSlaveBoard::setIdHighPtBoard ( int  m_id)
inherited

Definition at line 265 of file TGCSlaveBoard.cxx.

266 {
267  m_idHighPtBoard = idIn;
268 }

◆ setPatchPanel()

void LVL1TGCTrigger::TGCSlaveBoard::setPatchPanel ( TGCPatchPanel PPIn)
inherited

Definition at line 235 of file TGCSlaveBoard.cxx.

236 {
237  m_patchPanel = PPIn;
238 }

◆ setPatchPanelOut()

void LVL1TGCTrigger::TGCSlaveBoard::setPatchPanelOut ( TGCPatchPanelOut PPOut)
inlineinherited

Definition at line 58 of file TGCSlaveBoard.h.

58 { m_patchPanelOut=PPOut;};

◆ setRegion()

void LVL1TGCTrigger::TGCSlaveBoard::setRegion ( TGCRegionType  regionIn)
inlineinherited

Definition at line 53 of file TGCSlaveBoard.h.

53 { m_region=regionIn;};

◆ setType()

void LVL1TGCTrigger::TGCSlaveBoard::setType ( int  typeIn)
inlineinherited

Definition at line 50 of file TGCSlaveBoard.h.

50 { m_type=typeIn;};

◆ showResult()

void LVL1TGCTrigger::TGCSlaveBoard::showResult ( ) const
inherited

Definition at line 133 of file TGCSlaveBoard.cxx.

134 {
135 
136  int i;
137  if(m_patchPanelOut!=0){
138  for( i=0; i<NumberOfConnectorPerPPOut; i+=1)
139  if(std::as_const(m_patchPanelOut)->getHitPattern(i)!=0){
140  std::cout<<"#SB I: BID= "<<m_bid;
141  if(m_patchPanelOut->getOrigin()!=0){
142  std::cout << " Typ= " << m_patchPanelOut->getOrigin()->getType();
143  std::cout << " Rgn= " << (m_patchPanelOut->getOrigin()->getRegion() == TGCRegionType::FORWARD ? "FORWARD" : "ENDCAP");
144  std::cout << " PPID= "<< m_patchPanelOut->getOrigin()->getId()<<" ";
145  std::cout << " port= "<< i;
146  std::cout << "" << m_id;
147  }
148  std::cout << ":";
149  std::as_const(m_patchPanelOut)->getHitPattern(i)->print();
150  }
151  }
152 
153  if(m_slaveBoardOut!=0){
154  if(m_coincidenceOut!=0){
155  std::cout << "#SB O: BID= " << m_bid;
156  std::cout << " Rgn= " << (m_region == TGCRegionType::FORWARD ? "FORWARD" : "ENDCAP");
157  std::cout << " Typ= " << getTypeName(m_type);
158  std::cout << " ID= " << m_id << ":";
159  for( i=0; i<m_slaveBoardOut->getNumberOfData(); i++){
160  if(m_slaveBoardOut->getHit(i)){
161  std::cout << " i= " << i;
162  std::cout << " x= " << m_slaveBoardOut->getPos(i);
163  if((m_type==1)||(m_type==3))// doublet
164  std::cout << " d= " << m_slaveBoardOut->getDev(i);
165  }
166  }
167  std::cout<<std::endl;
168  std::cout<<"Destination HPBID= "<<m_idHighPtBoard<<std::endl;
169  }
170  }
171 }

◆ storeSlbIn()

void LVL1TGCTrigger::TGCSlaveBoard::storeSlbIn ( )
inherited

Definition at line 112 of file TGCSlaveBoard.cxx.

113 {
114  // store SlaveBoard input for readout
115  const TGCHitPattern* inner = m_patchPanelOut->getHitPattern(0);
116  const TGCHitPattern* pivot = m_patchPanelOut->getHitPattern(1);
117  int i;
118  if(pivot!=0){
119  for(i=0; i<s_pLength[m_type]; i++){
120  m_slbin.set(40+i+s_pOffset[m_type], pivot->getChannel(i+s_pLength[m_type]));
121  m_slbin.set(40+36+i+s_pOffset[m_type], pivot->getChannel(i));
122  }
123  }
124  if(inner!=0){
125  for(i=0; i<s_iLength[m_type]; i++){
126  if(inner->getLength()>s_iLength[m_type])//WTSB
127  m_slbin.set(40+36+36+i+s_iOffset[m_type], inner->getChannel(i+s_iLength[m_type]));
128  m_slbin.set(40+36+36+44+i+s_iOffset[m_type], inner->getChannel(i));
129  }
130  }
131 }

Member Data Documentation

◆ m_bid

int LVL1TGCTrigger::TGCSlaveBoard::m_bid
protectedinherited

Definition at line 77 of file TGCSlaveBoard.h.

◆ m_coincidenceOut

TGCHitPattern* LVL1TGCTrigger::TGCSlaveBoard::m_coincidenceOut
protectedinherited

Definition at line 73 of file TGCSlaveBoard.h.

◆ m_iChBase

int LVL1TGCTrigger::TGCDoubletSB::m_iChBase
protected

Definition at line 40 of file TGCDoubletSB.h.

◆ m_id

int LVL1TGCTrigger::TGCSlaveBoard::m_id
protectedinherited

Definition at line 76 of file TGCSlaveBoard.h.

◆ m_idHighPtBoard

int LVL1TGCTrigger::TGCSlaveBoard::m_idHighPtBoard
protectedinherited

Definition at line 78 of file TGCSlaveBoard.h.

◆ m_lengthOfCoincidenceOut

int LVL1TGCTrigger::TGCSlaveBoard::m_lengthOfCoincidenceOut
protectedinherited

Definition at line 72 of file TGCSlaveBoard.h.

◆ m_MatrixOverlap

int LVL1TGCTrigger::TGCDoubletSB::m_MatrixOverlap
protected

Definition at line 41 of file TGCDoubletSB.h.

◆ m_maxDev

int LVL1TGCTrigger::TGCDoubletSB::m_maxDev
protected

Definition at line 36 of file TGCDoubletSB.h.

◆ m_nChAdj

int LVL1TGCTrigger::TGCDoubletSB::m_nChAdj
protected

Definition at line 39 of file TGCDoubletSB.h.

◆ m_nChInBlock

int LVL1TGCTrigger::TGCDoubletSB::m_nChInBlock
protected

Definition at line 35 of file TGCDoubletSB.h.

◆ m_negMaxDev

int LVL1TGCTrigger::TGCDoubletSB::m_negMaxDev
protected

Definition at line 38 of file TGCDoubletSB.h.

◆ m_numberOfData

int LVL1TGCTrigger::TGCDoubletSB::m_numberOfData
protected

Definition at line 34 of file TGCDoubletSB.h.

◆ m_patchPanel

TGCPatchPanel* LVL1TGCTrigger::TGCSlaveBoard::m_patchPanel
protectedinherited

Definition at line 82 of file TGCSlaveBoard.h.

◆ m_patchPanelOut

TGCPatchPanelOut* LVL1TGCTrigger::TGCSlaveBoard::m_patchPanelOut
protectedinherited

Definition at line 83 of file TGCSlaveBoard.h.

◆ m_posMaxDev

int LVL1TGCTrigger::TGCDoubletSB::m_posMaxDev
protected

Definition at line 37 of file TGCDoubletSB.h.

◆ m_priorSign

int LVL1TGCTrigger::TGCDoubletSB::m_priorSign
protected

Definition at line 33 of file TGCDoubletSB.h.

◆ m_region

TGCRegionType LVL1TGCTrigger::TGCSlaveBoard::m_region
protectedinherited

Definition at line 80 of file TGCSlaveBoard.h.

◆ m_slaveBoardOut

TGCSlaveBoardOut* LVL1TGCTrigger::TGCSlaveBoard::m_slaveBoardOut
protectedinherited

Definition at line 74 of file TGCSlaveBoard.h.

◆ m_slbin

std::bitset<200> LVL1TGCTrigger::TGCSlaveBoard::m_slbin
protectedinherited

Definition at line 84 of file TGCSlaveBoard.h.

◆ m_SType

TGCSignalType LVL1TGCTrigger::TGCDoubletSB::m_SType
protected

Definition at line 42 of file TGCDoubletSB.h.

◆ m_type

int LVL1TGCTrigger::TGCSlaveBoard::m_type
protectedinherited

Definition at line 79 of file TGCSlaveBoard.h.

◆ s_iLength

constexpr int LVL1TGCTrigger::TGCSlaveBoard::s_iLength[6] = {36,44,32,32,32,32}
staticconstexprprivateinherited

Definition at line 28 of file TGCSlaveBoard.h.

◆ s_iOffset

constexpr int LVL1TGCTrigger::TGCSlaveBoard::s_iOffset[6] = {4,0,6,6,6,6}
staticconstexprprivateinherited

Definition at line 26 of file TGCSlaveBoard.h.

◆ s_pLength

constexpr int LVL1TGCTrigger::TGCSlaveBoard::s_pLength[6] = {36,36,32,32,32,32}
staticconstexprprivateinherited

Definition at line 27 of file TGCSlaveBoard.h.

◆ s_pOffset

constexpr int LVL1TGCTrigger::TGCSlaveBoard::s_pOffset[6] = {0,0,2,2,2,2}
staticconstexprprivateinherited

Definition at line 25 of file TGCSlaveBoard.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCPatchPanelOut::getOrigin
const TGCPatchPanel * getOrigin() const
Definition: TGCPatchPanelOut.h:58
LVL1TGCTrigger::TGCDoubletSB::do3outof4Coincedence
void do3outof4Coincedence(TGCHitPattern **LCOut)
Definition: TGCDoubletSB.cxx:205
LVL1TGCTrigger::TGCSlaveBoard::storeSlbIn
void storeSlbIn()
Definition: TGCSlaveBoard.cxx:112
LVL1TGCTrigger::TGCSlaveBoard::m_bid
int m_bid
Definition: TGCSlaveBoard.h:77
LVL1TGCTrigger::TGCSlaveBoard::collectInput
void collectInput()
Definition: TGCSlaveBoard.cxx:240
LVL1TGCTrigger::TGCSlaveBoardOut::clear
void clear()
Definition: TGCSlaveBoardOut.cxx:181
LVL1TGCTrigger::TGCPatchPanel::getId
int getId() const
Definition: TGCPatchPanel.cxx:399
LVL1TGCTrigger::TGCSlaveBoardOut::getDev
int getDev(int iData) const
Definition: TGCSlaveBoardOut.h:119
LVL1TGCTrigger::SISB
@ SISB
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCHitPattern::print
void print(int unit) const
Definition: TGCHitPattern.cxx:111
LVL1TGCTrigger::TGCDoubletSB::m_numberOfData
int m_numberOfData
Definition: TGCDoubletSB.h:34
LVL1TGCTrigger::TGCSlaveBoard::s_iOffset
static constexpr int s_iOffset[6]
Definition: TGCSlaveBoard.h:26
LVL1TGCTrigger::TGCDoubletSB::m_nChAdj
int m_nChAdj
Definition: TGCDoubletSB.h:39
LVL1TGCTrigger::TGCSlaveBoard::showResult
void showResult() const
Definition: TGCSlaveBoard.cxx:133
LVL1TGCTrigger::TGCSlaveBoard::m_id
int m_id
Definition: TGCSlaveBoard.h:76
DMTest::C
C_v1 C
Definition: C.h:26
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
LVL1TGCTrigger::TGCSlaveBoard::doCoincidence
virtual void doCoincidence()=0
LVL1TGCTrigger::TGCSlaveBoard::getTypeName
std::string getTypeName(int typeIn) const
Definition: TGCSlaveBoard.cxx:173
LVL1TGCTrigger::TGCSlaveBoard::doDecluster
void doDecluster()
Definition: TGCSlaveBoard.cxx:190
LVL1TGCTrigger::TGCSlaveBoardOut::getNumberOfData
int getNumberOfData() const
Definition: TGCSlaveBoardOut.h:155
LVL1TGCTrigger::TGCSlaveBoardOut::setDev
void setDev(int iData, int devIn)
Definition: TGCSlaveBoardOut.h:97
LVL1TGCTrigger::SDSB
@ SDSB
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCDoubletSB::m_MatrixOverlap
int m_MatrixOverlap
Definition: TGCDoubletSB.h:41
LVL1TGCTrigger::TGCSlaveBoardOut::setbDev
void setbDev(int block, int sign, int dr)
Definition: TGCSlaveBoardOut.cxx:138
LVL1TGCTrigger::TGCSlaveBoardOut::getbPos
TGCHitPattern * getbPos(int iData)
Definition: TGCSlaveBoardOut.h:107
LVL1TGCTrigger::TGCSlaveBoard::s_iLength
static constexpr int s_iLength[6]
Definition: TGCSlaveBoard.h:28
LVL1TGCTrigger::TGCRegionType::FORWARD
@ FORWARD
LVL1TGCTrigger::TGCSlaveBoard::s_pLength
static constexpr int s_pLength[6]
Definition: TGCSlaveBoard.h:27
LVL1TGCTrigger::TGCHitPattern::getLength
int getLength() const
Definition: TGCHitPattern.h:49
LVL1TGCTrigger::TGCDoubletSB::m_priorSign
int m_priorSign
Definition: TGCDoubletSB.h:33
LVL1TGCTrigger::TGCSlaveBoardOut::getPos
int getPos(int iData) const
Definition: TGCSlaveBoardOut.h:125
LVL1TGCTrigger::TGCDoubletSB::doLocalCoincidence
TGCHitPattern ** doLocalCoincidence(const TGCPatchPanelOut *PPOut)
Definition: TGCDoubletSB.cxx:73
LVL1TGCTrigger::TGCDoubletSB::element
bool element(bool A, bool B, bool C, bool D)
Definition: TGCDoubletSB.cxx:332
LVL1TGCTrigger::TGCSlaveBoard::m_slbin
std::bitset< 200 > m_slbin
Definition: TGCSlaveBoard.h:84
LVL1TGCTrigger::TGCHitPattern::printb
void printb() const
Definition: TGCHitPattern.cxx:141
LVL1TGCTrigger::TGCDoubletSB::m_nChInBlock
int m_nChInBlock
Definition: TGCDoubletSB.h:35
LVL1TGCTrigger::TGCPatchPanel::eraseOutput
void eraseOutput(int SBId)
Definition: TGCPatchPanel.cxx:420
LVL1TGCTrigger::TGCHitPattern::onChannel
void onChannel(int iChannel)
Definition: TGCHitPattern.h:55
LVL1TGCTrigger::TGCHitPattern::setLength
void setLength(int length)
Definition: TGCHitPattern.cxx:74
LVL1TGCTrigger::TGCSlaveBoardOut::setPos
void setPos(int iData, int posIn)
Definition: TGCSlaveBoardOut.cxx:171
A
LVL1TGCTrigger::WDSB
@ WDSB
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCSlaveBoard::s_pOffset
static constexpr int s_pOffset[6]
Definition: TGCSlaveBoard.h:25
LVL1TGCTrigger::TGCSlaveBoardOut::setHit
void setHit(int iData, bool hitIn)
Definition: TGCSlaveBoardOut.h:87
LVL1TGCTrigger::TGCSlaveBoard::m_region
TGCRegionType m_region
Definition: TGCSlaveBoard.h:80
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1TGCTrigger::TGCSlaveBoard::m_idHighPtBoard
int m_idHighPtBoard
Definition: TGCSlaveBoard.h:78
LVL1TGCTrigger::WTSB
@ WTSB
Definition: TGCNumbering.h:57
LVL1TGCTrigger::WIRE
@ WIRE
Definition: TGCNumbering.h:52
LVL1TGCTrigger::TGCSlaveBoard::doMaskOperation
void doMaskOperation()
Definition: TGCSlaveBoard.h:65
LVL1TGCTrigger::STSB
@ STSB
Definition: TGCNumbering.h:57
LVL1TGCTrigger::WISB
@ WISB
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCSlaveBoard::m_type
int m_type
Definition: TGCSlaveBoard.h:79
LVL1TGCTrigger::TGCHitPattern::getChannel
bool getChannel(int iChannel) const
Definition: TGCHitPattern.cxx:64
LVL1TGCTrigger::TGCPatchPanel::getOutput
TGCPatchPanelOut * getOutput(int SBId)
Definition: TGCPatchPanel.cxx:409
LVL1TGCTrigger::NumberOfConnectorPerPPOut
const int NumberOfConnectorPerPPOut
Definition: TGCPatchPanelOut.h:13
LVL1TGCTrigger::TGCSlaveBoard::m_slaveBoardOut
TGCSlaveBoardOut * m_slaveBoardOut
Definition: TGCSlaveBoard.h:74
LVL1TGCTrigger::TGCDoubletSB::m_SType
TGCSignalType m_SType
Definition: TGCDoubletSB.h:42
LVL1TGCTrigger::TGCHitPattern::clear
void clear()
Definition: TGCHitPattern.cxx:105
LVL1TGCTrigger::TGCSlaveBoardOut::getHit
bool getHit(int iData) const
Definition: TGCSlaveBoardOut.h:131
LVL1TGCTrigger::TGCPatchPanelOut::print
void print() const
Definition: TGCPatchPanelOut.cxx:46
LVL1TGCTrigger::TGCDoubletSB::doCoincidenceInSubMatrix
virtual void doCoincidenceInSubMatrix(const int block, TGCHitPattern **LCOut)
Definition: TGCDoubletSB.cxx:226
LVL1TGCTrigger::TGCSlaveBoard::deletePatchPanelOut
void deletePatchPanelOut()
Definition: TGCSlaveBoard.cxx:184
LVL1TGCTrigger::TGCPatchPanel::getType
int getType() const
Definition: TGCPatchPanel.h:64
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
LVL1TGCTrigger::TGCSlaveBoard::createSlaveBoardOut
virtual void createSlaveBoardOut()=0
LVL1TGCTrigger::TGCSlaveBoard::TGCSlaveBoard
TGCSlaveBoard()
Definition: TGCSlaveBoard.cxx:16
LVL1TGCTrigger::TGCDoubletSB::m_posMaxDev
int m_posMaxDev
Definition: TGCDoubletSB.h:37
LVL1TGCTrigger::TGCSlaveBoardOut::setbPos
void setbPos(int block, int pos)
Definition: TGCSlaveBoardOut.h:74
LVL1TGCTrigger::TGCDoubletSB::m_maxDev
int m_maxDev
Definition: TGCDoubletSB.h:36
LVL1TGCTrigger::TGCPatchPanelOut::getHitPattern
const TGCHitPattern * getHitPattern(int connector) const
Definition: TGCPatchPanelOut.h:46
LVL1TGCTrigger::NumberOfDoubletSBData
const int NumberOfDoubletSBData
Definition: TGCDoubletSB.h:13
LVL1TGCTrigger::TGCPatchPanel::getRegion
TGCRegionType getRegion() const
Definition: TGCPatchPanel.h:66
LVL1TGCTrigger::TGCSlaveBoard::m_patchPanel
TGCPatchPanel * m_patchPanel
Definition: TGCSlaveBoard.h:82
LVL1TGCTrigger::TGCSlaveBoard::m_patchPanelOut
TGCPatchPanelOut * m_patchPanelOut
Definition: TGCSlaveBoard.h:83
LVL1TGCTrigger::TGCSlaveBoardOut::setNumberOfData
void setNumberOfData(int nData)
Definition: TGCSlaveBoardOut.h:149
LVL1TGCTrigger::TGCDoubletSB::m_iChBase
int m_iChBase
Definition: TGCDoubletSB.h:40
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
LVL1TGCTrigger::TGCHitPattern::visual
void visual(int Cycle, int Width, int Tag) const
Definition: TGCHitPattern.cxx:232
LVL1TGCTrigger::TGCPatchPanel::showProperty
void showProperty()
Definition: TGCPatchPanel.cxx:261
LVL1TGCTrigger::TGCDoubletSB::m_negMaxDev
int m_negMaxDev
Definition: TGCDoubletSB.h:38
LVL1TGCTrigger::TGCSlaveBoard::m_coincidenceOut
TGCHitPattern * m_coincidenceOut
Definition: TGCSlaveBoard.h:73