BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcHitOnTrack Class Referenceabstract

#include <MdcHitOnTrack.h>

+ Inheritance diagram for MdcHitOnTrack:

Public Member Functions

 MdcHitOnTrack (const TrkFundHit &fundHit, const MdcHit &baseHit, int ambig, double fittime)
 
virtual ~MdcHitOnTrack ()
 
double entranceAngleHit () const
 
double entranceAngle () const
 
double entranceAngle (const HepPoint3D pos, const Hep3Vector dir) const
 
double dipAngle () const
 
int ambig () const
 
int wireAmbig () const
 
double fitTime () const
 
double drift () const
 
double drift (double dca) const
 
double dcaToWire () const
 
double rawTime () const
 
virtual const TrajectoryhitTraj () const
 
virtual const MdcHitOnTrackmdcHitOnTrack () const
 
virtual bool timeResid (double &t, double &tErr) const
 
virtual bool timeAbsolute (double &t, double &tErr) const
 
virtual const MdcHitmdcHit () const
 
virtual unsigned tdcIndex () const =0
 
virtual unsigned status () const =0
 
int wire () const
 
const MdcLayerlayer () const
 
int layernumber () const
 
unsigned layerNumber () const
 
int whichView () const
 
double charge () const
 
TrkEnums::TrkViewInfo whatView () const
 
void setAmbig (int a)
 
void setT0 (double t0)
 
 MdcHitOnTrack (const TrkFundHit &fundHit, const MdcHit &baseHit, int ambig, double fittime)
 
virtual ~MdcHitOnTrack ()
 
double entranceAngleHit () const
 
double entranceAngle () const
 
double entranceAngle (const HepPoint3D pos, const Hep3Vector dir) const
 
double dipAngle () const
 
int ambig () const
 
int wireAmbig () const
 
double fitTime () const
 
double drift () const
 
double drift (double dca) const
 
double dcaToWire () const
 
double rawTime () const
 
virtual const TrajectoryhitTraj () const
 
virtual const MdcHitOnTrackmdcHitOnTrack () const
 
virtual bool timeResid (double &t, double &tErr) const
 
virtual bool timeAbsolute (double &t, double &tErr) const
 
virtual const MdcHitmdcHit () const
 
virtual unsigned tdcIndex () const =0
 
virtual unsigned status () const =0
 
int wire () const
 
const MdcLayerlayer () const
 
int layernumber () const
 
unsigned layerNumber () const
 
int whichView () const
 
double charge () const
 
TrkEnums::TrkViewInfo whatView () const
 
void setAmbig (int a)
 
void setT0 (double t0)
 
- Public Member Functions inherited from TrkHitOnTrk
 TrkHitOnTrk (const TrkFundHit *, double tolerance)
 
virtual ~TrkHitOnTrk ()
 
virtual TrkHitOnTrkclone (TrkRep *parentRep, const TrkDifTraj *trkTraj=0) const =0
 
const TrkRecoTrkgetParentTrack () const
 
const TrkRepgetParentRep () const
 
PdtPid::PidType particleType () const
 
const TrkFundHithit () const
 
TrkFundHithit ()
 
const TrkDifTrajtrkTraj () const
 
virtual const MdcHitOnTrackmdcHitOnTrack () const
 
virtual const SvtHitOnTrack * svtHitOnTrack () const
 
bool isActive () const
 
bool isUsable () const
 
bool mustUse () const
 
virtual TrkEnums::TrkViewInfo whatView () const =0
 
virtual unsigned layerNumber () const =0
 
double hitRms () const
 
double weight () const
 
double fltLen () const
 
double hitLen () const
 
virtual int ambig () const
 
virtual void setAmbig (int newambig)
 
bool operator== (const TrkHitOnTrk &) const
 
bool operator< (const TrkHitOnTrk &rhs) const
 
virtual const TrajectoryhitTraj () const =0
 
bool hasResidual () const
 
TrkErrCode getFitStuff (HepVector &derivs, double &deltaChi) const
 
TrkErrCode getFitStuff (double &deltaChi) const
 
double resid (bool exclude=false) const
 
bool resid (double &resid, double &residErr, bool exclude=false) const
 
double residual () const
 
