CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

DTSectColl Class Reference

#include <DTSectColl.h>

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

List of all members.

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

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]

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.

                                      : _sectcollid(id){

  //_config = _conf_manager->getDTConfigSectColl(_sectcollid);
  
  // create SC Chips
  for(int istat=0;istat<4;istat++){
    for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++) {
      _tsc[istep][istat] = new DTSC(istat+1);
    }
  }
  for (int istat=0;istat<5;istat++) _tsphi[istat]=0;
  for (int istat=0;istat<3;istat++) _tstheta[istat]=0;

}
DTSectColl::~DTSectColl ( )

Destructor.

Definition at line 66 of file DTSectColl.cc.

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

                       {

  localClear();

  for(int istat=0;istat<4;istat++){
    for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++){
      delete _tsc[istep][istat];
    }
  }

}

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 relval_parameters_module::step.

Referenced by loadSectColl().

                                                                               {

  if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){
    std::cout << "DTSectColl::addTSPhi: step out of range: " << step;
    std::cout << " trigger not added!" << std::endl;
    return;
  }

  if(istat<1 || istat>4){
    std::cout << "DTSectColl::addTSPhi: station out of SC range: " << istat;
    std::cout << " trigger not added!" << std::endl;
    return;
  }
  
  // Check that a trigger is present, by its code
  if(tsmsegm->oldCode()==0) {
    std::cout << "DTSectColl::addTSPhi -->  code = 0 ! ";
    std::cout << " trigger not added!" << std::endl;
    return;
  }
   
  DTSC* tsc = getDTSC(step,istat);
  
  DTSectCollPhCand* cand = new DTSectCollPhCand(tsc, tsmsegm, ifs);
   
  bool fs = (ifs==1);
  _incand_ph[fs].push_back(cand);
  
  tsc->addDTSectCollPhCand(cand);
  
  // Debugging...
  if(config()->debug()){
    std::cout << "DTSectColl::addTSPhi at step " << step; 
    std::cout << " in SC station " << istat;
    if(ifs==1) {
      std::cout << " (first track)" << std::endl;
    } else {
      std::cout << " (second track)" << std::endl;
    }
  }

}
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 relval_parameters_module::step.

Referenced by loadSectColl().

                                                                        {

  if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){
    std::cout << "DTSectColl::addTSTheta: step out of range: " << step;
    std::cout << " trigger not added!" << std::endl;
    return;
  }

  if(istat<1 || istat>5){
    std::cout << "DTSectColl::addTSTheta: station out of SC range: " << istat;
    std::cout << " trigger not added!" << std::endl;
    return;
  }

  // Check if a trigger is present in theta
  bool is_empty=0;
  for (int i=0;i<7;i++) if (tstsegm->position(i)==1){
      is_empty = false;
      break;
    }
  if (is_empty==true) {
    std::cout << "DTSectColl::addTSTheta --> no position bit equal to 1 ! ";
    std::cout << " trigger not added!" << std::endl;
    return;
  }
  
   

  DTSC* tsc = getDTSC(step,istat);
  
  DTSectCollThCand* cand = new DTSectCollThCand(tsc, tstsegm);
   
  _incand_th.push_back(cand);

  tsc->addThCand(cand);
  
  // Debugging...
  if(config()->debug()){
    std::cout << "DTSectColl::addTSTheta at step " << step << std::endl;
  }
  
}
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().

                                     {

  int stat = tru->station();
  int sect = tru->sector();
  switch (sect){
  case 13:
    stat = 5;
    sect = 4;
    break;
  case 14:
    stat = 5;
    sect = 10;
    break;
  }
   
  if (_sectcollid!=DTSectCollId() &&
      _sectcollid!=DTSectCollId(tru->wheel(),sect)){
    std::cout << "DTSectColl::addTU: Trying to add tru " << tru
              << " into SectColl " << _sectcollid
              << " Skipping insertion" << std::endl;
    return;
  }
  
  if (stat<1 || stat >5) {
    std::cout << "DTSectColl::addTU: Wrong station number Skipping insertion" << std::endl;
    return;
  }

  _tsphi[stat-1] = tru->TSPhTrigs();
  if (stat<4) _tstheta[stat-1]=tru->TSThTrigs();
  
  if (_sectcollid==DTSectCollId())
    _sectcollid=DTSectCollId(tru->wheel(),sect);

  // add a Trigger Unit to the Sector Collector
//   if(flag==2) { 
//        _tsphi1 = tru->TSPhTrigs();    // these are the "normal" stations
//        _tsphi2 = 0;
//        _tstheta = tru->TSThTrigs();
//   }
//   else if (flag==0){ 
//     _tsphi1 = tru->TSPhTrigs();
//     _tstheta = 0;
//   }
//   else if(flag==1) {    
//     _tsphi2 = tru->TSPhTrigs();        // these are the "double" stations
//     _tstheta = 0;
//   }
//   // generates SectColl Id from tsphi Id
//   if (flag==2 || flag==0){
//     int sect  = tru->sector();
//     if (sect == 13) sect=4;
//     if (sect == 14) sect=10;
//     _sectcollid=DTSectCollId(tru->wheel(),tru->station(),sect);
//   }

}
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().

{ return  DTSCPhCache::_cache.begin(); }
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().

{ return DTSCThCache::_cache.begin(); }
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

Reimplemented from DTCache< T, Coll >.

Definition at line 175 of file DTSectColl.h.

Referenced by DTTrig::triggerReco().

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

Configuration.

Definition at line 78 of file DTSectColl.h.

References _config.

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

{ return _config; }
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().

{ return DTSCPhCache::_cache.end(); } 
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().

{ return DTSCThCache::_cache.end(); }
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 relval_parameters_module::step.

Referenced by addTSPhi(), and addTSTheta().

                                             {

  if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){
    std::cout << "DTSectColl::getDTSC: step out of range: " << step;
    std::cout << " empty pointer returned!" << std::endl;
    return 0;
  }

  if(istat<1 || istat>4){
    std::cout << "DTSectColl::getDTSC: station out of SC range: " << istat;
    std::cout << " emty pointer returned!" << std::endl;
    return 0;
  }

  return _tsc[step-DTConfigSectColl::NSTEPF][istat-1];  

}
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.

                                                         {

  if(ifs<1||ifs>2){
    std::cout << "DTSectColl::getDTSectCollPhCand: wrong track number: " << ifs;
    std::cout << " empty pointer returned!" << std::endl;
    return 0;
  }
  if(n<1 || n>nCandPh(ifs)) {
    std::cout << "DTSectColl::getDTSectCollPhCand: requested trigger not present: " << n;
    std::cout << " empty pointer returned!" << std::endl;
    return 0;
  }

  std::vector<DTSectCollPhCand*>::const_iterator p = _incand_ph[ifs-1].begin()+n-1;
  return (*p);

}
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.

                                                {

  if(n<1 || n>nCandTh()) {
    std::cout << "DTSectColl::getDTSectCollThCand: requested trigger not present: " << n;
    std::cout << " empty pointer returned!" << std::endl;
    return 0;
  }

  std::vector<DTSectCollThCand*>::const_iterator p = _incand_th.begin()+n-1;
  return (*p);

}
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.

                                  {

  if(n<1 || n>nTracksPh()) {
    std::cout << "DTSectColl::getTrackPh: requested track not present: " << n;
    std::cout << " empty pointer returned!" << std::endl;
    return 0;
  }

  std::vector<DTSectCollPhCand*>::const_iterator p = _outcand_ph.begin()+n-1;
  return (*p);

}
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.

                                  {

  if(n<1 || n>nTracksTh()) {
    std::cout << "DTSectColl::getTrackTh: requested track not present: " << n;
    std::cout << " empty pointer returned!" << std::endl;
    return 0;
  }

  std::vector<DTSectCollThCand*>::const_iterator p = _outcand_th.begin()+n-1;
  return (*p);

}
DTTSPhi* DTSectColl::getTSPhi ( int  istat) const [inline]

