56 for (
int itk = 0; itk <= 1; itk++) {
66 std::cout <<
"DTTSM::run: Processing DTTSM: ";
78 std::cout <<
"Vector of first tracks in DTTSM: " << std::endl;
79 std::vector<DTTSCand *>::const_iterator
p;
87 if (first !=
nullptr) {
99 std::vector<DTTSCand *>::const_iterator
p;
100 std::cout <<
"Vector of second tracks (including carry) in DTTSM: " << std::endl;
108 if (second !=
nullptr) {
117 std::vector<DTTSCand *>::iterator
p;
124 }
else if (bkmod == 0) {
127 std::cout <<
"DTTSM::sortTSM1: bkmod not properly assigned!" << std::endl;
130 if (best ==
nullptr) {
132 }
else if ((*curr) < (*best)) {
135 }
else if (carry ==
nullptr) {
137 }
else if ((*curr) < (*carry)) {
143 if (carry !=
nullptr) {
147 if (
config()->TsmGhost1Corr()) {
150 inner_or_corr = carry->
isInner();
153 if (
config()->TsmGhost1Flag() < 2) {
181 if (
config()->TsmGhost2Flag() == 3)
186 std::cout <<
"DTTSM::sortTSM2: called with no first track.";
187 std::cout <<
" empty pointer returned!" << std::endl;
194 std::vector<DTTSCand *>::iterator
p;
205 std::vector<DTTSCand *>::iterator
p;
215 inner_or_corr = curr->
isInner();
218 if (
config()->TsmGhost2Flag() != 0) {
238 }
else if (bkmod == 0) {
241 std::cout <<
" DTTSM::sortTSM2 bkmod not properly assigned!" << std::endl;
247 if (second ==
nullptr) {
249 }
else if ((*curr) < (*second)) {
264 if (ifs < 1 || ifs > 2) {
265 std::cout <<
"DTTSM::nCand: wrong track number: " << ifs;
266 std::cout <<
" 0 returned!" << std::endl;
270 return _incand[ifs - 1].size();
274 if (ifs < 1 || ifs > 2) {
275 std::cout <<
"DTTSM::getDTTSCand: wrong track number: " << ifs;
276 std::cout <<
" empty pointer returned!" << std::endl;
279 if (n < 1 || n >
nCand(ifs)) {
280 std::cout <<
"DTTSM::getDTTSCand: requested trigger not present: " <<
n;
281 std::cout <<
" empty pointer returned!" << std::endl;
284 std::vector<DTTSCand *>::const_iterator
p =
_incand[ifs - 1].begin() + n - 1;
289 if (ifs < 1 || ifs > 2) {
290 std::cout <<
"DTTSM::getTracoT: wrong track number: " << ifs;
291 std::cout <<
" empty pointer returned!" << std::endl;
294 if (n < 1 || n >
nCand(ifs)) {
295 std::cout <<
"DTTSM::getTracoT: requested trigger not present: " <<
n;
296 std::cout <<
" empty pointer returned!" << std::endl;
304 std::cout <<
"DTTSM::getTrack: requested track not present: " <<
n;
305 std::cout <<
" empty pointer returned!" << std::endl;
308 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.