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;
131 if (best ==
nullptr) {
133 }
else if ((*curr) <= (*best)) {
136 }
else if (carry ==
nullptr) {
138 }
else if ((*curr) <= (*carry)) {
145 if (carry !=
nullptr) {
153 inner_or_corr = carry->
isInner();
155 if (
config()->TssGhost1Flag() < 2 && (
156 config()->TssGhost1Flag() == 0 ||
159 abs(carry->
TcPos() - best->TcPos()) != 1)
192 std::cout <<
"DTTSS::DTTSSsort2: called with no first track.";
193 std::cout <<
" empty pointer returned!" << std::endl;
205 std::vector<DTTSCand *>::iterator
p;
207 if (!(*p)->isCarry())
213 if (
config()->TssGhost2Flag() == 3) {
215 std::vector<DTTSCand *>::iterator
p;
224 std::vector<DTTSCand *>::iterator
p;
244 inner_or_corr = curr->
isInner();
250 curr->
TcPos() == best->TcPos()) {
253 ((!best->isCorr()) && best->isInner() &&
264 }
else if ((*curr) <= (*
second)) {
277 int ifs = (
cand->isFirst()) ? 0 : 1;
283 if (ifs < 1 || ifs > 2) {
284 std::cout <<
"DTTSS::nTracoT: wrong track number: " << ifs;
285 std::cout <<
" 0 returned!" << std::endl;
288 return _tctrig[ifs - 1].size();
292 if (ifs < 1 || ifs > 2) {
293 std::cout <<
"DTTSS::getDTTSCand: wrong track number: " << ifs;
294 std::cout <<
" empty pointer returned!" << std::endl;
297 if (n < 1 || n >
nTracoT(ifs)) {
298 std::cout <<
"DTTSS::getDTTSCand: requested trigger not present: " <<
n;
299 std::cout <<
" empty pointer returned!" << std::endl;
302 std::vector<DTTSCand *>::const_iterator
p =
_tctrig[ifs - 1].begin() +
n - 1;
307 if (ifs < 1 || ifs > 2) {
308 std::cout <<
"DTTSS::getTracoT: wrong track number: " << ifs;
309 std::cout <<
" empty pointer returned!" << std::endl;
312 if (n < 1 || n >
nTracoT(ifs)) {
313 std::cout <<
"DTTSS::getTracoT: requested trigger not present: " <<
n;
314 std::cout <<
" empty pointer returned!" << std::endl;
322 std::cout <<
"DTTSS::getTrack: requested track not present: " <<
n;
323 std::cout <<
" empty pointer returned!" << std::endl;
326 std::vector<DTTSCand *>::const_iterator
p =
_outcand.begin() +
n - 1;
331 std::vector<DTTSCand *>::const_iterator
p;
348 std::cout <<
"DTTSS::logWord: requested track not present: " <<
n;
349 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.