Return TSPhi.

Definition at line 72 of file DTSectColl.h.

References _tsphi.

Referenced by DTTrig::triggerReco().

{ return _tsphi[istat-1]; }
DTTSTheta* DTSectColl::getTSTheta ( int  istat) const [inline]

Return TSTheta.

Definition at line 75 of file DTSectColl.h.

References _tstheta.

Referenced by DTTrig::triggerReco().

{ return _tstheta[istat-1]; }
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 relval_parameters_module::step.

Referenced by reconstruct().

                         {

  localClear();
  
  std::vector<DTChambPhSegm>::const_iterator p;
  std::vector<DTChambPhSegm>::const_iterator pend;

  for(int istat=1;istat<5;istat++){
    pend=_tsphi[istat-1]->end();
    for(p=_tsphi[istat-1]->begin();p!=pend;p++){
      int step = p->step();
      int fs = (p->isFirst()) ? 1 : 2 ;
      // load trigger
      addTSPhi(step, &(*p), fs, istat);
    }
  }

  if(!(_tsphi[4]==0)){  // only for double stations
    pend=_tsphi[4]->end();
    for(p=_tsphi[4]->begin();p!=pend;p++){
      int step = p->step();
      int fs = (p->isFirst()) ? 1 : 2 ;
      // load trigger
      addTSPhi(step, &(*p), fs ,4);
    }
  }
  std::vector<DTChambThSegm>::const_iterator pth;
  std::vector<DTChambThSegm>::const_iterator pthend;
  
  for(int istat=1;istat<4;istat++){
    pthend=_tstheta[istat-1]->end();
    for(pth=_tstheta[istat-1]->begin();pth!=pthend;pth++){
      int step = pth->step();      
      // load trigger
      addTSTheta(step,  &(*pth), istat);
    }
  }

}
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().

                       {

  // clear all sector collectors
  for(int istat=0;istat<4;istat++){
    for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++) {
      _tsc[istep][istat]->clear();
    }
  }
  
  for(int iph=0;iph<2;++iph){
    std::vector<DTSectCollPhCand*>::const_iterator phbi = _incand_ph[iph].begin();
    std::vector<DTSectCollPhCand*>::const_iterator phei = _incand_ph[iph].end();
    for ( std::vector<DTSectCollPhCand*>::const_iterator iphit = phbi;iphit!= phei;++iphit)
      delete (*iphit);
    _incand_ph[iph].clear();
  }
  
  _outcand_ph.clear();
  
  std::vector<DTSectCollThCand*>::const_iterator thb = _incand_th.begin();
  std::vector<DTSectCollThCand*>::const_iterator the = _incand_th.end();
  for ( std::vector<DTSectCollThCand*>::const_iterator ithit = thb;ithit!= the;++ithit)
    delete (*ithit);
  _incand_th.clear();
  
  _outcand_th.clear();
  
}
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().

                                 {

  if(ifs<1||ifs>2){
    std::cout << "DTSectColl::nCandPh: wrong track number: " << ifs;
    std::cout << " 0 returned!" << std::endl;
    return 0;
  }

  return _incand_ph[ifs-1].size();

}
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().

                          {

  return _incand_th.size();

}
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 relval_parameters_module::step.

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

                            {

  int n=0;
  std::vector<DTSectCollPhSegm>::const_iterator p;
   std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end();
  for(p=DTSCPhCache::begin(); p<endp; p++) {   
    if(p->step()==step)n++;  
  } 

  return n;

}
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 relval_parameters_module::step.

