CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTTSCand Class Reference

#include <DTTSCand.h>

Public Member Functions

void clear ()
 Clear the trigger. More...
 
void clearBits ()
 Clear (set to 1) the quality bits (but first/second track bit) More...
 
void clearBitsBkmod ()
 Clear (set to 1) all the bits (back-up mode) More...
 
const DTConfigTSPhiconfig () const
 Configuration set. More...
 
unsigned dataword () const
 Return an uint16 with the content of the data word (for debugging) More...
 
 DTTSCand (DTTSS *, const DTTracoTrigData *, int, int)
 Constructor. More...
 
 DTTSCand ()
 Constructor. More...
 
 DTTSCand (const DTTSCand &tscand)
 Constructor. More...
 
int is0H () const
 Return if H outer. More...
 
int is0L () const
 Return if L outer. More...
 
int isCarry () const
 Return the carry bit. More...
 
int isCorr () const
 Return correlation bit. More...
 
int isFirst () const
 Return the first/second track bit. More...
 
int isH0 () const
 Return if H inner. More...
 
int isHHorHL () const
 Return if HH or HL. More...
 
int isHtrig () const
 Return HTRIG/LTRIG bit. More...
 
int isInner () const
 Return Inner/Outer bit. More...
 
int isL0 () const
 Return if L inner. More...
 
int isLH () const
 Return if LH. More...
 
int isLL () const
 Return if LL. More...
 
bool operator< (const DTTSCand &c) const
 Operator < used for sorting. More...
 
bool operator<= (const DTTSCand &c) const
 Operator <= used for sorting. More...
 
DTTSCandoperator= (const DTTSCand &tscand)
 Assignment operator. More...
 
void print () const
 Print the trigger. More...
 
void resetCarry ()
 Reset the carry bit. More...
 
void setBitsBkmod ()
 Set the bits for TSM back-up mode. More...
 
void setBitsTsm ()
 Set the quality bits for DTTSM analysis. More...
 
void setBitsTss ()
 Set the quality bits for DTTSS analysis. More...
 
void setSecondTrack ()
 Set the first track bit to second track (used for carry) More...
 
int TcPos () const
 Retrun the TRACO position inside the TSS. More...
 
int tracoNumber () const
 Return the TRACO number. More...
 
const DTTracoTrigDatatracoTr () const
 Return associated TRACO trigger. More...
 
DTTSStss () const
 Return the DTTSS. More...
 
int tssNumber () const
 Return the DTTSS number. More...
 
 ~DTTSCand ()
 Destructor. More...
 

Private Attributes

BitArray< 15 > _dataword
 
int _isCarry
 
int _tcPos
 
const DTTracoTrigData_tctrig
 
DTTSS_tss
 

Detailed Description

A Trigger Server Candidate

Author
C. Grandi, D. Bonacorsi, S. Marcellini

Definition at line 35 of file DTTSCand.h.

Constructor & Destructor Documentation

DTTSCand::DTTSCand ( DTTSS tss,
const DTTracoTrigData tctrig,
int  ifs,
int  pos 
)

Constructor.

Definition at line 36 of file DTTSCand.cc.

References _dataword, BitArray< N >::one(), and BitArray< N >::unset().

38  : _tss(tss), _tctrig(tctrig), _tcPos(pos), _isCarry(0) {
39 
40  _dataword.one(); // reset dataword to 0x1ff
41 
42  // SM sector collector Set bit 14 instead of 8, for 1st/2nd track to allow extra space
43  // if(ifs==1)_dataword.unset(8); // set bit 8 (0=first, 1=second tracks)
44  if(ifs==1)_dataword.unset(14); // set bit 14 (0=first, 1=second tracks)
45 
46 }
int _isCarry
Definition: DTTSCand.h:155
int _tcPos
Definition: DTTSCand.h:153
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
void one()
Definition: BitArray.h:223
DTTSS * _tss
Definition: DTTSCand.h:149
void unset(const int i)
Definition: BitArray.h:231
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
DTTSCand::DTTSCand ( )

Constructor.

