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