BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TMLink Class Reference

A class to relate TMDCWireHit and TTrack objects. More...

#include <TMLink.h>

Public Member Functions

 TMLink (TTrack *track=0, const TMDCWireHit *hit=0, const HepPoint3D &position=HepPoint3D(), const HepPoint3D &positionD=HepPoint3D(), const double=0.0)
 Constructor.
 
 TMLink (const TMLink &)
 Copy constructor.
 
virtual ~TMLink ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
const TMDCWireHithit (void) const
 returns a pointer to a hit.
 
const TMDCWire *const wire (void) const
 returns a pointer to a wire.
 
TTracktrack (void) const
 returns a pointer to a track.
 
double pull (void) const
 returns pull.
 
const HepPoint3DxyPosition (void) const
 returns middle position of a wire. z componet is 0.
 
const HepPoint3DpositionOnWire (void) const
 returns the closest point on wire to a track.
 
const HepPoint3DpositionOnTrack (void) const
 returns the closest point on track to wire.
 
double dPhi (void) const
 returns dPhi to the closest point.
 
unsigned leftRight (void) const
 returns left-right. 0:left, 1:right, 2:wire
 
int zStatus (void) const
 returns stauts of stereo hit
 
int zPair (void) const
 returns id# of the pair, if zStatus == 20 (2 consective hits).

 
const HepPoint3Dposition (void) const
 returns position.
 
const HepPoint3DpositionD (void) const
 
double distance (void) const
 returns distance between point on wire and on track.
 
double distance (double)
 
double distancenew (void) const
 
TMLinkneighbor (unsigned int) const
 returns neighbor TMLink.
 
TMLinklink (void) const
 returns a pointer to a TMLink.
 
const HepPoint3DarcZ (const unsigned=0) const
 returns UseCathode flag
 
const HepPoint3Dconf (const HepPoint3D &conf)
 
void update (const HepPoint3D &onTrack, const HepPoint3D &onWire, unsigned leftRight, double pull)
 sets results of fitting.
 
const TMDCWireHithit (const TMDCWireHit *)
 sets a pointer to a hit.
 
TTracktrack (TTrack *)
 sets a pointer to a track.
 
const HepPoint3DpositionOnWire (const HepPoint3D &)
 sets and returns the closest point on wire to a track.
 
const HepPoint3DpositionOnWire (double p[3])
 
const HepPoint3DpositionOnTrack (const HepPoint3D &)
 sets and returns the closest point on track to wire.
 
const HepPoint3DpositionOnTrack (double p[3])
 
double dPhi (double)
 sets and returns dPhi to the closest point.
 
const HepPoint3Dposition (const HepPoint3D &)
 sets and returns position.
 
const HepPoint3DpositionD (const HepPoint3D &)
 
void neighbor (unsigned int, TMLink *)
 sets neighbor TMLink.
 
TMLinklink (TMLink *)
 sets a pointer to a TMLink.
 
unsigned leftRight (unsigned)
 sets left-right. 0:left, 1:right, 2:wire
 
double pull (double)
 sets pull.
 
int zStatus (int)
 sets stereo Hit status
 
int zPair (int)
 sets id# of the pair
 
const HepPoint3DarcZ (const HepPoint3D &, const unsigned=0)
 sets usecathode flag
 
const unsigned fit2D (const unsigned &)
 
unsigned fit2D (void)
 
float drift (void) const
 returns/sets drift distance.
 
float drift (unsigned) const
 
float drift (float, unsigned)
 
double cDrift (void) const
 
double cDrift (unsigned) const
 
double cDrift (double, unsigned)
 
float dDrift (void) const
 returns/sets drift distance error.
 
float dDrift (unsigned) const
 
float dDrift (float, unsigned)
 
unsigned tsfTag (void) const
 return tsfTag of links
 
unsigned tsfTag (unsigned)
 
double tof (void) const
 return time of flight
 
double tof (double)
 
void setDriftTime (double)
 add by jialk returns timeDrift after prop correction
 
double getDriftTime (void)
 
double DriftTime (double, double) const
 returs drift time
 

Detailed Description

A class to relate TMDCWireHit and TTrack objects.

Definition at line 43 of file TMLink.h.

Constructor & Destructor Documentation

◆ TMLink() [1/2]

TMLink::TMLink ( TTrack track = 0,
const TMDCWireHit hit = 0,
const HepPoint3D position = HepPoint3D(),
const HepPoint3D positionD = HepPoint3D(),
const double  dr = 0.0 
)