Definition at line 56 of file DTTSCand.cc.

56 {}
DTTSCand::DTTSCand ( const DTTSCand tscand)

Constructor.

Definition at line 48 of file DTTSCand.cc.

49  : _tss(tscand._tss), _tctrig(tscand._tctrig), _tcPos(tscand._tcPos),
50  _isCarry(tscand._isCarry) {
51 
52 
53 }
int _isCarry
Definition: DTTSCand.h:155
int _tcPos
Definition: DTTSCand.h:153
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
DTTSS * _tss
Definition: DTTSCand.h:149
DTTSCand::~DTTSCand ( )

Destructor.

Definition at line 61 of file DTTSCand.cc.

61  {
62 }

Member Function Documentation

void DTTSCand::clear ( void  )
inline

Clear the trigger.

Definition at line 81 of file DTTSCand.cc.

References _dataword, _isCarry, _tctrig, and BitArray< N >::one().

Referenced by clearBitsBkmod().

81  {
82  _tctrig=0;
83  _dataword.one();
84 
85  _isCarry=0;
86 
87 }
int _isCarry
Definition: DTTSCand.h:155
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
void one()
Definition: BitArray.h:223
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
void DTTSCand::clearBits ( )
inline

Clear (set to 1) the quality bits (but first/second track bit)

Definition at line 71 of file DTTSCand.h.

References _dataword, and BitArray< N >::assign().

Referenced by setBitsTsm(), and setBitsTss().

71 { _dataword.assign(5,3,0x7); }
void assign(const int p, const int n, const int val)
Definition: BitArray.h:239
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
void DTTSCand::clearBitsBkmod ( )
inline

Clear (set to 1) all the bits (back-up mode)

Definition at line 74 of file DTTSCand.h.

References _dataword, BitArray< N >::assign(), and clear().

Referenced by setBitsBkmod().

74 { _dataword.assign(0,7,0xff); }
void assign(const int p, const int n, const int val)
Definition: BitArray.h:239
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
const DTConfigTSPhi* DTTSCand::config ( void  ) const
inline

Configuration set.

Definition at line 80 of file DTTSCand.h.

References _tss, and DTTSS::config().

Referenced by setBitsTsm(), and setBitsTss().

80 { return _tss->config(); }
const DTConfigTSPhi * config() const
Configuration set.
Definition: DTTSS.h:71
DTTSS * _tss
Definition: DTTSCand.h:149
unsigned DTTSCand::dataword ( ) const
inline

Return an uint16 with the content of the data word (for debugging)

Definition at line 134 of file DTTSCand.h.

References _dataword, and BitArray< N >::dataWord().

Referenced by DTTSS::sortTSS1(), and DTTSS::sortTSS2().

134 { return _dataword.dataWord(0)&0x1ff; }
unsigned dataWord(const int i) const
Definition: BitArray.h:128
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
int DTTSCand::is0H ( ) const
inline

Return if H outer.

Definition at line 125 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

125 { return !_tctrig->pvCorr() && _tctrig->pvCode()==8; }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::is0L ( ) const
inline

Return if L outer.

Definition at line 131 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

131 { return !_tctrig->pvCorr() && _tctrig->pvCode()<8; }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isCarry ( ) const
inline

Return the carry bit.

Definition at line 110 of file DTTSCand.h.

References _isCarry.

Referenced by setBitsTsm(), setBitsTss(), and DTTSS::sortTSS2().

110 { return _isCarry; }
int _isCarry
Definition: DTTSCand.h:155
int DTTSCand::isCorr ( ) const
inline

Return correlation bit.

Definition at line 107 of file DTTSCand.h.

References _tctrig, and DTTracoTrigData::pvCorr().

Referenced by print(), DTTSPhi::runTSPhi(), setBitsTsm(), setBitsTss(), DTTSM::sortTSM1(), DTTSM::sortTSM2(), DTTSS::sortTSS1(), and DTTSS::sortTSS2().

107 { return _tctrig->pvCorr(); }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int DTTSCand::isFirst ( ) const
inline

Return the first/second track bit.

