CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
DTSectColl Class Reference

#include <DTSectColl.h>

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

Classes

class  h
 

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 ()
 Return iterator to the beghin of Phi cache. More...
 
std::vector< DTSectCollThSegm >
::const_iterator 
beginTh ()
 Return iterator to the begni of Theta cache. More...
 
void clearCache ()
 Local position in chamber of a trigger-data object. More...
 
DTConfigSectCollconfig () const
 Configuration. More...
 
 DTSectColl (DTSectCollId id)
 Constructor. More...
 
std::vector< DTSectCollPhSegm >
::const_iterator 
endPh ()
 Return iterator to the end of Phi cache. More...
 
std::vector< DTSectCollThSegm >
::const_iterator 
endTh ()
 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...
 
virtual void reconstruct ()
 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 ()
 Return Phi cache size. More...
 
int sizeTh ()
 Return Theta cache size. More...
 
 ~DTSectColl ()
 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

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 57 of file DTSectColl.h.

Constructor & Destructor Documentation

DTSectColl::DTSectColl ( DTSectCollId  id)

Constructor.

Definition at line 48 of file DTSectColl.cc.

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

48  : _sectcollid(id){
49 
50  //_config = _conf_manager->getDTConfigSectColl(_sectcollid);
51 
52  // create SC Chips
53  for(int istat=0;istat<4;istat++){
54  for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++) {
55  _tsc[istep][istat] = new DTSC(istat+1);
56  }
57  }
58  for (int istat=0;istat<5;istat++) _tsphi[istat]=0;
59  for (int istat=0;istat<3;istat++) _tstheta[istat]=0;
60 
61 }
DTSectCollId _sectcollid
Definition: DTSectColl.h:189
Definition: DTSC.h:43
static const int NSTEPF
Definition: DTConfig.h:36
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:195
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:192
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:191
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
DTSectColl::~DTSectColl ( )

Destructor.

Definition at line 66 of file DTSectColl.cc.

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

66  {
67 
68  localClear();
69 
70  for(int istat=0;istat<4;istat++){
71  for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++){
72  delete _tsc[istep][istat];
73  }
74  }
75 
76 }
static const int NSTEPF
Definition: DTConfig.h:36
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:195
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
void localClear()
Local Clear.
Definition: DTSectColl.cc:84

Member Function Documentation

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 230 of file DTSectColl.cc.

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

Referenced by loadSectColl().

230  {
231 
232  if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){
233  std::cout << "DTSectColl::addTSPhi: step out of range: " << step;
234  std::cout << " trigger not added!" << std::endl;
235  return;
236  }
237 
238  if(istat<1 || istat>4){
239  std::cout << "DTSectColl::addTSPhi: station out of SC range: " << istat;
240  std::cout << " trigger not added!" << std::endl;
241  return;
242  }
243 
244  // Check that a trigger is present, by its code
245  if(tsmsegm->oldCode()==0) {
246  std::cout << "DTSectColl::addTSPhi --> code = 0 ! ";
247  std::cout << " trigger not added!" << std::endl;
248  return;
249  }
250 
251  DTSC* tsc = getDTSC(step,istat);
252 
253  DTSectCollPhCand* cand = new DTSectCollPhCand(tsc, tsmsegm, ifs);
254 
255  bool fs = (ifs==1);
256  _incand_ph[fs].push_back(cand);
257 
258  tsc->addDTSectCollPhCand(cand);
259 
260  // Debugging...
261  if(config()->debug()){
262  std::cout << "DTSectColl::addTSPhi at step " << step;
263  std::cout << " in SC station " << istat;
264  if(ifs==1) {
265  std::cout << " (first track)" << std::endl;
266  } else {
267  std::cout << " (second track)" << std::endl;
268  }
269  }
270 
271 }
list step
Definition: launcher.py:15
Definition: DTSC.h:43
DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:78
int oldCode() const
Return trigger code (10*inner_code+outer_code; X_code=1,2,3,4,8)
Definition: DTChambPhSegm.h:98
void addDTSectCollPhCand(DTSectCollPhCand *cand)
Add a Sector Collector.
Definition: DTSC.cc:303
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
Definition: DTSectColl.cc:319
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:198
tuple cout
Definition: gather_cfg.py:121
#define debug
Definition: MEtoEDMFormat.h:34
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 274 of file DTSectColl.cc.

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

Referenced by loadSectColl().

274  {
275 
276  if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){
277  std::cout << "DTSectColl::addTSTheta: step out of range: " << step;
278  std::cout << " trigger not added!" << std::endl;
279  return;
280  }
281 
282  if(istat<1 || istat>5){
283  std::cout << "DTSectColl::addTSTheta: station out of SC range: " << istat;
284  std::cout << " trigger not added!" << std::endl;
285  return;
286  }
287 
288  // Check if a trigger is present in theta
289  bool is_empty=0;
290  for (int i=0;i<7;i++) if (tstsegm->position(i)==1){
291  is_empty = false;
292  break;
293  }
294  if (is_empty==true) {
295  std::cout << "DTSectColl::addTSTheta --> no position bit equal to 1 ! ";
296  std::cout << " trigger not added!" << std::endl;
297  return;
298  }
299 
300 
301 
302  DTSC* tsc = getDTSC(step,istat);
303 
304  DTSectCollThCand* cand = new DTSectCollThCand(tsc, tstsegm);
305 
306  _incand_th.push_back(cand);
307 
308  tsc->addThCand(cand);
309 
310  // Debugging...
311  if(config()->debug()){
312  std::cout << "DTSectColl::addTSTheta at step " << step << std::endl;
313  }
314 
315 }
int i
Definition: DBlmapReader.cc:9
list step
Definition: launcher.py:15
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:204
Definition: DTSC.h:43
DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:78
void addThCand(DTSectCollThCand *cand)
Add a Theta candidate to sect coll.
Definition: DTSC.cc:242
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
Definition: DTSectColl.cc:319
def is_empty
Definition: utils.py:171
tuple cout
Definition: gather_cfg.py:121
#define debug
Definition: MEtoEDMFormat.h:34
void DTSectColl::addTU ( DTSCTrigUnit tru)

Add a Trigger Unit to the Sector Collector.

Definition at line 128 of file DTSectColl.cc.

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

Referenced by DTTrig::createTUs().

128  {
129 
130  int stat = tru->station();
131  int sect = tru->sector();
132  switch (sect){
133  case 13:
134  stat = 5;
135  sect = 4;
136  break;
137  case 14:
138  stat = 5;
139  sect = 10;
140  break;
141  }
142 
143  if (_sectcollid!=DTSectCollId() &&
144  _sectcollid!=DTSectCollId(tru->wheel(),sect)){
145  std::cout << "DTSectColl::addTU: Trying to add tru " << tru
146  << " into SectColl " << _sectcollid
147  << " Skipping insertion" << std::endl;
148  return;
149  }
150 
151  if (stat<1 || stat >5) {
152  std::cout << "DTSectColl::addTU: Wrong station number Skipping insertion" << std::endl;
153  return;
154  }
155 
156  _tsphi[stat-1] = tru->TSPhTrigs();
157  if (stat<4) _tstheta[stat-1]=tru->TSThTrigs();
158 
159  if (_sectcollid==DTSectCollId())
160  _sectcollid=DTSectCollId(tru->wheel(),sect);
161 
162  // add a Trigger Unit to the Sector Collector
163 // if(flag==2) {
164 // _tsphi1 = tru->TSPhTrigs(); // these are the "normal" stations
165 // _tsphi2 = 0;
166 // _tstheta = tru->TSThTrigs();
167 // }
168 // else if (flag==0){
169 // _tsphi1 = tru->TSPhTrigs();
170 // _tstheta = 0;
171 // }
172 // else if(flag==1) {
173 // _tsphi2 = tru->TSPhTrigs(); // these are the "double" stations
174 // _tstheta = 0;
175 // }
176 // // generates SectColl Id from tsphi Id
177 // if (flag==2 || flag==0){
178 // int sect = tru->sector();
179 // if (sect == 13) sect=4;
180 // if (sect == 14) sect=10;
181 // _sectcollid=DTSectCollId(tru->wheel(),tru->station(),sect);
182 // }
183 
184 }
DTSectCollId _sectcollid
Definition: DTSectColl.h:189
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:99
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:96
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:192
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:191
int station() const
Return station number.
Definition: DTSCTrigUnit.h:84
int wheel() const
Return wheel number.
Definition: DTSCTrigUnit.h:81
tuple cout
Definition: gather_cfg.py:121
int sector() const
Return sector number.
Definition: DTSCTrigUnit.h:87
std::vector<DTSectCollPhSegm>::const_iterator DTSectColl::beginPh ( )
inline