Constructor.

Definition at line 67 of file TMLink.cxx.

68: _track(t),
69 _hit(h),
70 _dPhi(0),
71 _leftRight(0),
72 _pull(0),
73 _position(p),
74 _positionD(d),
75 _link(0),
76 _fit2D(0),
77 _tsfTag(0) {
78 if (h) {
79 _cDrift[0] = dr; //after conformal transformation.
80 _cDrift[1] = dr;
81 _drift[0] = h->drift(0);
82 _drift[1] = h->drift(1);
83 _dDrift[0] = h->dDrift(0);
84 _dDrift[1] = h->dDrift(1);
85 }
86 else {
87 _cDrift[0] = 0.;
88 _cDrift[1] = 0.;
89 _drift[0] = 0.;
90 _drift[1] = 0.;
91 _dDrift[0] = 0.;
92 _dDrift[1] = 0.;
93 }
94
95 for (unsigned i = 0; i < 6; ++i)
96 _neighbor[i] = NULL;
97 for (unsigned i = 0; i < 4; ++i)
98 _arcZ[i];
99
100
101 if (h) {
102 _onTrack = _onWire = h->xyPosition();
103 }
104}
int t()
Definition: t.c:1

◆ TMLink() [2/2]

TMLink::TMLink ( const TMLink l)

Copy constructor.

Definition at line 106 of file TMLink.cxx.

107: _track(l._track),
108 _hit(l._hit),
109 _onTrack(l._onTrack),
110 _onWire(l._onWire),
111 _position(l._position),
112 _positionD(l._positionD),
113 _dPhi(l._dPhi),
114 _leftRight(l._leftRight),
115 _pull(l._pull),
116 _link(l._link),
117 _distance(l._distance),
118 // addition by matsu ( 1999/07/05 )
119// _mclust(l._mclust ),
120// _usecathode(l._usecathode ),
121 // end of addition
122 _fit2D(l._fit2D),
123 _tsfTag(l._tsfTag) {
124 _drift[0] = l._drift[0];
125 _drift[1] = l._drift[1];
126 _dDrift[0] = l._dDrift[0];
127 _dDrift[1] = l._dDrift[1];
128 _cDrift[0] = l._cDrift[0];
129 _cDrift[1] = l._cDrift[1];
130 for (unsigned i = 0; i < 6; ++i)
131 _neighbor[i] = l._neighbor[i];
132 for (unsigned i = 0; i < 4; ++i)
133 _arcZ[i] = l._arcZ[i];
134
135}
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon IR regulator $ !ficticious photon IR regulator $ !Enhancement factor for Crude photon multiplicity $ !technical cut on E Ebeam for non IR real contributions $ !output cross section available through getter $ !output crossxsection available through getter *EVENT $ !e beam $ !e beam $ !final fermion $ !final anti fermion $ !photon momenta $ !MAIN weight of KK2f $ !crude distr from ISR and FSR $ !complete list of weights $ !complete list of weights $ !crude in nanobarns $ !Crude Born $ for fsr $ !photon for
Definition: KK2f.h:69

◆ ~TMLink()

TMLink::~TMLink ( )
virtual

Destructor.

Definition at line 137 of file TMLink.cxx.

137 {
138}

Member Function Documentation

◆ arcZ() [1/2]

const HepPoint3D & TMLink::arcZ ( const HepPoint3D az,
const unsigned  i = 0 
)
inline

sets usecathode flag

sets pointer to the cluster to be fit sets z(phi) before cathode fit sets and returns arc and Z for the curl finder.

Definition at line 672 of file TMLink.h.

672 {
673 if(i < 4)return _arcZ[i] = az;
674 std::cerr << "Error!! Please stop!!.....arcZ of TMLink!!! in TrkReco." << std::endl;
675 return _arcZ[0];
676}

◆ arcZ() [2/2]

const HepPoint3D & TMLink::arcZ ( const unsigned  i = 0) const
inline

returns UseCathode flag

returns pointer to the cluster to be fit returns arc and Z for the curl finder.

Definition at line 664 of file TMLink.h.

664 {
665 if(i < 4)return _arcZ[i];
666 std::cerr << "Error!! Please stop!!.....arcZ of TMLink!!! in TrkReco." << std::endl;
667 return _arcZ[0];
668}

◆ cDrift() [1/3]