Definition at line 98 of file DTTSCand.h.

References _dataword, and BitArray< N >::element().

Referenced by DTTSM::addCand(), DTTSS::addDTTSCand(), print(), DTTSS::sortTSS1(), and DTTSS::sortTSS2().

98 { return _dataword.element(14)==0; }
int element(const int pos) const
Definition: BitArray.h:210
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
int DTTSCand::isH0 ( ) const
inline

Return if H inner.

Definition at line 122 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

122 { return !_tctrig->pvCorr() && _tctrig->pvCode()==80; }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isHHorHL ( ) const
inline

Return if HH or HL.

Definition at line 113 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

113 { return _tctrig->pvCorr() && _tctrig->pvCode()==80; }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isHtrig ( ) const
inline

Return HTRIG/LTRIG bit.

Definition at line 101 of file DTTSCand.h.

References _tctrig, and DTTracoTrigData::pvCode().

Referenced by print(), DTTSPhi::runTSPhi(), setBitsTsm(), and setBitsTss().

101  { return _tctrig->pvCode()==8 ||
102  _tctrig->pvCode()==80; }
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isInner ( ) const
inline

Return Inner/Outer bit.

Definition at line 104 of file DTTSCand.h.

References _tctrig, and DTTracoTrigData::pvCode().

Referenced by print(), DTTSPhi::runTSPhi(), setBitsTsm(), setBitsTss(), DTTSM::sortTSM1(), DTTSM::sortTSM2(), DTTSS::sortTSS1(), and DTTSS::sortTSS2().

104 { return _tctrig->pvCode()>8; }
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isL0 ( ) const
inline

Return if L inner.

Definition at line 128 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

128  { return !_tctrig->pvCorr() && _tctrig->pvCode()<80 &&
129  _tctrig->pvCode()>8; }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isLH ( ) const
inline

Return if LH.

Definition at line 116 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

116 { return _tctrig->pvCorr() && _tctrig->pvCode()==8; }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
int DTTSCand::isLL ( ) const
inline

Return if LL.

Definition at line 119 of file DTTSCand.h.

References _tctrig, DTTracoTrigData::pvCode(), and DTTracoTrigData::pvCorr().

119  { return _tctrig->pvCorr() && !(_tctrig->pvCode()==8) &&
120  !(_tctrig->pvCode()==80); }
int pvCorr() const
Return the preview correaltion bit.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
int pvCode() const
Return the preview code.
bool DTTSCand::operator< ( const DTTSCand c) const
inline

Operator < used for sorting.

Definition at line 137 of file DTTSCand.h.

References _dataword.

137 { return _dataword<c._dataword; }
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
bool DTTSCand::operator<= ( const DTTSCand c) const
inline

Operator <= used for sorting.

Definition at line 140 of file DTTSCand.h.

References _dataword, and print().

140 { return _dataword<=c._dataword; }
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
DTTSCand & DTTSCand::operator= ( const DTTSCand tscand)

Assignment operator.

Definition at line 70 of file DTTSCand.cc.

References _isCarry, _tcPos, _tctrig, and _tss.

70  {
71  if(this != &tscand){
72  _tss = tscand._tss;
73  _tctrig = tscand._tctrig;
74  _tcPos = tscand._tcPos;
75  _isCarry = tscand._isCarry;
76  }
77  return *this;
78 }
int _isCarry
Definition: DTTSCand.h:155
int _tcPos
Definition: DTTSCand.h:153
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
DTTSS * _tss
Definition: DTTSCand.h:149
void DTTSCand::print ( void  ) const

Print the trigger.

Definition at line 263 of file DTTSCand.cc.

References _dataword, gather_cfg::cout, isCorr(), isFirst(), isHtrig(), isInner(), BitArray< N >::print(), DTTracoTrigData::pvK(), and tracoTr().

Referenced by operator<=().

