ATLAS Offline Software
Loading...
Searching...
No Matches
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()

◆ ~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;
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)
52 if(m_patchPanelOut->getHitPattern(i)!=0){
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 << ":";
62 m_patchPanelOut->getHitPattern(i)->print();
63 }
64 } else {
65 std::cout << "NO PP IN" << std::endl;
66 }
67#endif
68
69 // delete m_slaveBoardOut and m_coincidenceOut
71 if( m_slaveBoardOut!=0) delete m_slaveBoardOut;
74
75 if(m_patchPanelOut!=0){
77
78 storeSlbIn();
79
81 if(m_coincidenceOut!=0) {
82#ifdef TGCDEBUG_VISUAL
83 std::cout << "TGCSlaveBoard::clockIn: after doCoincidence()\n";
84 m_coincidenceOut->visual(m_coincidenceOut->getLength(), 1, 0);
85#endif
86#ifdef TGCDEBUG
87 std::cout << "#SB C: BID= " << m_bid << ":";
88 m_coincidenceOut->print();
89#endif
90 }
92#ifdef TGCDEBUG_VISUAL
93 if(m_coincidenceOut!=0) {
94 std::cout << "TGCSlaveBoard::clockIn: after doDecluster()\n";
95 m_coincidenceOut->visual(m_coincidenceOut->getLength(), 1, 0);
96 }
97#endif
99
100#ifdef TGCDEBUG
101 showResult();
102#endif
103
105 if(m_coincidenceOut!=0){
106 delete m_coincidenceOut;
108 }
109 }
110}
std::string getTypeName(int typeIn) const
TGCSlaveBoardOut * m_slaveBoardOut
virtual void doCoincidence()=0
TGCPatchPanelOut * m_patchPanelOut
virtual void createSlaveBoardOut()=0
const int NumberOfConnectorPerPPOut

◆ 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;
247 if (m_patchPanel!=0) m_patchPanel->showProperty();
248#endif
249
250 if(m_patchPanel!=0){
251 m_patchPanelOut = m_patchPanel->getOutput(m_id);
252#ifdef TGCDEBUG
253 if(m_patchPanelOut!=0) m_patchPanelOut->print();
254#endif
255 m_patchPanel->eraseOutput(m_id);
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){
35 if(m_coincidenceOut->getChannel(m_nChAdj+m_nChInBlock*block+i)){
36 m_slaveBoardOut->setPos(block,i);
37 m_slaveBoardOut->setHit(block,true);
38 break;
39 }
40 }// block 0:A 1:B
41 m_slaveBoardOut->setbPos(block, m_slaveBoardOut->getPos(block));
42#ifdef TGCCOUT
43 std::cout << " " << block << std::endl;
44 m_slaveBoardOut->getbPos(block)->printb();
45#endif
46 }
47 }
48 }
49}
const int NumberOfDoubletSBData

◆ deletePatchPanelOut()

void LVL1TGCTrigger::TGCSlaveBoard::deletePatchPanelOut ( )
protectedinherited

Definition at line 184 of file TGCSlaveBoard.cxx.

185{
186 if( m_patchPanelOut!=0 ) delete m_patchPanelOut;
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());
218 m_coincidenceOut->clear();
219 int i;
220 for( i=0; i<NumberOfDoubletSBData; i+=1)
221 // select tracks in each submatrix.
223 }
224}
virtual void doCoincidenceInSubMatrix(const int block, TGCHitPattern **LCOut)

◆ 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);
58 m_slaveBoardOut->clear();
59 m_slaveBoardOut->setNumberOfData(NumberOfDoubletSBData);
60
61 if(LCOut!=0){
62 // Coincidence matrix
64
65 delete LCOut[0];
66 delete LCOut[1];
67 delete LCOut[2];
68 delete LCOut[3];
69 delete [] LCOut;
70 }
71}
void do3outof4Coincedence(TGCHitPattern **LCOut)
TGCHitPattern ** doLocalCoincidence(const TGCPatchPanelOut *PPOut)

◆ 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)){
256 m_coincidenceOut->onChannel(pCh);
257 }
258 }else{//block B
260 m_coincidenceOut->onChannel(pCh);
261 }
262 }
263 }
264 oredHit |= hit;
265 }
266 }
267 if(oredHit){
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)){
302 m_coincidenceOut->onChannel(pCh);
303 }
304 }else{//block B
306 m_coincidenceOut->onChannel(pCh);
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}
bool element(bool A, bool B, bool C, bool D)
struct color C

◆ 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) {
199 A = m_coincidenceOut->getChannel(i-2);
200 B = m_coincidenceOut->getChannel(i-1);
201 C = m_coincidenceOut->getChannel(i);
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;
208 C = m_coincidenceOut->getChannel(0);
209 D = m_coincidenceOut->getChannel(1);
210 out->setChannel(0,( !B & C & !D )|( !A & B & C ));
211
212 A = false;
213 B = m_coincidenceOut->getChannel(0);
214 C = m_coincidenceOut->getChannel(1);
215 D = m_coincidenceOut->getChannel(2);
216 out->setChannel(1,( !B & C & !D )|( !A & B & C ));
217
218 A = m_coincidenceOut->getChannel(length-3);
219 B = m_coincidenceOut->getChannel(length-2);
220 C = m_coincidenceOut->getChannel(length-1);
221 D = false;
222 out->setChannel(length-1,( !B & C & !D )|( !A & B & C ));
223
224 delete m_coincidenceOut;
226 out=0;
227 }
228}
double length(const pvec &v)

◆ 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{
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}
TGCRegionType getRegion() const

◆ 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}
static constexpr int s_pOffset[6]
static constexpr int s_pLength[6]
static constexpr int s_iLength[6]
static constexpr int s_iOffset[6]

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

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

Definition at line 28 of file TGCSlaveBoard.h.

28{36,44,32,32,32,32};

◆ s_iOffset

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

Definition at line 26 of file TGCSlaveBoard.h.

26{4,0,6,6,6,6};

◆ s_pLength

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

Definition at line 27 of file TGCSlaveBoard.h.

27{36,36,32,32,32,32};

◆ s_pOffset

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

Definition at line 25 of file TGCSlaveBoard.h.

25{0,0,2,2,2,2};// WT,WD,ST,SD,WI,SI

The documentation for this class was generated from the following files: