#include <DTSectCollPhCand.h>
Public Member Functions | |
void | clear () |
Set the SC Candidate step. | |
void | clearBits () |
Clear (set to 1) the quality bits (but first/second track bit) | |
void | clearBitsSectColl () |
Clear (set to 1) the quality bits for Sector Collector. | |
int | CoarseSync () const |
Return the Coarse Sync Parameter. | |
DTConfigSectColl * | config () const |
Configuration set. | |
unsigned | dataword () const |
Return an uint16 with the content of the data word (for debugging) | |
DTSectCollPhCand () | |
Constructor. | |
DTSectCollPhCand (DTSC *, const DTChambPhSegm *, int) | |
Constructor. | |
DTSectCollPhCand (const DTSectCollPhCand &tsccand) | |
Constructor. | |
int | isFirst () const |
Return first/second track bit value. | |
bool | operator< (const DTSectCollPhCand &c) const |
Operator < used for sorting. | |
bool | operator<= (const DTSectCollPhCand &c) const |
Operator <= used for sorting. | |
DTSectCollPhCand & | operator= (const DTSectCollPhCand &tsccand) |
Assignment operator. | |
void | print () const |
Print the trigger. | |
void | resetCarry () |
Reset the carry bit. | |
void | setBitsSectColl () |
Set the bits for DTTSM analysis. | |
void | setSecondTrack () |
Set the first track bit to second track (used for carry) | |
DTSC * | tsc () const |
Return the DTTSS. | |
const DTChambPhSegm * | tsTr () const |
Return associated TSPhi trigger. | |
~DTSectCollPhCand () | |
Destructor. | |
Private Attributes | |
BitArray< 15 > | _dataword |
int | _isCarry |
DTSC * | _tsc |
const DTChambPhSegm * | _tsmsegm |
DTSectCollPhCand.h A Trigger Server Phi Candidate
D. Bonacorsi, S. Marcellini
Definition at line 34 of file DTSectCollPhCand.h.
DTSectCollPhCand::DTSectCollPhCand | ( | DTSC * | tsc, |
const DTChambPhSegm * | tsmsegm, | ||
int | ifs | ||
) |
Constructor.
Definition at line 30 of file DTSectCollPhCand.cc.
References _dataword, BitArray< N >::one(), and BitArray< N >::unset().
DTSectCollPhCand::DTSectCollPhCand | ( | ) |
DTSectCollPhCand::DTSectCollPhCand | ( | const DTSectCollPhCand & | tsccand | ) |
Constructor.
DTSectCollPhCand::~DTSectCollPhCand | ( | ) |
void DTSectCollPhCand::clear | ( | void | ) | [inline] |
Set the SC Candidate step.
Clear the trigger
Definition at line 62 of file DTSectCollPhCand.cc.
References _dataword, _tsmsegm, and BitArray< N >::one().
void DTSectCollPhCand::clearBits | ( | ) | [inline] |
Clear (set to 1) the quality bits (but first/second track bit)
Definition at line 59 of file DTSectCollPhCand.h.
References _dataword, and BitArray< N >::assign().
void DTSectCollPhCand::clearBitsSectColl | ( | ) | [inline] |
Clear (set to 1) the quality bits for Sector Collector.
Definition at line 62 of file DTSectCollPhCand.h.
References _dataword, and BitArray< N >::assign().
Referenced by setBitsSectColl().
int DTSectCollPhCand::CoarseSync | ( | ) | const |
Return the Coarse Sync Parameter.
Definition at line 69 of file DTSectCollPhCand.cc.
References _tsmsegm, DTChambPhSegm::ChamberId(), DTConfigSectColl::CoarseSync(), config(), DTChamberId::sector(), and DTChamberId::station().
Referenced by print(), and DTSectColl::runSectColl().
{ int sect= _tsmsegm->ChamberId().sector(); if (sect<13) return config()->CoarseSync(_tsmsegm->ChamberId().station()); else return config()->CoarseSync(5); }
DTConfigSectColl* DTSectCollPhCand::config | ( | void | ) | const [inline] |
Configuration set.
Definition at line 79 of file DTSectCollPhCand.h.
References _tsc, and DTSC::config().
Referenced by CoarseSync().
unsigned DTSectCollPhCand::dataword | ( | ) | const [inline] |
Return an uint16 with the content of the data word (for debugging)
Definition at line 91 of file DTSectCollPhCand.h.
References _dataword, and BitArray< N >::dataWord().
int DTSectCollPhCand::isFirst | ( | ) | const [inline] |
Return first/second track bit value.
Definition at line 85 of file DTSectCollPhCand.h.
References _dataword, and BitArray< N >::element().
Referenced by DTSC::addDTSectCollPhCand(), and DTSC::addPhCand().
bool DTSectCollPhCand::operator< | ( | const DTSectCollPhCand & | c | ) | const [inline] |
Operator < used for sorting.
Definition at line 94 of file DTSectCollPhCand.h.
References _dataword.
bool DTSectCollPhCand::operator<= | ( | const DTSectCollPhCand & | c | ) | const [inline] |
Operator <= used for sorting.
Definition at line 97 of file DTSectCollPhCand.h.
References _dataword.
DTSectCollPhCand & DTSectCollPhCand::operator= | ( | const DTSectCollPhCand & | tsccand | ) |
void DTSectCollPhCand::print | ( | void | ) | const |
Print the trigger.
Definition at line 110 of file DTSectCollPhCand.cc.
References _dataword, _tsmsegm, CoarseSync(), gather_cfg::cout, BitArray< N >::element(), BitArray< N >::print(), DTChambPhSegm::pvCode(), and DTChambPhSegm::step().
{ std::cout << "Sector Collector Phi Candidate: " << std::endl; if(_dataword.element(14)==0) {std::cout << "First track type" << std::endl;} else {std::cout << "Second track type" << std::endl;} std::cout << " code=" << _tsmsegm->pvCode(); std::cout << " dataword="; _dataword.print(); // SM double TSM remove datawordbk section std::cout << " SC step=" << CoarseSync()+_tsmsegm->step(); std::cout << std::endl; }
void DTSectCollPhCand::resetCarry | ( | ) | [inline] |
Reset the carry bit.
Definition at line 68 of file DTSectCollPhCand.h.
References _isCarry.
{ _isCarry=0; }
void DTSectCollPhCand::setBitsSectColl | ( | ) |
Set the bits for DTTSM analysis.
Definition at line 79 of file DTSectCollPhCand.cc.
References _dataword, _tsmsegm, abs, BitArray< N >::assign(), clearBitsSectColl(), DTChambPhSegm::code(), gather_cfg::cout, DTChambPhSegm::DeltaPsiR(), and BitArray< N >::unset().
Referenced by DTSC::DTSectCollsort1(), and DTSC::DTSectCollsort2().
{ clearBitsSectColl(); if(abs(_tsmsegm->DeltaPsiR())>1024 ){ // Check phiB within 10 bits range std::cout << "DTSectCollPhCand::setBitsSectColl phiB outside valid range: " << _tsmsegm->DeltaPsiR(); std::cout << " deltaPsiR set to 512" << std::endl; } else { // SM double TSM // assign preview in dataword (common to any other assignment) _dataword.assign(0,10,abs(_tsmsegm->DeltaPsiR())); // int a2 = 12; int a1 = 11; int a0 = 10; if( _tsmsegm->code()==6 ) { _dataword.unset(a2); _dataword.unset(a1); _dataword.unset(a0); } // 1-000 if( _tsmsegm->code()==5 ) { _dataword.unset(a2); _dataword.unset(a1); } // 1-001 if( _tsmsegm->code()==4 ) { _dataword.unset(a2); _dataword.unset(a0); } // 1-010 if( _tsmsegm->code()==3 ) { _dataword.unset(a1); } // 1-101 if( _tsmsegm->code()==2 ) { _dataword.unset(a1); _dataword.unset(a0); } // 1-100 // if( _tsmsegm->code()==1 ) no unset needed => 111 if( _tsmsegm->code()==0 ) { _dataword.unset(a0); } // 1-110 } }
void DTSectCollPhCand::setSecondTrack | ( | ) | [inline] |
Set the first track bit to second track (used for carry)
Definition at line 65 of file DTSectCollPhCand.h.
References _dataword, _isCarry, and BitArray< N >::set().
Referenced by DTSC::DTSectCollsort1().
DTSC* DTSectCollPhCand::tsc | ( | ) | const [inline] |
Return the DTTSS.
Definition at line 82 of file DTSectCollPhCand.h.
References _tsc.
{ return _tsc; }
const DTChambPhSegm* DTSectCollPhCand::tsTr | ( | ) | const [inline] |
Return associated TSPhi trigger.
Definition at line 88 of file DTSectCollPhCand.h.
References _tsmsegm.
Referenced by DTSectColl::runSectColl().
{ return _tsmsegm; }
BitArray<15> DTSectCollPhCand::_dataword [private] |
Definition at line 112 of file DTSectCollPhCand.h.
Referenced by clear(), clearBits(), clearBitsSectColl(), dataword(), DTSectCollPhCand(), isFirst(), operator<(), operator<=(), print(), setBitsSectColl(), and setSecondTrack().
int DTSectCollPhCand::_isCarry [private] |
Definition at line 114 of file DTSectCollPhCand.h.
Referenced by resetCarry(), and setSecondTrack().
DTSC* DTSectCollPhCand::_tsc [private] |
Definition at line 108 of file DTSectCollPhCand.h.
Referenced by config(), operator=(), and tsc().
const DTChambPhSegm* DTSectCollPhCand::_tsmsegm [private] |
Definition at line 109 of file DTSectCollPhCand.h.
Referenced by clear(), CoarseSync(), operator=(), print(), setBitsSectColl(), and tsTr().