63 for(
int itk=0;itk<=1;itk++){
79 std::cout <<
"DTTSS::run: Processing DTTSS number " <<
_n <<
" : ";
89 std::cout <<
"Vector of first tracks in DTTSS: " << std::endl;
90 std::vector<DTTSCand*>::const_iterator
p;
108 std::vector<DTTSCand*>::const_iterator
p;
109 std::cout <<
"Vector of second tracks (including carry) in DTTSS: " << std::endl;
129 std::vector<DTTSCand*>::iterator
p;
134 if(curr->
dataword()==0x1ff)
continue;
140 else if((*curr)<=(*best)){
147 else if((*curr)<=(*carry)){
163 {inner_or_corr=carry->
isInner();
166 if(
config()->TssGhost1Flag()<2 && (
167 config()->TssGhost1Flag()==0 ||
206 std::cout <<
"DTTSS::DTTSSsort2: called with no first track.";
207 std::cout <<
" empty pointer returned!" << std::endl;
219 std::vector<DTTSCand*>::iterator
p;
221 if(!(*p)->isCarry())
_logWord2[1+(*p)->TcPos()] =
'o';
226 if(
config()->TssGhost2Flag()==3) {
228 std::vector<DTTSCand*>::iterator
p;
237 std::vector<DTTSCand*>::iterator
p;
245 if(curr->
dataword()==0x1ff)
continue;
256 {inner_or_corr=curr->
isInner();
277 else if((*curr)<=(*second)){
291 int ifs = (cand->
isFirst()) ? 0 : 1;
299 std::cout <<
"DTTSS::nTracoT: wrong track number: " << ifs;
300 std::cout <<
" 0 returned!" << std::endl;
309 std::cout <<
"DTTSS::getDTTSCand: wrong track number: " << ifs;
310 std::cout <<
" empty pointer returned!" << std::endl;
314 std::cout <<
"DTTSS::getDTTSCand: requested trigger not present: " <<
n;
315 std::cout <<
" empty pointer returned!" << std::endl;
318 std::vector<DTTSCand*>::const_iterator
p=
_tctrig[ifs-1].begin()+n-1;
325 std::cout <<
"DTTSS::getTracoT: wrong track number: " << ifs;
326 std::cout <<
" empty pointer returned!" << std::endl;
330 std::cout <<
"DTTSS::getTracoT: requested trigger not present: " <<
n;
331 std::cout <<
" empty pointer returned!" << std::endl;
340 std::cout <<
"DTTSS::getTrack: requested track not present: " <<
n;
341 std::cout <<
" empty pointer returned!" << std::endl;
344 std::vector<DTTSCand*>::const_iterator
p =
_outcand.begin()+n-1;
350 std::vector<DTTSCand*>::const_iterator
p;
352 if((*p)->isCarry())
return (*p);
365 std::cout <<
"DTTSS::logWord: requested track not present: " <<
n;
366 std::cout <<
" empty string returned!" << std::endl;
void setBitsTss()
Set the quality bits for DTTSS analysis.
std::vector< DTTSCand * > _tctrig[2]
int nTracks() const
Return the number of sorted tracks.
std::string logWord(int n) const
Return the requested log word.
void addDTTSCand(DTTSCand *cand)
Add a TS candidate to the TSS, ifs is first/second track flag.
int nFirstT() const
Return the number of input first tracks.
DTTSCand * getCarry() const
Return the carry (for debugging)
unsigned dataword() const
Return an uint16 with the content of the data word (for debugging)
U second(std::pair< T, U > const &p)
int isFirst() const
Return the first/second track bit.
int nSecondT() const
Return the number of input second tracks.
std::vector< DTTSCand * > _outcand
DTTSCand * getTrack(int n) const
Return the requested track.
int isCarry() const
Return the carry bit.
DTTSCand * sortTSS2()
Sort 2.
DTTSCand * sortTSS1()
Sort 1.
bool TssGhost1Corr() const
Correlated ghost 1 suppression option in TSS.
const DTTracoTrigData * tracoTr() const
Return associated TRACO trigger.
int TssGhost2Flag() const
Ghost 2 suppression option in TSS.
int isInner() const
Return Inner/Outer bit.
void setSecondTrack()
Set the first track bit to second track (used for carry)
bool TssGhost2Corr() const
Correlated ghost 2 suppression option in TSS.
const DTTracoTrigData * getTracoT(int ifs, unsigned n) const
Return requested TRACO trigger.
int TcPos() const
Retrun the TRACO position inside the TSS.
DTConfigTSPhi * config() const
Configuration set.
void run()
Run the TSS algorithm.
int isCorr() const
Return correlation bit.
unsigned nTracoT(int ifs) const
Return the number of input tracks (first/second)
DTTSCand * getDTTSCand(int ifs, unsigned n) const
Return requested TS candidate.