263  {
264  std::cout << " First=" << isFirst();
265  std::cout << " HTRIG=" << isHtrig();
266  std::cout << " Inner=" << isInner();
267  std::cout << " Corr=" << isCorr();
268  std::cout << " Kpv=" << tracoTr()->pvK();
269  std::cout << " dataword=";
270  _dataword.print();
271  std::cout << std::endl;
272 }
int isHtrig() const
Return HTRIG/LTRIG bit.
Definition: DTTSCand.h:101
int isFirst() const
Return the first/second track bit.
Definition: DTTSCand.h:98
int pvK() const
Return the preview K.
const DTTracoTrigData * tracoTr() const
Return associated TRACO trigger.
Definition: DTTSCand.h:83
int isInner() const
Return Inner/Outer bit.
Definition: DTTSCand.h:104
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
std::ostream & print(std::ostream &o=std::cout) const
Definition: BitArray.h:345
int isCorr() const
Return correlation bit.
Definition: DTTSCand.h:107
void DTTSCand::resetCarry ( )
inline

Reset the carry bit.

Definition at line 68 of file DTTSCand.h.

References _isCarry.

68 { _isCarry=0; }
int _isCarry
Definition: DTTSCand.h:155
void DTTSCand::setBitsBkmod ( )

Set the bits for TSM back-up mode.

Definition at line 163 of file DTTSCand.cc.

References _dataword, _tctrig, clearBitsBkmod(), DTTracoTrigData::qdec(), and BitArray< N >::unset().

Referenced by DTTSM::sortTSM1(), and DTTSM::sortTSM2().

163  {
164  // first/second track already set. Set other 4 bits (1 for null, 3 for a2, a1, a0)
165  clearBitsBkmod();
166  // std::cout << " clearbits in TSM bk mode " << _dataword.print() << std::endl;
167 
168  int a2 = 6;
169  int a1 = 5;
170  int a0 = 4;
171  //
172  // std::cout << " _tctrig->qdec(): " << _tctrig->qdec() << std::endl;
173  if( _tctrig->qdec()==6 ) { _dataword.unset(a2); _dataword.unset(a1); _dataword.unset(a0); } // 1-000
174  if( _tctrig->qdec()==5 ) { _dataword.unset(a2); _dataword.unset(a1); } // 1-001
175  if( _tctrig->qdec()==4 ) { _dataword.unset(a2); _dataword.unset(a0); } // 1-010
176  if( _tctrig->qdec()==3 ) { _dataword.unset(a1); } // 1-101
177  if( _tctrig->qdec()==2 ) { _dataword.unset(a1); _dataword.unset(a0); } // 1-100
178 
179  if( _tctrig->qdec()==0 ) { _dataword.unset(a0); } // 1-110
180 
181  // std::cout << " set Bits TSM back up " << _dataword.print() << std::endl;
182 }
void clearBitsBkmod()
Clear (set to 1) all the bits (back-up mode)
Definition: DTTSCand.h:74
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
void unset(const int i)
Definition: BitArray.h:231
int qdec() const
Return the trigger code in new format.
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
void DTTSCand::setBitsTsm ( )

Set the quality bits for DTTSM analysis.

Definition at line 186 of file DTTSCand.cc.

References _dataword, _tctrig, BitArray< N >::assign(), clearBits(), config(), gather_cfg::cout, BitArray< N >::element(), isCarry(), isCorr(), isHtrig(), isInner(), DTTracoTrigData::pvK(), DTConfigTSPhi::TsmCorrEna(), DTConfigTSPhi::TsmCorrEnaCarry(), DTConfigTSPhi::TsmHtrigEna(), DTConfigTSPhi::TsmHtrigEnaCarry(), DTConfigTSPhi::TsmInOutEna(), DTConfigTSPhi::TsmInOutEnaCarry(), DTConfigTSPhi::TsmMasking(), DTConfigTSPhi::TssMasking(), and BitArray< N >::unset().