virtual bool timeResid (double &resid, double &error) const =0
 
virtual bool timeAbsolute (double &time, double &error) const =0
 
TrkRecoTrkparentTrack () const
 
void setActivity (bool turnOn)
 
void setUsability (int usability)
 
void setFltLen (double f)
 
void setHitRms (double newRms)
 
virtual void print (std::ostream &) const
 
virtual void printAll (std::ostream &) const
 
 TrkHitOnTrk (const TrkFundHit *, double tolerance)
 
virtual ~TrkHitOnTrk ()
 
virtual TrkHitOnTrkclone (TrkRep *parentRep, const TrkDifTraj *trkTraj=0) const =0
 
const TrkRecoTrkgetParentTrack () const
 
const TrkRepgetParentRep () const
 
PdtPid::PidType particleType () const
 
const TrkFundHithit () const
 
TrkFundHithit ()
 
const TrkDifTrajtrkTraj () const
 
virtual const MdcHitOnTrackmdcHitOnTrack () const
 
virtual const SvtHitOnTrack * svtHitOnTrack () const
 
bool isActive () const
 
bool isUsable () const
 
bool mustUse () const
 
virtual TrkEnums::TrkViewInfo whatView () const =0
 
virtual unsigned layerNumber () const =0
 
double hitRms () const
 
double weight () const
 
double fltLen () const
 
double hitLen () const
 
virtual int ambig () const
 
virtual void setAmbig (int newambig)
 
bool operator== (const TrkHitOnTrk &) const
 
bool operator< (const TrkHitOnTrk &rhs) const
 
virtual const TrajectoryhitTraj () const =0
 
bool hasResidual () const
 
TrkErrCode getFitStuff (HepVector &derivs, double &deltaChi) const
 
TrkErrCode getFitStuff (double &deltaChi) const
 
double resid (bool exclude=false) const
 
bool resid (double &resid, double &residErr, bool exclude=false) const
 
double residual () const
 
virtual bool timeResid (double &resid, double &error) const =0
 
virtual bool timeAbsolute (double &time, double &error) const =0
 
TrkRecoTrkparentTrack () const
 
void setActivity (bool turnOn)
 
void setUsability (int usability)
 
void setFltLen (double f)
 
void setHitRms (double newRms)
 
virtual void print (std::ostream &) const
 
virtual void printAll (std::ostream &) const
 

Protected Member Functions

 MdcHitOnTrack (const TrkFundHit *baseHit, int ambig, double fittime, int layer, int wire)
 
 MdcHitOnTrack (const MdcHitOnTrack &hitToBeCopied, TrkRep *newRep, const TrkDifTraj *trkTraj, const MdcHit *hb=0)
 
bool isBeyondEndflange () const
 
bool updateAmbiguity (double dca)
 
virtual TrkErrCode updateMeasurement (const TrkDifTraj *traj, bool maintainAmbiguity)
 
const MdcHitbaseHit () const
 
void changeBase (MdcHit *newBase)
 
 MdcHitOnTrack (const TrkFundHit *baseHit, int ambig, double fittime, int layer, int wire)
 
 MdcHitOnTrack (const MdcHitOnTrack &hitToBeCopied, TrkRep *newRep, const TrkDifTraj *trkTraj, const MdcHit *hb=0)
 
bool isBeyondEndflange () const
 
bool updateAmbiguity (double dca)
 
virtual TrkErrCode updateMeasurement (const TrkDifTraj *traj, bool maintainAmbiguity)
 
const MdcHitbaseHit () const
 
void changeBase (MdcHit *newBase)
 
- Protected Member Functions inherited from TrkHitOnTrk
 TrkHitOnTrk (const TrkHitOnTrk &hitToBeCopied, TrkRep *newRep, const TrkDifTraj *trkTraj=0)
 
void setHitResid (double newResid)
 
TrkRepparentRep () const
 
void setHitLen (double h)
 
void setUsedHit ()
 
void setUnusedHit ()
 
virtual TrkErrCode updateMeasurement (const TrkDifTraj *traj, bool maintainAmbiguity)=0
 
TrkErrCode updatePoca (const TrkDifTraj *trkTraj, bool maintainAmbiguity)
 
 TrkHitOnTrk (const TrkHitOnTrk &hitToBeCopied, TrkRep *newRep, const TrkDifTraj *trkTraj=0)
 
