#include <L1Trigger/DTSectorCollector/interface/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 (const DTSectCollPhCand &tsccand) | |
Constructor. | |
DTSectCollPhCand () | |
Constructor. | |
DTSectCollPhCand (DTSC *, const DTChambPhSegm *, int) | |
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 |
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().
00031 : _tsc(tsc), _tsmsegm(tsmsegm) { 00032 _dataword.one(); // reset dataword to 0x1ff 00033 if(ifs==1)_dataword.unset(14); // set bit 14 (0=first, 1=second tracks) 00034 }
DTSectCollPhCand::DTSectCollPhCand | ( | ) |
DTSectCollPhCand::DTSectCollPhCand | ( | const DTSectCollPhCand & | tsccand | ) |
Constructor.
DTSectCollPhCand::~DTSectCollPhCand | ( | ) |
Set the SC Candidate step.
Clear the trigger
Definition at line 62 of file DTSectCollPhCand.cc.
References _dataword, _tsmsegm, and BitArray< N >::one().
00062 { 00063 _tsmsegm=0; 00064 _dataword.one(); 00065 // std::cout << " clear dataword : " << _dataword.print() << std::endl; 00066 }
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().
00069 { 00070 int sect= _tsmsegm->ChamberId().sector(); 00071 if (sect<13) 00072 return config()->CoarseSync(_tsmsegm->ChamberId().station()); 00073 else 00074 return config()->CoarseSync(5); 00075 }
DTConfigSectColl* DTSectCollPhCand::config | ( | ) | 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 | ) |
Print the trigger.
Definition at line 110 of file DTSectCollPhCand.cc.
References _dataword, _tsmsegm, CoarseSync(), GenMuonPlsPt100GeV_cfg::cout, BitArray< N >::element(), lat::endl(), BitArray< N >::print(), DTChambPhSegm::pvCode(), and DTChambPhSegm::step().
00110 { 00111 std::cout << "Sector Collector Phi Candidate: " << std::endl; 00112 if(_dataword.element(14)==0) {std::cout << "First track type" << std::endl;} 00113 else {std::cout << "Second track type" << std::endl;} 00114 std::cout << " code=" << _tsmsegm->pvCode(); 00115 std::cout << " dataword="; 00116 _dataword.print(); 00117 // SM double TSM remove datawordbk section 00118 std::cout << " SC step=" << CoarseSync()+_tsmsegm->step(); 00119 std::cout << std::endl; 00120 }
void DTSectCollPhCand::resetCarry | ( | ) | [inline] |
Reset the carry bit.
Definition at line 68 of file DTSectCollPhCand.h.
References _isCarry.
00068 { _isCarry=0; }
void DTSectCollPhCand::setBitsSectColl | ( | ) |
Set the bits for DTTSM analysis.
Definition at line 79 of file DTSectCollPhCand.cc.
References _dataword, _tsmsegm, a1, a2, funct::abs(), BitArray< N >::assign(), clearBitsSectColl(), DTChambPhSegm::code(), GenMuonPlsPt100GeV_cfg::cout, DTChambPhSegm::DeltaPsiR(), lat::endl(), and BitArray< N >::unset().
Referenced by DTSC::DTSectCollsort1(), and DTSC::DTSectCollsort2().
00079 { 00080 00081 clearBitsSectColl(); 00082 00083 if(abs(_tsmsegm->DeltaPsiR())>1024 ){ // Check phiB within 10 bits range 00084 std::cout << "DTSectCollPhCand::setBitsSectColl phiB outside valid range: " << _tsmsegm->DeltaPsiR(); 00085 std::cout << " deltaPsiR set to 512" << std::endl; 00086 } 00087 else { 00088 // SM double TSM 00089 // assign preview in dataword (common to any other assignment) 00090 _dataword.assign(0,10,abs(_tsmsegm->DeltaPsiR())); 00091 // 00092 int a2 = 12; 00093 int a1 = 11; 00094 int a0 = 10; 00095 00096 if( _tsmsegm->code()==6 ) { _dataword.unset(a2); _dataword.unset(a1); _dataword.unset(a0); } // 1-000 00097 if( _tsmsegm->code()==5 ) { _dataword.unset(a2); _dataword.unset(a1); } // 1-001 00098 if( _tsmsegm->code()==4 ) { _dataword.unset(a2); _dataword.unset(a0); } // 1-010 00099 if( _tsmsegm->code()==3 ) { _dataword.unset(a1); } // 1-101 00100 if( _tsmsegm->code()==2 ) { _dataword.unset(a1); _dataword.unset(a0); } // 1-100 00101 // if( _tsmsegm->code()==1 ) no unset needed => 111 00102 if( _tsmsegm->code()==0 ) { _dataword.unset(a0); } // 1-110 00103 00104 } 00105 00106 }
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.
00082 { 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().
00088 { 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] |
const DTChambPhSegm* DTSectCollPhCand::_tsmsegm [private] |
Definition at line 109 of file DTSectCollPhCand.h.
Referenced by clear(), CoarseSync(), operator=(), print(), setBitsSectColl(), and tsTr().