56 for (
int itk = 0; itk <= 1; itk++) {
70 std::cout <<
"DTTSS::run: Processing DTTSS number " <<
_n <<
" : ";
81 std::cout <<
"Vector of first tracks in DTTSS: " << std::endl;
82 std::vector<DTTSCand *>::const_iterator
p;
90 if (
first !=
nullptr) {
101 std::vector<DTTSCand *>::const_iterator
p;
102 std::cout <<
"Vector of second tracks (including carry) in DTTSS: " << std::endl;
119 std::vector<DTTSCand *>::iterator
p;
121 DTTSCand *curr = (*p) ? (*p) :
nullptr;
129 if (best ==
nullptr) {
131 }
else if ((*curr) <= (*best)) {
134 }
else if (carry ==
nullptr) {
136 }
else if ((*curr) <= (*carry)) {
143 if (carry !=
nullptr) {
151 inner_or_corr = carry->
isInner();
153 if (
config()->TssGhost1Flag() < 2 && (
154 config()->TssGhost1Flag() == 0 ||
157 abs(carry->
TcPos() - best->TcPos()) != 1)
190 std::cout <<
"DTTSS::DTTSSsort2: called with no first track.";
191 std::cout <<
" empty pointer returned!" << std::endl;
203 std::vector<DTTSCand *>::iterator
p;
205 if (!(*p)->isCarry())
211 if (
config()->TssGhost2Flag() == 3) {
213 std::vector<DTTSCand *>::iterator
p;
222 std::vector<DTTSCand *>::iterator
p;
242 inner_or_corr = curr->
isInner();
248 curr->
TcPos() == best->TcPos()) {
251 ((!best->isCorr()) && best->isInner() &&
262 }
else if ((*curr) <= (*
second)) {
275 int ifs = (
cand->isFirst()) ? 0 : 1;
281 if (ifs < 1 || ifs > 2) {
282 std::cout <<
"DTTSS::nTracoT: wrong track number: " << ifs;
283 std::cout <<
" 0 returned!" << std::endl;
286 return _tctrig[ifs - 1].size();
290 if (ifs < 1 || ifs > 2) {
291 std::cout <<
"DTTSS::getDTTSCand: wrong track number: " << ifs;
292 std::cout <<
" empty pointer returned!" << std::endl;
295 if (n < 1 || n >
nTracoT(ifs)) {
296 std::cout <<
"DTTSS::getDTTSCand: requested trigger not present: " <<
n;
297 std::cout <<
" empty pointer returned!" << std::endl;
300 std::vector<DTTSCand *>::const_iterator
p =
_tctrig[ifs - 1].begin() +
n - 1;
305 if (ifs < 1 || ifs > 2) {
306 std::cout <<
"DTTSS::getTracoT: wrong track number: " << ifs;
307 std::cout <<
" empty pointer returned!" << std::endl;
310 if (n < 1 || n >
nTracoT(ifs)) {
311 std::cout <<
"DTTSS::getTracoT: requested trigger not present: " <<
n;
312 std::cout <<
" empty pointer returned!" << std::endl;
320 std::cout <<
"DTTSS::getTrack: requested track not present: " <<
n;
321 std::cout <<
" empty pointer returned!" << std::endl;
324 std::vector<DTTSCand *>::const_iterator
p =
_outcand.begin() +
n - 1;
329 std::vector<DTTSCand *>::const_iterator
p;
346 std::cout <<
"DTTSS::logWord: requested track not present: " <<
n;
347 std::cout <<
" empty string returned!" << std::endl;
void setBitsTss()
Set the quality bits for DTTSS analysis.
unsigned nTracoT(int ifs) const
Return the number of input tracks (first/second)
std::vector< DTTSCand * > _tctrig[2]
void addDTTSCand(DTTSCand *cand)
Add a TS candidate to the TSS, ifs is first/second track flag.
bool TssGhost2Corr() const
Correlated ghost 2 suppression option in TSS.
const DTConfigTSPhi * config() const
Configuration set.
DTTSCand * getCarry() const
Return the carry (for debugging)
U second(std::pair< T, U > const &p)
const DTTracoTrigData * getTracoT(int ifs, unsigned n) const
Return requested TRACO trigger.
int isInner() const
Return Inner/Outer bit.
const DTTracoTrigData * tracoTr() const
Return associated TRACO trigger.
Abs< T >::type abs(const T &t)
int nSecondT() const
Return the number of input second tracks.
DTTSCand * sortTSS2()
Sort 2.
std::vector< DTTSCand * > _outcand
int isCorr() const
Return correlation bit.
DTTSCand * sortTSS1()
Sort 1.
int isCarry() const
Return the carry bit.
DTTSCand * getDTTSCand(int ifs, unsigned n) const
Return requested TS candidate.
std::string logWord(int n) const
Return the requested log word.
unsigned dataword() const
Return an uint16 with the content of the data word (for debugging)
DTTSCand * getTrack(int n) const
Return the requested track.
int nTracks() const
Return the number of sorted tracks.
void setSecondTrack()
Set the first track bit to second track (used for carry)
int isFirst() const
Return the first/second track bit.
int TssGhost2Flag() const
Ghost 2 suppression option in TSS.
bool TssGhost1Corr() const
Correlated ghost 1 suppression option in TSS.
int TcPos() const
Retrun the TRACO position inside the TSS.
void run()
Run the TSS algorithm.
int nFirstT() const
Return the number of input first tracks.