void setHitResid (double newResid)
 
TrkRepparentRep () const
 
void setHitLen (double h)
 
void setUsedHit ()
 
void setUnusedHit ()
 
virtual TrkErrCode updateMeasurement (const TrkDifTraj *traj, bool maintainAmbiguity)=0
 
TrkErrCode updatePoca (const TrkDifTraj *trkTraj, bool maintainAmbiguity)
 

Additional Inherited Members

- Public Types inherited from TrkHitOnTrk
typedef std::unary_function< TrkHitOnTrk, boolpredicate_type
 
typedef std::unary_function< TrkHitOnTrk, boolpredicate_type
 
- Protected Attributes inherited from TrkHitOnTrk
TrkRep_parentRep
 
TrkFundHit_theHit
 
bool _isActive
 
int _isUsable
 
double _hitRms
 
double _trkLen
 
double _hitLen
 
double _resid
 
const TrkDifTraj_trkTraj
 
TrkPoca_poca
 
double _tolerance
 

Detailed Description

Constructor & Destructor Documentation

◆ MdcHitOnTrack() [1/6]

MdcHitOnTrack::MdcHitOnTrack ( const TrkFundHit fundHit,
const MdcHit baseHit,
int  ambig,
double  fittime 
)

Definition at line 47 of file MdcHitOnTrack.cxx.

50: TrkHitOnTrk(&fundHit,10.e-4),
51 _ambig(ambig),
52 _hitTraj(baseHit.hitTraj()),
53 _fitTime(baseHit.rawTime()-t0*1e-9),
54 _dHit(&baseHit)
55{
56 // need to flag somehow that that we haven't computed things yet...
57 // now, we know that _drift[0] is for ambig <0, and _drift[1] is ambig >0
58 // and _drift is signed according to ambig. Thus _drift[0] should be -tive
59 // and _drift[1] should be +tive. To indicate this are not yet initialized,
60 // put 'impossible' values here...
61 _drift[0] = +9999;
62 _drift[1] = -9999;
63 setHitResid(-21212121.0);
64 setHitRms( 0.02 );
65 setHitLen(0.5 * baseHit.layer()->zLength());
66 setFltLen(0.);
67 _startLen = hitTraj()->lowRange() - 5.;
68 _endLen = hitTraj()->hiRange() + 5.;
69}
virtual const Trajectory * hitTraj() const
const Trajectory * hitTraj() const
Definition: MdcHit.cxx:231
const MdcLayer * layer() const

◆ ~MdcHitOnTrack() [1/2]

MdcHitOnTrack::~MdcHitOnTrack ( )
virtual

Definition at line 113 of file MdcHitOnTrack.cxx.

114{ ; }

◆ MdcHitOnTrack() [2/6]

MdcHitOnTrack::MdcHitOnTrack ( const TrkFundHit baseHit,
int  ambig,
double  fittime,
int  layer,
int  wire 
)
protected

◆ MdcHitOnTrack() [3/6]

MdcHitOnTrack::MdcHitOnTrack ( const MdcHitOnTrack hitToBeCopied,
TrkRep newRep,
const TrkDifTraj trkTraj,
const MdcHit hb = 0 
)
protected

Definition at line 99 of file MdcHitOnTrack.cxx.

101: TrkHitOnTrk(hot,newRep,trkTraj)
102{
103 _ambig = hot._ambig;
104 _hitTraj = hot._hitTraj;
105 _fitTime = hot._fitTime;
106 _drift[0] = hot._drift[0];
107 _drift[1] = hot._drift[1];
108 _startLen = hot._startLen;
109 _endLen = hot._endLen;
110 _dHit = (hb==0?hot._dHit:hb);
111}

◆ MdcHitOnTrack() [4/6]

MdcHitOnTrack::MdcHitOnTrack ( const TrkFundHit fundHit,
const MdcHit baseHit,
int  ambig,
double  fittime 
)

◆ ~MdcHitOnTrack() [2/2]

virtual MdcHitOnTrack::~MdcHitOnTrack ( )
virtual

◆ MdcHitOnTrack() [5/6]

