56 for (
int itk = 0; itk <= 1; itk++) {
67 std::cout <<
"DTTSM::run: Processing DTTSM: ";
80 std::cout <<
"Vector of first tracks in DTTSM: " << std::endl;
81 std::vector<DTTSCand *>::const_iterator
p;
89 if (first !=
nullptr) {
101 std::vector<DTTSCand *>::const_iterator
p;
102 std::cout <<
"Vector of second tracks (including carry) in DTTSM: " 111 if (second !=
nullptr) {
121 std::vector<DTTSCand *>::iterator
p;
132 std::cout <<
"DTTSM::sortTSM1: bkmod not properly assigned!" 136 if (best ==
nullptr) {
138 }
else if ((*curr) < (*best)) {
141 }
else if (carry ==
nullptr) {
143 }
else if ((*curr) < (*carry)) {
149 if (carry !=
nullptr) {
153 if (
config()->TsmGhost1Corr()) {
156 inner_or_corr = carry->
isInner();
159 if (
config()->TsmGhost1Flag() < 2) {
189 if (
config()->TsmGhost2Flag() == 3)
194 std::cout <<
"DTTSM::sortTSM2: called with no first track.";
195 std::cout <<
" empty pointer returned!" << std::endl;
202 std::vector<DTTSCand *>::iterator
p;
213 std::vector<DTTSCand *>::iterator
p;
223 inner_or_corr = curr->
isInner();
226 if (
config()->TsmGhost2Flag() != 0) {
253 std::cout <<
" DTTSM::sortTSM2 bkmod not properly assigned!" << std::endl;
259 if (second ==
nullptr) {
261 }
else if ((*curr) < (*second)) {
276 if (ifs < 1 || ifs > 2) {
277 std::cout <<
"DTTSM::nCand: wrong track number: " << ifs;
278 std::cout <<
" 0 returned!" << std::endl;
282 return _incand[ifs - 1].size();
286 if (ifs < 1 || ifs > 2) {
287 std::cout <<
"DTTSM::getDTTSCand: wrong track number: " << ifs;
288 std::cout <<
" empty pointer returned!" << std::endl;
291 if (n < 1 || n >
nCand(ifs)) {
292 std::cout <<
"DTTSM::getDTTSCand: requested trigger not present: " <<
n;
293 std::cout <<
" empty pointer returned!" << std::endl;
296 std::vector<DTTSCand *>::const_iterator
p =
_incand[ifs - 1].begin() + n - 1;
301 if (ifs < 1 || ifs > 2) {
302 std::cout <<
"DTTSM::getTracoT: wrong track number: " << ifs;
303 std::cout <<
" empty pointer returned!" << std::endl;
306 if (n < 1 || n >
nCand(ifs)) {
307 std::cout <<
"DTTSM::getTracoT: requested trigger not present: " <<
n;
308 std::cout <<
" empty pointer returned!" << std::endl;
317 std::cout <<
"DTTSM::getTrack: requested track not present: " <<
n;
318 std::cout <<
" empty pointer returned!" << std::endl;
321 std::vector<DTTSCand *>::const_iterator
p =
_outcand.begin() + n - 1;
std::vector< DTTSCand * > _outcand
void setBitsTss()
Set the quality bits for DTTSS analysis.
DTTSCand * sortTSM2(int bkmod)
Sort 2.
DTTSCand * getTrack(int n) const
Return the requested track.
bool TsmGhost2Corr() const
Correlated ghost 2 suppression option in TSM.
static const int NTSSTSM
Constant: maximum number of TSS in input to the TSM.
void run(int bkmod)
Run the TSM algorithm.
U second(std::pair< T, U > const &p)
int isFirst() const
Return the first/second track bit.
DTTSCand * getDTTSCand(int ifs, unsigned n) const
Return requested TS candidate.
int tssNumber() const
Return the DTTSS number.
static const int NTCTSS
Constant: number of TRACOs in input to a TSS.
int nTracks() const
Return the number of sorted tracks.
Abs< T >::type abs(const T &t)
unsigned nCand(int ifs) const
Return the number of input tracks (first/second)
int nSecondT() const
Return the number of input second tracks.
const DTTracoTrigData * getTracoT(int ifs, unsigned n) const
Return requested TRACO trigger.
int TsmGhost1Flag() const
Ghost 1 suppression option in TSM.
int nFirstT() const
Return the number of input first tracks.
const DTTracoTrigData * tracoTr() const
Return associated TRACO trigger.
std::vector< DTTSCand * > _incand[2]
int TsmGhost2Flag() const
Ghost 2 suppression option in TSM.
int isInner() const
Return Inner/Outer bit.
void setSecondTrack()
Set the first track bit to second track (used for carry)
DTTSCand * sortTSM1(int bkmod)
Sort 1.
void addCand(DTTSCand *cand)
Add a TSS candidate to the TSM, ifs is first/second track flag.
int TcPos() const
Retrun the TRACO position inside the TSS.
const DTConfigTSPhi * config() const
Configuration set.
void setBitsBkmod()
Set the bits for TSM back-up mode.
int isCorr() const
Return correlation bit.