CMS 3D CMS Logo

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

#include <DTTracoTrigData.h>

Inheritance diagram for DTTracoTrigData:
DTTrigData

Public Member Functions

DTChamberId ChamberId () const override
 Return chamber identifier. More...
 
void clear ()
 Clear. More...
 
int code () const
 Return trigger code. More...
 
int DeltaPsiR () const
 Return DeltaPsiR. More...
 
 DTTracoTrigData ()
 Constructor. More...
 
 DTTracoTrigData (DTTracoId, int)
 Constructor. More...
 
int eqIn () const
 Return bti trigger equation of inner segment. More...
 
int eqOut () const
 Return bti trigger equation of outer segment. More...
 
int isFirst () const
 Return non 0 if the track is a first track. More...
 
int K () const
 Return trigger K parameter. More...
 
DTTracoId parentId () const
 Return parent TRACO identifier. More...
 
int posIn () const
 Return the position of inner segment. More...
 
int posMask () const
 Return correlator output code (position of segments) More...
 
int posOut () const
 Return the position of outer segment. More...
 
void print () const override
 print More...
 
int psi () const
 Return trigger K parameter converted to angle. More...
 
int psiR () const
 Return trigger X parameter converted to angle. More...
 
int pvCode () const
 Return the preview code. More...
 
int pvCorr () const
 Return the preview correaltion bit. More...
 
int pvIO () const
 Return the preview i/o bit. More...
 
int pvK () const
 Return the preview K. More...
 
int qdec () const
 Return the trigger code in new format. More...
 
void resetPV ()
 Reset preview variables. More...
 
void resetVar ()
 Reset all variables but preview. More...
 
void setAngles (int psi, int psir, int dpsir)
 Set trigger angles. More...
 
void setCodeIn (int code)
 Set trigger code inner layer. More...
 
void setCodeOut (int code)
 Set trigger code outer layer. More...
 
void setEqIn (int eq)
 Set bti trigger equation of segment, inner layer. More...
 
void setEqOut (int eq)
 Set bti trigger equation of segment, outer layer. More...
 
void setK (int k)
 Set trigger K parameter. More...
 
void setParent (DTTracoId tracoid)
 Set the parent TRACO Identifier. More...
 
void setPosIn (int pos)
 Set position of segment, inner layer. More...
 
void setPosOut (int pos)
 Set position of segment, outer layer. More...
 
void setPV (int first, int code, int K, int ioflag)
 Set trigger preview parameters. More...
 
void setPVCorr (int ic)
 Set trigger preview correlation bit. More...
 
void setStep (int step)
 Set trigger step. More...
 
void setX (int x)
 Set trigger X parameter. More...
 
int step () const
 Return step. More...
 
int tracoNumber () const
 Return parent TRACO number. More...
 
int X () const
 Return trigger X parameter. More...
 
 ~DTTracoTrigData () override
 Destructor. More...
 
- Public Member Functions inherited from DTTrigData
 DTTrigData ()
 Constructor. More...
 
int sector () const
 Return sector number. More...
 
int station () const
 Return station number. More...
 
int wheel () const
 Return wheel number. More...
 
virtual ~DTTrigData ()
 Destructor. More...
 

Private Attributes

myint8 _codeIn
 
myint8 _codeOut
 
long int _dPsiR
 
myint8 _eqIn
 
myint8 _eqOut
 
int _Kval
 
myint8 _posIn
 
myint8 _posOut
 
long int _psi
 
long int _psiR
 
myint8 _pvcode
 
myint8 _pvCorr
 
myint8 _pvfirst
 
myint8 _pvIOflag
 
int _pvKval
 
myint8 _step
 
DTTracoId _tracoid
 
int _Xval
 

Detailed Description

DTTracoChip Trigger Data

Author
C. Grandi

Definition at line 37 of file DTTracoTrigData.h.

Constructor & Destructor Documentation

DTTracoTrigData::DTTracoTrigData ( )
inline

Constructor.

Definition at line 43 of file DTTracoTrigData.h.

