CMS 3D CMS Logo

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