|
|
Go to the documentation of this file.
51 for (
int istat = 0; istat < 4; istat++) {
53 _tsc[istep][istat] =
new DTSC(istat + 1);
56 for (
int istat = 0; istat < 5; istat++)
58 for (
int istat = 0; istat < 3; istat++)
68 for (
int istat = 0; istat < 4; istat++) {
70 delete _tsc[istep][istat];
81 for (
int istat = 0; istat < 4; istat++) {
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)
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)
109 for (
int istat = 0; istat < 4; istat++) {
132 <<
" Skipping insertion" << std::endl;
136 if (stat < 1 || stat > 5) {
137 std::cout <<
"DTSectColl::addTU: Wrong station number Skipping insertion" << std::endl;
174 std::vector<DTChambPhSegm>::const_iterator
p;
175 std::vector<DTChambPhSegm>::const_iterator pend;
177 for (
int istat = 1; istat < 5; istat++) {
180 int step =
p->step();
181 int fs = (
p->isFirst()) ? 1 : 2;
187 if (!(
_tsphi[4] ==
nullptr)) {
190 int step =
p->step();
191 int fs = (
p->isFirst()) ? 1 : 2;
196 std::vector<DTChambThSegm>::const_iterator pth;
197 std::vector<DTChambThSegm>::const_iterator pthend;
199 for (
int istat = 1; istat < 4; istat++) {
201 for (pth =
_tstheta[istat - 1]->
begin(); pth != pthend; pth++) {
202 int step = pth->step();
211 std::cout <<
"DTSectColl::addTSPhi: step out of range: " <<
step;
212 std::cout <<
" trigger not added!" << std::endl;
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;
224 std::cout <<
"DTSectColl::addTSPhi --> code = 0 ! ";
225 std::cout <<
" trigger not added!" << std::endl;
233 bool fs = (ifs == 1);
243 std::cout <<
" (first track)" << std::endl;
245 std::cout <<
" (second track)" << std::endl;
252 std::cout <<
"DTSectColl::addTSTheta: step out of range: " <<
step;
253 std::cout <<
" trigger not added!" << std::endl;
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;
265 for (
int i = 0;
i < 7;
i++)
271 std::cout <<
"DTSectColl::addTSTheta --> no position bit equal to 1 ! ";
272 std::cout <<
" trigger not added!" << std::endl;
286 std::cout <<
"DTSectColl::addTSTheta at step " <<
step << std::endl;
292 std::cout <<
"DTSectColl::getDTSC: step out of range: " <<
step;
293 std::cout <<
" empty pointer returned!" << std::endl;
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;
307 for (
int istat = 0; istat < 4; istat++) {
336 std::cout <<
"====================================================" << std::endl;
337 std::cout <<
" Sect Coll segments " << std::endl;
339 std::cout <<
" ***Phi Segments*** " << std::endl;
340 std::vector<DTSectCollPhSegm>::const_iterator pph;
346 std::cout <<
" **Theta Segments** " << std::endl;
347 std::vector<DTSectCollThSegm>::const_iterator pth;
352 std::cout <<
"====================================================" << std::endl;
359 if (ifs < 1 || ifs > 2) {
360 std::cout <<
"DTSectColl::getDTSectCollPhCand: wrong track number: " << ifs;
361 std::cout <<
" empty pointer returned!" << std::endl;
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;
370 std::vector<DTSectCollPhCand*>::const_iterator
p =
_incand_ph[ifs - 1].begin() +
n - 1;
376 std::cout <<
"DTSectColl::getDTSectCollThCand: requested trigger not present: " <<
n;
377 std::cout <<
" empty pointer returned!" << std::endl;
381 std::vector<DTSectCollThCand*>::const_iterator
p =
_incand_th.begin() +
n - 1;
387 std::cout <<
"DTSectColl::getTrackPh: requested track not present: " <<
n;
388 std::cout <<
" empty pointer returned!" << std::endl;
392 std::vector<DTSectCollPhCand*>::const_iterator
p =
_outcand_ph.begin() +
n - 1;
398 std::cout <<
"DTSectColl::getTrackTh: requested track not present: " <<
n;
399 std::cout <<
" empty pointer returned!" << std::endl;
403 std::vector<DTSectCollThCand*>::const_iterator
p =
_outcand_th.begin() +
n - 1;
408 if (ifs < 1 || ifs > 2) {
409 std::cout <<
"DTSectColl::nCandPh: wrong track number: " << ifs;
410 std::cout <<
" 0 returned!" << std::endl;
421 std::vector<DTSectCollPhSegm>::const_iterator
p;
424 if (
p->step() ==
step)
433 std::vector<DTSectCollThSegm>::const_iterator
p;
436 if (
p->step() ==
step)
444 std::vector<DTSectCollPhSegm>::const_iterator
p;
447 if (
p->step() ==
step && ((
n == 1 &&
p->isFirst()) || (
n == 2 && !
p->isFirst())))
455 std::vector<DTSectCollThSegm>::const_iterator
p;
458 if (
p->step() ==
step)
int oldCode() const
Return trigger code (10*inner_code+outer_code; X_code=1,2,3,4,8)
void addThCand(DTSectCollThCand *cand)
Add a Theta candidate to sect coll.
const DTConfigSectColl * _config
DTSC * getDTSC(int step, int istat) const
Get a Sector Collector (step is TS one)
void addDTSectCollPhCand(DTSectCollPhCand *cand)
Add a Sector Collector.
int wheel() const
Return wheel number.
void setConfig(const DTConfigManager *conf)
Set configuration.
std::vector< DTSectCollThCand * > _incand_th
void loadSectColl()
Load a Sector Collector.
void run()
Run the Sector Collector algorithm.
void localClear()
Local Clear.
static const int NSTEPL
Constants: first and last step to start trigger finding.
int sector() const
Return sector number.
~DTSectColl() override
Destructor.
const_iterator begin() const
Get first cache element.
DTSectCollPhCand * getDTSectCollPhCand(int ifs, unsigned n) const
Get a Phi Candidate for Sector Collector.
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
DTSC * _tsc[DTConfigSectColl::NSTEPL - DTConfigSectColl::NSTEPF+1][DTConfigSectColl::NDTSC]
void addTSPhi(int step, const DTChambPhSegm *tsmsegm, int ifs, int istat)
Add a TSM candidate (step is TSM step not SC one)
void setConfig(const DTConfigSectColl *conf)
Set configuration.
void addTSTheta(int step, const DTChambThSegm *tsmsegm, int istat)
Add a TS Theta candidate (step is TSTheta step not sc one)
unsigned nCandPh(int ifs) const
Return the number of Phi input tracks (first/second)
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
DTSectCollThCand * getDTSectCollThCand(unsigned n) const
Get a Candidate for Sector Collector.
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
DTTSTheta * _tstheta[DTConfigSectColl::NTSTSC]
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
DTSectCollId SectCollId()
Return the Sector Collector Id.
int nTracksTh() const
Return the number of output Theta tracks.
const_iterator end() const
Get last cache element.
DTTSPhi * _tsphi[DTConfigSectColl::NTSPSC]
DTSectColl(DTSectCollId id)
Constructor.
DTSectCollPhCand * getTrackPh(int n) const
Return the requested Phi track.
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
DTSectCollThCand * getTrackTh(int n) const
Return the requested Theta track.
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
int station() const
Return station number.
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
int nTracksPh() const
Return the number of output Phi tracks.
unsigned nCandTh() const
Return the number of Theta input tracks.
int position(const int i) const
Return the position for a given set of 7 BTI.
void runSectColl()
Run Sector Collector.
std::vector< DTSectCollPhCand * > _outcand_ph
const DTConfigSectColl * getDTConfigSectColl(DTSectCollId) const
Get desired SectorCollector configuration.
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
std::vector< DTSectCollThCand * > _outcand_th
std::vector< DTSectCollPhCand * > _incand_ph[2]
const DTConfigSectColl * config() const
Configuration.