186  {
187  // first/second track already set. Set other 3 bits
188  int itk=_dataword.element(14); // first tracks 0, second tracks 1
189 
190  clearBits();
191 
192  if(_tctrig->pvK()>31|| _tctrig->pvK()<0){ // Check K within 5 bits range
193  std::cout << "DTTSCand::setBitsTsm pvK outside valid range: " << _tctrig->pvK();
194  std::cout << " deltaPsiR set to 31" << std::endl;
195  }
196  else {
197  // SM double TSM
198  // assign preview in dataword (common to any other assignment)
199  _dataword.assign(0,5,_tctrig->pvK());
200  // _dataword.assign(0,5,0);
201  //
202 
203  int posH=-1;
204  int posI=-1;
205  int posC=-1;
206  switch(config()->TsmMasking(itk)) {
207  case 123: // H/L, In/Out, Corr/NotC
208  posH = 7;
209  posI = 6;
210  posC = 5;
211  break;
212  case 132: // H/L, Corr/NotC, In/Out
213  posH = 7;
214  posI = 5;
215  posC = 6;
216  break;
217  case 213: // In/Out, H/L, Corr/NotC
218  posH = 6;
219  posI = 7;
220  posC = 5;
221  break;
222  case 231: // In/Out, Corr/NotC, H/L
223  posH = 5;
224  posI = 7;
225  posC = 6;
226  break;
227  case 312: // Corr/NotC, H/L, In/Out
228  posH = 6;
229  posI = 5;
230  posC = 7;
231  break;
232  case 321: // Corr/NotC, In/Out, H/L
233  posH = 5;
234  posI = 6;
235  posC = 7;
236  break;
237  default:
238  std::cout << "DTTSCand::DTTSCand(): masking not correct: ";
239  std::cout << config()->TssMasking(itk);
240  std::cout << " All bits set to 1" << std::endl;
241 
242  // Masking:
243  bool enaH = config()->TsmHtrigEna(itk);
244  bool enaI = config()->TsmInOutEna(itk);
245  bool enaC = config()->TsmCorrEna(itk) ;
246  if(isCarry()) {
247  // Special setting for carry
248  enaH = config()->TsmHtrigEnaCarry();
249  enaI = config()->TsmInOutEnaCarry();
250  enaC = config()->TsmCorrEnaCarry() ;
251  }
252  // Bits set to 0 give higher priority:
253  if(isHtrig()&&enaH&&posH>0)_dataword.unset(posH);
254  if(isInner()&&enaI&&posI>0)_dataword.unset(posI);
255  if(isCorr() &&enaC&&posC>0)_dataword.unset(posC);
256 
257  }
258  }
259 
260 
261 }
bool TsmInOutEna(int i) const
Enable Inner SL checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:96
bool TsmHtrigEna(int i) const
Enable Htrig checking in TSM for sort1/2.
Definition: DTConfigTSPhi.h:90
int isHtrig() const
Return HTRIG/LTRIG bit.
Definition: DTTSCand.h:101
int TsmMasking(int i) const
Order of quality bits in TSM for sort1/2.
Definition: DTConfigTSPhi.h:87
int TssMasking(int i) const
Order of quality bits in TSS for sort1/2.
Definition: DTConfigTSPhi.h:66
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
const DTConfigTSPhi * config() const
Configuration set.
Definition: DTTSCand.h:80
int pvK() const
Return the preview K.
bool TsmHtrigEnaCarry() const
Enable Htrig checking in TSM for carry.
Definition: DTConfigTSPhi.h:93
int isCarry() const
Return the carry bit.
Definition: DTTSCand.h:110
void unset(const int i)
Definition: BitArray.h:231
int element(const int pos) const
Definition: BitArray.h:210
bool TsmCorrEnaCarry() const
Enable Correlation checking in TSM for carry.
void clearBits()
Clear (set to 1) the quality bits (but first/second track bit)
Definition: DTTSCand.h:71
bool TsmCorrEna(int i) const
Enable Correlation checking in TSM for sort1/2.
int isInner() const
Return Inner/Outer bit.
Definition: DTTSCand.h:104
void assign(const int p, const int n, const int val)
Definition: BitArray.h:239
bool TsmInOutEnaCarry() const
Enable Inner SL checking in TSM for carry.
Definition: DTConfigTSPhi.h:99
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
int isCorr() const
Return correlation bit.
Definition: DTTSCand.h:107
void DTTSCand::setBitsTss ( )