MdcHitOnTrack::MdcHitOnTrack ( const TrkFundHit baseHit,
int  ambig,
double  fittime,
int  layer,
int  wire 
)
protected

◆ MdcHitOnTrack() [6/6]

MdcHitOnTrack::MdcHitOnTrack ( const MdcHitOnTrack hitToBeCopied,
TrkRep newRep,
const TrkDifTraj trkTraj,
const MdcHit hb = 0 
)
protected

Member Function Documentation

◆ ambig() [1/2]

int MdcHitOnTrack::ambig ( ) const
inlinevirtual

Reimplemented from TrkHitOnTrk.

Definition at line 67 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

67{ return _ambig; } // wire wrt track direction

Referenced by MdcTrackList::pickHits(), updateAmbiguity(), updateMeasurement(), and wireAmbig().

◆ ambig() [2/2]

int MdcHitOnTrack::ambig ( ) const
inlinevirtual

Reimplemented from TrkHitOnTrk.

Definition at line 67 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

67{ return _ambig; } // wire wrt track direction

◆ baseHit() [1/2]

const MdcHit * MdcHitOnTrack::baseHit ( ) const
inlineprotected

Definition at line 123 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

123{ return _dHit; }

Referenced by MdcHitOnTrack().

◆ baseHit() [2/2]

const MdcHit * MdcHitOnTrack::baseHit ( ) const
inlineprotected

Definition at line 123 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

123{ return _dHit; }

◆ changeBase() [1/2]

void MdcHitOnTrack::changeBase ( MdcHit newBase)
protected

Definition at line 399 of file MdcHitOnTrack.cxx.

400{
401 _dHit = newBase;
402}

◆ changeBase() [2/2]

void MdcHitOnTrack::changeBase ( MdcHit newBase)
protected

◆ charge() [1/2]

double MdcHitOnTrack::charge ( ) const

Definition at line 378 of file MdcHitOnTrack.cxx.

379{
380 return _dHit->charge();
381}

◆ charge() [2/2]

double MdcHitOnTrack::charge ( ) const

◆ dcaToWire() [1/2]

double MdcHitOnTrack::dcaToWire ( ) const

Definition at line 123 of file MdcHitOnTrack.cxx.

124{
125 double dca = -9999.;
126 if ( getParentRep() == 0 ) {
127 // cout << "no parent rep" << endl;
128 return dca;
129 }
130 // WARNING: cannot use the internal _poca, as it lags one iteration
131 // behind the fit... therfore use _EXTERNAL_ residual
132 if (isActive()) { // FIXME: currently can only use 'resid()' if isActive..
133 dca = resid()+drift();
134 } else {
135 TrkPoca poca(getParentRep()->traj(), fltLen(), *hitTraj(), hitLen(),
136 _tolerance);
137 if (poca.status().success()) dca = poca.doca();
138 }
139 return dca;
140}
double resid(bool exclude=false) const

Referenced by MdcTrkRecon::fillTrackList(), MdcTrack::storeTrack(), and timeResid().

◆ dcaToWire() [2/2]

double MdcHitOnTrack::dcaToWire ( ) const

◆ dipAngle() [1/2]

double MdcHitOnTrack::dipAngle ( ) const

Definition at line 227 of file MdcHitOnTrack.cxx.

228{
229 return getParentRep()==0?0:Constants::pi/2-getParentRep()->traj().direction(fltLen()).theta();
230}
virtual Hep3Vector direction(double) const =0
virtual const TrkDifTraj & traj() const =0

◆ dipAngle() [2/2]

double MdcHitOnTrack::dipAngle ( ) const

◆ drift() [1/4]

double MdcHitOnTrack::drift ( ) const
inline

Definition at line 75 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

75 { return _ambig!=0 ? _drift[_ambig<0 ? 0:1]
76 : (_drift[1]-_drift[0])*0.5; }

Referenced by dcaToWire(), MdcTrkRecon::fillTrackList(), MdcTrack::storeTrack(), timeResid(), and updateMeasurement().

◆ drift() [2/4]

double MdcHitOnTrack::drift ( ) const
inline

Definition at line 75 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

75 { return _ambig!=0 ? _drift[_ambig<0 ? 0:1]
76 : (_drift[1]-_drift[0])*0.5; }