Return iterator to the beghin of Phi cache.

Definition at line 151 of file DTSectColl.h.

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCPhTrigs().

151 { return DTSCPhCache::_cache.begin(); }
my_collection _cache
Definition: DTCache.h:58
std::vector<DTSectCollThSegm>::const_iterator DTSectColl::beginTh ( )
inline

Return iterator to the begni of Theta cache.

Definition at line 160 of file DTSectColl.h.

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCThTrigs().

160 { return DTSCThCache::_cache.begin(); }
my_collection _cache
Definition: DTCache.h:58
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 175 of file DTSectColl.h.

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

Referenced by DTTrig::triggerReco().

void clearCache()
Clear cache vector.
Definition: DTCache.h:51
DTConfigSectColl* DTSectColl::config ( void  ) const
inline

Configuration.

Definition at line 78 of file DTSectColl.h.

References _config.

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

78 { return _config; }
DTConfigSectColl * _config
Definition: DTSectColl.h:186
std::vector<DTSectCollPhSegm>::const_iterator DTSectColl::endPh ( )
inline

Return iterator to the end of Phi cache.

Definition at line 157 of file DTSectColl.h.

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCPhTrigs().

157 { return DTSCPhCache::_cache.end(); }
my_collection _cache
Definition: DTCache.h:58
std::vector<DTSectCollThSegm>::const_iterator DTSectColl::endTh ( )
inline

Return iterator to the end of Theta cache.

Definition at line 166 of file DTSectColl.h.

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::SCThTrigs().

166 { return DTSCThCache::_cache.end(); }
my_collection _cache
Definition: DTCache.h:58
DTSC * DTSectColl::getDTSC ( int  step,
int  istat 
) const

Get a Sector Collector (step is TS one)

Definition at line 319 of file DTSectColl.cc.

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

Referenced by addTSPhi(), and addTSTheta().

319  {
320 
321  if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){
322  std::cout << "DTSectColl::getDTSC: step out of range: " << step;
323  std::cout << " empty pointer returned!" << std::endl;
324  return 0;
325  }
326 
327  if(istat<1 || istat>4){
328  std::cout << "DTSectColl::getDTSC: station out of SC range: " << istat;
329  std::cout << " emty pointer returned!" << std::endl;
330  return 0;
331  }
332 
333  return _tsc[step-DTConfigSectColl::NSTEPF][istat-1];
334 
335 }
list step
Definition: launcher.py:15
static const int NSTEPF
Definition: DTConfig.h:36
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:195
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
tuple cout
Definition: gather_cfg.py:121
DTSectCollPhCand * DTSectColl::getDTSectCollPhCand ( int  ifs,
unsigned  n 
) const

Get a Phi Candidate for Sector Collector.

Definition at line 400 of file DTSectColl.cc.

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

400  {
401 
402  if(ifs<1||ifs>2){
403  std::cout << "DTSectColl::getDTSectCollPhCand: wrong track number: " << ifs;
404  std::cout << " empty pointer returned!" << std::endl;
405  return 0;
406  }
407  if(n<1 || n>nCandPh(ifs)) {
408  std::cout << "DTSectColl::getDTSectCollPhCand: requested trigger not present: " << n;
409  std::cout << " empty pointer returned!" << std::endl;
410  return 0;
411  }
412 
413  std::vector<DTSectCollPhCand*>::const_iterator p = _incand_ph[ifs-1].begin()+n-1;
414  return (*p);
415 
416 }
unsigned nCandPh(int ifs) const
Return the number of Phi input tracks (first/second)
Definition: DTSectColl.cc:463
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:198
tuple cout
Definition: gather_cfg.py:121
DTSectCollThCand * DTSectColl::getDTSectCollThCand ( unsigned  n) const

Get a Candidate for Sector Collector.

Definition at line 419 of file DTSectColl.cc.

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

419  {
420 
421  if(n<1 || n>nCandTh()) {
422  std::cout << "DTSectColl::getDTSectCollThCand: requested trigger not present: " << n;
423  std::cout << " empty pointer returned!" << std::endl;
424  return 0;
425  }
426 
427  std::vector<DTSectCollThCand*>::const_iterator p = _incand_th.begin()+n-1;
428  return (*p);
429 
430 }
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:204
unsigned nCandTh() const
Return the number of Theta input tracks.
Definition: DTSectColl.cc:476
tuple cout
Definition: gather_cfg.py:121
DTSectCollPhCand * DTSectColl::getTrackPh ( int  n) const

Return the requested Phi track.

Definition at line 434 of file DTSectColl.cc.

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

434  {
435 
436  if(n<1 || n>nTracksPh()) {
437  std::cout << "DTSectColl::getTrackPh: requested track not present: " << n;
438  std::cout << " empty pointer returned!" << std::endl;
439  return 0;
440  }
441 
442  std::vector<DTSectCollPhCand*>::const_iterator p = _outcand_ph.begin()+n-1;
443  return (*p);
444 
445 }
int nTracksPh() const
Return the number of output Phi tracks.
Definition: DTSectColl.h:139
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:201
tuple cout
Definition: gather_cfg.py:121
DTSectCollThCand * DTSectColl::getTrackTh ( int  n) const

Return the requested Theta track.

Definition at line 448 of file DTSectColl.cc.

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

448  {
449 
450  if(n<1 || n>nTracksTh()) {
451  std::cout << "DTSectColl::getTrackTh: requested track not present: " << n;
452  std::cout << " empty pointer returned!" << std::endl;
453  return 0;
454  }
455 
456  std::vector<DTSectCollThCand*>::const_iterator p = _outcand_th.begin()+n-1;
457  return (*p);
458 
459 }
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:207
int nTracksTh() const
Return the number of output Theta tracks.
Definition: DTSectColl.h:142
tuple cout
Definition: gather_cfg.py:121
DTTSPhi* DTSectColl::getTSPhi ( int  istat) const
inline

Return TSPhi.

Definition at line 72 of file DTSectColl.h.

References _tsphi.

Referenced by DTTrig::triggerReco().

72 { return _tsphi[istat-1]; }
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:191
DTTSTheta* DTSectColl::getTSTheta ( int  istat) const
inline

Return TSTheta.

Definition at line 75 of file DTSectColl.h.

References _tstheta.

Referenced by DTTrig::triggerReco().

75 { return _tstheta[istat-1]; }
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:192
void DTSectColl::loadSectColl ( )

Load a Sector Collector.

Definition at line 188 of file DTSectColl.cc.

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

Referenced by reconstruct().

188  {
189 
190  localClear();
191 
192  std::vector<DTChambPhSegm>::const_iterator p;
193  std::vector<DTChambPhSegm>::const_iterator pend;
194 
195  for(int istat=1;istat<5;istat++){
196  pend=_tsphi[istat-1]->end();
197  for(p=_tsphi[istat-1]->begin();p!=pend;p++){
198  int step = p->step();
199  int fs = (p->isFirst()) ? 1 : 2 ;
200  // load trigger
201  addTSPhi(step, &(*p), fs, istat);
202  }
203  }
204 
205  if(!(_tsphi[4]==0)){ // only for double stations
206  pend=_tsphi[4]->end();
207  for(p=_tsphi[4]->begin();p!=pend;p++){
208  int step = p->step();
209  int fs = (p->isFirst()) ? 1 : 2 ;
210  // load trigger
211  addTSPhi(step, &(*p), fs ,4);
212  }
213  }
214  std::vector<DTChambThSegm>::const_iterator pth;
215  std::vector<DTChambThSegm>::const_iterator pthend;
216 
217  for(int istat=1;istat<4;istat++){
218  pthend=_tstheta[istat-1]->end();
219  for(pth=_tstheta[istat-1]->begin();pth!=pthend;pth++){
220  int step = pth->step();
221  // load trigger
222  addTSTheta(step, &(*pth), istat);
223  }
224  }
225 
226 }
list step
Definition: launcher.py:15
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:230
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
Definition: DTSectColl.h:192
void addTSTheta(int step, const DTChambThSegm *tsmsegm, int istat)
Add a TS Theta candidate (step is TSTheta step not sc one)
Definition: DTSectColl.cc:274
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
Definition: DTSectColl.h:191
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
void localClear()
Local Clear.
Definition: DTSectColl.cc:84
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
void DTSectColl::localClear ( )

