57 for (
int itk = 0; itk <= 1; itk++) {
72 std::cout <<
"DTTSS::run: Processing DTTSS number " <<
_n <<
" : ";
84 std::cout <<
"Vector of first tracks in DTTSS: " << std::endl;
85 std::vector<DTTSCand *>::const_iterator
p;
93 if (first !=
nullptr) {
104 std::vector<DTTSCand *>::const_iterator
p;
105 std::cout <<
"Vector of second tracks (including carry) in DTTSS: " 114 if (second !=
nullptr) {
124 std::vector<DTTSCand *>::iterator
p;
126 DTTSCand *curr = (*p) ? (*p) :
nullptr;
134 if (best ==
nullptr) {
136 }
else if ((*curr) <= (*best)) {
139 }
else if (carry ==
nullptr) {
141 }
else if ((*curr) <= (*carry)) {
148 if (carry !=
nullptr) {
156 inner_or_corr = carry->
isInner();
158 if (
config()->TssGhost1Flag() < 2 &&
160 config()->TssGhost1Flag() == 0 ||
197 std::cout <<
"DTTSS::DTTSSsort2: called with no first track.";
198 std::cout <<
" empty pointer returned!" << std::endl;
210 std::vector<DTTSCand *>::iterator
p;
212 if (!(*p)->isCarry())
218 if (
config()->TssGhost2Flag() == 3) {
220 std::vector<DTTSCand *>::iterator
p;
229 std::vector<DTTSCand *>::iterator
p;
249 inner_or_corr = curr->
isInner();
269 if (second ==
nullptr) {
271 }
else if ((*curr) <= (*second)) {
284 int ifs = (cand->
isFirst()) ? 0 : 1;
290 if (ifs < 1 || ifs > 2) {
291 std::cout <<
"DTTSS::nTracoT: wrong track number: " << ifs;
292 std::cout <<
" 0 returned!" << std::endl;
295 return _tctrig[ifs - 1].size();
299 if (ifs < 1 || ifs > 2) {
300 std::cout <<
"DTTSS::getDTTSCand: wrong track number: " << ifs;
301 std::cout <<
" empty pointer returned!" << std::endl;
304 if (n < 1 || n >
nTracoT(ifs)) {
305 std::cout <<
"DTTSS::getDTTSCand: requested trigger not present: " <<
n;
306 std::cout <<
" empty pointer returned!" << std::endl;
309 std::vector<DTTSCand *>::const_iterator
p =
_tctrig[ifs - 1].begin() + n - 1;
314 if (ifs < 1 || ifs > 2) {
315 std::cout <<
"DTTSS::getTracoT: wrong track number: " << ifs;
316 std::cout <<
" empty pointer returned!" << std::endl;
319 if (n < 1 || n >
nTracoT(ifs)) {
320 std::cout <<
"DTTSS::getTracoT: requested trigger not present: " <<
n;
321 std::cout <<
" empty pointer returned!" << std::endl;
329 std::cout <<
"DTTSS::getTrack: requested track not present: " <<
n;
330 std::cout <<
" empty pointer returned!" << std::endl;
333 std::vector<DTTSCand *>::const_iterator
p =
_outcand.begin() + n - 1;
338 std::vector<DTTSCand *>::const_iterator
p;
355 std::cout <<
"DTTSS::logWord: requested track not present: " <<
n;
356 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.
DTTSCand * getTrack(int n) const
Return the requested track.
const DTConfigTSPhi * config() const
Configuration set.
Abs< T >::type abs(const T &t)
int isCarry() const
Return the carry bit.
DTTSCand * sortTSS2()
Sort 2.
std::vector< DTTSCand * > _outcand
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.
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.