◆ drift() [3/4]

double MdcHitOnTrack::drift ( double  dca) const
inline

Definition at line 77 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

77{ return _drift[dca<0?0:1]; }

◆ drift() [4/4]

double MdcHitOnTrack::drift ( double  dca) const
inline

Definition at line 77 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

77{ return _drift[dca<0?0:1]; }

◆ entranceAngle() [1/4]

double MdcHitOnTrack::entranceAngle ( ) const

Definition at line 172 of file MdcHitOnTrack.cxx.

173{
174 static Hep3Vector dir;
175 static HepPoint3D pos;
176 if (getParentRep() == 0) return 0.;
177 getParentRep()->traj().getInfo(fltLen(), pos, dir);
178
179 return entranceAngle(pos, dir);
180}
double entranceAngle() const
virtual void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0

Referenced by entranceAngle(), MdcTrkRecon::fillTrackList(), and MdcTrack::storeTrack().

◆ entranceAngle() [2/4]

double MdcHitOnTrack::entranceAngle ( ) const

◆ entranceAngle() [3/4]

double MdcHitOnTrack::entranceAngle ( const HepPoint3D  pos,
const Hep3Vector  dir 
) const

Definition at line 183 of file MdcHitOnTrack.cxx.

184{
185 double angle = EntranceAngle(dir.phi() - _dHit->phi(pos.z()));
186 //std::cout<< "eAngle("<<layernumber()<<","<<wire()<<") dir.phi() "<<dir.phi()*180./3.14<<" hit phi "<<_dHit->phi(pos.z())*180./3.14<<" eAngle "<<angle*180./3.14<<" degree "<<angle<<std::endl;
187
188 //std::cout<< __FILE__ << " " << __LINE__ << " ("<<layernumber()<<","<<wire()<<") "<<
189 //" phiPoca "<<dir.phi()*180/3.14<< " phiWire "<<_dHit->phi(pos.z())*180/3.14<<" z "<<pos.z()<<
190 //" dPhiz "<<_dHit->wire()->dPhizDC(pos.z())*180/3.14<< " eAngle "<<angle*180/3.14<< " angle "<<(dir.phi() - _dHit->phi(pos.z()))*180./3.14<<std::endl;
191 /*
192 if(g_tupleHit && fabs(angle)>0.0001){
193 int layer = layernumber();
194 int wireId = wire();
195 g_hitLayer = layer;
196 g_hitWire = wireId;
197
198 int lrCalib=2;
199 if (ambig()==1) lrCalib = 0;
200 else if (ambig()==-1) lrCalib = 1;
201 g_hitAmbig = lrCalib;
202 g_hitAmbigMc = haveDigiMcLr[layer][wireId];
203 g_hitEAngle = angle*180./3.14;
204 g_hitEAngleMc = haveDigiEAngle[layer][wireId]*180./3.14;
205 g_hitZ = pos.z();
206 g_hitZMc = haveDigiZ[layer][wireId];
207 g_hitDrift = _drift[ambig()];
208 g_hitDriftMc = haveDigiDrift[layer][wireId];
209 g_hitTkIdMc = haveDigiTk[layer][wireId];
210 g_hitPhiPoca = dir.phi()*180./3.41;
211 g_hitPhiHit = _dHit->phi(pos.z())*180./3.41;
212 g_hitPhiHit0 = _dHit->phi()*180./3.41;
213 g_hitPhiHitDel = _dHit->wire()->dPhiz()*180./3.41;
214 g_tupleHit->write();
215 }
216 */
217 return angle;
218}

◆ entranceAngle() [4/4]

double MdcHitOnTrack::entranceAngle ( const HepPoint3D  pos,
const Hep3Vector  dir 
) const

◆ entranceAngleHit() [1/2]

double MdcHitOnTrack::entranceAngleHit ( ) const

Definition at line 161 of file MdcHitOnTrack.cxx.

162{
163 static Hep3Vector dir;
164 static HepPoint3D pos;
165 if (getParentRep() == 0) return 0.;
166 getParentRep()->traj().getInfo(fltLen(), pos, dir);
167
168 return BesAngle(dir.phi() - pos.phi());
169}

