61 for(
int itk=0;itk<=1;itk++){
73 std::cout <<
"DTTSM::run: Processing DTTSM: ";
84 std::cout <<
"Vector of first tracks in DTTSM: " << std::endl;
85 std::vector<DTTSCand*>::const_iterator
p;
105 std::vector<DTTSCand*>::const_iterator
p;
106 std::cout <<
"Vector of second tracks (including carry) in DTTSM: " << std::endl;
126 std::vector<DTTSCand*>::iterator
p;
132 }
else if( bkmod == 0) {
135 std::cout <<
"DTTSM::sortTSM1: bkmod not properly assigned!" << std::endl;
142 else if((*curr)<(*best)){
149 else if((*curr)<(*carry)){
160 if(
config()->TsmGhost1Corr()) {
163 inner_or_corr=carry->
isInner();
166 if(
config()->TsmGhost1Flag()<2){
198 if(
config()->TsmGhost2Flag()==3)
return 0;
202 std::cout <<
"DTTSM::sortTSM2: called with no first track.";
203 std::cout <<
" empty pointer returned!" << std::endl;
209 std::vector<DTTSCand*>::iterator
p;
211 if((*p)->isCarry())
return (*p);
219 std::vector<DTTSCand*>::iterator
p;
230 {inner_or_corr=curr->
isInner();
233 if(
config()->TsmGhost2Flag()!=0){
252 }
else if( bkmod == 0) {
255 std::cout <<
" DTTSM::sortTSM2 bkmod not properly assigned!" << std::endl;
266 else if((*curr)<(*second)){
286 std::cout <<
"DTTSM::nCand: wrong track number: " << ifs;
287 std::cout <<
" 0 returned!" << std::endl;
297 std::cout <<
"DTTSM::getDTTSCand: wrong track number: " << ifs;
298 std::cout <<
" empty pointer returned!" << std::endl;
301 if(n<1 || n>
nCand(ifs)) {
302 std::cout <<
"DTTSM::getDTTSCand: requested trigger not present: " <<
n;
303 std::cout <<
" empty pointer returned!" << std::endl;
306 std::vector<DTTSCand*>::const_iterator
p =
_incand[ifs-1].begin()+n-1;
313 std::cout <<
"DTTSM::getTracoT: wrong track number: " << ifs;
314 std::cout <<
" empty pointer returned!" << std::endl;
317 if(n<1 || n>
nCand(ifs)) {
318 std::cout <<
"DTTSM::getTracoT: requested trigger not present: " <<
n;
319 std::cout <<
" empty pointer returned!" << std::endl;
329 std::cout <<
"DTTSM::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;
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.
std::vector< DTTSCand * > _incand[2]
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.
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)
std::vector< DTTSCand * > _outcand
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.