BOSS 7.0.2
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.
 
 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

Constructor & Destructor Documentation

◆ TMDCWireHit() [1/2]

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

◆ ~TMDCWireHit() [1/2]

TMDCWireHit::~TMDCWireHit ( )
virtual

Destructor.

Definition at line 60 of file TMDCWireHit.cxx.

60 {
61}

◆ TMDCWireHit() [2/2]

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

Constructor.

◆ ~TMDCWireHit() [2/2]

virtual TMDCWireHit::~TMDCWireHit ( )
virtual

Destructor.

Member Function Documentation

◆ dDrift() [1/4]

float TMDCWireHit::dDrift ( unsigned  i) const
inline

◆ dDrift() [2/4]

float TMDCWireHit::dDrift ( unsigned  ) const

returns drift distance error.

◆ dDrift() [3/4]

float TMDCWireHit::dDrift ( void  ) const
inline

returns drift distance error.

Definition at line 256 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

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

◆ dDrift() [4/4]

float TMDCWireHit::dDrift ( void  ) const

returns drift distance error.

◆ drift() [1/4]

◆ drift() [2/4]

float TMDCWireHit::drift ( unsigned  ) const

returns drift distance.

◆ drift() [3/4]

float TMDCWireHit::drift ( void  ) const
inline

returns drift distance.

Definition at line 250 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

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

◆ drift() [4/4]

float TMDCWireHit::drift ( void  ) const

returns drift distance.

◆ dump() [1/2]

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)
Definition: TMDCUtil.cxx:85
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.
const TMDCWireHitMC *const mc(void) const
returns a pointer to TMDCWireHitMC.
unsigned localId(void) const
returns local id in a wire layer.
unsigned layerId(void) const
returns layer id.
std::string name(void) const
returns name.
unsigned id(void) const
returns an id started from 0.

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

◆ dump() [2/2]

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

dumps debug information.

◆ mc() [1/4]

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

sets a pointer to TMDCWireHitMC.

Definition at line 304 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

304 {
305 return _mc = a;
306}

◆ mc() [2/4]

const TMDCWireHitMC *const TMDCWireHit::mc ( TMDCWireHitMC )

sets a pointer to TMDCWireHitMC.

◆ mc() [3/4]

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

returns a pointer to TMDCWireHitMC.

Definition at line 298 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

298 {
299 return _mc;
300}

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

◆ mc() [4/4]

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

returns a pointer to TMDCWireHitMC.

◆ position() [1/2]

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}

Referenced by TCircleFitter::fit().

◆ position() [2/2]

HepPoint3D TMDCWireHit::position ( unsigned  ) const

returns left position. z is always zero.

◆ reccdc() [1/2]

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

returns a pointer to RECMDC_WIRHIT.

Definition at line 224 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

224 {
225 return _r;
226}

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

◆ reccdc() [2/2]

struct MdcRec_wirhit * TMDCWireHit::reccdc ( void  ) const

returns a pointer to RECMDC_WIRHIT.

◆ sequence() [1/4]

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 InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

316 {
317 return _sequentialLength = a;
318}

◆ sequence() [2/4]

unsigned TMDCWireHit::sequence ( unsigned  ) const

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

◆ sequence() [3/4]

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 InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

310 {
311 return _sequentialLength;
312}

◆ sequence() [4/4]

unsigned TMDCWireHit::sequence ( void  ) const

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

◆ state() [1/6]

unsigned TMDCWireHit::state ( unsigned  newState)
inline

sets state. Meaning of bits are written below.

Definition at line 268 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

268 {
269 return _state = i;
270}

◆ state() [2/6]

unsigned TMDCWireHit::state ( unsigned  newState)

sets state. Meaning of bits are written below.

◆ state() [3/6]

unsigned TMDCWireHit::state ( unsigned  newState) const
inline

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

Definition at line 274 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

274 {
275 return _state = i;
276}

◆ state() [4/6]

unsigned TMDCWireHit::state ( unsigned  newState) const

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

◆ state() [5/6]

◆ state() [6/6]

unsigned TMDCWireHit::state ( void  ) const

returns state.

◆ track() [1/6]

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

assigns a pointer to a TTrack.

Definition at line 286 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

286 {
287 return _track = a;
288}

◆ track() [2/6]

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

assigns a pointer to a TTrack.

◆ track() [3/6]

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

assigns a pointer to a TTrack. (tmp)

Definition at line 292 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

292 {
293 return _track = a;
294}

◆ track() [4/6]

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

assigns a pointer to a TTrack. (tmp)

◆ track() [5/6]

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

assigns a pointer to a TTrack.

Definition at line 280 of file InstallArea/include/TrkReco/TrkReco/TMDCWireHit.h.

280 {
281 return _track;
282}

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

◆ track() [6/6]

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

assigns a pointer to a TTrack.

◆ wire() [1/2]

◆ wire() [2/2]

const TMDCWire *const TMDCWireHit::wire ( void  ) const

returns a pointer to a TMDCWire.

◆ xyPosition() [1/2]

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

◆ xyPosition() [2/2]

const HepPoint3D & TMDCWireHit::xyPosition ( void  ) const

returns drift time

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


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