◆ entranceAngleHit() [2/2]

double MdcHitOnTrack::entranceAngleHit ( ) const

◆ fitTime() [1/2]

double MdcHitOnTrack::fitTime ( ) const
inline

Definition at line 71 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

71{ return _fitTime; }

◆ fitTime() [2/2]

double MdcHitOnTrack::fitTime ( ) const
inline

Definition at line 71 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

71{ return _fitTime; }

◆ hitTraj() [1/2]

const Trajectory * MdcHitOnTrack::hitTraj ( ) const
virtual

Implements TrkHitOnTrk.

Definition at line 384 of file MdcHitOnTrack.cxx.

385{
386 return _hitTraj;
387}

Referenced by dcaToWire(), and MdcHitOnTrack().

◆ hitTraj() [2/2]

virtual const Trajectory * MdcHitOnTrack::hitTraj ( ) const
virtual

Implements TrkHitOnTrk.

◆ isBeyondEndflange() [1/2]

bool MdcHitOnTrack::isBeyondEndflange ( ) const
inlineprotected

Definition at line 114 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

115 { return (hitLen() < _startLen || hitLen() > _endLen); }

Referenced by updateMeasurement().

◆ isBeyondEndflange() [2/2]

bool MdcHitOnTrack::isBeyondEndflange ( ) const
inlineprotected

Definition at line 114 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

115 { return (hitLen() < _startLen || hitLen() > _endLen); }

◆ layer() [1/2]

const MdcLayer * MdcHitOnTrack::layer ( ) const

Definition at line 354 of file MdcHitOnTrack.cxx.

355{
356 return _dHit->layer();
357}

Referenced by MdcTrkRecon::fillTrackList(), MdcTrackList::pickHits(), and MdcTrack::storeTrack().

◆ layer() [2/2]

const MdcLayer * MdcHitOnTrack::layer ( ) const

◆ layernumber() [1/2]

int MdcHitOnTrack::layernumber ( ) const

Definition at line 348 of file MdcHitOnTrack.cxx.

349{
350 return _dHit->layernumber();
351}

Referenced by layerNumber().

◆ layerNumber() [1/2]

unsigned MdcHitOnTrack::layerNumber ( ) const
virtual

Implements TrkHitOnTrk.

Definition at line 221 of file MdcHitOnTrack.cxx.

222{
223 return layernumber();
224}
int layernumber() const

◆ layernumber() [2/2]

int MdcHitOnTrack::layernumber ( ) const

◆ layerNumber() [2/2]

unsigned MdcHitOnTrack::layerNumber ( ) const
virtual

Implements TrkHitOnTrk.

◆ mdcHit() [1/2]

const MdcHit * MdcHitOnTrack::mdcHit ( ) const
virtual

Reimplemented in MdcRecoHitOnTrack, and MdcRecoHitOnTrack.

Definition at line 390 of file MdcHitOnTrack.cxx.

391{
392 return 0;
393}

Referenced by MdcTrackList::dropMultiHotInLayer(), and wireAmbig().

◆ mdcHit() [2/2]

virtual const MdcHit * MdcHitOnTrack::mdcHit ( ) const
virtual

Reimplemented in MdcRecoHitOnTrack, and MdcRecoHitOnTrack.

◆ mdcHitOnTrack() [1/2]

const MdcHitOnTrack * MdcHitOnTrack::mdcHitOnTrack ( ) const
virtual

Reimplemented from TrkHitOnTrk.

Definition at line 155 of file MdcHitOnTrack.cxx.

156{
157 return this;
158}

◆ mdcHitOnTrack() [2/2]

virtual const MdcHitOnTrack * MdcHitOnTrack::mdcHitOnTrack ( ) const
virtual

Reimplemented from TrkHitOnTrk.

◆ rawTime() [1/2]

double MdcHitOnTrack::rawTime ( ) const

Definition at line 372 of file MdcHitOnTrack.cxx.

373{
374 return _dHit->rawTime();
375}

Referenced by MdcTrkRecon::fillTrackList().

◆ rawTime() [2/2]

double MdcHitOnTrack::rawTime ( ) const

◆ setAmbig() [1/2]

void MdcHitOnTrack::setAmbig ( int  a)
inlinevirtual

