CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcHitUse Class Reference

#include <MdcHitUse.h>

+ Inheritance diagram for MdcHitUse:

Public Member Functions

 MdcHitUse (const MdcHit &, double fltLen, int ambig, bool active=true, int usable=1)
 
virtual ~MdcHitUse ()
 
virtual bool operator== (const TrkHitUse &) const
 
int ambig () const
 
virtual TrkHitOnTrkcreateHitOnTrk (const TrkRep &) const
 
const MdcHitmdcHit () const
 
- Public Member Functions inherited from TrkHitUse
 TrkHitUse (const TrkFundHit &, double fltLen, bool active=true, int usable=1)
 
virtual ~TrkHitUse ()
 
bool isActive () const
 
int isUsable () const
 
double fltLen () const
 
const TrkFundHithit () const
 
void setFltLen (double flt)
 

Detailed Description

Definition at line 24 of file MdcHitUse.h.

Constructor & Destructor Documentation

◆ MdcHitUse()

MdcHitUse::MdcHitUse ( const MdcHit & thehit,
double fltLen,
int ambig,
bool active = true,
int usable = 1 )

Definition at line 21 of file MdcHitUse.cxx.

22 :
23 TrkHitUse(thehit, flt, active, usable)
24{
25 _ambig = amb;
26}
TrkHitUse(const TrkFundHit &, double fltLen, bool active=true, int usable=1)
Definition TrkHitUse.cxx:18

◆ ~MdcHitUse()

MdcHitUse::~MdcHitUse ( )
virtual

Definition at line 28 of file MdcHitUse.cxx.

29{ }

Member Function Documentation

◆ ambig()

int MdcHitUse::ambig ( ) const
inline

Definition at line 32 of file MdcHitUse.h.

32{return _ambig;}

Referenced by MdcSeg::markHits(), operator==(), MdcSeg::plotSeg(), MdcSeg::plotSegAll(), and MdcSegInfoSterO::zPosition().

◆ createHitOnTrk()

TrkHitOnTrk * MdcHitUse::createHitOnTrk ( const TrkRep & rep) const
virtual

Implements TrkHitUse.

Definition at line 32 of file MdcHitUse.cxx.

34{
35 // This is a kludge -- fix once MdcHitOnTrack gets more cleaned up
36 // (time should not be used for anything (I hope)
37 // Also note that I temporarily have to cast off const from TrkRep
38 const MdcHit *h=mdcHit(); assert(h!=0);
39 MdcRecoHitOnTrack tempHot(*h, ambig(), 0.);
40 TrkHitOnTrk* newHot = tempHot.clone(&const_cast<TrkRep&>(rep));
41 newHot->setFltLen( fltLen() );
42 updateMeasurement(*newHot);
43 /*
44 //yzhang changed 2011-05-04
45 std::cout<< __FILE__ << " " << __LINE__ << " maintainAmbiguity "<<maintainAmbiguity<<std::endl;
46 if( maintainAmbiguity )
47 {
48 std::cout<< __FILE__ << " " << __LINE__ << " 2d "<<false<<std::endl;
49 updateMeasurement(*newHot,0, false); //2d maintainAmbiguity = false
50 }else{
51 std::cout<< __FILE__ << " " << __LINE__ << " 3d "<<true<<std::endl;
52 updateMeasurement(*newHot,0, true); //3d maintainAmbiguity = true
53 }
54 */
55 //zhangy
56 return newHot;
57}
int ambig() const
Definition MdcHitUse.h:32
const MdcHit * mdcHit() const
Definition MdcHitUse.cxx:69
TrkErrCode updateMeasurement(TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
virtual TrkHitOnTrk * clone(TrkRep *parentRep, const TrkDifTraj *trkTraj=0) const =0
void setFltLen(double f)
double fltLen() const
Definition TrkHitUse.h:34

◆ mdcHit()

◆ operator==()

bool MdcHitUse::operator== ( const TrkHitUse & rhs) const
virtual

Implements TrkHitUse.

Definition at line 60 of file MdcHitUse.cxx.

61{
62 // This is not going to win any design prizes:
63 if (mdcHit() == 0 || rhs.mdcHit() ==0) return false;
64 const MdcHitUse& x = static_cast<const MdcHitUse&>(rhs);
65 return ( ambig() == x.ambig() && TrkHitUse::operator==(x) );
66}
Double_t x[10]
virtual const MdcHit * mdcHit() const
Definition TrkHitUse.cxx:33

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