CMS 3D CMS Logo

Public Member Functions | Private Attributes

DTTracoTrigData Class Reference

#include <DTTracoTrigData.h>

Inheritance diagram for DTTracoTrigData:
DTTrigData

List of all members.

Public Member Functions

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

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

Date:
2008/06/30 13:42:21
Revision:
1.3
Author:
C. Grandi

Definition at line 39 of file DTTracoTrigData.h.


Constructor & Destructor Documentation

DTTracoTrigData::DTTracoTrigData ( ) [inline]

Constructor.

Definition at line 46 of file DTTracoTrigData.h.

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

Constructor.

Definition at line 35 of file DTTracoTrigData.cc.

References clear().

                                             : _tracoid(tracoid), _step(step) {
  clear();
}
DTTracoTrigData::~DTTracoTrigData ( ) [inline]

Destructor.

Definition at line 52 of file DTTracoTrigData.h.

{}

Member Function Documentation

DTChamberId DTTracoTrigData::ChamberId ( ) const [inline, virtual]

Return chamber identifier.

Implements DTTrigData.

Definition at line 178 of file DTTracoTrigData.h.

References _tracoid, and DTTracoId::ChamberId().

Referenced by DTTracoTrig::ChamberId().

                                {
    return _tracoid.ChamberId(); 
  }
void DTTracoTrigData::clear ( void  ) [inline]

Clear.

Definition at line 172 of file DTTracoTrigData.h.

References resetPV(), and resetVar().

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

               {
    resetVar();
    resetPV();
  }
int DTTracoTrigData::code ( ) const [inline]

Return trigger code.

Definition at line 201 of file DTTracoTrigData.h.

References _codeIn, and _codeOut.

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

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

Return DeltaPsiR.

Definition at line 278 of file DTTracoTrigData.h.

References _dPsiR.

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

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

Return bti trigger equation of inner segment.

Definition at line 221 of file DTTracoTrigData.h.

References _eqIn.

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

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

Return bti trigger equation of outer segment.

Definition at line 226 of file DTTracoTrigData.h.

References _eqOut.

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

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

Return non 0 if the track is a first track.

Definition at line 232 of file DTTracoTrigData.h.

References _pvfirst.

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

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

Return trigger K parameter.

Definition at line 258 of file DTTracoTrigData.h.

References _Kval.

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

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

Return parent TRACO identifier.

Definition at line 186 of file DTTracoTrigData.h.

References _tracoid.

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

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

Return the position of inner segment.

Definition at line 211 of file DTTracoTrigData.h.

References _posIn.

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

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

Return correlator output code (position of segments)

Definition at line 206 of file DTTracoTrigData.h.

References _posIn, and _posOut.

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

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

Return the position of outer segment.

Definition at line 216 of file DTTracoTrigData.h.

References _posOut.

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

                            { 
    return _posOut; 
  }
void DTTracoTrigData::print ( void  ) const [virtual]

print

Implements DTTrigData.

Definition at line 60 of file DTTracoTrigData.cc.

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

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

                             {
  cout << "TRACO Id=" << " ( " << _tracoid.wheel()   ;
  cout                << " , " << _tracoid.station() ;
  cout                << " , " << _tracoid.sector()  ;
  cout                << " # " << _tracoid.traco()   ;
  cout                << " ) " << " step: " << step();

  cout << dec << " code=" << code() << " K=" << K() << " X=" << X();
  cout << dec << " PVcode=" << pvCode() << " PVk=" << pvK() << " qdec=" << qdec();
  cout << " qdec=" << qdec();
  cout << hex << " psiR=" << psiR() << "  DeltaPsiR=" << DeltaPsiR() << dec << endl;
  if(isFirst())
    cout << " I trk"; 
  if(!isFirst())
    cout << " II trk"; 
  cout << " (";
  if(!pvCorr()) cout << "NOT ";
  cout << "correlated)" << endl;
}
int DTTracoTrigData::psi ( ) const [inline]

Return trigger K parameter converted to angle.

Definition at line 268 of file DTTracoTrigData.h.

References _psi.

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

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

Return trigger X parameter converted to angle.

Definition at line 273 of file DTTracoTrigData.h.

References _psiR.

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

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

Return the preview correaltion bit.

Definition at line 247 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().

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

Return the preview i/o bit.

Definition at line 252 of file DTTracoTrigData.h.

References _pvIOflag.

Referenced by DTTracoTrig::operator==().

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

Return the preview K.

Definition at line 242 of file DTTracoTrigData.h.

References _pvKval.

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

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

Return the trigger code in new format.

Definition at line 46 of file DTTracoTrigData.cc.

References _codeIn, and _codeOut.

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

                            {
  // This is consistent with memo
  if (_codeIn==8 && _codeOut==8) return 6; // HH
  if (_codeIn==8 && _codeOut==0) return 2; // Hinner
  if (_codeIn==0 && _codeOut==8) return 3; // Houter
  if (_codeIn >0 && _codeOut==8) return 5; // LH
  if (_codeIn==8 && _codeOut> 0) return 5; // HL
  if (_codeIn> 0 && _codeOut> 0) return 4; // LL
  if (_codeIn> 0 && _codeOut==0) return 0; // Linner
  if (_codeIn==0 && _codeOut> 0) return 1; // Louter
  return 7;                                // null
}
void DTTracoTrigData::resetPV ( ) [inline]

Reset preview variables.

Definition at line 163 of file DTTracoTrigData.h.

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

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

                 {
    _pvfirst = 0;
    _pvcode = 0;
    _pvKval = 9999;
    _pvCorr = 0;
    _pvIOflag = 0;
  }
void DTTracoTrigData::resetVar ( ) [inline]

Reset all variables but preview.

Definition at line 141 of file DTTracoTrigData.h.

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

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

                  {
    _codeIn = 0; 
    _codeOut = 0; 
    _posIn = 0;
    _posOut = 0;
    _eqIn = 0;
    _eqOut = 0;
    _Kval = 255; 
    _Xval = 0;
    /*
    _psi = -DTConfig::RESOLPSI;
    _psiR = -DTConfig::RESOLPSIR/2;
    _dPsiR = -DTConfig::RESOLPSI;
    */
    //SV notazione complemento a due:
    _psi = 0x1FF;
    _psiR = 0xFFF;
    _dPsiR = 0x1FF;

  }
void DTTracoTrigData::setAngles ( int  psi,
int  psir,
int  dpsir 
) [inline]

Set trigger angles.

Definition at line 127 of file DTTracoTrigData.h.

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

Referenced by DTTracoTrig::setAngles().

                                                      { 
    if(psi & 0x200)
      psi |= 0xFFFFFC00;
    if(psir & 0x800)
      psir |= 0xFFFFF000;
    if(dpsir & 0x200)
      dpsir |= 0xFFFFFC00;

    _psi = psi;
    _psiR = psir;
    _dPsiR = dpsir; 
  }
void DTTracoTrigData::setCodeIn ( int  code) [inline]

Set trigger code inner layer.

Definition at line 87 of file DTTracoTrigData.h.

References _codeIn, and code().

Referenced by DTTracoTrig::setCodeIn().

                                  {
    _codeIn = code;
  }
void DTTracoTrigData::setCodeOut ( int  code) [inline]

Set trigger code outer layer.

Definition at line 91 of file DTTracoTrigData.h.

References _codeOut, and code().

Referenced by DTTracoTrig::setCodeOut().

                                   {
    _codeOut = code;
  }
void DTTracoTrigData::setEqIn ( int  eq) [inline]

Set bti trigger equation of segment, inner layer.

Definition at line 106 of file DTTracoTrigData.h.

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

Referenced by DTTracoTrig::setEqIn().

                              {
    _eqIn = eq;
  }
void DTTracoTrigData::setEqOut ( int  eq) [inline]

Set bti trigger equation of segment, outer layer.

Definition at line 111 of file DTTracoTrigData.h.

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

Referenced by DTTracoTrig::setEqOut().

                               {
    _eqOut = eq;
  }