double TMLink::cDrift ( double  b,
unsigned  a 
)
inline

Definition at line 716 of file TMLink.h.

716 {
717 return _cDrift[a] = b;
718}

◆ cDrift() [2/3]

double TMLink::cDrift ( unsigned  a) const
inline

Definition at line 710 of file TMLink.h.

710 {
711 return _cDrift[a];
712}

◆ cDrift() [3/3]

double TMLink::cDrift ( void  ) const
inline

Definition at line 740 of file TMLink.h.

740 {
741 return (_cDrift[0] + _cDrift[1]) / 2.;
742}

◆ conf()

const HepPoint3D & TMLink::conf ( const HepPoint3D conf)
inline

Definition at line 534 of file TMLink.h.

534 {
535 return _conf = a;
536}

◆ dDrift() [1/3]

float TMLink::dDrift ( float  b,
unsigned  a 
)
inline

Definition at line 728 of file TMLink.h.

728 {
729 return _dDrift[a] = b;
730}

◆ dDrift() [2/3]

float TMLink::dDrift ( unsigned  a) const
inline

Definition at line 722 of file TMLink.h.

722 {
723 return _dDrift[a];
724}

◆ dDrift() [3/3]

float TMLink::dDrift ( void  ) const
inline

returns/sets drift distance error.

Definition at line 746 of file TMLink.h.

746 {
747 return (_dDrift[0] + _dDrift[1]) / 2.;
748}

Referenced by TTrackBase::appendByApproach(), TMDC::driftDistance(), T3DLineFitter::fit(), and TTrackManager::makeTds().

◆ distance() [1/2]

double TMLink::distance ( double  a)
inline

Definition at line 582 of file TMLink.h.

582 {
583
584 _distance=a ;
585}

◆ distance() [2/2]

double TMLink::distance ( void  ) const
inline

returns distance between point on wire and on track.

Definition at line 567 of file TMLink.h.

567 {
568
569 return (_onTrack-_onWire).mag() ;
570}

Referenced by TTrackManager::makeTds(), TTrackManager::salvageAssociateHits(), and TTrackBase::testByApproach().

◆ distancenew()

double TMLink::distancenew ( void  ) const
inline

Definition at line 573 of file TMLink.h.

573 {
574
575
576 return _distance;
577
578}

Referenced by TTrackManager::makeTds().

◆ dPhi() [1/2]

double TMLink::dPhi ( double  a)
inline

sets and returns dPhi to the closest point.

Definition at line 498 of file TMLink.h.

498 {
499 return _dPhi = a;
500}

◆ dPhi() [2/2]

double TMLink::dPhi ( void  ) const
inline

returns dPhi to the closest point.

Definition at line 492 of file TMLink.h.

492 {
493 return _dPhi;
494}

Referenced by TTrack::approach(), TTrack::approach2D(), TMDC::driftDistance(), TTrack::fit2D(), and TTrackManager::makeTds().

◆ drift() [1/3]

float TMLink::drift ( float  b,
unsigned  a 
)
inline

Definition at line 704 of file TMLink.h.

704 {
705 return _drift[a] = b;
706}

◆ drift() [2/3]

float TMLink::drift ( unsigned  a) const
inline

Definition at line 698 of file TMLink.h.

698 {
699 return _drift[a];
700}

◆ drift() [3/3]

float TMLink::drift ( void  ) const
inline

returns/sets drift distance.

Definition at line 734 of file TMLink.h.

734 {
735 return (_drift[0] + _drift[1]) / 2.;
736}

Referenced by TTrackBase::appendByApproach(), TMDC::driftDistance(), T3DLineFitter::fit(), and TTrackManager::makeTds().

◆ DriftTime()

double TMLink::DriftTime ( double  ,
double   
) const

returs drift time

◆ dump()

void TMLink::dump ( const std::string &  message = std::string(""),
const std::string &  prefix = std::string("") 
) const

dumps debug information.

Definition at line 141 of file TMLink.cxx.

141 {
142 std::cout << pre;
143 if (_track) std::cout << "track#=,";
144 if (_hit) {
145 _hit->dump(msg);
146 }
147}
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TMDCWireHit.cxx:64

Referenced by TTrackBase::appendByApproach(), and TTrackBase::testByApproach().

◆ fit2D() [1/2]

const unsigned TMLink::fit2D ( const unsigned &  f)
inline