43 {}
DTTracoTrigData::DTTracoTrigData ( DTTracoId  tracoid,
int  step 
)

Constructor.

Definition at line 35 of file DTTracoTrigData.cc.

References clear().

36  : _tracoid(tracoid), _step(step) {
37  clear();
38 }
void clear()
Clear.
step
Definition: StallMonitor.cc:94
DTTracoTrigData::~DTTracoTrigData ( )
inlineoverride

Destructor.

Definition at line 49 of file DTTracoTrigData.h.

49 {}

Member Function Documentation

DTChamberId DTTracoTrigData::ChamberId ( ) const
inlineoverridevirtual

Return chamber identifier.

Implements DTTrigData.

Definition at line 151 of file DTTracoTrigData.h.

References _tracoid, DTTracoId::ChamberId(), and print().

Referenced by DTTracoTrig::ChamberId().

151 { return _tracoid.ChamberId(); }
DTChamberId ChamberId() const
Returns the chamber id.
Definition: DTTracoId.h:72
void DTTracoTrigData::clear ( void  )
inline

Clear.

Definition at line 145 of file DTTracoTrigData.h.

References resetPV(), and resetVar().

Referenced by DTTracoTrig::clear(), and DTTracoTrigData().

145  {
146  resetVar();
147  resetPV();
148  }
void resetVar()
Reset all variables but preview.
void resetPV()
Reset preview variables.
int DTTracoTrigData::code ( ) const
inline

Return trigger code.

Definition at line 166 of file DTTracoTrigData.h.

References _codeIn, and _codeOut.

Referenced by DTTSPhi::addTracoT(), DTTracoTrig::code(), DTChambPhSegm::oldCode(), print(), DTTSPhi::runTSPhi(), setCodeIn(), setCodeOut(), and setPV().

166 { return _codeIn * 10 + _codeOut; }
int DTTracoTrigData::DeltaPsiR ( ) const
inline

Return DeltaPsiR.

Definition at line 211 of file DTTracoTrigData.h.

References _dPsiR, and qdec().

Referenced by DTChambPhSegm::DeltaPsiR(), DTTracoTrig::DeltaPsiR(), DTChambPhSegm::phiB(), and print().

211 { return _dPsiR; }
int DTTracoTrigData::eqIn ( ) const
inline

Return bti trigger equation of inner segment.

Definition at line 178 of file DTTracoTrigData.h.

References _eqIn.

Referenced by DTTracoTrig::eqIn(), DTChambPhSegm::print(), and DTSectCollPhSegm::print().

178 { return _eqIn; }
int DTTracoTrigData::eqOut ( ) const
inline

Return bti trigger equation of outer segment.

Definition at line 181 of file DTTracoTrigData.h.

References _eqOut.

Referenced by DTTracoTrig::eqOut(), DTChambPhSegm::print(), and DTSectCollPhSegm::print().

181 { return _eqOut; }
int DTTracoTrigData::isFirst ( ) const
inline

Return non 0 if the track is a first track.

Definition at line 184 of file DTTracoTrigData.h.

References _pvfirst.

Referenced by DTTracoTrig::isFirst(), and print().

184 { return _pvfirst; }
int DTTracoTrigData::K ( ) const
inline

Return trigger K parameter.

Definition at line 199 of file DTTracoTrigData.h.

References _Kval.

Referenced by DTChambPhSegm::K(), DTTracoTrig::K(), DTTracoCard::localDirection(), print(), and setPV().

199 { return _Kval; }
DTTracoId DTTracoTrigData::parentId ( ) const
inline

Return parent TRACO identifier.

Definition at line 157 of file DTTracoTrigData.h.

References _tracoid.

Referenced by DTTracoCard::localDirection(), DTTracoCard::localPosition(), and DTTracoCard::storeTrigger().

157 { return _tracoid; }
int DTTracoTrigData::posIn ( ) const
inline

Return the position of inner segment.

Definition at line 172 of file DTTracoTrigData.h.

References _posIn.

Referenced by DTTracoCard::localPosition(), and DTTracoTrig::posIn().

172 { return _posIn; }
int DTTracoTrigData::posMask ( ) const
inline

