CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTSectColl Class Reference

#include <DTSectColl.h>

Inheritance diagram for DTSectColl:
DTCache< T, Coll > DTCache< T, Coll >

Public Member Functions

void addTSPhi (int step, const DTChambPhSegm *tsmsegm, int ifs, int istat)
 Add a TSM candidate (step is TSM step not SC one) More...
 
void addTSTheta (int step, const DTChambThSegm *tsmsegm, int istat)
 Add a TS Theta candidate (step is TSTheta step not sc one) More...
 
void addTU (DTSCTrigUnit *tru)
 Add a Trigger Unit to the Sector Collector. More...
 
std::vector< DTSectCollPhSegm >::const_iterator beginPh () const
 Return iterator to the beghin of Phi cache. More...
 
std::vector< DTSectCollThSegm >::const_iterator beginTh () const
 Return iterator to the begni of Theta cache. More...
 
void clearCache ()
 Local position in chamber of a trigger-data object. More...
 
const DTConfigSectCollconfig () const
 Configuration. More...
 
 DTSectColl (DTSectCollId id)
 Constructor. More...
 
std::vector< DTSectCollPhSegm >::const_iterator endPh () const
 Return iterator to the end of Phi cache. More...
 
std::vector< DTSectCollThSegm >::const_iterator endTh () const
 Return iterator to the end of Theta cache. More...
 
DTSCgetDTSC (int step, int istat) const
 Get a Sector Collector (step is TS one) More...
 
DTSectCollPhCandgetDTSectCollPhCand (int ifs, unsigned n) const
 Get a Phi Candidate for Sector Collector. More...
 
DTSectCollThCandgetDTSectCollThCand (unsigned n) const
 Get a Candidate for Sector Collector. More...
 
DTSectCollPhCandgetTrackPh (int n) const
 Return the requested Phi track. More...
 
DTSectCollThCandgetTrackTh (int n) const
 Return the requested Theta track. More...
 
DTTSPhigetTSPhi (int istat) const
 Return TSPhi. More...
 
DTTSThetagetTSTheta (int istat) const
 Return TSTheta. More...
 
void loadSectColl ()
 Load a Sector Collector. More...
 
void localClear ()
 Local Clear. More...
 
unsigned nCandPh (int ifs) const
 Return the number of Phi input tracks (first/second) More...
 
unsigned nCandTh () const
 Return the number of Theta input tracks. More...
 
int nSegmPh (int step)
 Return number of DTSectCollPhi segments (SC step) More...
 
int nSegmTh (int step)
 Return number of DTSectCollTheta segments (SC step) More...
 
int nTracksPh () const
 Return the number of output Phi tracks. More...
 
int nTracksTh () const
 Return the number of output Theta tracks. More...
 
void reconstruct () override
 Load Trigger Units triggers and run Sector Collector algorithm. More...
 
void runSectColl ()
 Run Sector Collector. More...
 
DTSectCollId SectCollId ()
 Return the Sector Collector Id. More...
 
const DTSectCollPhSegmSectCollPhSegment (int step, unsigned n)
 Return requested Sector Collector Phi Segment 1st/2nd. More...
 
const DTSectCollThSegmSectCollThSegment (int step)
 Return requested Sector Collector Theta Segment. More...
 
void setConfig (const DTConfigManager *conf)
 Set configuration. More...
 
int sizePh () const
 Return Phi cache size. More...
 
int sizeTh () const
 Return Theta cache size. More...
 
 ~DTSectColl () override
 Destructor. More...
 
- Public Member Functions inherited from DTCache< T, Coll >
const_iterator begin () const
 Get first cache element. More...
 
void clearCache ()
 Clear cache vector. More...
 
 DTCache ()
 Constructor. More...
 
const_iterator end () const
 Get last cache element. More...
 
int size () const
 Get cache vector's size. More...
 
virtual ~DTCache ()
 Destructor. More...
 

Private Attributes

const DTConfigSectColl_config
 
std::vector< DTSectCollPhCand * > _incand_ph [2]
 
std::vector< DTSectCollThCand * > _incand_th
 
std::vector< DTSectCollPhCand * > _outcand_ph
 
std::vector< DTSectCollThCand * > _outcand_th
 
DTSectCollId _sectcollid
 
