CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTSPhi.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTSPhi.cpp
4 //
5 // Description: Implementation of TS Phi trigger algorithm
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // jan02 - D.Bonacorsi/S.Marcellini
12 // improved algorithm for 2nd track handling in case of pile-up in TSM
13 // param: tsmgetcarryflag - value: 1 (default)
14 // feb04 - Implementation of sector collector related stuff(S. Marcellini)
15 // jan07 - C. Battilana local conf update
16 // mar07 - S. Vanini : parameters from DTConfigManager
17 //
18 //--------------------------------------------------
19 
21 
22 //-----------------------
23 // This Class's Header --
24 //-----------------------
26 
27 //-------------------------------
28 // Collaborating Class Headers --
29 //-------------------------------
35 
36 //---------------
37 // C++ Headers --
38 //---------------
39 #include <iostream>
40 
41 //----------------
42 // Constructors --
43 //----------------
45  DTGeomSupplier(geom), _tracocard(tracocard){
46 
47  // reserve the appropriate amount of space for vectors
48  int i=0;
49  for(i=0;i<DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF + 1 ;i++) { // SM add + 1
50  _tss[i].reserve(DTConfigTSPhi::NTSSTSM);
51  // DBSM-doubleTSM
52  _tsm[i].reserve(DTConfigTSPhi::NTSMD);
53  }
54 
55  for(int is=0;is<DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1;is++) {
56 
57  // create DTTSSs
58  for(int itss=1; itss<=DTConfigTSPhi::NTSSTSM; itss++) {
59  DTTSS* tss = new DTTSS(itss);
60  _tss[is].push_back(tss);
61  }
62 
63  // create DTTSMs SM double TSM
64  for(int itsmd=1; itsmd<=DTConfigTSPhi::NTSMD; itsmd++) {
65  DTTSM* tsm = new DTTSM(itsmd);
66  _tsm[is].push_back(tsm);
67  }
68  }
69 }
70 
71 
72 //--------------
73 // Destructor --
74 //--------------
76 
77  std::vector<DTTSS*>::iterator ptss;
78  std::vector<DTTSM*>::iterator ptsm;
79  for(int is=0;is<DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1;is++){
80  // clear TSSs
81  for (ptss = _tss[is].begin(); ptss != _tss[is].end(); ptss++){
82  delete (*ptss);
83  }
84  _tss[is].clear();
85  // clear TSMs
86  for (ptsm = _tsm[is].begin(); ptsm != _tsm[is].end(); ptsm++){
87  delete (*ptsm);
88  }
89  _tsm[is].clear();
90 
91  }
92 
93  localClear();
94 
95  //delete _config;
96 
97 }
98 
99 
100 //--------------
101 // Operations --
102 //--------------
103 
104 void
106  for(int is=0;is<DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1;is++) {
107  // clear buffer
108  std::vector<DTTSCand*>::iterator p1;
109  for(p1 = _tctrig[is].begin(); p1 != _tctrig[is].end(); p1++) {
110  delete (*p1);
111  }
112  _tctrig[is].clear();
113 
114  std::vector<DTTSS*>::iterator ptss;
115  for(ptss = _tss[is].begin(); ptss != _tss[is].end(); ptss++) {
116  (*ptss)->clear();
117  }
118  // clear all DTTSM
119  std::vector<DTTSM*>::iterator ptsm;
120  for(ptsm = _tsm[is].begin(); ptsm != _tsm[is].end(); ptsm++) {
121  (*ptsm)->clear();
122  }
123  }
124 }
125 
126 void
128 
129  DTChamberId sid = ChamberId();
130  _config = conf->getDTConfigTSPhi(sid);
131 
132  for(int is=0;is<DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1;is++) {
133 
134  // set TSS config
135  std::vector<DTTSS*>::iterator ptss;
136  for (ptss = _tss[is].begin(); ptss != _tss[is].end(); ptss++){
137  (*ptss)->setConfig(config());
138  }
139  // set TSM config
140  std::vector<DTTSM*>::iterator ptsm;
141  for (ptsm = _tsm[is].begin(); ptsm != _tsm[is].end(); ptsm++){
142  (*ptsm)->setConfig(config());
143  }
144 
145  }
146 
147 }
148 
149 void
151 
152  // clear DTTSSs and DTTSM
153  localClear();
154 
155  if(config()->debug()){
156  std::cout << "DTTSPhi::loadDTTSPhi called for wheel=" << wheel() ;
157  std::cout << ", station=" << station();
158  std::cout << ", sector=" << sector() << std::endl;
159  }
160 
161  // loop on all TRACO triggers
162  std::vector<DTTracoTrigData>::const_iterator p;
163  std::vector<DTTracoTrigData>::const_iterator pend=_tracocard->end();
164  for(p=_tracocard->begin();p!=pend;p++){
165 
166  if(config()->usedTraco(p->tracoNumber()) /*|| config()->usedTraco(p->tracoNumber())==1*/ ) {
167  int step = p->step();
168  int fs = (p->isFirst()) ? 1 : 2 ;
169 
170  // if first track is found inhibit second track processing in previous BX
171  if( fs==1 && step>DTConfigTSPhi::NSTEPF)
172  ignoreSecondTrack(step-1,p->tracoNumber());
173 
174  // load trigger
175  addTracoT( step, &(*p), fs );
176  }
177  }
178 }
179 
180 void
181 DTTSPhi::addTracoT(int step, const DTTracoTrigData* tracotrig, int ifs) {
182  if(step<DTConfigTSPhi::NSTEPF||step>DTConfigTSPhi::NSTEPL){
183  std::cout << "DTTSPhi::addTracoT: step out of range: " << step;
184  std::cout << " trigger not added!" << std::endl;
185  return;
186  }
187  // Check that a preview is present and code is not zero
188  if(!tracotrig->pvCode() || !tracotrig->code() ) {
189  std::cout << "DTTSPhi::addTracoT: preview not present in TRACO trigger or its code=0 ";
190  std::cout << " trigger not added!" << std::endl;
191  return;
192  }
193 
194  // Get the appropriate TSS
195  int itss = (tracotrig->tracoNumber() -1 ) / DTConfigTSPhi::NTCTSS + 1;
196  if(itss<1 || itss>DTConfigTSPhi::NTSSTSM) {
197  std::cout << "DTTSPhi::addTracoT: wrong TRACO number: ";
198  std::cout << tracotrig->tracoNumber();
199  std::cout << " trigger not added!" << std::endl;
200  return;
201  }
202 
203  // TSM status check (if it is the case, reject TRACO triggers related to broken TSMData)
204  if( config()->TsmStatus().element(itss)==0){ // TSMD broken
205  return;
206  }
207 
208  int pos = tracotrig->tracoNumber() - (itss-1)*DTConfigTSPhi::NTCTSS;
209  DTTSS* tss = getDTTSS(step,itss);
210 
211  // Create a new Trigger Server candidate
212  DTTSCand* cand = new DTTSCand(tss, tracotrig, ifs, pos);
213 
214  // Add it to the buffer and to the TSS
215  _tctrig[step-DTConfigTSPhi::NSTEPF].push_back(cand);
216  tss->addDTTSCand(cand);
217 
218  // Debugging...
219  if(config()->debug()){
220  std::cout << "DTTSPhi::addTracoT at step " << step;
221  if(ifs==1) {
222  std::cout << " (first track)";
223  } else {
224  std::cout << " (second track)";
225  }
226  std::cout << " from TRACO " << tracotrig->tracoNumber();
227  std::cout << " to TSS " << tss->number() << ", position=" << pos << std::endl;
228  tracotrig->print();
229  }
230  // end debugging
231 
232 }
233 
234 void
236 
237  DTTSCand* secondPrevBx = 0; // new DTTSCand;
238 
239  bool existSecondPrevBx = false;
240  int itsmd = 1; // initialize it to 1, default value if not in back up mode
242  int i_tsmd;
243 
244  for(int is=DTConfigTSPhi::NSTEPF;is<DTConfigTSPhi::NSTEPL+1;is++) {
245  // loop on DTTSSs
246  int ntss = 0;
247  i_tsmd = 0;
248  ntsm[is-DTConfigTSPhi::NSTEPF][0] = 0; // counter to make sector collector run if at least a tsm
249  ntsm[is-DTConfigTSPhi::NSTEPF][1] = 0;
250  std::vector<DTTSS*>::iterator p;
251  for(p=_tss[is-DTConfigTSPhi::NSTEPF].begin();
252  p<_tss[is-DTConfigTSPhi::NSTEPF].end(); p++) {
253  if((*p)->nTracoT(1)>0) {
254  // run DTTSS algorithm on non-empty DTTSSs
255  (*p)->run();
256  // load DTTSM with output DTTSS tracks
257  if((*p)->nTracks()>0){
258  for(int it=1;it<=(*p)->nTracks();it++){
259  //--- SM double TSM get the corresponding tsm data
260  int bkmod = config()->TsmStatus().element(0);
261  if (bkmod==0) { // we are in back-up mode
262  int my_itss = (*p)->number(); // metodo di DTTSS che ritorna itss
263  int ntsstsmd = config()->TSSinTSMD(station(),sector());
264  if(ntsstsmd<2 || ntsstsmd>DTConfigTSPhi::NTSSTSMD) {
265  std::cout << " DTTSPhi::addTracoT - wrong TSMD: " << ntsstsmd << std::endl;
266  }
267 
268  // Get the appropriate TSMD
269  itsmd = (my_itss -1 ) / ntsstsmd + 1;
270  if(config()->debug()){
271  std::cout << " DTTSPhi::addTracoT: itsmd = (my_itss -1 ) / ntsstsmd + 1 ---> my_itss = " <<
272  my_itss << " ntsstsmd = " << ntsstsmd << " itsmd = " << itsmd << std::endl;}
273  }
274  else if(bkmod==1) {
275  itsmd = 1; // initialize it to 1, default value if not in back up mode
276  }
277  if(itsmd>2) std::cout << "****** >DTTSPhi::RunTSPhi wrong itsmd = " << itsmd << std::endl;
278  DTTSM* tsm = getDTTSM(is,itsmd);
279  tsm->addCand((*p)->getTrack(it));
280  }
281  ntss++;
282  } // end loop on output DTTSS tracks
283  }
284  } // end loop on DTTSSs
285 
286 
287  // at least a DTTSS with signal. Run DTTSM
288 
289  std::vector<DTTSM*>::iterator p_tsm;
290 
291  for(p_tsm=_tsm[is-DTConfigTSPhi::NSTEPF].begin();
292  p_tsm<_tsm[is-DTConfigTSPhi::NSTEPF].end(); p_tsm++) {
293 
294  // Run TSM sorting if at least a first track
295 
296  i_tsmd = (*p_tsm)->number()-1; // returns itsmd (0 in default, 0 or 1 when bkmode )
297 
298  if((*p_tsm)->nCand(1)>0) {
299  int bkmod = config()->TsmStatus().element(0);
300 
301  (*p_tsm)->run(bkmod); // bkmod 1 normal, 0 backup
302  // Run TSM for current BX in case of 1st Tracks
303  // Run TSM for previous BX for second tracks, to check whether there is a pile up
304  // Tells whether a second track at previous BX exists
305 
306  if((*p_tsm)->nTracks()>0){
307  // We have a first track. Store it if code is > 0
308 
309  if((*p_tsm)->getTrack(1)->tracoTr()->code()>0) {
310 
311  DTTSCand* first = (*p_tsm)->getTrack(1);
312  if( config()->TsmGetCarryFlag()==0 ) { // get 1st tk at current BX and ignore any 2nd tk at previous BX
313 
314  _cache.push_back(DTChambPhSegm(ChamberId(),is,(*p_tsm)->getTrack(1)->tracoTr(),1));
315  ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd]++; // SM increment ntsm at current BX
316  if( config()->debug())
317  std::cout << "ntsm = " << ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd] << " is = " << is << " i_tsmd = " << i_tsmd << std::endl;
318  if((*p_tsm)->nTracks()>1) { // there is a 2nd tk
319  if((*p_tsm)->getTrack(2)->tracoTr()->code()>0) { // check if its code > 0
320  ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd]++;
321  if( config()->debug())
322  std::cout << "ntsm = " << ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd] << " is = " << is << " i_tsmd = " << i_tsmd << std::endl;
323 
324  secondPrevBx=(*p_tsm)->getTrack(2) ; // assign second tk of previous BX
325 
326  }
327  }
328  }
329  else if( config()->TsmGetCarryFlag()==1 ) { // compare with 2nd tk in previous BX and get the tk with better quality
330  existSecondPrevBx = ((is-1-DTConfigTSPhi::NSTEPF>=0) && ( ntsm[is-1-DTConfigTSPhi::NSTEPF][i_tsmd]>1) &&
331  (secondPrevBx->tracoTr()->code()>0));
332  if( (!existSecondPrevBx) ||
333  ! ( (secondPrevBx->isCorr() && secondPrevBx->isHtrig() && secondPrevBx->isInner()) ||
334  (secondPrevBx->isCorr() && secondPrevBx->isHtrig() && !secondPrevBx->isInner()) ||
335  (!secondPrevBx->isCorr() && secondPrevBx->isHtrig() && secondPrevBx->isInner()) ) ||
336 
337  ( (secondPrevBx->isCorr() && secondPrevBx->isHtrig() && secondPrevBx->isInner()) &&
338  (first->isCorr() && first->isHtrig() && first->isInner()) ) ||
339 
340  ( (secondPrevBx->isCorr() && secondPrevBx->isHtrig() && !secondPrevBx->isInner()) &&
341  ( (first->isCorr() && first->isHtrig() && first->isInner()) ||
342  (first->isCorr() && first->isHtrig() && !first->isInner()) ) ) ||
343 
344  ( (!secondPrevBx->isCorr() && secondPrevBx->isHtrig() && secondPrevBx->isInner()) &&
345  !( (!first->isCorr() && first->isHtrig() && !first->isInner()) ||
346  (!first->isCorr() && !first->isHtrig() && first->isInner()) ||
347  (!first->isCorr() && !first->isHtrig() && !first->isInner()) ||
348  (first->isCorr() && !first->isHtrig() && !first->isInner()) ||
349  (first->isCorr() && !first->isHtrig() && first->isInner()) ) )
350  ) {
351  // SM sector collector
352  ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd]++; // SM increment ntsm at current BX. I need to know if there is at least a first track from TSM to run Sect Coll
353 
354  _cache.push_back(DTChambPhSegm(ChamberId(),is,(*p_tsm)->getTrack(1)->tracoTr(),1));
355  // (*p_tsm)->getTrack(1)->print();
356 
357  if((*p_tsm)->nTracks()>1) { // there is a 2nd tk
358  ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd]++;
359  if((*p_tsm)->getTrack(2)->tracoTr()->code()>0) { // check if its code > 0
360  secondPrevBx=(*p_tsm)->getTrack(2) ; // assign second previous BX
361  }
362  }
363  }
364  else { // if 2nd tk prev BX is better than first present BX skip the event and get 2nd prev BX
365  ntsm[is-1-DTConfigTSPhi::NSTEPF][i_tsmd]++; // SM increment ntsm at previous BX.
366  _cache.push_back(DTChambPhSegm(ChamberId(),is-1,secondPrevBx->tracoTr(),2));
367  //secondPrevBx->print();
368  }
369  }
370 
371  else if( config()->TsmGetCarryFlag()==2 ) { // neglect first tk if it is a low uncorrelated trigger
372  existSecondPrevBx = ((is-1-DTConfigTSPhi::NSTEPF>=0) && (ntsm[is-1-DTConfigTSPhi::NSTEPF][i_tsmd] >1) && (secondPrevBx->tracoTr()->code()>0));
373  if( (!existSecondPrevBx) || first->isHtrig() || first->isCorr()) {
374  ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd]++; // SM increment ntsm at current BX.
375  // SM sector collector: Load DTSectColl with output of DTTSM
376  _cache.push_back(DTChambPhSegm(ChamberId(),is,(*p_tsm)->getTrack(1)->tracoTr(),1));
377  // (*p_tsm)->getTrack(1)->print();
378 
379  if((*p_tsm)->nTracks()>1) { // there is a 2nd tk
380  ntsm[is-DTConfigTSPhi::NSTEPF][i_tsmd]++;
381  if((*p_tsm)->getTrack(2)->tracoTr()->code()>0) { // check if its code > 0
382  secondPrevBx=(*p_tsm)->getTrack(2) ; // assign second tk of previous BX
383  }
384  }
385  }
386  else {
387  ntsm[is-1-DTConfigTSPhi::NSTEPF][i_tsmd]++; // SM increment ntsm at previous BX.
388  _cache.push_back(DTChambPhSegm(ChamberId(),is-1,secondPrevBx->tracoTr(),2));
389  // secondPrevBx->print();
390  }
391  }
392  }
393  }
394 
395 
396  }
397  else if ( ((*p_tsm)->nCand(1) == 0) && (is-1-DTConfigTSPhi::NSTEPF>=0) && ntsm[is-1-DTConfigTSPhi::NSTEPF][i_tsmd] > 0 ) {// it means that the last BX with sort 2 was not the previous one
398  existSecondPrevBx = ((is-1-DTConfigTSPhi::NSTEPF>=0) && (ntsm[is-1-DTConfigTSPhi::NSTEPF][i_tsmd]>1) && (secondPrevBx->tracoTr()->code()>0));
399  if(existSecondPrevBx) {
400  _cache.push_back(DTChambPhSegm(ChamberId(),is-1,secondPrevBx->tracoTr(),2));
401 
402  // secondPrevBx->print();
403  }
404  }
405  }
406  //---
407 
408  } // end loop on step
409  // debugging...
410  if(config()->debug()){
411  if(_cache.size()>0){
412  std::cout << "====================================================" << std::endl;
413  std::cout << " Phi segments " << std::endl;
414  std::vector<DTChambPhSegm>::const_iterator p;
415  for(p=_cache.begin();p<_cache.end();p++) {
416  p->print();
417 
418  }
419  std::cout << "====================================================" << std::endl;
420  }
421  }
422  // end debugging
423 
424 
425 }
426 
427 void
429 
430  int itsmd = 1; // initialize it to default
431 
432  if(step<DTConfigTSPhi::NSTEPF||step>DTConfigTSPhi::NSTEPL){
433  std::cout << "DTTSPhi::ignoreSecondTrack: step out of range: " << step;
434  std::cout << " no flag set!" << std::endl;
435  return;
436  }
437  int itss = (tracon-1 ) / DTConfigTSPhi::NTCTSS + 1;
438  if(itss<1 || itss>DTConfigTSPhi::NTSSTSM) {
439  std::cout << "DTTSPhi::ignoreSecondTrack: wrong TRACO number: " << tracon;
440  std::cout << " no flag set!" << std::endl;
441  return;
442  }
443  DTTSS* tss = getDTTSS(step,itss);
444  tss->ignoreSecondTrack();
445 
446  int bkmod = config()->TsmStatus().element(0);
447  if (bkmod==0) { // we are in back-up mode
448 
449  int ntsstsmd = config()->TSSinTSMD(station(),sector());
450  // Get the appropriate TSMD
451  itsmd = (itss -1 ) / ntsstsmd + 1;
452 
453  }
454 
455  DTTSM* tsm = getDTTSM(step,itsmd);
456  tsm->ignoreSecondTrack();
457 }
458 
459 DTTSS*
460 DTTSPhi::getDTTSS(int step, unsigned n) const {
461  if(step<DTConfigTSPhi::NSTEPF||step>DTConfigTSPhi::NSTEPL){
462  std::cout << "DTTSPhi::getDTTSS: step out of range: " << step;
463  std::cout << " empty pointer returned!" << std::endl;
464  return 0;
465  }
466  if(n<1 || n>_tss[step-DTConfigTSPhi::NSTEPF].size()){
467  std::cout << "DTTSPhi::getDTTSS: requested DTTSS not present: " << n;
468  std::cout << " (at step " << step << ")";
469  std::cout << " empty pointer returned!" << std::endl;
470  return 0;
471  }
472 
473  std::vector<DTTSS*>::const_iterator p = _tss[step-DTConfigTSPhi::NSTEPF].begin()+n-1;
474  return *p;
475 
476 
477 }
478 
479 
480 DTTSM*
481 DTTSPhi::getDTTSM(int step, unsigned n) const {
482  if(step<DTConfigTSPhi::NSTEPF||step>DTConfigTSPhi::NSTEPL){
483  std::cout << "DTTSPhi::getDTTSM: step out of range: " << step;
484  std::cout << " empty pointer returned!" << std::endl;
485  return 0;
486  }
487  if(n<1 || n>_tsm[step-DTConfigTSPhi::NSTEPF].size()){
488  std::cout << "DTTSPhi::getDTTSM: requested DTTSM not present: " << n;
489  std::cout << " (at step " << step << ")";
490  std::cout << " empty pointer returned!" << std::endl;
491  return 0;
492  }
493  std::vector<DTTSM*>::const_iterator p_tsm = _tsm[step-DTConfigTSPhi::NSTEPF].begin()+n-1;
494  return *p_tsm;
495 }
496 
497 
498 
499 int
501  int n=0;
502  std::vector<DTChambPhSegm>::const_iterator p; //p=0;
503  for(p=begin(); p<end(); p++) {
504  if(p->step()==step)n++;
505  }
506  return n;
507 }
508 
509 const DTChambPhSegm*
510 DTTSPhi::segment(int step, unsigned n) {
511  std::vector<DTChambPhSegm>::const_iterator p; //p=0;
512  for(p=begin();p<end();p++){
513  if(p->step()==step&&((n==1&&p->isFirst())||(n==2&&!p->isFirst())))
514  return &(*p);// p;
515  }
516  return 0;
517 }
518 
519 LocalPoint
521  //@@ patch for Sun 4.2 compiler
522  //sm DTChambPhSegm* trig = dynamic_cast<DTChambPhSegm*>(const_cast<DTTrigData*>(tr));
523  const DTChambPhSegm* trig = dynamic_cast<const DTChambPhSegm*>(tr);
524  if(!trig) {
525  std::cout << "DTTSPhi::LocalPosition called with wrong argument!" << std::endl;
526  return LocalPoint(0,0,0);
527  }
528  return _tracocard->localPosition(trig->tracoTrig());
529 }
530 
533  DTChambPhSegm* trig = dynamic_cast<DTChambPhSegm*>(const_cast<DTTrigData*>(tr));
534  // const DTChambPhSegm* trig = dynamic_cast<const DTChambPhSegm*>(tr);
535  if(!trig) {
536  std::cout << "DTTSPhi::LocalDirection called with wrong argument!" << std::endl;
537  return LocalVector(0,0,0);
538  }
539  return _tracocard->localDirection(trig->tracoTrig());
540 }
int i
Definition: DBlmapReader.cc:9
my_collection _cache
Definition: DTCache.h:56
void ignoreSecondTrack()
Set a flag to skip sort2.
Definition: DTTSS.h:53
Local3DVector LocalVector
Definition: LocalVector.h:12
int sector() const
Return sector number.
void print() const
print
int nSegm(int step)
Return number of DTTSPhi segments.
Definition: DTTSPhi.cc:500
std::vector< DTTSM * > _tsm[DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1]
Definition: DTTSPhi.h:119
int isHtrig() const
Return HTRIG/LTRIG bit.
Definition: DTTSCand.h:101
void runTSPhi()
run DTTSPhi algorithm (DTTSS+DTTSM)
Definition: DTTSPhi.cc:235
void loadTSPhi()
store DTTracoChip triggers in the DTTSS&#39;s
Definition: DTTSPhi.cc:150
void addDTTSCand(DTTSCand *cand)
Add a TS candidate to the TSS, ifs is first/second track flag.
Definition: DTTSS.cc:290
static const int NSTEPF
Definition: DTConfig.h:36
int tracoNumber() const
Return parent TRACO number.
LocalPoint localPosition(const DTTrigData *) const
Local position in chamber of a trigger-data object.
Definition: DTTSPhi.cc:520
static const int NTSSTSM
Constant: maximum number of TSS in input to the TSM.
Definition: DTConfigTSPhi.h:42
~DTTSPhi()
Destructor.
Definition: DTTSPhi.cc:75
int station() const
Return station number.
const DTConfigTSPhi * config() const
Return the configuration class.
Definition: DTTSPhi.h:64
static const int NTCTSS
Constant: number of TRACOs in input to a TSS.
Definition: DTConfig.h:41
Definition: DTTSM.h:38
DTTSS * getDTTSS(int step, unsigned n) const
Definition: DTTSPhi.cc:460
int wheel() const
Return wheel number.
void ignoreSecondTrack(int step, int tracon)
Set a flag to ignore second tracks (if first track at following BX)
Definition: DTTSPhi.cc:428
bool debug() const
Return the debug flag.
Definition: DTConfigTSPhi.h:63
std::vector< DTTSCand * > _tctrig[DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1]
Definition: DTTSPhi.h:122
static const int NTSMD
Constant: number of TSMD.
Definition: DTConfigTSPhi.h:45
const DTChambPhSegm * segment(int step, unsigned n)
Return the requested DTTSPhi segment.
Definition: DTTSPhi.cc:510
int TsmGetCarryFlag() const
Handling of second track (carry) in case of pile-up, in TSM.
DTChamberId ChamberId() const
Identifier of the associated chamber.
int TSSinTSMD(int stat, int sect) const
Return the max nb. of TSSs in input to a single TSMD (called ONLY in back-up mode) ...
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
bool first
Definition: L1TdeRCT.cc:75
LocalPoint localPosition(const DTTrigData *) const
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTTracoCard.cc:376
const DTConfigTSPhi * _config
Definition: DTTSPhi.h:114
tuple conf
Definition: dbtoconf.py:185
int pvCode() const
Return the preview code.
DTTracoCard * _tracocard
Definition: DTTSPhi.h:112
#define debug
Definition: HDRShower.cc:19
void ignoreSecondTrack()
Set a flag to skip sort2.
Definition: DTTSM.h:59
const DTTracoTrigData * tracoTr() const
Return associated TRACO trigger.
Definition: DTTSCand.h:83
int element(const int pos) const
Definition: BitArray.h:210
DTTSPhi(DTTrigGeom *, DTTracoCard *)
Constructor.
Definition: DTTSPhi.cc:44
Definition: DTTSS.h:36
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
int isInner() const
Return Inner/Outer bit.
Definition: DTTSCand.h:104
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTSPhi.cc:127
void localClear()
Clear.
Definition: DTTSPhi.cc:105
int code() const
Return trigger code.
double p1[4]
Definition: TauolaWrapper.h:89
int number() const
Return identifier.
Definition: DTTSS.h:68
void addTracoT(int step, const DTTracoTrigData *tracotrig, int ifs)
Add a DTTracoChip trigger to the DTTSPhi, ifs is track number (first or second)
Definition: DTTSPhi.cc:181
static const int NTSSTSMD
Constant: maximum number of TSS in input to a single TSMD.
Definition: DTConfigTSPhi.h:48
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
std::vector< DTTSS * > _tss[DTConfigTSPhi::NSTEPL-DTConfigTSPhi::NSTEPF+1]
Definition: DTTSPhi.h:117
BitArray< 8 > TsmStatus() const
TSM status.
const DTTracoTrigData * tracoTrig() const
Return associated TRACO trigger.
Definition: DTChambPhSegm.h:75
const DTConfigTSPhi * getDTConfigTSPhi(DTChamberId) const
Get desired Trigger Server Phi configuration.
tuple cout
Definition: gather_cfg.py:121
void addCand(DTTSCand *cand)
Add a TSS candidate to the TSM, ifs is first/second track flag.
Definition: DTTSM.cc:276
LocalVector localDirection(const DTTrigData *) const
Local direction in chamber of a trigger-data object.
Definition: DTTSPhi.cc:532
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
bool usedTraco(int i) const
Enabled TRACOs in TS.
LocalVector localDirection(const DTTrigData *) const
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTTracoCard.cc:429
int isCorr() const
Return correlation bit.
Definition: DTTSCand.h:107
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:46
DTTSM * getDTTSM(int step, unsigned n) const
Definition: DTTSPhi.cc:481