Return correlator output code (position of segments)

Definition at line 169 of file DTTracoTrigData.h.

References _posIn, and _posOut.

Referenced by DTChambPhSegm::posMask(), and DTTracoTrig::posMask().

169 { return _posOut * 1000 + _posIn; }
int DTTracoTrigData::posOut ( ) const
inline

Return the position of outer segment.

Definition at line 175 of file DTTracoTrigData.h.

References _posOut.

Referenced by DTTracoCard::localPosition(), and DTTracoTrig::posOut().

175 { return _posOut; }
void DTTracoTrigData::print ( void  ) const
overridevirtual

print

Implements DTTrigData.

Definition at line 65 of file DTTracoTrigData.cc.

References _tracoid, code(), gather_cfg::cout, TauDecayModes::dec, DeltaPsiR(), isFirst(), K(), psiR(), pvCode(), pvCorr(), pvK(), qdec(), DTTracoId::sector(), DTTracoId::station(), step(), DTTracoId::traco(), DTTracoId::wheel(), and X().

Referenced by DTTSPhi::addTracoT(), ChamberId(), and DTTracoTrig::print().

65  {
66  cout << "TRACO Id="
67  << " ( " << _tracoid.wheel();
68  cout << " , " << _tracoid.station();
69  cout << " , " << _tracoid.sector();
70  cout << " # " << _tracoid.traco();
71  cout << " ) "
72  << " step: " << step();
73 
74  cout << dec << " code=" << code() << " K=" << K() << " X=" << X();
75  cout << dec << " PVcode=" << pvCode() << " PVk=" << pvK()
76  << " qdec=" << qdec();
77  cout << " qdec=" << qdec();
78  cout << hex << " psiR=" << psiR() << " DeltaPsiR=" << DeltaPsiR() << dec
79  << endl;
80  if (isFirst())
81  cout << " I trk";
82  if (!isFirst())
83  cout << " II trk";
84  cout << " (";
85  if (!pvCorr())
86  cout << "NOT ";
87  cout << "correlated)" << endl;
88 }
int psiR() const
Return trigger X parameter converted to angle.
int step() const
Return step.
int pvCorr() const
Return the preview correaltion bit.
int X() const
Return trigger X parameter.
int sector() const
Returns sector number.
Definition: DTTracoId.h:68
int traco() const
Returns the traco.
Definition: DTTracoId.h:70
int station() const
Returns station number.
Definition: DTTracoId.h:66
int isFirst() const
Return non 0 if the track is a first track.
int pvK() const
Return the preview K.
int DeltaPsiR() const
Return DeltaPsiR.
int wheel() const
Returns wheel number.
Definition: DTTracoId.h:64
int pvCode() const
Return the preview code.
int qdec() const
Return the trigger code in new format.
int code() const
Return trigger code.
int K() const
Return trigger K parameter.
int DTTracoTrigData::psi ( ) const
inline

Return trigger K parameter converted to angle.

Definition at line 205 of file DTTracoTrigData.h.

References _psi.

Referenced by DTChambPhSegm::psi(), DTTracoTrig::psi(), and setAngles().

205 { return _psi; }
int DTTracoTrigData::psiR ( ) const
inline

Return trigger X parameter converted to angle.

Definition at line 208 of file DTTracoTrigData.h.

References _psiR.

Referenced by DTChambPhSegm::phi(), print(), DTChambPhSegm::psiR(), and DTTracoTrig::psiR().

208 { return _psiR; }
int DTTracoTrigData::pvCode ( ) const
inline
int DTTracoTrigData::pvCorr ( ) const
inline

Return the preview correaltion bit.

Definition at line 193 of file DTTracoTrigData.h.

References _pvCorr.

Referenced by DTTSCand::is0H(), DTTSCand::is0L(), DTTSCand::isCorr(), DTTSCand::isH0(), DTTSCand::isHHorHL(), DTTSCand::isL0(), DTTSCand::isLH(), DTTSCand::isLL(), print(), and DTTracoTrig::pvCorr().