Local Clear.

Definition at line 84 of file DTSectColl.cc.

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

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

84  {
85 
86  // clear all sector collectors
87  for(int istat=0;istat<4;istat++){
88  for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++) {
89  _tsc[istep][istat]->clear();
90  }
91  }
92 
93  for(int iph=0;iph<2;++iph){
94  std::vector<DTSectCollPhCand*>::const_iterator phbi = _incand_ph[iph].begin();
95  std::vector<DTSectCollPhCand*>::const_iterator phei = _incand_ph[iph].end();
96  for ( std::vector<DTSectCollPhCand*>::const_iterator iphit = phbi;iphit!= phei;++iphit)
97  delete (*iphit);
98  _incand_ph[iph].clear();
99  }
100 
101  _outcand_ph.clear();
102 
103  std::vector<DTSectCollThCand*>::const_iterator thb = _incand_th.begin();
104  std::vector<DTSectCollThCand*>::const_iterator the = _incand_th.end();
105  for ( std::vector<DTSectCollThCand*>::const_iterator ithit = thb;ithit!= the;++ithit)
106  delete (*ithit);
107  _incand_th.clear();
108 
109  _outcand_th.clear();
110 
111 }
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:204
static const int NSTEPF
Definition: DTConfig.h:36
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:207
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:201
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:195
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
void clear()
Clear.
Definition: DTSC.cc:67
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:198
unsigned DTSectColl::nCandPh ( int  ifs) const

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

Definition at line 463 of file DTSectColl.cc.

References _incand_ph, and gather_cfg::cout.

Referenced by getDTSectCollPhCand().

463  {
464 
465  if(ifs<1||ifs>2){
466  std::cout << "DTSectColl::nCandPh: wrong track number: " << ifs;
467  std::cout << " 0 returned!" << std::endl;
468  return 0;
469  }
470 
471  return _incand_ph[ifs-1].size();
472 
473 }
std::vector< DTSectCollPhCand * > _incand_ph[2]
Definition: DTSectColl.h:198
tuple cout
Definition: gather_cfg.py:121
unsigned DTSectColl::nCandTh ( ) const

Return the number of Theta input tracks.

Definition at line 476 of file DTSectColl.cc.

References _incand_th.

Referenced by getDTSectCollThCand(), and runSectColl().

476  {
477 
478  return _incand_th.size();
479 
480 }
std::vector< DTSectCollThCand * > _incand_th
Definition: DTSectColl.h:204
int DTSectColl::nSegmPh ( int  step)

Return number of DTSectCollPhi segments (SC step)

Definition at line 483 of file DTSectColl.cc.

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

Referenced by DTTrig::chSectCollPhSegm1(), and DTTrig::chSectCollPhSegm2().

483  {
484 
485  int n=0;
486  std::vector<DTSectCollPhSegm>::const_iterator p;
487  std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end();
488  for(p=DTSCPhCache::begin(); p<endp; p++) {
489  if(p->step()==step)n++;
490  }
491 
492  return n;
493 
494 }
list step
Definition: launcher.py:15
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
int DTSectColl::nSegmTh ( int  step)

Return number of DTSectCollTheta segments (SC step)

Definition at line 497 of file DTSectColl.cc.

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

Referenced by DTTrig::chSectCollThSegm().

497  {
498 
499  int n=0;
500  std::vector<DTSectCollThSegm>::const_iterator p;
501  std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end();
502  for(p=DTSCThCache::begin(); p>endp; p++) {
503  if(p->step()==step)n++;
504  }
505 
506  return n;
507 
508 }
list step
Definition: launcher.py:15
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
int DTSectColl::nTracksPh ( ) const
inline