Set the quality bits for DTTSS analysis.

Definition at line 90 of file DTTSCand.cc.

References _dataword, _tctrig, BitArray< N >::assign(), clearBits(), config(), gather_cfg::cout, BitArray< N >::element(), isCarry(), isCorr(), isHtrig(), isInner(), DTTracoTrigData::pvK(), DTConfigTSPhi::TssCorrEna(), DTConfigTSPhi::TssCorrEnaCarry(), DTConfigTSPhi::TssHtrigEna(), DTConfigTSPhi::TssHtrigEnaCarry(), DTConfigTSPhi::TssInOutEna(), DTConfigTSPhi::TssInOutEnaCarry(), DTConfigTSPhi::TssMasking(), and BitArray< N >::unset().

Referenced by DTTSM::sortTSM1(), DTTSM::sortTSM2(), DTTSS::sortTSS1(), and DTTSS::sortTSS2().

90  {
91  // first/second track already set. Set other 3 bits
92  int itk=_dataword.element(14); // first tracks 0, second tracks 1
93 
94  clearBits();
95  if(_tctrig->pvK()>32|| _tctrig->pvK()<0){ // Check K within 5 bits range
96  std::cout << "DTTSCand::setBitsTss() pvK outside valid range: " << _tctrig->pvK();
97  std::cout << " deltaPsiR set to 31" << std::endl;
98  }
99  else {
100  // assign preview in dataword (common to any other assignment)
101  _dataword.assign(0,5,_tctrig->pvK());
102  // _dataword.assign(0,5,0);
103 
104  int posH=-1;
105  int posI=-1;
106  int posC=-1;
107  switch(config()->TssMasking(itk)) {
108  case 123: // H/L, In/Out, Corr/NotC
109  posH = 7;
110  posI = 6;
111  posC = 5;
112  break;
113  case 132: // H/L, Corr/NotC, In/Out
114  posH = 7;
115  posI = 5;
116  posC = 6;
117  break;
118  case 213: // In/Out, H/L, Corr/NotC
119  posH = 6;
120  posI = 7;
121  posC = 5;
122  break;
123  case 231: // In/Out, Corr/NotC, H/L
124  posH = 5;
125  posI = 7;
126  posC = 6;
127  break;
128  case 312: // Corr/NotC, H/L, In/Out
129  posH = 6;
130  posI = 5;
131  posC = 7;
132  break;
133  case 321: // Corr/NotC, In/Out, H/L
134  posH = 5;
135  posI = 6;
136  posC = 7;
137  break;
138  default:
139  std::cout << "DTTSCand::DTTSCand(): masking not correct: ";
140  std::cout << config()->TssMasking(itk);
141  std::cout << " All bits set to 1" << std::endl;
142  }
143  // Masking:
144  bool enaH = config()->TssHtrigEna(itk);
145  bool enaI = config()->TssInOutEna(itk);
146  bool enaC = config()->TssCorrEna(itk) ;
147  if(isCarry()) {
148  // Special setting for carry
149  enaH = config()->TssHtrigEnaCarry();
150  enaI = config()->TssInOutEnaCarry();
151  enaC = config()->TssCorrEnaCarry() ;
152  }
153  // Bits set to 0 give higher priority:
154  if(isHtrig()&&enaH&&posH>0)_dataword.unset(posH);
155  if(isInner()&&enaI&&posI>0)_dataword.unset(posI);
156  if(isCorr() &&enaC&&posC>0)_dataword.unset(posC);
157  }
158 
159 }
bool TssInOutEnaCarry() const
Enable Inner SL checking in TSS for carry.
Definition: DTConfigTSPhi.h:78
int isHtrig() const
Return HTRIG/LTRIG bit.
Definition: DTTSCand.h:101
int TssMasking(int i) const
Order of quality bits in TSS for sort1/2.
Definition: DTConfigTSPhi.h:66
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
const DTConfigTSPhi * config() const
Configuration set.
Definition: DTTSCand.h:80
bool TssCorrEnaCarry() const
Enable Correlation checking in TSS for carry.
Definition: DTConfigTSPhi.h:84
int pvK() const
Return the preview K.
int isCarry() const
Return the carry bit.
Definition: DTTSCand.h:110
void unset(const int i)
Definition: BitArray.h:231
bool TssHtrigEnaCarry() const
Enable Htrig checking in TSS for carry.
Definition: DTConfigTSPhi.h:72
int element(const int pos) const
Definition: BitArray.h:210
void clearBits()
Clear (set to 1) the quality bits (but first/second track bit)
Definition: DTTSCand.h:71
int isInner() const
Return Inner/Outer bit.
Definition: DTTSCand.h:104
void assign(const int p, const int n, const int val)
Definition: BitArray.h:239
bool TssInOutEna(int i) const
Enable Inner SL checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:75
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
bool TssCorrEna(int i) const
Enable Correlation checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:81
int isCorr() const
Return correlation bit.
Definition: DTTSCand.h:107
bool TssHtrigEna(int i) const
Enable Htrig checking in TSS for sort1/2.
Definition: DTConfigTSPhi.h:69
void DTTSCand::setSecondTrack ( )
inline