Reimplemented from TrkHitOnTrk.

Definition at line 104 of file InstallArea/include/MdcData/MdcData/MdcHitOnTrack.h.

104{ _ambig = a<0?-1:a>0?1:0; }

Referenced by updateAmbiguity().

◆ setAmbig() [2/2]

void MdcHitOnTrack::setAmbig ( int  a)
inlinevirtual

Reimplemented from TrkHitOnTrk.

Definition at line 104 of file Reconstruction/MdcPatRec/MdcData/MdcData-00-01-27/MdcData/MdcHitOnTrack.h.

104{ _ambig = a<0?-1:a>0?1:0; }

◆ setT0() [1/2]

void MdcHitOnTrack::setT0 ( double  t0)

Definition at line 117 of file MdcHitOnTrack.cxx.

118{
119 _fitTime= _dHit->rawTime()-t0*1e-9;
120}

◆ setT0() [2/2]

void MdcHitOnTrack::setT0 ( double  t0)

◆ status() [1/2]

virtual unsigned MdcHitOnTrack::status ( ) const
pure virtual

Implemented in MdcRecoHitOnTrack, and MdcRecoHitOnTrack.

Referenced by updateMeasurement().

◆ status() [2/2]

virtual unsigned MdcHitOnTrack::status ( ) const
pure virtual

Implemented in MdcRecoHitOnTrack, and MdcRecoHitOnTrack.

◆ tdcIndex() [1/2]

virtual unsigned MdcHitOnTrack::tdcIndex ( ) const
pure virtual

Implemented in MdcRecoHitOnTrack, and MdcRecoHitOnTrack.

◆ tdcIndex() [2/2]

virtual unsigned MdcHitOnTrack::tdcIndex ( ) const
pure virtual

Implemented in MdcRecoHitOnTrack, and MdcRecoHitOnTrack.

◆ timeAbsolute() [1/2]

bool MdcHitOnTrack::timeAbsolute ( double &  t,
double &  tErr 
) const
virtual

Implements TrkHitOnTrk.

Definition at line 330 of file MdcHitOnTrack.cxx.

331{
332 double tresid(-1.0);
333 if(timeResid(tresid,tErr)){
334 // add back the track time
335 t = tresid + getParentRep()->parentTrack()->trackT0();
336 return true;
337 } else
338 return false;
339}
virtual bool timeResid(double &t, double &tErr) const
double trackT0() const
Definition: TrkRecoTrk.cxx:140
int t()
Definition: t.c:1

◆ timeAbsolute() [2/2]

virtual bool MdcHitOnTrack::timeAbsolute ( double &  t,
double &  tErr 
) const
virtual

Implements TrkHitOnTrk.

◆ timeResid() [1/2]

bool MdcHitOnTrack::timeResid ( double &  t,
double &  tErr 
) const
virtual

Implements TrkHitOnTrk.

Definition at line 320 of file MdcHitOnTrack.cxx.

321{
322 double v = driftVelocity();
323 if (v <= 0) return false;
324 t = (fabs(drift())-fabs(dcaToWire()))/v;
325 tErr= hitRms()/v;
326 return true;
327}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
double dcaToWire() const

Referenced by timeAbsolute().

◆ timeResid() [2/2]

virtual bool MdcHitOnTrack::timeResid ( double &  t,
double &  tErr 
) const
virtual

Implements TrkHitOnTrk.

◆ updateAmbiguity() [1/2]

bool MdcHitOnTrack::updateAmbiguity ( double  dca)
protected

Definition at line 143 of file MdcHitOnTrack.cxx.

144{
145 if (dca < 0 && ambig() >= 0) {
146 setAmbig(-1); return isActive();
147 } else if (dca > 0 && ambig() <= 0) {
148 setAmbig(1); return isActive();
149 } else {
150 return false;
151 }
152}

Referenced by updateMeasurement().

◆ updateAmbiguity() [2/2]

bool MdcHitOnTrack::updateAmbiguity ( double  dca)
protected

◆ updateMeasurement() [1/2]

TrkErrCode MdcHitOnTrack::updateMeasurement ( const TrkDifTraj traj,
bool  maintainAmbiguity 
)
protectedvirtual

Implements TrkHitOnTrk.

Definition at line 233 of file MdcHitOnTrack.cxx.

234{
235 TrkErrCode status=updatePoca(traj,maintainAmb);
236 if (status.failure()) {
237#ifdef MDCPATREC_DEBUG
238 std::cout<<" ErrMsg(warning) " << "MdcHitOnTrack::updateMeasurement failed " << status << std::endl;
239#endif
240 return status;
241 }
242 assert (_poca!=0);
243 double dca=_poca->doca();
244 bool forceIteration = (maintainAmb&&ambig()!=0)?false:updateAmbiguity(dca);
245 //std::cout<< __FILE__ << " " << __LINE__ << " maintainAmb "<< maintainAmb
246 //<< " maintain&& ambig "<<(maintainAmb&&ambig()!=0)
247 //<< " forceIteration "<<forceIteration<<std::endl;
248 assert(ambig()!=0);
249 // Check for hits beyond end plates. !!Turn off hit if it is == temp. hack
250 if (isBeyondEndflange()) setUsability(false);
251 if (forceIteration || !driftCurrent() ) {
252 updateCorrections(); // force recomputation of drift for current ambig(), setting of hitRms
253 forceIteration=true;
254 }
255 setHitResid(dca-drift());
256 return !forceIteration?status:
257 TrkErrCode(TrkErrCode::succeed, 11, "Ambiguity flipped");
258}
bool updateAmbiguity(double dca)
virtual unsigned status() const =0
TrkErrCode updatePoca(const TrkDifTraj *trkTraj, bool maintainAmbiguity)
void setUsability(int usability)

◆ updateMeasurement() [2/2]

virtual TrkErrCode MdcHitOnTrack::updateMeasurement ( const TrkDifTraj traj,
bool  maintainAmbiguity 
)
protectedvirtual

Implements TrkHitOnTrk.

◆ whatView() [1/2]

TrkEnums::TrkViewInfo MdcHitOnTrack::whatView ( ) const
virtual

Implements TrkHitOnTrk.

Definition at line 342 of file MdcHitOnTrack.cxx.

343{
344 return _dHit->whatView();
345}
TrkEnums::TrkViewInfo whatView() const

◆ whatView() [2/2]

TrkEnums::TrkViewInfo MdcHitOnTrack::whatView ( ) const
virtual

Implements TrkHitOnTrk.

◆ whichView() [1/2]

int MdcHitOnTrack::whichView ( ) const

Definition at line 366 of file MdcHitOnTrack.cxx.

367{
368 return _dHit->whichView();
369}

◆ whichView() [2/2]

int MdcHitOnTrack::whichView ( ) const

◆ wire() [1/2]

int MdcHitOnTrack::wire ( ) const

Definition at line 360 of file MdcHitOnTrack.cxx.

361{
362 return _dHit->wirenumber();
363}

◆ wire() [2/2]

int MdcHitOnTrack::wire ( ) const

◆ wireAmbig() [1/2]

int MdcHitOnTrack::wireAmbig ( ) const

Definition at line 415 of file MdcHitOnTrack.cxx.

415 {
416 // hit wrt the wire location
417
418 //return fabs(entranceAngle())<Constants::pi/2?ambig():-ambig();
419 const TrkRep* tkRep = getParentRep();
420 static Hep3Vector dir;
421 static HepPoint3D pos;
422 if (getParentRep() == 0) return 0.;
423 getParentRep()->traj().getInfo(fltLen(), pos, dir);
424
425 double wireAmb = ambig();
426 if (mdcHit()->isCosmicFit()){
427 HepPoint3D poca = tkRep->position(0.);
428 if ( pos.y() > poca.y()){
429 wireAmb = -1.*_ambig;//yzhang 2012-07-17
430 //std::cout<<"MdcHitOnTrack CosmicFit up ambig *-1"<<std::endl;
431 }
432 }
433
434 return wireAmb;
435}
virtual const MdcHit * mdcHit() const
virtual HepPoint3D position(double fltL) const
Definition: TrkRep.cxx:180

Referenced by MdcTrkRecon::fillTrackList(), and MdcTrack::storeTrack().

◆ wireAmbig() [2/2]

int MdcHitOnTrack::wireAmbig ( ) const

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