Return the number of output Phi tracks.

Definition at line 139 of file DTSectColl.h.

References _outcand_ph.

Referenced by getTrackPh(), and runSectColl().

139 { return _outcand_ph.size(); }
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:201
int DTSectColl::nTracksTh ( ) const
inline

Return the number of output Theta tracks.

Definition at line 142 of file DTSectColl.h.

References _outcand_th.

Referenced by getTrackTh(), and runSectColl().

142 { return _outcand_th.size(); }
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:207
virtual void DTSectColl::reconstruct ( )
inlinevirtual

Load Trigger Units triggers and run Sector Collector algorithm.

Reimplemented from DTCache< T, Coll >.

Definition at line 178 of file DTSectColl.h.

References loadSectColl(), and runSectColl().

Referenced by DTTrig::triggerReco().

178 { loadSectColl(); runSectColl(); }
void loadSectColl()
Load a Sector Collector.
Definition: DTSectColl.cc:188
void runSectColl()
Run Sector Collector.
Definition: DTSectColl.cc:339
void DTSectColl::runSectColl ( )

Run Sector Collector.

Definition at line 339 of file DTSectColl.cc.

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

Referenced by reconstruct().

339  {
340 
341  for(int istat=0;istat<4;istat++){
342  for(int istep=DTConfigSectColl::NSTEPF;istep<DTConfigSectColl::NSTEPL+1;istep++) {
343 
344  if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nFirstTPh()>0 || _tsc[istep-DTConfigSectColl::NSTEPF][istat]->nCandTh()>0 ) {
345 
346  _tsc[istep-DTConfigSectColl::NSTEPF][istat]->run();
347 
348  if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksPh()>0) {
349 
350  DTSectCollPhCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackPh(1);
351  DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr(),1));
352  _outcand_ph.push_back(cand);
353 
354  if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksPh()>1) {
355 
356  DTSectCollPhCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackPh(2);
357  DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr(),2));
358  _outcand_ph.push_back(cand);
359  }
360  }
361  if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksTh()>0) {
362 
363  DTSectCollThCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackTh(1);
364  DTSCThCache::_cache.push_back(DTSectCollThSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr()));
365  _outcand_th.push_back(cand); // CB getTrackTh non dovrebbe prendere argomenti modificala!
366 
367  }
368  }
369  }
370  }
371 
372  // debugging...
373  if(config()->debug()){
375  std::cout << "====================================================" << std::endl;
376  std::cout << " Sect Coll segments " << std::endl;
377  if (DTSCPhCache::_cache.size()>0){
378  std:: cout << " ***Phi Segments*** " << std:: endl;
379  std::vector<DTSectCollPhSegm>::const_iterator pph;
380  for(pph=DTSCPhCache::_cache.begin();pph<DTSCPhCache::_cache.end();pph++) {
381  pph->print();
382  }
383  }
384  if (DTSCThCache::_cache.size()>0){
385  std:: cout << " **Theta Segments** " << std:: endl;
386  std::vector<DTSectCollThSegm>::const_iterator pth;
387  for(pth=DTSCThCache::_cache.begin();pth<DTSCThCache::_cache.end();pth++) {
388  pth->print();
389  }
390  }
391  std::cout << "====================================================" << std::endl;
392  }
393  }
394  // end debugging
395 
396 }
int nTracksPh() const
Return the number of output Phi tracks.
Definition: DTSectColl.h:139
my_collection _cache
Definition: DTCache.h:58
const DTChambPhSegm * tsTr() const
Return associated TSPhi trigger.
int CoarseSync() const
Return the Coarse Sync Parameter.
DTSectCollId SectCollId()
Return the Sector Collector Id.
Definition: DTSectColl.h:181
static const int NSTEPF
Definition: DTConfig.h:36
const DTChambThSegm * tsTr() const
Return associated TSTheta trigger.
std::vector< DTSectCollThCand * > _outcand_th
Definition: DTSectColl.h:207
std::vector< DTSectCollPhCand * > _outcand_ph
Definition: DTSectColl.h:201
unsigned nCandTh() const
Return the number of Theta input tracks.
Definition: DTSectColl.cc:476
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
Definition: DTSC.cc:328
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:195
DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:78
int CoarseSync() const
Return the Coarse Sync Parameter.
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
int nTracksTh() const
Return the number of output Theta tracks.
Definition: DTSectColl.h:142
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
Definition: DTSC.cc:312
void run()
Run the Sector Collector algorithm.
Definition: DTSC.cc:84
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
tuple cout
Definition: gather_cfg.py:121
#define debug
Definition: MEtoEDMFormat.h:34
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:48
DTSectCollId DTSectColl::SectCollId ( )
inline

Return the Sector Collector Id.

Definition at line 181 of file DTSectColl.h.

References _sectcollid.

Referenced by runSectColl().

181 { return _sectcollid; }
DTSectCollId _sectcollid
Definition: DTSectColl.h:189
const DTSectCollPhSegm * DTSectColl::SectCollPhSegment ( int  step,
unsigned  n 
)

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

Definition at line 512 of file DTSectColl.cc.

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

Referenced by DTTrig::chSectCollPhSegm1(), and DTTrig::chSectCollPhSegm2().

512  {
513 
514  std::vector<DTSectCollPhSegm>::const_iterator p;
515  std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end();
516  for(p=DTSCPhCache::begin();p<endp;p++){
517  if(p->step()==step&&((n==1&&p->isFirst())||(n==2&&!p->isFirst())))
518  return &(*p);
519  }
520 
521  return 0;
522 
523 }
list step
Definition: launcher.py:15
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
const DTSectCollThSegm * DTSectColl::SectCollThSegment ( int  step)

Return requested Sector Collector Theta Segment.

Definition at line 526 of file DTSectColl.cc.

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

Referenced by DTTrig::chSectCollThSegm().

526  {
527 
528  std::vector<DTSectCollThSegm>::const_iterator p;
529  std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end();
530  for(p=DTSCThCache::begin();p<endp;p++){
531  if(p->step()==step)
532  return &(*p);
533  }
534 
535  return 0;
536 
537 }
list step
Definition: launcher.py:15
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
void DTSectColl::setConfig ( const DTConfigManager conf)

Set configuration.

Definition at line 114 of file DTSectColl.cc.

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

114  {
115 
117 
118  for(int istat=0;istat<4;istat++){
119  for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++){
120  _tsc[istep][istat]->setConfig(config());
121  }
122  }
123 
124 }
void setConfig(DTConfigSectColl *conf)
Set configuration.
Definition: DTSC.h:56
DTSectCollId _sectcollid
Definition: DTSectColl.h:189
static const int NSTEPF
Definition: DTConfig.h:36
DTConfigSectColl * getDTConfigSectColl(DTSectCollId) const
Get desired SectorCollector configuration.
DTSC * _tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
Definition: DTSectColl.h:195
DTConfigSectColl * config() const
Configuration.
Definition: DTSectColl.h:78
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
DTConfigSectColl * _config
Definition: DTSectColl.h:186
int DTSectColl::sizePh ( )
inline

Return Phi cache size.

Definition at line 154 of file DTSectColl.h.

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::triggerReco().

154 { return DTSCPhCache::_cache.size(); }
my_collection _cache
Definition: DTCache.h:58
int DTSectColl::sizeTh ( )
inline

Return Theta cache size.

Definition at line 163 of file DTSectColl.h.

References DTCache< T, Coll >::_cache.

Referenced by DTTrig::triggerReco().

163 { return DTSCThCache::_cache.size(); }
my_collection _cache
Definition: DTCache.h:58

Member Data Documentation

DTConfigSectColl* DTSectColl::_config
private

Definition at line 186 of file DTSectColl.h.

Referenced by config(), and setConfig().

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

Definition at line 198 of file DTSectColl.h.

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

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

Definition at line 204 of file DTSectColl.h.

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

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

Definition at line 201 of file DTSectColl.h.

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

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

Definition at line 207 of file DTSectColl.h.

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

DTSectCollId DTSectColl::_sectcollid
private

Definition at line 189 of file DTSectColl.h.

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

Definition at line 195 of file DTSectColl.h.

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

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

Definition at line 191 of file DTSectColl.h.

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

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

Definition at line 192 of file DTSectColl.h.

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