DTSC_tsc [DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
 
DTTSPhi_tsphi [DTConfigSectColl::NTSPSC]
 
DTTSTheta_tstheta [DTConfigSectColl::NTSTSC]
 

Additional Inherited Members

- Public Types inherited from DTCache< T, Coll >
typedef my_collection::const_iterator const_iterator
 
typedef my_collection::iterator iterator
 
typedef Coll my_collection
 
typedef T my_type
 
- Protected Attributes inherited from DTCache< T, Coll >
my_collection _cache
 

Detailed Description

Definition at line 56 of file DTSectColl.h.

Constructor & Destructor Documentation

◆ DTSectColl()

DTSectColl::DTSectColl ( DTSectCollId  id)

Constructor.

Definition at line 47 of file DTSectColl.cc.

47  : _sectcollid(id) {
48  //_config = _conf_manager->getDTConfigSectColl(_sectcollid);
49 
50  // create SC Chips
51  for (int istat = 0; istat < 4; istat++) {
52  for (int istep = 0; istep < DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF + 1; istep++) {
53  _tsc[istep][istat] = new DTSC(istat + 1);
54  }
55  }
56  for (int istat = 0; istat < 5; istat++)
57  _tsphi[istat] = nullptr;
58  for (int istat = 0; istat < 3; istat++)
59  _tstheta[istat] = nullptr;
60 }

References _tsc, _tsphi, _tstheta, DTConfig::NSTEPF, and DTConfig::NSTEPL.

◆ ~DTSectColl()

DTSectColl::~DTSectColl ( )
override

Destructor.

Definition at line 65 of file DTSectColl.cc.

65  {
66  localClear();
67 
68  for (int istat = 0; istat < 4; istat++) {
69  for (int istep = 0; istep < DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF + 1; istep++) {
70  delete _tsc[istep][istat];
71  }
72  }
73 }

References _tsc, localClear(), DTConfig::NSTEPF, and DTConfig::NSTEPL.

Member Function Documentation

◆ addTSPhi()

void DTSectColl::addTSPhi ( int  step,
const DTChambPhSegm tsmsegm,
int  ifs,
int  istat 
)

Add a TSM candidate (step is TSM step not SC one)

Definition at line 209 of file DTSectColl.cc.

209  {
211  std::cout << "DTSectColl::addTSPhi: step out of range: " << step;
212  std::cout << " trigger not added!" << std::endl;
213  return;
214  }
215 
216  if (istat < 1 || istat > 4) {
217  std::cout << "DTSectColl::addTSPhi: station out of SC range: " << istat;
218  std::cout << " trigger not added!" << std::endl;
219  return;
220  }
221 
222  // Check that a trigger is present, by its code
223  if (tsmsegm->oldCode() == 0) {
224  std::cout << "DTSectColl::addTSPhi --> code = 0 ! ";
225  std::cout << " trigger not added!" << std::endl;
226  return;
227  }
228 
229  DTSC* tsc = getDTSC(step, istat);
230 
231  DTSectCollPhCand* cand = new DTSectCollPhCand(tsc, tsmsegm, ifs);
232 
233  bool fs = (ifs == 1);
234  _incand_ph[fs].push_back(cand);
235 
237 
238  // Debugging...
239  if (config()->debug()) {
240  std::cout << "DTSectColl::addTSPhi at step " << step;
241  std::cout << " in SC station " << istat;
242  if (ifs == 1) {
243  std::cout << " (first track)" << std::endl;
244  } else {
245  std::cout << " (second track)" << std::endl;
246  }
247  }
248 }

References _incand_ph, DTSC::addDTSectCollPhCand(), config(), gather_cfg::cout, debug, getDTSC(), DTConfig::NSTEPL, and DTChambPhSegm::oldCode().

Referenced by loadSectColl().

◆ addTSTheta()

void DTSectColl::addTSTheta ( int  step,
const DTChambThSegm tsmsegm,
int  istat 
)

Add a TS Theta candidate (step is TSTheta step not sc one)

Definition at line 250 of file DTSectColl.cc.

250  {
252  std::cout << "DTSectColl::addTSTheta: step out of range: " << step;
253  std::cout << " trigger not added!" << std::endl;
254  return;
255  }
256 
257  if (istat < 1 || istat > 5) {
258  std::cout << "DTSectColl::addTSTheta: station out of SC range: " << istat;
259  std::cout << " trigger not added!" << std::endl;
260  return;
261  }
262 
263  // Check if a trigger is present in theta
264  bool is_empty = false;
265  for (int i = 0; i < 7; i++)
266  if (tstsegm->position(i) == 1) {
267  is_empty = false;
268  break;
269  }
270  if (is_empty == true) {
271  std::cout << "DTSectColl::addTSTheta --> no position bit equal to 1 ! ";
272  std::cout << " trigger not added!" << std::endl;
273  return;
274  }
275 
276  DTSC* tsc = getDTSC(step, istat);
277 
278  DTSectCollThCand* cand = new DTSectCollThCand(tsc, tstsegm);
279 
280  _incand_th.push_back(cand);
281 
282  tsc->addThCand(cand);
283 
284  // Debugging...
285  if (config()->debug()) {
286  std::cout << "DTSectColl::addTSTheta at step " << step << std::endl;
287  }
288 }