Referenced by DTTrig::chSectCollThSegm().

                            {

  int n=0;
  std::vector<DTSectCollThSegm>::const_iterator p;
  std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end();
  for(p=DTSCThCache::begin(); p>endp; p++) {   
    if(p->step()==step)n++;  
  } 

  return n;

}
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().

{ return _outcand_ph.size(); }
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().

{ return _outcand_th.size(); }
virtual void DTSectColl::reconstruct ( ) [inline, virtual]

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().

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().

                        {

  for(int istat=0;istat<4;istat++){
    for(int istep=DTConfigSectColl::NSTEPF;istep<DTConfigSectColl::NSTEPL+1;istep++) {
      
      if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nFirstTPh()>0 || _tsc[istep-DTConfigSectColl::NSTEPF][istat]->nCandTh()>0 ) {
           
        _tsc[istep-DTConfigSectColl::NSTEPF][istat]->run();
        
        if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksPh()>0) {
        
          DTSectCollPhCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackPh(1);
          DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr(),1));
          _outcand_ph.push_back(cand);
          
          if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksPh()>1) {
            
            DTSectCollPhCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackPh(2);
            DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr(),2)); 
            _outcand_ph.push_back(cand);
          }
        }
        if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksTh()>0) {
          
          DTSectCollThCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackTh(1);
          DTSCThCache::_cache.push_back(DTSectCollThSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr()));
          _outcand_th.push_back(cand); // CB getTrackTh non dovrebbe prendere argomenti modificala!

        }
      }
    }
  }
 
  // debugging...
  if(config()->debug()){
    if( DTSCPhCache::_cache.size()>0 || DTSCThCache::_cache.size()>0){
      std::cout << "====================================================" << std::endl;
      std::cout << "                  Sect Coll segments                      " << std::endl;
        if (DTSCPhCache::_cache.size()>0){
        std:: cout << "                  ***Phi Segments***                      " << std:: endl;
        std::vector<DTSectCollPhSegm>::const_iterator pph;
        for(pph=DTSCPhCache::_cache.begin();pph<DTSCPhCache::_cache.end();pph++) {
          pph->print();
        }
      }
      if (DTSCThCache::_cache.size()>0){
        std:: cout << "                  **Theta Segments**                      " << std:: endl;
        std::vector<DTSectCollThSegm>::const_iterator pth;
        for(pth=DTSCThCache::_cache.begin();pth<DTSCThCache::_cache.end();pth++) {
          pth->print();
        }
      }
      std::cout << "====================================================" << std::endl;
    }
  }
  //  end debugging
  
}
DTSectCollId DTSectColl::SectCollId ( ) [inline]

Return the Sector Collector Id.

Definition at line 181 of file DTSectColl.h.

References _sectcollid.

Referenced by runSectColl().

{ return _sectcollid; }
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().

                                                  {

  std::vector<DTSectCollPhSegm>::const_iterator p;
  std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end(); 
  for(p=DTSCPhCache::begin();p<endp;p++){
    if(p->step()==step&&((n==1&&p->isFirst())||(n==2&&!p->isFirst())))
      return &(*p); 
  }

  return 0;

}
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 relval_parameters_module::step.

Referenced by DTTrig::chSectCollThSegm().

                                      {

  std::vector<DTSectCollThSegm>::const_iterator p;
 std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end();
  for(p=DTSCThCache::begin();p<endp;p++){
    if(p->step()==step)
      return &(*p); 
  }

  return 0;

}
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().

                                                 {

  _config = conf->getDTConfigSectColl(_sectcollid);

  for(int istat=0;istat<4;istat++){
    for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++){
      _tsc[istep][istat]->setConfig(config());
    }
  }

}
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().

{ return DTSCPhCache::_cache.size(); } 
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().

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

Member Data Documentation

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().

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().

Definition at line 191 of file DTSectColl.h.

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

Definition at line 192 of file DTSectColl.h.

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