193 { return _pvCorr; }
int DTTracoTrigData::pvIO ( ) const
inline

Return the preview i/o bit.

Definition at line 196 of file DTTracoTrigData.h.

References _pvIOflag.

Referenced by DTTracoTrig::operator==().

196 { return _pvIOflag; }
int DTTracoTrigData::pvK ( ) const
inline

Return the preview K.

Definition at line 190 of file DTTracoTrigData.h.

References _pvKval.

Referenced by print(), DTTSCand::print(), DTChambPhSegm::pvK(), DTTracoTrig::pvK(), DTTSCand::setBitsTsm(), and DTTSCand::setBitsTss().

190 { return _pvKval; }
int DTTracoTrigData::qdec ( ) const

Return the trigger code in new format.

Definition at line 44 of file DTTracoTrigData.cc.

References _codeIn, and _codeOut.

Referenced by DTTracoChip::calculateAngles(), DTChambPhSegm::code(), DeltaPsiR(), print(), DTTracoTrig::qdec(), and DTTSCand::setBitsBkmod().

44  {
45  // This is consistent with memo
46  if (_codeIn == 8 && _codeOut == 8)
47  return 6; // HH
48  if (_codeIn == 8 && _codeOut == 0)
49  return 2; // Hinner
50  if (_codeIn == 0 && _codeOut == 8)
51  return 3; // Houter
52  if (_codeIn > 0 && _codeOut == 8)
53  return 5; // LH
54  if (_codeIn == 8 && _codeOut > 0)
55  return 5; // HL
56  if (_codeIn > 0 && _codeOut > 0)
57  return 4; // LL
58  if (_codeIn > 0 && _codeOut == 0)
59  return 0; // Linner
60  if (_codeIn == 0 && _codeOut > 0)
61  return 1; // Louter
62  return 7; // null
63 }
void DTTracoTrigData::resetPV ( )
inline

Reset preview variables.

Definition at line 136 of file DTTracoTrigData.h.

References _pvcode, _pvCorr, _pvfirst, _pvIOflag, and _pvKval.

Referenced by clear(), and DTTracoTrig::resetPV().

136  {
137  _pvfirst = 0;
138  _pvcode = 0;
139  _pvKval = 9999;
140  _pvCorr = 0;
141  _pvIOflag = 0;
142  }
void DTTracoTrigData::resetVar ( )
inline

Reset all variables but preview.

Definition at line 115 of file DTTracoTrigData.h.

References _codeIn, _codeOut, _dPsiR, _eqIn, _eqOut, _Kval, _posIn, _posOut, _psi, _psiR, and _Xval.

Referenced by clear(), and DTTracoTrig::resetVar().

115  {
116  _codeIn = 0;
117  _codeOut = 0;
118  _posIn = 0;
119  _posOut = 0;
120  _eqIn = 0;
121  _eqOut = 0;
122  _Kval = 255;
123  _Xval = 0;
124  /*
125  _psi = -DTConfig::RESOLPSI;
126  _psiR = -DTConfig::RESOLPSIR/2;
127  _dPsiR = -DTConfig::RESOLPSI;
128  */
129  // SV notazione complemento a due:
130  _psi = 0x1FF;
131  _psiR = 0xFFF;
132  _dPsiR = 0x1FF;
133  }
void DTTracoTrigData::setAngles ( int  psi,
int  psir,
int  dpsir 
)
inline

Set trigger angles.

Definition at line 101 of file DTTracoTrigData.h.

References _dPsiR, _psi, _psiR, and psi().

Referenced by DTTracoTrig::setAngles().

101  {
102  if (psi & 0x200)
103  psi |= 0xFFFFFC00;
104  if (psir & 0x800)
105  psir |= 0xFFFFF000;
106  if (dpsir & 0x200)
107  dpsir |= 0xFFFFFC00;
108 
109  _psi = psi;
110  _psiR = psir;
111  _dPsiR = dpsir;
112  }
std::map< std::string, int, std::less< std::string > > psi
int psi() const
Return trigger K parameter converted to angle.
void DTTracoTrigData::setCodeIn ( int  code)
inline