References _incand_th, DTSC::addThCand(), config(), gather_cfg::cout, debug, getDTSC(), mps_fire::i, utils::is_empty(), DTConfig::NSTEPL, and DTChambThSegm::position().

Referenced by loadSectColl().

◆ addTU()

void DTSectColl::addTU ( DTSCTrigUnit tru)

Add a Trigger Unit to the Sector Collector.

Definition at line 116 of file DTSectColl.cc.

116  {
117  int stat = tru->station();
118  int sect = tru->sector();
119  switch (sect) {
120  case 13:
121  stat = 5;
122  sect = 4;
123  break;
124  case 14:
125  stat = 5;
126  sect = 10;
127  break;
128  }
129 
130  if (_sectcollid != DTSectCollId() && _sectcollid != DTSectCollId(tru->wheel(), sect)) {
131  std::cout << "DTSectColl::addTU: Trying to add tru " << tru << " into SectColl " << _sectcollid
132  << " Skipping insertion" << std::endl;
133  return;
134  }
135 
136  if (stat < 1 || stat > 5) {
137  std::cout << "DTSectColl::addTU: Wrong station number Skipping insertion" << std::endl;
138  return;
139  }
140 
141  _tsphi[stat - 1] = tru->TSPhTrigs();
142  if (stat < 4)
143  _tstheta[stat - 1] = tru->TSThTrigs();
144 
145  if (_sectcollid == DTSectCollId())
146  _sectcollid = DTSectCollId(tru->wheel(), sect);
147 
148  // add a Trigger Unit to the Sector Collector
149  // if(flag==2) {
150  // _tsphi1 = tru->TSPhTrigs(); // these are the "normal" stations
151  // _tsphi2 = 0;
152  // _tstheta = tru->TSThTrigs();
153  // }
154  // else if (flag==0){
155  // _tsphi1 = tru->TSPhTrigs();
156  // _tstheta = 0;
157  // }
158  // else if(flag==1) {
159  // _tsphi2 = tru->TSPhTrigs(); // these are the "double" stations
160  // _tstheta = 0;
161  // }
162  // // generates SectColl Id from tsphi Id
163  // if (flag==2 || flag==0){
164  // int sect = tru->sector();
165  // if (sect == 13) sect=4;
166  // if (sect == 14) sect=10;
167  // _sectcollid=DTSectCollId(tru->wheel(),tru->station(),sect);
168  // }
169 }

References _sectcollid, _tsphi, _tstheta, gather_cfg::cout, DTSCTrigUnit::sector(), edm_modernize_messagelogger::stat, DTSCTrigUnit::station(), DTSCTrigUnit::TSPhTrigs(), DTSCTrigUnit::TSThTrigs(), and DTSCTrigUnit::wheel().

◆ beginPh()

std::vector<DTSectCollPhSegm>::const_iterator DTSectColl::beginPh ( ) const
inline

Return iterator to the beghin of Phi cache.

Definition at line 148 of file DTSectColl.h.

148 { return DTSCPhCache::_cache.begin(); }

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCPhTrigs().

◆ beginTh()

std::vector<DTSectCollThSegm>::const_iterator DTSectColl::beginTh ( ) const
inline

Return iterator to the begni of Theta cache.

Definition at line 157 of file DTSectColl.h.

157 { return DTSCThCache::_cache.begin(); }

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCThTrigs().

◆ clearCache()

void DTSectColl::clearCache ( )
inline

Local position in chamber of a trigger-data object.

Local direction in chamber of a trigger-data object Clear both (Phi and Theta) caches

Definition at line 172 of file DTSectColl.h.

172  {
175  }

References DTCache< T, Coll >::clearCache().

Referenced by DTTrig::triggerReco().

◆ config()

const DTConfigSectColl* DTSectColl::config ( void  ) const
inline

Configuration.

Definition at line 75 of file DTSectColl.h.

75 { return _config; }

References _config.

Referenced by addTSPhi(), addTSTheta(), runSectColl(), and setConfig().

◆ endPh()

std::vector<DTSectCollPhSegm>::const_iterator DTSectColl::endPh ( ) const
inline

Return iterator to the end of Phi cache.

Definition at line 154 of file DTSectColl.h.

154 { return DTSCPhCache::_cache.end(); }

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCPhTrigs().

◆ endTh()

std::vector<DTSectCollThSegm>::const_iterator DTSectColl::endTh ( ) const
inline

Return iterator to the end of Theta cache.

Definition at line 163 of file DTSectColl.h.

163 { return DTSCThCache::_cache.end(); }

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCThTrigs().

◆ getDTSC()

DTSC * DTSectColl::getDTSC ( int  step,
int  istat 
) const

Get a Sector Collector (step is TS one)

Definition at line 290 of file DTSectColl.cc.

290  {
292  std::cout << "DTSectColl::getDTSC: step out of range: " << step;
293  std::cout << " empty pointer returned!" << std::endl;
294  return nullptr;
295  }
296 
297  if (istat < 1 || istat > 4) {
298  std::cout << "DTSectColl::getDTSC: station out of SC range: " << istat;
299  std::cout << " emty pointer returned!" << std::endl;
300  return nullptr;
301  }
302 
303  return _tsc[step - DTConfigSectColl::NSTEPF][istat - 1];
304 }

References _tsc, gather_cfg::cout, DTConfig::NSTEPF, and DTConfig::NSTEPL.

Referenced by addTSPhi(), and addTSTheta().

◆ getDTSectCollPhCand()

DTSectCollPhCand * DTSectColl::getDTSectCollPhCand ( int  ifs,
unsigned  n 
) const

Get a Phi Candidate for Sector Collector.

Definition at line 358 of file DTSectColl.cc.

358  {
359  if (ifs < 1 || ifs > 2) {
360  std::cout << "DTSectColl::getDTSectCollPhCand: wrong track number: " << ifs;
361  std::cout << " empty pointer returned!" << std::endl;
362  return nullptr;
363  }
364  if (n < 1 || n > nCandPh(ifs)) {
365  std::cout << "DTSectColl::getDTSectCollPhCand: requested trigger not present: " << n;
366  std::cout << " empty pointer returned!" << std::endl;
367  return nullptr;
368  }
369 
370  std::vector<DTSectCollPhCand*>::const_iterator p = _incand_ph[ifs - 1].begin() + n - 1;
371  return (*p);
372 }