Definition at line 686 of file TMLink.h.

686 {
687 return _fit2D = f;
688}

Referenced by TTrack::fit2D().

◆ fit2D() [2/2]

unsigned TMLink::fit2D ( void  )
inline

Definition at line 692 of file TMLink.h.

692 {
693 return _fit2D;
694}

◆ getDriftTime()

double TMLink::getDriftTime ( void  )
inline

Definition at line 776 of file TMLink.h.

776 {
777 return _drifttime;
778}

Referenced by TTrackManager::makeTds().

◆ hit() [1/2]

const TMDCWireHit * TMLink::hit ( const TMDCWireHit a)
inline

sets a pointer to a hit.

Definition at line 402 of file TMLink.h.

402 {
403 return _hit = a;
404}

◆ hit() [2/2]

◆ leftRight() [1/2]

unsigned TMLink::leftRight ( unsigned  a)
inline

sets left-right. 0:left, 1:right, 2:wire

Definition at line 486 of file TMLink.h.

486 {
487 return _leftRight = a;
488}

◆ leftRight() [2/2]

unsigned TMLink::leftRight ( void  ) const
inline

returns left-right. 0:left, 1:right, 2:wire

Definition at line 480 of file TMLink.h.

480 {
481 return _leftRight;
482}

Referenced by TBuilder::buildStereo(), TBuilder0::buildStereo(), TBuilderCosmic::buildStereo(), TBuilder0::buildStereo0(), TPerfectFinder::doit(), Dump(), TTrackManager::makeTds(), TTrack::szPosition(), and update().

◆ link() [1/2]

TMLink * TMLink::link ( TMLink a)
inline

sets a pointer to a TMLink.

Definition at line 561 of file TMLink.h.

561 {
562 return _link = a;
563}

◆ link() [2/2]

TMLink * TMLink::link ( void  ) const
inline

returns a pointer to a TMLink.

Definition at line 555 of file TMLink.h.

555 {
556 return _link;
557}

Referenced by TBuilder::buildStereo(), TBuilder0::buildStereo(), TBuilderCosmic::buildStereo(), and TBuilder0::buildStereo0().

◆ neighbor() [1/2]

TMLink * TMLink::neighbor ( unsigned int  ) const

returns neighbor TMLink.

Referenced by findIsolatedCloseHits(), and TCircle::weight().

◆ neighbor() [2/2]

void TMLink::neighbor ( unsigned int  ,
TMLink  
)

sets neighbor TMLink.

◆ position() [1/2]

const HepPoint3D & TMLink::position ( const HepPoint3D a)
inline

sets and returns position.

Definition at line 510 of file TMLink.h.

510 {
511 return _position = a;
512}

◆ position() [2/2]

◆ positionD() [1/2]

const HepPoint3D & TMLink::positionD ( const HepPoint3D a)
inline

Definition at line 522 of file TMLink.h.

522 {
523 return _positionD = a;
524}

◆ positionD() [2/2]

const HepPoint3D & TMLink::positionD ( void  ) const
inline

Definition at line 516 of file TMLink.h.

516 {
517 return _positionD;
518}

◆ positionOnTrack() [1/3]

const HepPoint3D & TMLink::positionOnTrack ( const HepPoint3D a)
inline

sets and returns the closest point on track to wire.

Definition at line 465 of file TMLink.h.

465 {
466 return _onTrack = a;
467}

◆ positionOnTrack() [2/3]

const HepPoint3D & TMLink::positionOnTrack ( double  p[3])
inline

Definition at line 471 of file TMLink.h.

471 {
472 _onTrack.setX(p[0]);
473 _onTrack.setY(p[1]);
474 _onTrack.setZ(p[2]);
475 return _onTrack;
476}

◆ positionOnTrack() [3/3]

const HepPoint3D & TMLink::positionOnTrack ( void  ) const
inline

◆ positionOnWire() [1/3]

const HepPoint3D & TMLink::positionOnWire ( const HepPoint3D a)
inline

sets and returns the closest point on wire to a track.

Definition at line 450 of file TMLink.h.

450 {
451 return _onWire = a;
452}

◆ positionOnWire() [2/3]

const HepPoint3D & TMLink::positionOnWire ( double  p[3])
inline

Definition at line 456 of file TMLink.h.

456 {
457 _onWire.setX(p[0]);
458 _onWire.setY(p[1]);
459 _onWire.setZ(p[2]);
460 return _onWire;
461}