Set the first track bit to second track (used for carry)

Definition at line 65 of file DTTSCand.h.

References _dataword, _isCarry, and BitArray< N >::set().

Referenced by DTTSM::sortTSM1(), and DTTSS::sortTSS1().

65 { _dataword.set(14); _isCarry=1; }
int _isCarry
Definition: DTTSCand.h:155
BitArray< 15 > _dataword
Definition: DTTSCand.h:151
void set(const int i)
Definition: BitArray.h:230
int DTTSCand::TcPos ( ) const
inline

Retrun the TRACO position inside the TSS.

Definition at line 86 of file DTTSCand.h.

References _tcPos.

Referenced by DTTSM::sortTSM1(), DTTSM::sortTSM2(), DTTSS::sortTSS1(), and DTTSS::sortTSS2().

86 { return _tcPos; }
int _tcPos
Definition: DTTSCand.h:153
int DTTSCand::tracoNumber ( ) const
inline

Return the TRACO number.

Definition at line 95 of file DTTSCand.h.

References _tctrig, and DTTracoTrigData::tracoNumber().

95 { return _tctrig->tracoNumber(); }
int tracoNumber() const
Return parent TRACO number.
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
const DTTracoTrigData* DTTSCand::tracoTr ( ) const
inline

Return associated TRACO trigger.

Definition at line 83 of file DTTSCand.h.

References _tctrig.

Referenced by DTTSS::getTracoT(), DTTSM::getTracoT(), print(), and DTTSPhi::runTSPhi().

83 { return _tctrig; }
const DTTracoTrigData * _tctrig
Definition: DTTSCand.h:150
DTTSS* DTTSCand::tss ( ) const
inline

Return the DTTSS.

Definition at line 89 of file DTTSCand.h.

References _tss.

89 { return _tss; }
DTTSS * _tss
Definition: DTTSCand.h:149
int DTTSCand::tssNumber ( ) const
inline

Return the DTTSS number.

Definition at line 92 of file DTTSCand.h.

References _tss, and DTTSS::number().

Referenced by DTTSM::sortTSM1(), and DTTSM::sortTSM2().

92 { return _tss->number(); }
DTTSS * _tss
Definition: DTTSCand.h:149
int number() const
Return identifier.
Definition: DTTSS.h:68

Member Data Documentation

BitArray<15> DTTSCand::_dataword
private
int DTTSCand::_isCarry
private

Definition at line 155 of file DTTSCand.h.

Referenced by clear(), isCarry(), operator=(), resetCarry(), and setSecondTrack().

int DTTSCand::_tcPos
private

Definition at line 153 of file DTTSCand.h.

Referenced by operator=(), and TcPos().

const DTTracoTrigData* DTTSCand::_tctrig
private
DTTSS* DTTSCand::_tss
private

Definition at line 149 of file DTTSCand.h.

Referenced by config(), operator=(), tss(), and tssNumber().