BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
TMDCWireHit Class Reference

#include <TMDCWireHit.h>

Public Member Functions

 TMDCWireHit (TMDCWire *, MdcRec_wirhit *, float fudgeFactor)
 Constructor.
 
virtual ~TMDCWireHit ()
 Destructor.
 
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
 
const TMDCWire *const wire (void) const
 returns a pointer to a TMDCWire.
 
struct MdcRec_wirhitreccdc (void) const
 returns a pointer to RECMDC_WIRHIT.
 
unsigned state (void) const
 returns state.
 
float drift (unsigned) const
 returns drift distance.
 
float dDrift (unsigned) const
 returns drift distance error.
 
float drift (void) const
 returns drift distance.
 
float dDrift (void) const
 returns drift distance error.
 
const HepPoint3DxyPosition (void) const
 returns drift time
 
HepPoint3D position (unsigned) const
 returns left position. z is always zero.
 
const TTrack *const track (void) const
 assigns a pointer to a TTrack.
 
unsigned sequence (void) const
 returns sequential Length in one segment : this parameter is used in TCurlFinder now.
 
const TMDCWireHitMC *const mc (void) const
 returns a pointer to TMDCWireHitMC.
 
unsigned state (unsigned newState)
 sets state. Meaning of bits are written below.
 
unsigned state (unsigned newState) const
 sets state. Meaning of bits are written below. (tmp)
 
const TTrack *const track (const TTrack *)
 assigns a pointer to a TTrack.
 
const TTrack *const track (const TTrack *) const
 assigns a pointer to a TTrack. (tmp)
 
const TMDCWireHitMC *const mc (TMDCWireHitMC *)
 sets a pointer to TMDCWireHitMC.
 
unsigned sequence (unsigned) const
 sets sequential length in one segment : this parameter is used in TCurlFinder now.
 

Detailed Description

Definition at line 81 of file TMDCWireHit.h.

Constructor & Destructor Documentation

◆ TMDCWireHit()

TMDCWireHit::TMDCWireHit ( TMDCWire w,
MdcRec_wirhit r,
float  fudgeFactor 
)

Constructor.

Definition at line 44 of file TMDCWireHit.cxx.

45: _wire(w),
46 _xyPosition(w->xyPosition()),
47 _r(r),
48 _state(r->stat),
49 _track(0),
50 _mc(0) {
51 w->hit(this);
52 _drift[0] = r->ddl;
53 _drift[1] = r->ddr;
54 _driftError[0] = r->erddl * fudgeFactor;
55 _driftError[1] = r->erddr * fudgeFactor;
56 if (w->axial()) _state |= WireHitAxial;
57 else _state |= WireHitStereo;
58}
double w
#define WireHitAxial
Definition: TMDCWireHit.h:30
#define WireHitStereo
Definition: TMDCWireHit.h:31

◆ ~TMDCWireHit()

TMDCWireHit::~TMDCWireHit ( )
virtual

Destructor.

Definition at line 60 of file TMDCWireHit.cxx.

60 {
61}

Member Function Documentation

◆ dDrift() [1/2]

float TMDCWireHit::dDrift ( unsigned  i) const
inline

returns drift distance error.

Definition at line 243 of file TMDCWireHit.h.

243 {
244 if (i) return _driftError[1];
245 return _driftError[0];
246}

Referenced by TTrackBase::appendByApproach(), TMDC::driftDistance(), TCosmicFitter::fit(), TRungeFitter::fit(), TTrack::fit2D(), TLine0::reducedChi2(), TMLine::reducedChi2(), TTrackManager::salvageAssociateHits(), TTrackBase::testByApproach(), and TMLink::TMLink().

◆ dDrift() [2/2]

float TMDCWireHit::dDrift ( void  ) const
inline

returns drift distance error.

Definition at line 256 of file TMDCWireHit.h.

256 {
257 return (_driftError[0] + _driftError[1]) / 2.;
258}

◆ drift() [1/2]

float TMDCWireHit::drift ( unsigned  i) const
inline

◆ drift() [2/2]

float TMDCWireHit::drift ( void  ) const
inline

returns drift distance.

Definition at line 250 of file TMDCWireHit.h.

250 {
251 return (_drift[0] + _drift[1]) / 2.;
252}

◆ dump()

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

dumps debug information.

Definition at line 64 of file TMDCWireHit.cxx.

64 {
65 std::cout << pre;
66 std::cout << _wire->name();
67 if (msg.find("state") != std::string::npos || msg.find("detail") != std::string::npos) {
68 std::cout << ",state ";
69 bitDisplay(_state);
70 if (track()) std::cout << ",trk ";
71 }
72 if (msg.find("drift") != std::string::npos || msg.find("detail") != std::string::npos) {
73 if (_state & WireHitLeftMask) std::cout << ", L";
74 if (_state & WireHitRightMask) std::cout << ", R";
75 std::cout<<" layer "<<_wire->layerId()<<" cell "<<_wire->localId();
76 std::cout << ",dl " << _drift[0] << "+-" << _driftError[0];
77 std::cout << ",dr " << _drift[1] << "+-" << _driftError[1];
78 }
79 if (msg.find("mc") != std::string::npos || msg.find("detail") != std::string::npos) {
80 std::cout << ",hep ";
81 if (mc()) {
82 if (mc()->hep()) std::cout << mc()->hep()->id();
83 else std::cout << "0";
84 }
85 else {
86 std::cout << "0";
87 }
88 }
89 std::cout << std::endl;
90}
void bitDisplay(unsigned val)
Definition: TMDCUtil.cxx:85
#define WireHitRightMask
Definition: TMDCWireHit.h:49
#define WireHitLeftMask
Definition: TMDCWireHit.h:48
const TTrackHEP *const hep(void) const
returns a pointer to a GEN_HEPEVT.
const TTrack *const track(void) const
assigns a pointer to a TTrack.
Definition: TMDCWireHit.h:280
const TMDCWireHitMC *const mc(void) const
returns a pointer to TMDCWireHitMC.
Definition: TMDCWireHit.h:298
unsigned localId(void) const
returns local id in a wire layer.
Definition: TMDCWire.h:213
unsigned layerId(void) const
returns layer id.
Definition: TMDCWire.h:219
std::string name(void) const
returns name.
Definition: TMDCWire.h:412
unsigned id(void) const
returns an id started from 0.
Definition: TTrackHEP.h:122

Referenced by TMLink::dump(), T3DLineFitter::fit(), TCosmicFitter::fit(), TTrack::fit2D(), and TSegment::solveDualHits().

◆ mc() [1/2]

const TMDCWireHitMC *const TMDCWireHit::mc ( TMDCWireHitMC a)
inline

sets a pointer to TMDCWireHitMC.

Definition at line 304 of file TMDCWireHit.h.

304 {
305 return _mc = a;
306}

◆ mc() [2/2]

const TMDCWireHitMC *const TMDCWireHit::mc ( void  ) const
inline

returns a pointer to TMDCWireHitMC.

Definition at line 298 of file TMDCWireHit.h.

298 {
299 return _mc;
300}

Referenced by Dump(), dump(), Links2HEP(), TLine0::refine(), TMLine::refine(), TTrackManager::saveMCTables(), and TMDC::updateMC().

◆ position()

HepPoint3D TMDCWireHit::position ( unsigned  lr) const

returns left position. z is always zero.

Definition at line 93 of file TMDCWireHit.cxx.

93 {
94 const HepPoint3D myHepZHat(0.0, 0.0, 1.0);
95 //...Left...
96 if (lr == WireHitLeft) {
97 return _xyPosition
98 - _drift[WireHitLeft] * myHepZHat.cross(_xyPosition.unit());
99 }
100
101 //...Right case...
102 else {
103 return _xyPosition
104 + _drift[WireHitRight] * myHepZHat.cross(_xyPosition.unit());
105 }
106}
#define WireHitLeft
Definition: TMDCWireHit.h:21
#define WireHitRight
Definition: TMDCWireHit.h:22

Referenced by TCircleFitter::fit().

◆ reccdc()

struct MdcRec_wirhit * TMDCWireHit::reccdc ( void  ) const
inline

returns a pointer to RECMDC_WIRHIT.

Definition at line 224 of file TMDCWireHit.h.

224 {
225 return _r;
226}

Referenced by TMDC::driftDistance(), TRungeFitter::fit(), TTrackManager::makeTds(), and TTrackManager::saveMCTables().

◆ sequence() [1/2]

unsigned TMDCWireHit::sequence ( unsigned  a) const
inline

sets sequential length in one segment : this parameter is used in TCurlFinder now.

Definition at line 316 of file TMDCWireHit.h.

316 {
317 return _sequentialLength = a;
318}

◆ sequence() [2/2]

unsigned TMDCWireHit::sequence ( void  ) const
inline

returns sequential Length in one segment : this parameter is used in TCurlFinder now.

Definition at line 310 of file TMDCWireHit.h.

310 {
311 return _sequentialLength;
312}

◆ state() [1/3]

unsigned TMDCWireHit::state ( unsigned  newState)
inline

sets state. Meaning of bits are written below.

Definition at line 268 of file TMDCWireHit.h.

268 {
269 return _state = i;
270}

◆ state() [2/3]

unsigned TMDCWireHit::state ( unsigned  newState) const
inline

sets state. Meaning of bits are written below. (tmp)

Definition at line 274 of file TMDCWireHit.h.

274 {
275 return _state = i;
276}

◆ state() [3/3]

◆ track() [1/3]

const TTrack *const TMDCWireHit::track ( const TTrack a)
inline

assigns a pointer to a TTrack.

Definition at line 286 of file TMDCWireHit.h.

286 {
287 return _track = a;
288}

◆ track() [2/3]

const TTrack *const TMDCWireHit::track ( const TTrack a) const
inline

assigns a pointer to a TTrack. (tmp)

Definition at line 292 of file TMDCWireHit.h.

292 {
293 return _track = a;
294}

◆ track() [3/3]

const TTrack *const TMDCWireHit::track ( void  ) const
inline

assigns a pointer to a TTrack.

Definition at line 280 of file TMDCWireHit.h.

280 {
281 return _track;
282}

Referenced by TTrack::assign(), and dump().

◆ wire()

◆ xyPosition()

const HepPoint3D & TMDCWireHit::xyPosition ( void  ) const
inline

returns drift time

returns position in the middle of wire. z is always zero, however.

Definition at line 262 of file TMDCWireHit.h.

262 {
263 return _xyPosition;
264}

Referenced by TConformalFinder0::conformalTransformation(), TConformalFinder0::conformalTransformationDriftCircle(), TConformalFinder0::conformalTransformationRphi(), TCircleFitter::fit(), TCircle::fitForCurl(), TSegment::solveDualHits(), TSegment0::solveDualHits(), and TMLink::TMLink().


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