#include <L1Trigger/DTSectorCollector/interface/DTSectColl.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. | |
DTConfigSectColl * | config () 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. | |
DTSC * | getDTSC (int step, int istat) const |
Get a Sector Collector (step is TS one). | |
DTSectCollPhCand * | getDTSectCollPhCand (int ifs, unsigned n) const |
Get a Phi Candidate for Sector Collector. | |
DTSectCollThCand * | getDTSectCollThCand (unsigned n) const |
Get a Candidate for Sector Collector. | |
DTSectCollPhCand * | getTrackPh (int n) const |
Return the requested Phi track. | |
DTSectCollThCand * | getTrackTh (int n) const |
Return the requested Theta track. | |
DTTSPhi * | getTSPhi (int istat) const |
Return TSPhi. | |
DTTSTheta * | getTSTheta (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 DTSectCollPhSegm * | SectCollPhSegment (int step, unsigned n) |
Return requested Sector Collector Phi Segment 1st/2nd. | |
const DTSectCollThSegm * | SectCollThSegment (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] |
Definition at line 57 of file DTSectColl.h.
DTSectColl::DTSectColl | ( | DTSectCollId | id | ) |
Constructor.
Definition at line 48 of file DTSectColl.cc.
References _tsc, _tsphi, _tstheta, DTConfig::NSTEPF, and DTConfig::NSTEPL.
00048 : _sectcollid(id){ 00049 00050 //_config = _conf_manager->getDTConfigSectColl(_sectcollid); 00051 00052 // create SC Chips 00053 for(int istat=0;istat<4;istat++){ 00054 for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++) { 00055 _tsc[istep][istat] = new DTSC(istat+1); 00056 } 00057 } 00058 for (int istat=0;istat<5;istat++) _tsphi[istat]=0; 00059 for (int istat=0;istat<3;istat++) _tstheta[istat]=0; 00060 00061 }
DTSectColl::~DTSectColl | ( | ) |
Destructor.
Definition at line 66 of file DTSectColl.cc.
References _tsc, localClear(), DTConfig::NSTEPF, and DTConfig::NSTEPL.
00066 { 00067 00068 localClear(); 00069 00070 for(int istat=0;istat<4;istat++){ 00071 for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++){ 00072 delete _tsc[istep][istat]; 00073 } 00074 } 00075 00076 }
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(), GenMuonPlsPt100GeV_cfg::cout, debug, lat::endl(), getDTSC(), DTConfig::NSTEPL, and DTChambPhSegm::oldCode().
Referenced by loadSectColl().
00230 { 00231 00232 if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){ 00233 std::cout << "DTSectColl::addTSPhi: step out of range: " << step; 00234 std::cout << " trigger not added!" << std::endl; 00235 return; 00236 } 00237 00238 if(istat<1 || istat>4){ 00239 std::cout << "DTSectColl::addTSPhi: station out of SC range: " << istat; 00240 std::cout << " trigger not added!" << std::endl; 00241 return; 00242 } 00243 00244 // Check that a trigger is present, by its code 00245 if(tsmsegm->oldCode()==0) { 00246 std::cout << "DTSectColl::addTSPhi --> code = 0 ! "; 00247 std::cout << " trigger not added!" << std::endl; 00248 return; 00249 } 00250 00251 DTSC* tsc = getDTSC(step,istat); 00252 00253 DTSectCollPhCand* cand = new DTSectCollPhCand(tsc, tsmsegm, ifs); 00254 00255 bool fs = (ifs==1); 00256 _incand_ph[fs].push_back(cand); 00257 00258 tsc->addDTSectCollPhCand(cand); 00259 00260 // Debugging... 00261 if(config()->debug()){ 00262 std::cout << "DTSectColl::addTSPhi at step " << step; 00263 std::cout << " in SC station " << istat; 00264 if(ifs==1) { 00265 std::cout << " (first track)" << std::endl; 00266 } else { 00267 std::cout << " (second track)" << std::endl; 00268 } 00269 } 00270 00271 }
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(), GenMuonPlsPt100GeV_cfg::cout, debug, lat::endl(), getDTSC(), i, DTConfig::NSTEPL, and DTChambThSegm::position().
Referenced by loadSectColl().
00274 { 00275 00276 if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){ 00277 std::cout << "DTSectColl::addTSTheta: step out of range: " << step; 00278 std::cout << " trigger not added!" << std::endl; 00279 return; 00280 } 00281 00282 if(istat<1 || istat>5){ 00283 std::cout << "DTSectColl::addTSTheta: station out of SC range: " << istat; 00284 std::cout << " trigger not added!" << std::endl; 00285 return; 00286 } 00287 00288 // Check if a trigger is present in theta 00289 bool is_empty=0; 00290 for (int i=0;i<7;i++) if (tstsegm->position(i)==1){ 00291 is_empty = false; 00292 break; 00293 } 00294 if (is_empty==true) { 00295 std::cout << "DTSectColl::addTSTheta --> no position bit equal to 1 ! "; 00296 std::cout << " trigger not added!" << std::endl; 00297 return; 00298 } 00299 00300 00301 00302 DTSC* tsc = getDTSC(step,istat); 00303 00304 DTSectCollThCand* cand = new DTSectCollThCand(tsc, tstsegm); 00305 00306 _incand_th.push_back(cand); 00307 00308 tsc->addThCand(cand); 00309 00310 // Debugging... 00311 if(config()->debug()){ 00312 std::cout << "DTSectColl::addTSTheta at step " << step << std::endl; 00313 } 00314 00315 }
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, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DTSCTrigUnit::sector(), DTSCTrigUnit::station(), DTSCTrigUnit::TSPhTrigs(), DTSCTrigUnit::TSThTrigs(), and DTSCTrigUnit::wheel().
Referenced by DTTrig::createTUs().
00128 { 00129 00130 int stat = tru->station(); 00131 int sect = tru->sector(); 00132 switch (sect){ 00133 case 13: 00134 stat = 5; 00135 sect = 4; 00136 break; 00137 case 14: 00138 stat = 5; 00139 sect = 10; 00140 break; 00141 } 00142 00143 if (_sectcollid!=DTSectCollId() && 00144 _sectcollid!=DTSectCollId(tru->wheel(),sect)){ 00145 std::cout << "DTSectColl::addTU: Trying to add tru " << tru 00146 << " into SectColl " << _sectcollid 00147 << " Skipping insertion" << std::endl; 00148 return; 00149 } 00150 00151 if (stat<1 || stat >5) { 00152 std::cout << "DTSectColl::addTU: Wrong station number Skipping insertion" << std::endl; 00153 return; 00154 } 00155 00156 _tsphi[stat-1] = tru->TSPhTrigs(); 00157 if (stat<4) _tstheta[stat-1]=tru->TSThTrigs(); 00158 00159 if (_sectcollid==DTSectCollId()) 00160 _sectcollid=DTSectCollId(tru->wheel(),sect); 00161 00162 // add a Trigger Unit to the Sector Collector 00163 // if(flag==2) { 00164 // _tsphi1 = tru->TSPhTrigs(); // these are the "normal" stations 00165 // _tsphi2 = 0; 00166 // _tstheta = tru->TSThTrigs(); 00167 // } 00168 // else if (flag==0){ 00169 // _tsphi1 = tru->TSPhTrigs(); 00170 // _tstheta = 0; 00171 // } 00172 // else if(flag==1) { 00173 // _tsphi2 = tru->TSPhTrigs(); // these are the "double" stations 00174 // _tstheta = 0; 00175 // } 00176 // // generates SectColl Id from tsphi Id 00177 // if (flag==2 || flag==0){ 00178 // int sect = tru->sector(); 00179 // if (sect == 13) sect=4; 00180 // if (sect == 14) sect=10; 00181 // _sectcollid=DTSectCollId(tru->wheel(),tru->station(),sect); 00182 // } 00183 00184 }
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().
00151 { 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().
00160 { return DTSCThCache::_cache.begin(); }
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.
References DTCache< T, Coll >::clearCache().
Referenced by DTTrig::triggerReco().
00175 { DTSCPhCache::clearCache(); DTSCThCache::clearCache(); }
DTConfigSectColl* DTSectColl::config | ( | ) | const [inline] |
Configuration.
Definition at line 78 of file DTSectColl.h.
References _config.
Referenced by addTSPhi(), addTSTheta(), runSectColl(), and setConfig().
00078 { 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().
00157 { 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().
00166 { return DTSCThCache::_cache.end(); }
Get a Sector Collector (step is TS one).
Definition at line 319 of file DTSectColl.cc.
References _tsc, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DTConfig::NSTEPF, and DTConfig::NSTEPL.
Referenced by addTSPhi(), and addTSTheta().
00319 { 00320 00321 if(step<DTConfigSectColl::NSTEPF||step>DTConfigSectColl::NSTEPL){ 00322 std::cout << "DTSectColl::getDTSC: step out of range: " << step; 00323 std::cout << " empty pointer returned!" << std::endl; 00324 return 0; 00325 } 00326 00327 if(istat<1 || istat>4){ 00328 std::cout << "DTSectColl::getDTSC: station out of SC range: " << istat; 00329 std::cout << " emty pointer returned!" << std::endl; 00330 return 0; 00331 } 00332 00333 return _tsc[step-DTConfigSectColl::NSTEPF][istat-1]; 00334 00335 }
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, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), nCandPh(), and p.
00400 { 00401 00402 if(ifs<1||ifs>2){ 00403 std::cout << "DTSectColl::getDTSectCollPhCand: wrong track number: " << ifs; 00404 std::cout << " empty pointer returned!" << std::endl; 00405 return 0; 00406 } 00407 if(n<1 || n>nCandPh(ifs)) { 00408 std::cout << "DTSectColl::getDTSectCollPhCand: requested trigger not present: " << n; 00409 std::cout << " empty pointer returned!" << std::endl; 00410 return 0; 00411 } 00412 00413 std::vector<DTSectCollPhCand*>::const_iterator p = _incand_ph[ifs-1].begin()+n-1; 00414 return (*p); 00415 00416 }
DTSectCollThCand * DTSectColl::getDTSectCollThCand | ( | unsigned | n | ) | const |
Get a Candidate for Sector Collector.
Definition at line 419 of file DTSectColl.cc.
References _incand_th, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), nCandTh(), and p.
00419 { 00420 00421 if(n<1 || n>nCandTh()) { 00422 std::cout << "DTSectColl::getDTSectCollThCand: requested trigger not present: " << n; 00423 std::cout << " empty pointer returned!" << std::endl; 00424 return 0; 00425 } 00426 00427 std::vector<DTSectCollThCand*>::const_iterator p = _incand_th.begin()+n-1; 00428 return (*p); 00429 00430 }
DTSectCollPhCand * DTSectColl::getTrackPh | ( | int | n | ) | const |
Return the requested Phi track.
Definition at line 434 of file DTSectColl.cc.
References _outcand_ph, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), nTracksPh(), and p.
00434 { 00435 00436 if(n<1 || n>nTracksPh()) { 00437 std::cout << "DTSectColl::getTrackPh: requested track not present: " << n; 00438 std::cout << " empty pointer returned!" << std::endl; 00439 return 0; 00440 } 00441 00442 std::vector<DTSectCollPhCand*>::const_iterator p = _outcand_ph.begin()+n-1; 00443 return (*p); 00444 00445 }
DTSectCollThCand * DTSectColl::getTrackTh | ( | int | n | ) | const |
Return the requested Theta track.
Definition at line 448 of file DTSectColl.cc.
References _outcand_th, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), nTracksTh(), and p.
00448 { 00449 00450 if(n<1 || n>nTracksTh()) { 00451 std::cout << "DTSectColl::getTrackTh: requested track not present: " << n; 00452 std::cout << " empty pointer returned!" << std::endl; 00453 return 0; 00454 } 00455 00456 std::vector<DTSectCollThCand*>::const_iterator p = _outcand_th.begin()+n-1; 00457 return (*p); 00458 00459 }
Return TSPhi.
Definition at line 72 of file DTSectColl.h.
References _tsphi.
Referenced by DTTrig::triggerReco().
00072 { return _tsphi[istat-1]; }
Return TSTheta.
Definition at line 75 of file DTSectColl.h.
References _tstheta.
Referenced by DTTrig::triggerReco().
00075 { 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(), p, and cmsRelvalreportInput::step.
Referenced by reconstruct().
00188 { 00189 00190 localClear(); 00191 00192 std::vector<DTChambPhSegm>::const_iterator p; 00193 std::vector<DTChambPhSegm>::const_iterator pend; 00194 00195 for(int istat=1;istat<5;istat++){ 00196 pend=_tsphi[istat-1]->end(); 00197 for(p=_tsphi[istat-1]->begin();p!=pend;p++){ 00198 int step = p->step(); 00199 int fs = (p->isFirst()) ? 1 : 2 ; 00200 // load trigger 00201 addTSPhi(step, &(*p), fs, istat); 00202 } 00203 } 00204 00205 if(!(_tsphi[4]==0)){ // only for double stations 00206 pend=_tsphi[4]->end(); 00207 for(p=_tsphi[4]->begin();p!=pend;p++){ 00208 int step = p->step(); 00209 int fs = (p->isFirst()) ? 1 : 2 ; 00210 // load trigger 00211 addTSPhi(step, &(*p), fs ,4); 00212 } 00213 } 00214 std::vector<DTChambThSegm>::const_iterator pth; 00215 std::vector<DTChambThSegm>::const_iterator pthend; 00216 00217 for(int istat=1;istat<4;istat++){ 00218 pthend=_tstheta[istat-1]->end(); 00219 for(pth=_tstheta[istat-1]->begin();pth!=pthend;pth++){ 00220 int step = pth->step(); 00221 // load trigger 00222 addTSTheta(step, &(*pth), istat); 00223 } 00224 } 00225 00226 }
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().
00084 { 00085 00086 // clear all sector collectors 00087 for(int istat=0;istat<4;istat++){ 00088 for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++) { 00089 _tsc[istep][istat]->clear(); 00090 } 00091 } 00092 00093 for(int iph=0;iph<2;++iph){ 00094 std::vector<DTSectCollPhCand*>::const_iterator phbi = _incand_ph[iph].begin(); 00095 std::vector<DTSectCollPhCand*>::const_iterator phei = _incand_ph[iph].end(); 00096 for ( std::vector<DTSectCollPhCand*>::const_iterator iphit = phbi;iphit!= phei;++iphit) 00097 delete (*iphit); 00098 _incand_ph[iph].clear(); 00099 } 00100 00101 _outcand_ph.clear(); 00102 00103 std::vector<DTSectCollThCand*>::const_iterator thb = _incand_th.begin(); 00104 std::vector<DTSectCollThCand*>::const_iterator the = _incand_th.end(); 00105 for ( std::vector<DTSectCollThCand*>::const_iterator ithit = thb;ithit!= the;++ithit) 00106 delete (*ithit); 00107 _incand_th.clear(); 00108 00109 _outcand_th.clear(); 00110 00111 }
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, GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
Referenced by getDTSectCollPhCand().
00463 { 00464 00465 if(ifs<1||ifs>2){ 00466 std::cout << "DTSectColl::nCandPh: wrong track number: " << ifs; 00467 std::cout << " 0 returned!" << std::endl; 00468 return 0; 00469 } 00470 00471 return _incand_ph[ifs-1].size(); 00472 00473 }
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().
00476 { 00477 00478 return _incand_th.size(); 00479 00480 }
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, and p.
Referenced by DTTrig::chSectCollPhSegm1(), and DTTrig::chSectCollPhSegm2().
00483 { 00484 00485 int n=0; 00486 std::vector<DTSectCollPhSegm>::const_iterator p; 00487 std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end(); 00488 for(p=DTSCPhCache::begin(); p<endp; p++) { 00489 if(p->step()==step)n++; 00490 } 00491 00492 return n; 00493 00494 }
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, and p.
Referenced by DTTrig::chSectCollThSegm().
00497 { 00498 00499 int n=0; 00500 std::vector<DTSectCollThSegm>::const_iterator p; 00501 std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end(); 00502 for(p=DTSCThCache::begin(); p>endp; p++) { 00503 if(p->step()==step)n++; 00504 } 00505 00506 return n; 00507 00508 }
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().
00139 { 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().
00142 { return _outcand_th.size(); }
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().
00178 { loadSectColl(); runSectColl(); }
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(), GenMuonPlsPt100GeV_cfg::cout, debug, lat::endl(), 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().
00339 { 00340 00341 for(int istat=0;istat<4;istat++){ 00342 for(int istep=DTConfigSectColl::NSTEPF;istep<DTConfigSectColl::NSTEPL+1;istep++) { 00343 00344 if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nFirstTPh()>0 || _tsc[istep-DTConfigSectColl::NSTEPF][istat]->nCandTh()>0 ) { 00345 00346 _tsc[istep-DTConfigSectColl::NSTEPF][istat]->run(); 00347 00348 if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksPh()>0) { 00349 00350 DTSectCollPhCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackPh(1); 00351 DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr(),1)); 00352 _outcand_ph.push_back(cand); 00353 00354 if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksPh()>1) { 00355 00356 DTSectCollPhCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackPh(2); 00357 DTSCPhCache::_cache.push_back(DTSectCollPhSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr(),2)); 00358 _outcand_ph.push_back(cand); 00359 } 00360 } 00361 if(_tsc[istep-DTConfigSectColl::NSTEPF][istat]->nTracksTh()>0) { 00362 00363 DTSectCollThCand *cand = _tsc[istep-DTConfigSectColl::NSTEPF][istat]->getTrackTh(1); 00364 DTSCThCache::_cache.push_back(DTSectCollThSegm(SectCollId(),istep+cand->CoarseSync(),cand->tsTr())); 00365 _outcand_th.push_back(cand); // CB getTrackTh non dovrebbe prendere argomenti modificala! 00366 00367 } 00368 } 00369 } 00370 } 00371 00372 // debugging... 00373 if(config()->debug()){ 00374 if( DTSCPhCache::_cache.size()>0 || DTSCThCache::_cache.size()>0){ 00375 std::cout << "====================================================" << std::endl; 00376 std::cout << " Sect Coll segments " << std::endl; 00377 if (DTSCPhCache::_cache.size()>0){ 00378 std:: cout << " ***Phi Segments*** " << std:: endl; 00379 std::vector<DTSectCollPhSegm>::const_iterator pph; 00380 for(pph=DTSCPhCache::_cache.begin();pph<DTSCPhCache::_cache.end();pph++) { 00381 pph->print(); 00382 } 00383 } 00384 if (DTSCThCache::_cache.size()>0){ 00385 std:: cout << " **Theta Segments** " << std:: endl; 00386 std::vector<DTSectCollThSegm>::const_iterator pth; 00387 for(pth=DTSCThCache::_cache.begin();pth<DTSCThCache::_cache.end();pth++) { 00388 pth->print(); 00389 } 00390 } 00391 std::cout << "====================================================" << std::endl; 00392 } 00393 } 00394 // end debugging 00395 00396 }
DTSectCollId DTSectColl::SectCollId | ( | ) | [inline] |
Return the Sector Collector Id.
Definition at line 181 of file DTSectColl.h.
References _sectcollid.
Referenced by runSectColl().
00181 { 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 p.
Referenced by DTTrig::chSectCollPhSegm1(), and DTTrig::chSectCollPhSegm2().
00512 { 00513 00514 std::vector<DTSectCollPhSegm>::const_iterator p; 00515 std::vector<DTSectCollPhSegm>::const_iterator endp = DTSCPhCache::end(); 00516 for(p=DTSCPhCache::begin();p<endp;p++){ 00517 if(p->step()==step&&((n==1&&p->isFirst())||(n==2&&!p->isFirst()))) 00518 return &(*p); 00519 } 00520 00521 return 0; 00522 00523 }
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(), and p.
Referenced by DTTrig::chSectCollThSegm().
00526 { 00527 00528 std::vector<DTSectCollThSegm>::const_iterator p; 00529 std::vector<DTSectCollThSegm>::const_iterator endp = DTSCThCache::end(); 00530 for(p=DTSCThCache::begin();p<endp;p++){ 00531 if(p->step()==step) 00532 return &(*p); 00533 } 00534 00535 return 0; 00536 00537 }
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().
00114 { 00115 00116 _config = conf->getDTConfigSectColl(_sectcollid); 00117 00118 for(int istat=0;istat<4;istat++){ 00119 for(int istep=0;istep<DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1;istep++){ 00120 _tsc[istep][istat]->setConfig(config()); 00121 } 00122 } 00123 00124 }
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().
00154 { 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().
00163 { return DTSCThCache::_cache.size(); }
DTConfigSectColl* DTSectColl::_config [private] |
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] |
DTSC* DTSectColl::_tsc[DTConfigSectColl::NSTEPL-DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC] [private] |
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().