References _incand_ph, gather_cfg::cout, dqmiodumpmetadata::n, nCandPh(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getDTSectCollThCand()

DTSectCollThCand * DTSectColl::getDTSectCollThCand ( unsigned  n) const

Get a Candidate for Sector Collector.

Definition at line 374 of file DTSectColl.cc.

374  {
375  if (n < 1 || n > nCandTh()) {
376  std::cout << "DTSectColl::getDTSectCollThCand: requested trigger not present: " << n;
377  std::cout << " empty pointer returned!" << std::endl;
378  return nullptr;
379  }
380 
381  std::vector<DTSectCollThCand*>::const_iterator p = _incand_th.begin() + n - 1;
382  return (*p);
383 }

References _incand_th, gather_cfg::cout, dqmiodumpmetadata::n, nCandTh(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getTrackPh()

DTSectCollPhCand * DTSectColl::getTrackPh ( int  n) const

Return the requested Phi track.

Definition at line 385 of file DTSectColl.cc.

385  {
386  if (n < 1 || n > nTracksPh()) {
387  std::cout << "DTSectColl::getTrackPh: requested track not present: " << n;
388  std::cout << " empty pointer returned!" << std::endl;
389  return nullptr;
390  }
391 
392  std::vector<DTSectCollPhCand*>::const_iterator p = _outcand_ph.begin() + n - 1;
393  return (*p);
394 }

References _outcand_ph, gather_cfg::cout, dqmiodumpmetadata::n, nTracksPh(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getTrackTh()

DTSectCollThCand * DTSectColl::getTrackTh ( int  n) const

Return the requested Theta track.

Definition at line 396 of file DTSectColl.cc.

396  {
397  if (n < 1 || n > nTracksTh()) {
398  std::cout << "DTSectColl::getTrackTh: requested track not present: " << n;
399  std::cout << " empty pointer returned!" << std::endl;
400  return nullptr;
401  }
402 
403  std::vector<DTSectCollThCand*>::const_iterator p = _outcand_th.begin() + n - 1;
404  return (*p);
405 }

References _outcand_th, gather_cfg::cout, dqmiodumpmetadata::n, nTracksTh(), and AlCaHLTBitMon_ParallelJobs::p.

◆ getTSPhi()

DTTSPhi* DTSectColl::getTSPhi ( int  istat) const
inline

Return TSPhi.

Definition at line 69 of file DTSectColl.h.

69 { return _tsphi[istat - 1]; }

References _tsphi.

Referenced by DTTrig::triggerReco().

◆ getTSTheta()

DTTSTheta* DTSectColl::getTSTheta ( int  istat) const
inline

Return TSTheta.

Definition at line 72 of file DTSectColl.h.

72 { return _tstheta[istat - 1]; }

References _tstheta.

Referenced by DTTrig::triggerReco().

◆ loadSectColl()

void DTSectColl::loadSectColl ( )

Load a Sector Collector.

Definition at line 171 of file DTSectColl.cc.

171  {
172  localClear();
173 
174  std::vector<DTChambPhSegm>::const_iterator p;
175  std::vector<DTChambPhSegm>::const_iterator pend;
176 
177  for (int istat = 1; istat < 5; istat++) {
178  pend = _tsphi[istat - 1]->end();
179  for (p = _tsphi[istat - 1]->begin(); p != pend; p++) {
180  int step = p->step();
181  int fs = (p->isFirst()) ? 1 : 2;
182  // load trigger
183  addTSPhi(step, &(*p), fs, istat);
184  }
185  }
186 
187  if (!(_tsphi[4] == nullptr)) { // only for double stations
188  pend = _tsphi[4]->end();
189  for (p = _tsphi[4]->begin(); p != pend; p++) {
190  int step = p->step();
191  int fs = (p->isFirst()) ? 1 : 2;
192  // load trigger
193  addTSPhi(step, &(*p), fs, 4);
194  }
195  }
196  std::vector<DTChambThSegm>::const_iterator pth;
197  std::vector<DTChambThSegm>::const_iterator pthend;
198 
199  for (int istat = 1; istat < 4; istat++) {
200  pthend = _tstheta[istat - 1]->end();
201  for (pth = _tstheta[istat - 1]->begin(); pth != pthend; pth++) {
202  int step = pth->step();
203  // load trigger
204  addTSTheta(step, &(*pth), istat);
205  }
206  }
207 }

References _tsphi, _tstheta, addTSPhi(), addTSTheta(), DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), localClear(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by reconstruct().

◆ localClear()

void DTSectColl::localClear ( )

Local Clear.

Definition at line 79 of file DTSectColl.cc.

79  {
80  // clear all sector collectors
81  for (int istat = 0; istat < 4; istat++) {
82  for (int istep = 0; istep < DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF + 1; istep++) {
83  _tsc[istep][istat]->clear();
84  }
85  }
86 
87  for (int iph = 0; iph < 2; ++iph) {
88  std::vector<DTSectCollPhCand*>::const_iterator phbi = _incand_ph[iph].begin();
89  std::vector<DTSectCollPhCand*>::const_iterator phei = _incand_ph[iph].end();
90  for (std::vector<DTSectCollPhCand*>::const_iterator iphit = phbi; iphit != phei; ++iphit)
91  delete (*iphit);
92  _incand_ph[iph].clear();
93  }
94 
95  _outcand_ph.clear();
96 
97  std::vector<DTSectCollThCand*>::const_iterator thb = _incand_th.begin();
98  std::vector<DTSectCollThCand*>::const_iterator the = _incand_th.end();
99  for (std::vector<DTSectCollThCand*>::const_iterator ithit = thb; ithit != the; ++ithit)
100  delete (*ithit);
101  _incand_th.clear();
102 
103  _outcand_th.clear();
104 }

References _incand_ph, _incand_th, _outcand_ph, _outcand_th, _tsc, DTSC::clear(), DTConfig::NSTEPF, and DTConfig::NSTEPL.

Referenced by loadSectColl(), and ~DTSectColl().

◆ nCandPh()

unsigned DTSectColl::nCandPh ( int  ifs) const

Return the number of Phi input tracks (first/second)

Definition at line 407 of file DTSectColl.cc.

407  {
408  if (ifs < 1 || ifs > 2) {
409  std::cout << "DTSectColl::nCandPh: wrong track number: " << ifs;
410  std::cout << " 0 returned!" << std::endl;
411  return 0;
412  }
413 
414  return _incand_ph[ifs - 1].size();
415 }

References _incand_ph, and gather_cfg::cout.

Referenced by getDTSectCollPhCand().

◆ nCandTh()

unsigned DTSectColl::nCandTh ( ) const

Return the number of Theta input tracks.

Definition at line 417 of file DTSectColl.cc.

417 { return _incand_th.size(); }

References _incand_th.

Referenced by getDTSectCollThCand(), and runSectColl().

◆ nSegmPh()

int DTSectColl::nSegmPh ( int  step)

Return number of DTSectCollPhi segments (SC step)

Definition at line 419 of file DTSectColl.cc.

419  {
420  int n = 0;
421  std::vector<DTSectCollPhSegm>::const_iterator p;
422  std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end();
423  for (p = DTSCPhCache::begin(); p < endp; p++) {
424  if (p->step() == step)
425  n++;
426  }
427 
428  return n;
429 }

References DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), dqmiodumpmetadata::n, and AlCaHLTBitMon_ParallelJobs::p.

◆ nSegmTh()

int DTSectColl::nSegmTh ( int  step)

Return number of DTSectCollTheta segments (SC step)

Definition at line 431 of file DTSectColl.cc.

431  {
432  int n = 0;
433  std::vector<DTSectCollThSegm>::const_iterator p;
434  std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end();
435  for (p = DTSCThCache::begin(); p > endp; p++) {
436  if (p->step() == step)
437  n++;
438  }
439 
440  return n;
441 }

References DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), dqmiodumpmetadata::n, and AlCaHLTBitMon_ParallelJobs::p.

◆ nTracksPh()

int DTSectColl::nTracksPh ( ) const
inline

Return the number of output Phi tracks.

Definition at line 136 of file DTSectColl.h.

136 { return _outcand_ph.size(); }

References _outcand_ph.

Referenced by getTrackPh(), and runSectColl().

◆ nTracksTh()

int DTSectColl::nTracksTh ( ) const
inline

Return the number of output Theta tracks.

Definition at line 139 of file DTSectColl.h.

139 { return _outcand_th.size(); }

References _outcand_th.

Referenced by getTrackTh(), and runSectColl().

◆ reconstruct()

void DTSectColl::reconstruct ( )
inlineoverridevirtual

Load Trigger Units triggers and run Sector Collector algorithm.

Reimplemented from DTCache< T, Coll >.

Definition at line 178 of file DTSectColl.h.

178  {
179  loadSectColl();
180  runSectColl();
181  }

References loadSectColl(), and runSectColl().

Referenced by DTTrig::triggerReco().

◆ runSectColl()

void DTSectColl::runSectColl ( )

Run Sector Collector.

Definition at line 306 of file DTSectColl.cc.

306  {
307  for (int istat = 0; istat < 4; istat++) {
308  for (int istep = DTConfigSectColl::NSTEPF; istep < DTConfigSectColl::NSTEPL + 1; istep++) {
309  if (_tsc[istep - DTConfigSectColl::NSTEPF][istat]->nFirstTPh() > 0 ||
310  _tsc[istep - DTConfigSectColl::NSTEPF][istat]->nCandTh() > 0) {
311  _tsc[istep - DTConfigSectColl::NSTEPF][istat]->run();
312 
313  if (_tsc[istep - DTConfigSectColl::NSTEPF][istat]->nTracksPh() > 0) {
315  DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(), istep + cand->CoarseSync(), cand->tsTr(), 1));
316  _outcand_ph.push_back(cand);
317 
318  if (_tsc[istep - DTConfigSectColl::NSTEPF][istat]->nTracksPh() > 1) {
320  DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(), istep + cand->CoarseSync(), cand->tsTr(), 2));
321  _outcand_ph.push_back(cand);
322  }
323  }
324  if (_tsc[istep - DTConfigSectColl::NSTEPF][istat]->nTracksTh() > 0) {
326  DTSCThCache::_cache.push_back(DTSectCollThSegm(SectCollId(), istep + cand->CoarseSync(), cand->tsTr()));
327  _outcand_th.push_back(cand); // CB getTrackTh non dovrebbe prendere argomenti modificala!
328  }
329  }
330  }
331  }
332 
333  // debugging...
334  if (config()->debug()) {
336  std::cout << "====================================================" << std::endl;
337  std::cout << " Sect Coll segments " << std::endl;
338  if (!DTSCPhCache::_cache.empty()) {
339  std::cout << " ***Phi Segments*** " << std::endl;
340  std::vector<DTSectCollPhSegm>::const_iterator pph;
341  for (pph = DTSCPhCache::_cache.begin(); pph < DTSCPhCache::_cache.end(); pph++) {
342  pph->print();
343  }
344  }
345  if (!DTSCThCache::_cache.empty()) {
346  std::cout << " **Theta Segments** " << std::endl;
347  std::vector<DTSectCollThSegm>::const_iterator pth;
348  for (pth = DTSCThCache::_cache.begin(); pth < DTSCThCache::_cache.end(); pth++) {
349  pth->print();
350  }
351  }
352  std::cout << "====================================================" << std::endl;
353  }
354  }
355  // end debugging
356 }