void DTTracoTrigData::setK ( int  k) [inline]

Set trigger K parameter.

Definition at line 117 of file DTTracoTrigData.h.

References _Kval, and gen::k.

Referenced by DTTracoTrig::setK().

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

Set the parent TRACO Identifier.

Definition at line 57 of file DTTracoTrigData.h.

References _tracoid.

Referenced by DTTracoTrig::DTTracoTrig().

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

Set position of segment, inner layer.

Definition at line 96 of file DTTracoTrigData.h.

References _posIn, and pos.

Referenced by DTTracoTrig::setPosIn().

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

Set position of segment, outer layer.

Definition at line 101 of file DTTracoTrigData.h.

References _posOut, and pos.

Referenced by DTTracoTrig::setPosOut().

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

Set trigger preview parameters.

Definition at line 67 of file DTTracoTrigData.h.

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

Referenced by DTTracoTrig::setPV().

                                                            {
    _pvfirst = first; 
    _pvcode = code;
    _pvKval = K; 
    _pvIOflag = ioflag;
/*
    cout<<"setPV called, stored:"<<
    "  first=" << first <<
    "  code=" << code <<
    "  K=" << K <<
    " ioflag=" << ioflag << endl;
*/
   }
void DTTracoTrigData::setPVCorr ( int  ic) [inline]

Set trigger preview correlation bit.

Definition at line 82 of file DTTracoTrigData.h.

References _pvCorr.

Referenced by DTTracoTrig::setPVCorr().

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

Set trigger step.

Definition at line 62 of file DTTracoTrigData.h.

References _step, and step().

Referenced by DTTracoTrig::DTTracoTrig().

                                {
    _step = step;
  }
void DTTracoTrigData::setX ( int  x) [inline]

Set trigger X parameter.

Definition at line 122 of file DTTracoTrigData.h.

References _Xval, and x.

Referenced by DTTracoTrig::setX().

                          {
    _Xval = x;
  }
int DTTracoTrigData::step ( ) const [inline]

Return step.

Definition at line 196 of file DTTracoTrigData.h.

References _step.

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

                          { 
    return _step; 
  }
int DTTracoTrigData::tracoNumber ( ) const [inline]
int DTTracoTrigData::X ( ) const [inline]

Return trigger X parameter.

Definition at line 263 of file DTTracoTrigData.h.

References _Xval.

Referenced by DTTracoCard::localPosition(), print(), DTTracoTrig::X(), and DTChambPhSegm::X().

                       { 
    return _Xval; 
  }

Member Data Documentation

Definition at line 303 of file DTTracoTrigData.h.

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

Definition at line 305 of file DTTracoTrigData.h.

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

long int DTTracoTrigData::_dPsiR [private]

Definition at line 330 of file DTTracoTrigData.h.

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

Definition at line 298 of file DTTracoTrigData.h.

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

Definition at line 300 of file DTTracoTrigData.h.

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

int DTTracoTrigData::_Kval [private]

Definition at line 321 of file DTTracoTrigData.h.

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

Definition at line 294 of file DTTracoTrigData.h.

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

Definition at line 296 of file DTTracoTrigData.h.

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

long int DTTracoTrigData::_psi [private]

Definition at line 326 of file DTTracoTrigData.h.

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

long int DTTracoTrigData::_psiR [private]

Definition at line 328 of file DTTracoTrigData.h.

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

Definition at line 311 of file DTTracoTrigData.h.

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

Definition at line 315 of file DTTracoTrigData.h.

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

Definition at line 308 of file DTTracoTrigData.h.

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

Definition at line 317 of file DTTracoTrigData.h.

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

int DTTracoTrigData::_pvKval [private]

Definition at line 313 of file DTTracoTrigData.h.

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

Definition at line 291 of file DTTracoTrigData.h.

Referenced by setStep(), and step().

Definition at line 288 of file DTTracoTrigData.h.

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

int DTTracoTrigData::_Xval [private]

Definition at line 323 of file DTTracoTrigData.h.

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