Set trigger code inner layer.

Definition at line 78 of file DTTracoTrigData.h.

References _codeIn, and code().

Referenced by DTTracoTrig::setCodeIn().

78 { _codeIn = code; }
int code() const
Return trigger code.
void DTTracoTrigData::setCodeOut ( int  code)
inline

Set trigger code outer layer.

Definition at line 80 of file DTTracoTrigData.h.

References _codeOut, and code().

Referenced by DTTracoTrig::setCodeOut().

80 { _codeOut = code; }
int code() const
Return trigger code.
void DTTracoTrigData::setEqIn ( int  eq)
inline

Set bti trigger equation of segment, inner layer.

Definition at line 89 of file DTTracoTrigData.h.

References _eqIn, and Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq().

Referenced by DTTracoTrig::setEqIn().

void DTTracoTrigData::setEqOut ( int  eq)
inline

Set bti trigger equation of segment, outer layer.

Definition at line 92 of file DTTracoTrigData.h.

References _eqOut, and Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq().

Referenced by DTTracoTrig::setEqOut().

void DTTracoTrigData::setK ( int  k)
inline

Set trigger K parameter.

Definition at line 95 of file DTTracoTrigData.h.

References _Kval, and gen::k.

Referenced by DTTracoTrig::setK().

95 { _Kval = k; }
int k[5][pyjets_maxn]
void DTTracoTrigData::setParent ( DTTracoId  tracoid)
inline

Set the parent TRACO Identifier.

Definition at line 54 of file DTTracoTrigData.h.

References _tracoid.

Referenced by lumiQTWidget.LumiCanvas::__init__(), and DTTracoTrig::DTTracoTrig().

54 { _tracoid = tracoid; }
void DTTracoTrigData::setPosIn ( int  pos)
inline

Set position of segment, inner layer.

Definition at line 83 of file DTTracoTrigData.h.

References _posIn.

Referenced by DTTracoTrig::setPosIn().

83 { _posIn = pos; }
void DTTracoTrigData::setPosOut ( int  pos)
inline

Set position of segment, outer layer.

Definition at line 86 of file DTTracoTrigData.h.

References _posOut.

Referenced by DTTracoTrig::setPosOut().

86 { _posOut = pos; }
void DTTracoTrigData::setPV ( int  first,
int  code,
int  K,
int  ioflag 
)
inline

Set trigger preview parameters.

Definition at line 60 of file DTTracoTrigData.h.

References _pvcode, _pvfirst, _pvIOflag, _pvKval, code(), plotBeamSpotDB::first, and K().

Referenced by DTTracoTrig::setPV().

60  {
61  _pvfirst = first;
62  _pvcode = code;
63  _pvKval = K;
64  _pvIOflag = ioflag;
65  /*
66  cout<<"setPV called, stored:"<<
67  " first=" << first <<
68  " code=" << code <<
69  " K=" << K <<
70  " ioflag=" << ioflag << endl;
71  */
72  }
int code() const
Return trigger code.
int K() const
Return trigger K parameter.
void DTTracoTrigData::setPVCorr ( int  ic)
inline

Set trigger preview correlation bit.

Definition at line 75 of file DTTracoTrigData.h.

References _pvCorr.

Referenced by DTTracoTrig::setPVCorr().

75 { _pvCorr = ic; }
void DTTracoTrigData::setStep ( int  step)
inline

Set trigger step.

Definition at line 57 of file DTTracoTrigData.h.

References _step, and step().

Referenced by DTTracoTrig::DTTracoTrig().

57 { _step = step; }
int step() const
Return step.
void DTTracoTrigData::setX ( int  x)
inline

Set trigger X parameter.

Definition at line 98 of file DTTracoTrigData.h.

References _Xval, and x.

Referenced by DTTracoTrig::setX().

int DTTracoTrigData::step ( ) const
inline

Return step.

Definition at line 163 of file DTTracoTrigData.h.

References _step.

Referenced by print(), setStep(), DTTracoTrig::step(), and DTTracoCard::storeTrigger().