References DTCache< T, Coll >::_cache, _outcand_ph, _outcand_th, _tsc, DTCache< T, Coll >::begin(), config(), gather_cfg::cout, debug, relativeConstraints::empty, DTSC::getTrackPh(), DTSC::getTrackTh(), nCandTh(), DTConfig::NSTEPF, DTConfig::NSTEPL, nTracksPh(), nTracksTh(), DTSC::run(), and SectCollId().

Referenced by reconstruct().

◆ SectCollId()

DTSectCollId DTSectColl::SectCollId ( )
inline

Return the Sector Collector Id.

Definition at line 184 of file DTSectColl.h.

184 { return _sectcollid; }

References _sectcollid.

Referenced by runSectColl().

◆ SectCollPhSegment()

const DTSectCollPhSegm * DTSectColl::SectCollPhSegment ( int  step,
unsigned  n 
)

Return requested Sector Collector Phi Segment 1st/2nd.

Definition at line 443 of file DTSectColl.cc.

443  {
444  std::vector<DTSectCollPhSegm>::const_iterator p;
445  std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end();
446  for (p = DTSCPhCache::begin(); p < endp; p++) {
447  if (p->step() == step && ((n == 1 && p->isFirst()) || (n == 2 && !p->isFirst())))
448  return &(*p);
449  }
450 
451  return nullptr;
452 }

References DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), dqmiodumpmetadata::n, and AlCaHLTBitMon_ParallelJobs::p.

◆ SectCollThSegment()

const DTSectCollThSegm * DTSectColl::SectCollThSegment ( int  step)

Return requested Sector Collector Theta Segment.

Definition at line 454 of file DTSectColl.cc.

454  {
455  std::vector<DTSectCollThSegm>::const_iterator p;
456  std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end();
457  for (p = DTSCThCache::begin(); p < endp; p++) {
458  if (p->step() == step)
459  return &(*p);
460  }
461 
462  return nullptr;
463 }

References DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), and AlCaHLTBitMon_ParallelJobs::p.

◆ setConfig()

void DTSectColl::setConfig ( const DTConfigManager conf)

Set configuration.

Definition at line 106 of file DTSectColl.cc.

106  {
108 
109  for (int istat = 0; istat < 4; istat++) {
110  for (int istep = 0; istep < DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF + 1; istep++) {
111  _tsc[istep][istat]->setConfig(config());
112  }
113  }
114 }

References _config, _sectcollid, _tsc, config(), DTConfigManager::getDTConfigSectColl(), DTConfig::NSTEPF, DTConfig::NSTEPL, and DTSC::setConfig().

◆ sizePh()

int DTSectColl::sizePh ( ) const
inline

Return Phi cache size.

Definition at line 151 of file DTSectColl.h.

151 { return DTSCPhCache::_cache.size(); }

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::triggerReco().

◆ sizeTh()

int DTSectColl::sizeTh ( ) const
inline

Return Theta cache size.

Definition at line 160 of file DTSectColl.h.

160 { return DTSCThCache::_cache.size(); }

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::triggerReco().

Member Data Documentation

◆ _config

const DTConfigSectColl* DTSectColl::_config
private

Definition at line 188 of file DTSectColl.h.

Referenced by config(), and setConfig().

◆ _incand_ph

std::vector<DTSectCollPhCand*> DTSectColl::_incand_ph[2]
private

Definition at line 200 of file DTSectColl.h.

Referenced by addTSPhi(), getDTSectCollPhCand(), localClear(), and nCandPh().

◆ _incand_th

std::vector<DTSectCollThCand*> DTSectColl::_incand_th
private

Definition at line 206 of file DTSectColl.h.

Referenced by addTSTheta(), getDTSectCollThCand(), localClear(), and nCandTh().

◆ _outcand_ph

std::vector<DTSectCollPhCand*> DTSectColl::_outcand_ph
private

Definition at line 203 of file DTSectColl.h.

Referenced by getTrackPh(), localClear(), nTracksPh(), and runSectColl().

◆ _outcand_th

std::vector<DTSectCollThCand*> DTSectColl::_outcand_th
private

Definition at line 209 of file DTSectColl.h.

Referenced by getTrackTh(), localClear(), nTracksTh(), and runSectColl().

◆ _sectcollid

DTSectCollId DTSectColl::_sectcollid
private

Definition at line 191 of file DTSectColl.h.

Referenced by addTU(), SectCollId(), and setConfig().

◆ _tsc

Definition at line 197 of file DTSectColl.h.

Referenced by DTSectColl(), getDTSC(), localClear(), runSectColl(), setConfig(), and ~DTSectColl().

◆ _tsphi

DTTSPhi* DTSectColl::_tsphi[DTConfigSectColl::NTSPSC]
private

Definition at line 193 of file DTSectColl.h.

Referenced by addTU(), DTSectColl(), getTSPhi(), and loadSectColl().

◆ _tstheta

DTTSTheta* DTSectColl::_tstheta[DTConfigSectColl::NTSTSC]
private

Definition at line 194 of file DTSectColl.h.

Referenced by addTU(), DTSectColl(), getTSTheta(), and loadSectColl().

mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DTChambPhSegm::oldCode
int oldCode() const
Return trigger code (10*inner_code+outer_code; X_code=1,2,3,4,8)
Definition: DTChambPhSegm.h:91
DTSC::addThCand
void addThCand(DTSectCollThCand *cand)
Add a Theta candidate to sect coll.
Definition: DTSC.cc:198
step
step
Definition: StallMonitor.cc:94
DTSectColl::_config
const DTConfigSectColl * _config
Definition: DTSectColl.h:188
DTSectColl::getDTSC
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
Definition: DTSectColl.cc:290
DTSC::addDTSectCollPhCand
void addDTSectCollPhCand(DTSectCollPhCand *cand)
Add a Sector Collector.
Definition: DTSC.cc:238
DTSectCollPhCand
Definition: DTSectCollPhCand.h:32
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTSCTrigUnit::wheel
int wheel() const
Return wheel number.
Definition: DTSCTrigUnit.h:75
DTSectColl::_incand_th
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:206
DTSectColl::loadSectColl
void loadSectColl()
Load a Sector Collector.
Definition: DTSectColl.cc:171
DTSC::run
void run()
Run the Sector Collector algorithm.
Definition: DTSC.cc:69
DTSectColl::localClear
void localClear()
Local Clear.
Definition: DTSectColl.cc:79
DTConfig::NSTEPL
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
DTConfig::NSTEPF
static const int NSTEPF
Definition: DTConfig.h:35
DTSectCollThSegm
Definition: DTSectCollThSegm.h:38
DTSCTrigUnit::sector
int sector() const
Return sector number.
Definition: DTSCTrigUnit.h:81
DTCache::begin
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38
DTSC::clear
void clear()
Clear.
Definition: DTSC.cc:57
DTSectColl::_tsc
DTSC * _tsc[DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:197
DTSectColl::addTSPhi
void addTSPhi(int step, const DTChambPhSegm *tsmsegm, int ifs, int istat)
Add a TSM candidate (step is TSM step not SC one)
Definition: DTSectColl.cc:209
debug
#define debug
Definition: HDRShower.cc:19
DTCache::_cache
my_collection _cache
Definition: DTCache.h:53
DTSC::setConfig
void setConfig(const DTConfigSectColl *conf)
Set configuration.
Definition: DTSC.h:52
utils.is_empty
def is_empty(h)
Definition: utils.py:179
DTSectColl::addTSTheta
void addTSTheta(int step, const DTChambThSegm *tsmsegm, int istat)
Add a TS Theta candidate (step is TSTheta step not sc one)
Definition: DTSectColl.cc:250
DTSectCollId
Definition: DTSectCollId.h:18
DTSectColl::nCandPh
unsigned nCandPh(int ifs) const
Return the number of Phi input tracks (first/second)
Definition: DTSectColl.cc:407
DTSC::getTrackPh
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
Definition: DTSC.cc:244
DTSectColl::_tstheta
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:194
DTSectColl::SectCollId
DTSectCollId SectCollId()
Return the Sector Collector Id.
Definition: DTSectColl.h:184
cand
Definition: decayParser.h:32
DTSectColl::nTracksTh
int nTracksTh() const
Return the number of output Theta tracks.
Definition: DTSectColl.h:139
DTCache::end
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
DTSC
Definition: DTSC.h:41
DTCache::clearCache
void clearCache()
Clear cache vector.
Definition: DTCache.h:47
DTSectCollPhSegm
Definition: DTSectCollPhSegm.h:39
DTSectColl::_tsphi
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:193
DTSectCollThCand
Definition: DTSectCollThCand.h:31
DTSC::getTrackTh
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
Definition: DTSC.cc:256
DTSectColl::_sectcollid
DTSectCollId _sectcollid
Definition: DTSectColl.h:191
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
DTSCTrigUnit::station
int station() const
Return station number.
Definition: DTSCTrigUnit.h:78
DTSCTrigUnit::TSThTrigs
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:93
DTSectColl::nTracksPh
int nTracksPh() const
Return the number of output Phi tracks.
Definition: DTSectColl.h:136
DTSectColl::nCandTh
unsigned nCandTh() const
Return the number of Theta input tracks.
Definition: DTSectColl.cc:417
edm_modernize_messagelogger.stat
stat
Definition: edm_modernize_messagelogger.py:27
DTSectColl::runSectColl
void runSectColl()
Run Sector Collector.
Definition: DTSectColl.cc:306
DTSectColl::_outcand_ph
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:203
DTConfigManager::getDTConfigSectColl
const DTConfigSectColl * getDTConfigSectColl(DTSectCollId) const
Get desired SectorCollector configuration.
Definition: DTConfigManager.cc:160
DTSCTrigUnit::TSPhTrigs
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:90
DTSectColl::_outcand_th
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:209
DTSectColl::_incand_ph
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:200
DTSectColl::config
const DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:75