◆ positionOnWire() [3/3]

const HepPoint3D & TMLink::positionOnWire ( void  ) const
inline

returns the closest point on wire to a track.

Definition at line 438 of file TMLink.h.

438 {
439 return _onWire;
440}

Referenced by TTrackBase::appendByApproach(), TTrack::approach(), T3DLine::approach(), TRunge::approach(), TTrack::approach2D(), TMDC::driftDistance(), T3DLineFitter::fit(), TTrack::fit2D(), and TTrackManager::makeTds().

◆ pull() [1/2]

double TMLink::pull ( double  a)
inline

sets pull.

Definition at line 432 of file TMLink.h.

432 {
433 return _pull = a;
434}

◆ pull() [2/2]

double TMLink::pull ( void  ) const
inline

returns pull.

Definition at line 426 of file TMLink.h.

426 {
427 return _pull;
428}

Referenced by Dump(), TTrackManager::makeTds(), TTrackManager::salvageAssociateHits(), TTrackBase::testByApproach(), and update().

◆ setDriftTime()

void TMLink::setDriftTime ( double  time)
inline

add by jialk returns timeDrift after prop correction

Definition at line 782 of file TMLink.h.

782 {
783_drifttime = time;
784
785 }
Double_t time

◆ tof() [1/2]

double TMLink::tof ( double  a)
inline

Definition at line 770 of file TMLink.h.

770 {
771 return _tof = a;
772}

◆ tof() [2/2]

double TMLink::tof ( void  ) const
inline

return time of flight

Definition at line 764 of file TMLink.h.

764 {
765 return _tof;
766}

◆ track() [1/2]

TTrack * TMLink::track ( TTrack a)
inline

sets a pointer to a track.

Definition at line 408 of file TMLink.h.

408 {
409 return _track = a;
410}

◆ track() [2/2]

TTrack * TMLink::track ( void  ) const
inline

returns a pointer to a track.

Definition at line 396 of file TMLink.h.

396 {
397 return _track;
398}

◆ tsfTag() [1/2]

unsigned TMLink::tsfTag ( unsigned  a)
inline

Definition at line 758 of file TMLink.h.

758 {
759 return _tsfTag = a;
760}

◆ tsfTag() [2/2]

unsigned TMLink::tsfTag ( void  ) const
inline

return tsfTag of links

Definition at line 752 of file TMLink.h.

752 {
753 return _tsfTag;
754}

Referenced by TSegment::splitTsf().

◆ update()

void TMLink::update ( const HepPoint3D onTrack,
const HepPoint3D onWire,
unsigned  leftRight,
double  pull 
)
inline

sets results of fitting.

Definition at line 414 of file TMLink.h.

417 {
418 _onTrack = onTrack;
419 _onWire = onWire;
420 _leftRight = leftRight;
421 _pull = pull;
422}

Referenced by T3DLineFitter::fit(), TTrack::fit2D(), and neighbor().

◆ wire()

◆ xyPosition()

const HepPoint3D & TMLink::xyPosition ( void  ) const

returns middle position of a wire. z componet is 0.

Definition at line 28 of file TMLink.cxx.

28 {
29 return _hit->wire()->xyPosition();
30}
const HepPoint3D & xyPosition(void) const
returns middle position of a wire. z componet is 0.
Definition: TMDCWire.h:327

Referenced by TSegment::solveDualHits(), and TSegment0::solveDualHits().

◆ zPair() [1/2]

int TMLink::zPair ( int  a)
inline

sets id# of the pair

Definition at line 629 of file TMLink.h.

629 {
630 return _zPair = a;
631}

◆ zPair() [2/2]

int TMLink::zPair ( void  ) const
inline

returns id# of the pair, if zStatus == 20 (2 consective hits).

Definition at line 623 of file TMLink.h.

623 {
624 return _zPair;
625}

Referenced by TBuilder0::buildStereo().

◆ zStatus() [1/2]

int TMLink::zStatus ( int  a)
inline

sets stereo Hit status

Definition at line 617 of file TMLink.h.

617 {
618 return _zStatus = a;
619}

◆ zStatus() [2/2]

int TMLink::zStatus ( void  ) const
inline

returns stauts of stereo hit

Definition at line 611 of file TMLink.h.

611 {
612 return _zStatus;
613}

Referenced by TBuilder0::buildStereo(), and Dump().


The documentation for this class was generated from the following files: