CMS 3D CMS Logo

Public Member Functions | Private Attributes

DTTracoTrig Class Reference

#include <DTTracoTrig.h>

Inheritance diagram for DTTracoTrig:
DTTrigData

List of all members.

Public Member Functions

void addDTBtiTrig (const DTBtiTrigData *btitrig)
 Add a BTI trigger to the list.
std::vector< const
DTBtiTrigData * > 
btiTrigList () const
 Return the BTI Triggers list.
DTChamberId ChamberId () const
 Return chamber identifier.
void clear ()
 Clear.
int code () const
 Return trigger code.
DTTracoTrigData data () const
 Return the data part.
int DeltaPsiR () const
 Return DeltaPsiR.
 DTTracoTrig (DTTracoChip *, int)
 Constructors.
 DTTracoTrig (DTTracoChip *, DTTracoTrigData)
 Constructors.
 DTTracoTrig ()
 Constructors.
int eqIn ()
 Return bti trigger equation of segments, inner.
int eqOut ()
 Return bti trigger equation of segments, outer.
int isFirst () const
 Return non 0 if the track is a first track.
int K () const
 Return trigger K parameter.
bool operator== (const DTTracoTrig &) const
 comparison operator
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 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 segment.
void setCodeOut (int code)
 Set trigger code, outer segment.
void setEqIn (int eq)
 Set bti trigger equation of segments, inner.
void setEqOut (int eq)
 Set bti trigger equation of segments, outer.
void setK (int k)
 Set trigger K parameter.
void setParent (DTTracoChip *parent)
 Set the parent TRACO.
void setPosIn (int pos)
 Set position of segments, inner.
void setPosOut (int pos)
 Set position of segments, outer.
void setPV (int first, int code, int K, int io)
 Set trigger preview parameters.
void setPVCorr (int ic)
 Set trigger preview correlation bit.
void setX (int x)
 Set trigger X parameter.
int step () const
 Return step.
DTTracoChiptParent () const
 Return parent TRACO pointer.
int tracoNumber () const
 Return parent TRACO number.
int X () const
 Return trigger X parameter.
 ~DTTracoTrig ()
 Destructor.

Private Attributes

std::vector< const
DTBtiTrigData * > 
_btitrig
DTTracoTrigData _data
DTTracoChip_tparent

Detailed Description

TRACO Trigger Data. Has pointers to parent TRACO and BTI triggers which allow algorithm debugging

Date:
2006/07/19 10:24:02
Revision:
1.1
Author:
C. Grandi, S. Vanini

Definition at line 42 of file DTTracoTrig.h.


Constructor & Destructor Documentation

DTTracoTrig::DTTracoTrig ( )

Constructors.

Definition at line 38 of file DTTracoTrig.cc.

References hitfit::clear().

                         {

  // reserve the appropriate amount of space for vectors
  _btitrig.reserve(2);
  clear();

}
DTTracoTrig::DTTracoTrig ( DTTracoChip tparent,
int  step 
)

Constructors.

Definition at line 46 of file DTTracoTrig.cc.

References _btitrig, _data, clear(), DTTracoChip::id(), DTTracoTrigData::setParent(), and DTTracoTrigData::setStep().

                                                       : 
                                                   _tparent(tparent)     {

  // reserve the appropriate amount of space for vectors
  _btitrig.reserve(2);
  clear();

  // data part of the trigger
  _data.setStep(step);
  _data.setParent(tparent->id());

}
DTTracoTrig::DTTracoTrig ( DTTracoChip parent,
DTTracoTrigData  data 
)

Constructors.

Definition at line 59 of file DTTracoTrig.cc.

References _btitrig.

                                                       : 
                                 _tparent(parent), _data(data) {

  // reserve the appropriate amount of space for vectors
  _btitrig.reserve(2);

}
DTTracoTrig::~DTTracoTrig ( )

Destructor.

Definition at line 71 of file DTTracoTrig.cc.

                          {
}

Member Function Documentation

void DTTracoTrig::addDTBtiTrig ( const DTBtiTrigData btitrig) [inline]

Add a BTI trigger to the list.

Definition at line 64 of file DTTracoTrig.h.

References _btitrig.

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                                                           {
      _btitrig.push_back(btitrig); 
    }
std::vector<const DTBtiTrigData*> DTTracoTrig::btiTrigList ( ) const [inline]

Return the BTI Triggers list.

Definition at line 250 of file DTTracoTrig.h.

References _btitrig.

                                                          { 
      return _btitrig; 
    }
DTChamberId DTTracoTrig::ChamberId ( ) const [inline, virtual]

Return chamber identifier.

Implements DTTrigData.

Definition at line 140 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::ChamberId().

Referenced by DTTracoChip::calculateAngles().

                                         {
      return _data.ChamberId(); 
    }
void DTTracoTrig::clear ( void  ) [inline]

Clear.

Definition at line 134 of file DTTracoTrig.h.

References _btitrig, _data, and DTTracoTrigData::clear().

Referenced by DTTracoTrig().

                        {
      _data.clear();
      _btitrig.clear();
    }
int DTTracoTrig::code ( ) const [inline]

Return trigger code.

Definition at line 170 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::code().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                            { 
      return _data.code(); 
    }
DTTracoTrigData DTTracoTrig::data ( ) const [inline]

Return the data part.

Definition at line 155 of file DTTracoTrig.h.

References _data.

Referenced by DTTracoChip::calculateAngles(), and operator==().

                                        {
      return _data;
    }
int DTTracoTrig::DeltaPsiR ( ) const [inline]

Return DeltaPsiR.

Definition at line 240 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::DeltaPsiR().

Referenced by DTTracoChip::insideAngWindow(), and operator==().

                                 {
      return _data.DeltaPsiR(); 
    }
int DTTracoTrig::eqIn ( ) [inline]

Return bti trigger equation of segments, inner.

Definition at line 190 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::eqIn().

                      {
      return _data.eqIn();
    }
int DTTracoTrig::eqOut ( ) [inline]

Return bti trigger equation of segments, outer.

Definition at line 195 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::eqOut().

                       {
      return _data.eqOut();
    }
int DTTracoTrig::isFirst ( ) const [inline]

Return non 0 if the track is a first track.

Definition at line 200 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::isFirst().

Referenced by operator==().

                               {
      return _data.isFirst();
    }
int DTTracoTrig::K ( ) const [inline]

Return trigger K parameter.

Definition at line 220 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::K().

Referenced by DTTracoChip::calculateAngles(), DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                         { 
      return _data.K(); 
    }
bool DTTracoTrig::operator== ( const DTTracoTrig tt) const

comparison operator

Definition at line 76 of file DTTracoTrig.cc.

References gather_cfg::cout, data(), DeltaPsiR(), isFirst(), psiR(), pvCode(), pvCorr(), DTTracoTrigData::pvIO(), pvK(), and qdec().

                                                     {
  if(qdec()==7 && tt.qdec()==7)
    return true;

  if ( !(  isFirst()     == tt.isFirst())     ||
       !(  pvK()         == tt.pvK())         ||
       (  (fmod(double(pvCode()),8.)==0) ^ (fmod(double(tt.pvCode()),8.)==0) )  ||
       !(  pvCorr()      == tt.pvCorr())      ||
       !(  psiR()        == tt.psiR())        ||
       !(  DeltaPsiR()   == tt.DeltaPsiR())   ||
       !(  qdec()        == tt.qdec())        ||
       !(  data().pvIO() == tt.data().pvIO())
                                                        ){


    cout<<"fs:"<<isFirst() <<","<< tt.isFirst() <<endl;
    cout<<"pvCode:"<<pvCode()<<","<<tt.pvCode()<<endl;
    cout<<"pvK:"<< pvK() <<","<<tt.pvK()<<endl;
    cout<<"pvCorr:"<<pvCorr()<<","<<tt.pvCorr()<<endl;
    cout<<"psiR:"<<psiR()<<","<<tt.psiR()<<endl;
    cout<<"DeltaPsiR:"<<DeltaPsiR()<<","<<tt.DeltaPsiR()<<endl;
    cout<<"qdec:"<<qdec()<<","<<tt.qdec()<<endl;
    cout<<"data().pvIO:"<<data().pvIO()<<","<<tt.data().pvIO()<<endl;

     return false;
  }
  return true;
}
int DTTracoTrig::posIn ( ) const [inline]

Return the position of inner segment.

Definition at line 180 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::posIn().

                             { 
      return _data.posIn(); 
    }
int DTTracoTrig::posMask ( ) const [inline]

Return correlator output code (position of segments)

Definition at line 175 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::posMask().

                               { 
      return _data.posMask(); 
    }
int DTTracoTrig::posOut ( ) const [inline]

Return the position of outer segment.

Definition at line 185 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::posOut().

                              { 
      return _data.posOut(); 
    }
void DTTracoTrig::print ( void  ) const [inline, virtual]

Print.

Implements DTTrigData.

Definition at line 145 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::print().

Referenced by DTTracoChip::addTrig(), DTTracoChip::calculateAngles(), and DTTracoChip::run().

                              { 
      _data.print();
    }
int DTTracoTrig::psi ( ) const [inline]

Return trigger K parameter converted to angle.

Definition at line 230 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::psi().

                           { 
      return _data.psi(); 
    }
int DTTracoTrig::psiR ( ) const [inline]

Return trigger X parameter converted to angle.

Definition at line 235 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::psiR().

Referenced by operator==().

                            { 
      return _data.psiR(); 
    }
int DTTracoTrig::pvCode ( ) const [inline]

Return the preview code.

Definition at line 205 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::pvCode().

Referenced by operator==().

                              { 
      return _data.pvCode(); 
    }
int DTTracoTrig::pvCorr ( ) const [inline]

Return the preview correaltion bit.

Definition at line 215 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::pvCorr().

Referenced by operator==().

                              { 
      return _data.pvCorr(); 
    }
int DTTracoTrig::pvK ( ) const [inline]

Return the preview K.

Definition at line 210 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::pvK().

Referenced by operator==().

                           { 
      return _data.pvK(); 
    }
int DTTracoTrig::qdec ( ) const [inline]

Return the trigger code in new format.

Definition at line 245 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::qdec().

Referenced by operator==(), and DTTracoChip::storeCorr().

                            { 
      return _data.qdec(); 
    }
void DTTracoTrig::resetPV ( ) [inline]

Reset preview variables.

Definition at line 129 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::resetPV().

                          {
      _data.resetPV();
    }
void DTTracoTrig::resetVar ( ) [inline]

Reset all variables but preview.

Definition at line 124 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::resetVar().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                           {
      _data.resetVar();
    }
void DTTracoTrig::setAngles ( int  psi,
int  psir,
int  dpsir 
) [inline]

Set trigger angles.

Definition at line 119 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setAngles().

Referenced by DTTracoChip::calculateAngles().

                                                        {
      _data.setAngles(psi,psir,dpsir);
    }
void DTTracoTrig::setCodeIn ( int  code) [inline]

Set trigger code, inner segment.

Definition at line 79 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setCodeIn().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

void DTTracoTrig::setCodeOut ( int  code) [inline]

Set trigger code, outer segment.

Definition at line 84 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setCodeOut().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

void DTTracoTrig::setEqIn ( int  eq) [inline]

Set bti trigger equation of segments, inner.

Definition at line 99 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setEqIn().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                                {
      _data.setEqIn(eq);
    }
void DTTracoTrig::setEqOut ( int  eq) [inline]

Set bti trigger equation of segments, outer.

Definition at line 104 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setEqOut().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                                 {
      _data.setEqOut(eq);
    }
void DTTracoTrig::setK ( int  k) [inline]

Set trigger K parameter.

Definition at line 109 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setK().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                            {
      _data.setK(k);
    }
void DTTracoTrig::setParent ( DTTracoChip parent) [inline]

Set the parent TRACO.

Definition at line 59 of file DTTracoTrig.h.

References _tparent, and dbtoconf::parent.

                                               { 
      _tparent = parent; 
    }  
void DTTracoTrig::setPosIn ( int  pos) [inline]

Set position of segments, inner.

Definition at line 89 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setPosIn().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

void DTTracoTrig::setPosOut ( int  pos) [inline]

Set position of segments, outer.

Definition at line 94 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setPosOut().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

void DTTracoTrig::setPV ( int  first,
int  code,
int  K,
int  io 
) [inline]

Set trigger preview parameters.

Definition at line 69 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setPV().

Referenced by DTTracoChip::setPV().

                                                          { 
      _data.setPV(first,code,K,io); 
    }
void DTTracoTrig::setPVCorr ( int  ic) [inline]

Set trigger preview correlation bit.

Definition at line 74 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setPVCorr().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                                  { 
      _data.setPVCorr(ic); 
    }
void DTTracoTrig::setX ( int  x) [inline]

Set trigger X parameter.

Definition at line 114 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::setX().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                            {
      _data.setX(x);
    }
int DTTracoTrig::step ( ) const [inline]

Return step.

Definition at line 165 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::step().

Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                            { 
      return _data.step(); 
    }
DTTracoChip* DTTracoTrig::tParent ( ) const [inline]

Return parent TRACO pointer.

Definition at line 150 of file DTTracoTrig.h.

References _tparent.

                                        { 
      return _tparent; 
    }
int DTTracoTrig::tracoNumber ( ) const [inline]

Return parent TRACO number.

Definition at line 160 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::tracoNumber().

                                   { 
      return _data.tracoNumber(); 
    }
int DTTracoTrig::X ( ) const [inline]

Return trigger X parameter.

Definition at line 225 of file DTTracoTrig.h.

References _data, and DTTracoTrigData::X().

Referenced by DTTracoChip::calculateAngles(), DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

                         { 
      return _data.X(); 
    }

Member Data Documentation

std::vector<const DTBtiTrigData*> DTTracoTrig::_btitrig [private]

Definition at line 267 of file DTTracoTrig.h.

Referenced by addDTBtiTrig(), btiTrigList(), clear(), and DTTracoTrig().

Definition at line 261 of file DTTracoTrig.h.

Referenced by setParent(), and tParent().