163 { return _step; }
int DTTracoTrigData::tracoNumber ( ) const
inline

Return parent TRACO number.

Definition at line 160 of file DTTracoTrigData.h.

References _tracoid, and DTTracoId::traco().

Referenced by DTTSPhi::addTracoT(), DTChambPhSegm::print(), DTSectCollPhSegm::print(), DTChambPhSegm::tracoNumber(), DTTSCand::tracoNumber(), and DTTracoTrig::tracoNumber().

160 { return _tracoid.traco(); }
int traco() const
Returns the traco.
Definition: DTTracoId.h:70
int DTTracoTrigData::X ( ) const
inline

Return trigger X parameter.

Definition at line 202 of file DTTracoTrigData.h.

References _Xval.

Referenced by svgfig.Curve.Sample::__repr__(), DTTracoCard::localPosition(), print(), DTChambPhSegm::X(), and DTTracoTrig::X().

202 { return _Xval; }

Member Data Documentation

myint8 DTTracoTrigData::_codeIn
private

Definition at line 233 of file DTTracoTrigData.h.

Referenced by code(), qdec(), resetVar(), and setCodeIn().

myint8 DTTracoTrigData::_codeOut
private

Definition at line 235 of file DTTracoTrigData.h.

Referenced by code(), qdec(), resetVar(), and setCodeOut().

long int DTTracoTrigData::_dPsiR
private

Definition at line 259 of file DTTracoTrigData.h.

Referenced by DeltaPsiR(), resetVar(), and setAngles().

myint8 DTTracoTrigData::_eqIn
private

Definition at line 228 of file DTTracoTrigData.h.

Referenced by eqIn(), resetVar(), and setEqIn().

myint8 DTTracoTrigData::_eqOut
private

Definition at line 230 of file DTTracoTrigData.h.

Referenced by eqOut(), resetVar(), and setEqOut().

int DTTracoTrigData::_Kval
private

Definition at line 250 of file DTTracoTrigData.h.

Referenced by K(), resetVar(), and setK().

myint8 DTTracoTrigData::_posIn
private

Definition at line 224 of file DTTracoTrigData.h.

Referenced by posIn(), posMask(), resetVar(), and setPosIn().

myint8 DTTracoTrigData::_posOut
private

Definition at line 226 of file DTTracoTrigData.h.

Referenced by posMask(), posOut(), resetVar(), and setPosOut().

long int DTTracoTrigData::_psi
private

Definition at line 255 of file DTTracoTrigData.h.

Referenced by psi(), resetVar(), and setAngles().

long int DTTracoTrigData::_psiR
private

Definition at line 257 of file DTTracoTrigData.h.

Referenced by psiR(), resetVar(), and setAngles().

myint8 DTTracoTrigData::_pvcode
private

Definition at line 241 of file DTTracoTrigData.h.

Referenced by pvCode(), resetPV(), and setPV().

myint8 DTTracoTrigData::_pvCorr
private

Definition at line 245 of file DTTracoTrigData.h.

Referenced by pvCorr(), resetPV(), and setPVCorr().

myint8 DTTracoTrigData::_pvfirst
private

Definition at line 238 of file DTTracoTrigData.h.

Referenced by isFirst(), resetPV(), and setPV().

myint8 DTTracoTrigData::_pvIOflag
private

Definition at line 247 of file DTTracoTrigData.h.

Referenced by pvIO(), resetPV(), and setPV().

int DTTracoTrigData::_pvKval
private

Definition at line 243 of file DTTracoTrigData.h.

Referenced by pvK(), resetPV(), and setPV().

myint8 DTTracoTrigData::_step
private

Definition at line 221 of file DTTracoTrigData.h.

Referenced by setStep(), and step().

DTTracoId DTTracoTrigData::_tracoid
private

Definition at line 218 of file DTTracoTrigData.h.

Referenced by ChamberId(), parentId(), print(), setParent(), and tracoNumber().

int DTTracoTrigData::_Xval
private

Definition at line 252 of file DTTracoTrigData.h.

Referenced by resetVar(), setX(), and X().