|
|
Go to the documentation of this file.
57 _tss[is].push_back(tss);
63 _tsm[is].push_back(tsm);
72 std::vector<DTTSS *>::iterator ptss;
73 std::vector<DTTSM *>::iterator ptsm;
76 for (ptss =
_tss[is].
begin(); ptss !=
_tss[is].end(); ptss++) {
81 for (ptsm =
_tsm[is].
begin(); ptsm !=
_tsm[is].end(); ptsm++) {
99 std::vector<DTTSCand *>::iterator
p1;
105 std::vector<DTTSS *>::iterator ptss;
106 for (ptss =
_tss[is].
begin(); ptss !=
_tss[is].end(); ptss++) {
110 std::vector<DTTSM *>::iterator ptsm;
111 for (ptsm =
_tsm[is].
begin(); ptsm !=
_tsm[is].end(); ptsm++) {
123 std::vector<DTTSS *>::iterator ptss;
124 for (ptss =
_tss[is].
begin(); ptss !=
_tss[is].end(); ptss++) {
125 (*ptss)->setConfig(
config());
128 std::vector<DTTSM *>::iterator ptsm;
129 for (ptsm =
_tsm[is].
begin(); ptsm !=
_tsm[is].end(); ptsm++) {
130 (*ptsm)->setConfig(
config());
146 std::vector<DTTracoTrigData>::const_iterator
p;
147 std::vector<DTTracoTrigData>::const_iterator pend =
_tracocard->
end();
150 int step =
p->step();
151 int fs = (
p->isFirst()) ? 1 : 2;
165 std::cout <<
"DTTSPhi::addTracoT: step out of range: " <<
step;
166 std::cout <<
" trigger not added!" << std::endl;
170 if (!tracotrig->
pvCode() || !tracotrig->
code()) {
171 std::cout <<
"DTTSPhi::addTracoT: preview not present in TRACO trigger or "
173 std::cout <<
" trigger not added!" << std::endl;
180 std::cout <<
"DTTSPhi::addTracoT: wrong TRACO number: ";
182 std::cout <<
" trigger not added!" << std::endl;
188 if (
config()->TsmStatus().element(itss) == 0) {
220 bool existSecondPrevBx =
false;
231 std::vector<DTTSS *>::iterator
p;
233 if ((*p)->nTracoT(1) > 0) {
237 if ((*p)->nTracks() > 0) {
238 for (
int it = 1; it <= (*p)->nTracks(); it++) {
242 int my_itss = (*p)->number();
245 std::cout <<
" DTTSPhi::addTracoT - wrong TSMD: " << ntsstsmd << std::endl;
249 itsmd = (my_itss - 1) / ntsstsmd + 1;
251 std::cout <<
" DTTSPhi::addTracoT: itsmd = (my_itss -1 ) / "
252 "ntsstsmd + 1 ---> my_itss = "
253 << my_itss <<
" ntsstsmd = " << ntsstsmd <<
" itsmd = " << itsmd << std::endl;
255 }
else if (bkmod == 1) {
259 std::cout <<
"****** >DTTSPhi::RunTSPhi wrong itsmd = " << itsmd << std::endl;
261 tsm->
addCand((*p)->getTrack(it));
270 std::vector<DTTSM *>::iterator p_tsm;
275 i_tsmd = (*p_tsm)->number() - 1;
277 if ((*p_tsm)->nCand(1) > 0) {
280 (*p_tsm)->run(bkmod);
285 if ((*p_tsm)->nTracks() > 0) {
288 if ((*p_tsm)->getTrack(1)->tracoTr()->code() > 0) {
290 if (
config()->TsmGetCarryFlag() == 0) {
297 <<
" i_tsmd = " << i_tsmd << std::endl;
298 if ((*p_tsm)->nTracks() > 1) {
299 if ((*p_tsm)->getTrack(2)->tracoTr()->code() > 0) {
303 <<
" i_tsmd = " << i_tsmd << std::endl;
305 secondPrevBx = (*p_tsm)->getTrack(2);
308 }
else if (
config()->TsmGetCarryFlag() == 1) {
313 if ((!existSecondPrevBx) ||
339 if ((*p_tsm)->nTracks() > 1) {
341 if ((*p_tsm)->getTrack(2)->tracoTr()->code() > 0) {
342 secondPrevBx = (*p_tsm)->getTrack(2);
358 if ((!existSecondPrevBx) ||
first->isHtrig() ||
first->isCorr()) {
364 if ((*p_tsm)->nTracks() > 1) {
366 if ((*p_tsm)->getTrack(2)->tracoTr()->code() > 0) {
367 secondPrevBx = (*p_tsm)->getTrack(2);
386 if (existSecondPrevBx) {
399 std::cout <<
"====================================================" << std::endl;
400 std::cout <<
" Phi segments " << std::endl;
401 std::vector<DTChambPhSegm>::const_iterator
p;
405 std::cout <<
"====================================================" << std::endl;
415 std::cout <<
"DTTSPhi::ignoreSecondTrack: step out of range: " <<
step;
416 std::cout <<
" no flag set!" << std::endl;
421 std::cout <<
"DTTSPhi::ignoreSecondTrack: wrong TRACO number: " << tracon;
422 std::cout <<
" no flag set!" << std::endl;
433 itsmd = (itss - 1) / ntsstsmd + 1;
442 std::cout <<
"DTTSPhi::getDTTSS: step out of range: " <<
step;
443 std::cout <<
" empty pointer returned!" << std::endl;
447 std::cout <<
"DTTSPhi::getDTTSS: requested DTTSS not present: " <<
n;
449 std::cout <<
" empty pointer returned!" << std::endl;
459 std::cout <<
"DTTSPhi::getDTTSM: step out of range: " <<
step;
460 std::cout <<
" empty pointer returned!" << std::endl;
464 std::cout <<
"DTTSPhi::getDTTSM: requested DTTSM not present: " <<
n;
466 std::cout <<
" empty pointer returned!" << std::endl;
475 std::vector<DTChambPhSegm>::const_iterator
p;
477 if (
p->step() ==
step)
484 std::vector<DTChambPhSegm>::const_iterator
p;
486 if (
p->step() ==
step && ((
n == 1 &&
p->isFirst()) || (
n == 2 && !
p->isFirst())))
498 std::cout <<
"DTTSPhi::LocalPosition called with wrong argument!" << std::endl;
505 DTChambPhSegm *
trig = dynamic_cast<DTChambPhSegm *>(const_cast<DTTrigData *>(tr));
508 std::cout <<
"DTTSPhi::LocalDirection called with wrong argument!" << std::endl;
int tracoNumber() const
Return parent TRACO number.
void runTSPhi()
run DTTSPhi algorithm (DTTSS+DTTSM)
static const int NTSMD
Constant: number of TSMD.
int size() const
Get cache vector's size.
LocalPoint localPosition(const DTTrigData *) const override
Local position in chamber of a trigger-data object.
DTTSS * getDTTSS(int step, unsigned n) const
const DTConfigTSPhi * _config
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
int pvCode() const
Return the preview code.
int number() const
Return identifier.
int isInner() const
Return Inner/Outer bit.
static const int NSTEPL
Constants: first and last step to start trigger finding.
int TsmGetCarryFlag() const
Handling of second track (carry) in case of pile-up, in TSM.
DTTSPhi(DTTrigGeom *, DTTracoCard *)
Constructor.
std::vector< DTTSM * > _tsm[DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF+1]
Point3DBase< Scalar, LocalTag > LocalPoint
const_iterator begin() const
Get first cache element.
DTChamberId ChamberId() const
Identifier of the associated chamber.
int sector() const
Return sector number.
void loadTSPhi()
store DTTracoChip triggers in the DTTSS's
void setConfig(const DTConfigManager *conf)
Set configuration.
void ignoreSecondTrack(int step, int tracon)
Set a flag to ignore second tracks (if first track at following BX)
void addDTTSCand(DTTSCand *cand)
Add a TS candidate to the TSS, ifs is first/second track flag.
const DTChambPhSegm * segment(int step, unsigned n)
Return the requested DTTSPhi segment.
int isCorr() const
Return correlation bit.
int element(const int pos) const
bool usedTraco(int i) const
Enabled TRACOs in TS.
int nSegm(int step)
Return number of DTTSPhi segments.
static const int NTSSTSM
Constant: maximum number of TSS in input to the TSM.
int wheel() const
Return wheel number.
const DTConfigTSPhi * config() const
Return the configuration class.
~DTTSPhi() override
Destructor.
static const int NTCTSS
Constant: number of TRACOs in input to a TSS.
int TSSinTSMD(int stat, int sect) const
Return the max nb. of TSSs in input to a single TSMD (called ONLY in back-up mode)
const_iterator end() const
Get last cache element.
Local3DVector LocalVector
const DTTracoTrigData * tracoTr() const
Return associated TRACO trigger.
void print() const override
print
std::vector< DTTSCand * > _tctrig[DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF+1]
void addCand(DTTSCand *cand)
Add a TSS candidate to the TSM, ifs is first/second track flag.
void addTracoT(int step, const DTTracoTrigData *tracotrig, int ifs)
int code() const
Return trigger code.
void ignoreSecondTrack()
Set a flag to skip sort2.
BitArray< 8 > TsmStatus() const
TSM status.
LocalVector localDirection(const DTTrigData *) const override
Local direction in chamber of a trigger-data object.
int station() const
Return station number.
int isHtrig() const
Return HTRIG/LTRIG bit.
LocalPoint localPosition(const DTTrigData *) const override
NEWGEO Local position in chamber of a trigger-data object.
const DTConfigTSPhi * getDTConfigTSPhi(DTChamberId) const
Get desired Trigger Server Phi configuration.
std::vector< DTTSS * > _tss[DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF+1]
void ignoreSecondTrack()
Set a flag to skip sort2.
bool debug() const
Return the debug flag.
DTTSM * getDTTSM(int step, unsigned n) const
static const int NTSSTSMD
Constant: maximum number of TSS in input to a single TSMD.