#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. | |
MdcRec_wirhit * | reccdc (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 HepPoint3D & | xyPosition (void) const |
returns position in the middle of wire. z is always zero, however. | |
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. | |
Private Attributes | |
unsigned | _state |
float | _drift [2] |
float | _driftError [2] |
const TMDCWire * | _wire |
MdcRec_wirhit *const | _r |
const HepPoint3D & | _xyPosition |
const TTrack * | _track |
const TMDCWireHitMC * | _mc |
unsigned | _sequentialLength |
Definition at line 81 of file TMDCWireHit.h.
TMDCWireHit::TMDCWireHit | ( | TMDCWire * | , | |
MdcRec_wirhit * | , | |||
float | fudgeFactor | |||
) |
Constructor.
Definition at line 44 of file TMDCWireHit.cxx.
References _drift, _driftError, _state, MdcRec_wirhit::ddl, MdcRec_wirhit::ddr, MdcRec_wirhit::erddl, MdcRec_wirhit::erddr, w, WireHitAxial, and WireHitStereo.
00045 : _wire(w), 00046 _xyPosition(w->xyPosition()), 00047 _r(r), 00048 _state(r->stat), 00049 _track(0), 00050 _mc(0) { 00051 w->hit(this); 00052 _drift[0] = r->ddl; 00053 _drift[1] = r->ddr; 00054 _driftError[0] = r->erddl * fudgeFactor; 00055 _driftError[1] = r->erddr * fudgeFactor; 00056 if (w->axial()) _state |= WireHitAxial; 00057 else _state |= WireHitStereo; 00058 }
TMDCWireHit::~TMDCWireHit | ( | ) | [virtual] |
float TMDCWireHit::dDrift | ( | void | ) | const [inline] |
returns drift distance error.
Definition at line 256 of file TMDCWireHit.h.
References _driftError.
00256 { 00257 return (_driftError[0] + _driftError[1]) / 2.; 00258 }
float TMDCWireHit::dDrift | ( | unsigned | ) | const [inline] |
returns drift distance error.
Definition at line 243 of file TMDCWireHit.h.
References _driftError.
Referenced by THelixFitter::drift(), TMDC::driftDistance(), TRungeFitter::fit(), TTrack::fit2D(), TTrackManager::salvageAssociateHits(), TTrackBase::testByApproach(), and TMLink::TMLink().
00243 { 00244 if (i) return _driftError[1]; 00245 return _driftError[0]; 00246 }
float TMDCWireHit::drift | ( | void | ) | const [inline] |
float TMDCWireHit::drift | ( | unsigned | ) | const [inline] |
returns drift distance.
Definition at line 236 of file TMDCWireHit.h.
References _drift.
Referenced by calVirtualCircle(), TBuilder0::check2CnHits(), TBuilder0::consectiveHits(), TCurlFinder::distance(), THelixFitter::drift(), TMDC::driftDistance(), TTrack::fit2D(), TTrackManager::salvageAssociateHits(), TSegment0::solveDualHits(), TTrack::stereoHitForCurl(), TTrack::szPosition(), TTrackBase::testByApproach(), TMLink::TMLink(), and TSegment0::updateDuality().
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.
References _drift, _driftError, _state, _wire, bitDisplay(), TMDCWireHitMC::hep(), TTrackHEP::id(), TMDCWire::layerId(), TMDCWire::localId(), mc(), TMDCWire::name(), RealDBUtil::npos, track(), WireHitLeftMask, and WireHitRightMask.
Referenced by TMLink::dump(), TTrack::fit2D(), THelixFitter::main(), and TSegment::solveDualHits().
00064 { 00065 std::cout << pre; 00066 std::cout << _wire->name(); 00067 if (msg.find("state") != std::string::npos || msg.find("detail") != std::string::npos) { 00068 std::cout << ",state "; 00069 bitDisplay(_state); 00070 if (track()) std::cout << ",trk "; 00071 } 00072 if (msg.find("drift") != std::string::npos || msg.find("detail") != std::string::npos) { 00073 if (_state & WireHitLeftMask) std::cout << ", L"; 00074 if (_state & WireHitRightMask) std::cout << ", R"; 00075 std::cout<<" layer "<<_wire->layerId()<<" cell "<<_wire->localId(); 00076 std::cout << ",dl " << _drift[0] << "+-" << _driftError[0]; 00077 std::cout << ",dr " << _drift[1] << "+-" << _driftError[1]; 00078 } 00079 if (msg.find("mc") != std::string::npos || msg.find("detail") != std::string::npos) { 00080 std::cout << ",hep "; 00081 if (mc()) { 00082 if (mc()->hep()) std::cout << mc()->hep()->id(); 00083 else std::cout << "0"; 00084 } 00085 else { 00086 std::cout << "0"; 00087 } 00088 } 00089 std::cout << std::endl; 00090 }
const TMDCWireHitMC *const TMDCWireHit::mc | ( | TMDCWireHitMC * | ) | [inline] |
sets a pointer to TMDCWireHitMC.
Definition at line 304 of file TMDCWireHit.h.
References _mc.
00304 { 00305 return _mc = a; 00306 }
const TMDCWireHitMC *const TMDCWireHit::mc | ( | void | ) | const [inline] |
returns a pointer to TMDCWireHitMC.
Definition at line 298 of file TMDCWireHit.h.
References _mc.
Referenced by TTrackMC::compare(), dump(), and TMDC::updateMC().
00298 { 00299 return _mc; 00300 }
HepPoint3D TMDCWireHit::position | ( | unsigned | ) | const |
returns left position. z is always zero.
Definition at line 93 of file TMDCWireHit.cxx.
References _drift, _xyPosition, WireHitLeft, and WireHitRight.
Referenced by TCircleFitter::fit().
00093 { 00094 const HepPoint3D myHepZHat(0.0, 0.0, 1.0); 00095 //...Left... 00096 if (lr == WireHitLeft) { 00097 return _xyPosition 00098 - _drift[WireHitLeft] * myHepZHat.cross(_xyPosition.unit()); 00099 } 00100 00101 //...Right case... 00102 else { 00103 return _xyPosition 00104 + _drift[WireHitRight] * myHepZHat.cross(_xyPosition.unit()); 00105 } 00106 }
struct MdcRec_wirhit * TMDCWireHit::reccdc | ( | void | ) | const [inline] |
returns a pointer to RECMDC_WIRHIT.
Definition at line 224 of file TMDCWireHit.h.
References _r.
Referenced by THelixFitter::drift(), T3DLineFitter::drift(), TMDC::driftDistance(), and TRungeFitter::fit().
00224 { 00225 return _r; 00226 }
unsigned TMDCWireHit::sequence | ( | unsigned | ) | const [inline] |
sets sequential length in one segment : this parameter is used in TCurlFinder now.
Definition at line 316 of file TMDCWireHit.h.
References _sequentialLength.
00316 { 00317 return _sequentialLength = a; 00318 }
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.
References _sequentialLength.
00310 { 00311 return _sequentialLength; 00312 }
unsigned TMDCWireHit::state | ( | unsigned | newState | ) | const [inline] |
sets state. Meaning of bits are written below. (tmp)
Definition at line 274 of file TMDCWireHit.h.
References _state.
unsigned TMDCWireHit::state | ( | unsigned | newState | ) | [inline] |
sets state. Meaning of bits are written below.
Definition at line 268 of file TMDCWireHit.h.
References _state.
unsigned TMDCWireHit::state | ( | void | ) | const [inline] |
returns state.
Definition at line 230 of file TMDCWireHit.h.
References _state.
Referenced by TTrackBase::append(), TTrack::assign(), Cores(), TCircleFitter::fit(), THelixFitter::main(), TTrackManager::merge(), TBuilder0::salvage(), TBuilder0::salvageNormal(), SeparateCores(), and TTrackBase::update().
00230 { 00231 return _state; 00232 }
assigns a pointer to a TTrack. (tmp)
Definition at line 292 of file TMDCWireHit.h.
References _track.
00292 { 00293 return _track = a; 00294 }
assigns a pointer to a TTrack.
Definition at line 286 of file TMDCWireHit.h.
References _track.
00286 { 00287 return _track = a; 00288 }
const TTrack *const TMDCWireHit::track | ( | void | ) | const [inline] |
assigns a pointer to a TTrack.
Definition at line 280 of file TMDCWireHit.h.
References _track.
Referenced by TTrack::assign(), and dump().
00280 { 00281 return _track; 00282 }
const TMDCWire *const TMDCWireHit::wire | ( | void | ) | const [inline] |
returns a pointer to a TMDCWire.
Definition at line 218 of file TMDCWireHit.h.
References _wire.
Referenced by TSegmentCurl::append(), TTrack::assign(), TBuilder0::buildStereo(), TBuilder0::check2CnHits(), TBuilder0::consectiveHits(), THelixFitter::drift(), T3DLineFitter::drift(), TMDC::driftDistance(), TRungeFitter::fit(), TMLine::fit2(), TLine0::fit2(), TMLine::fit2p(), TLine0::fit2p(), THelixFitter::main(), offsetBorder(), TSegmentCurl::remove(), TCurlFinder::searchHits(), TTrack::stereoHitForCurl(), TTrack::szPosition(), TMDC::updateMC(), TCircle::weight(), TMLink::wire(), and TMLink::xyPosition().
00218 { 00219 return _wire; 00220 }
const HepPoint3D & TMDCWireHit::xyPosition | ( | void | ) | const [inline] |
returns position in the middle of wire. z is always zero, however.
Definition at line 262 of file TMDCWireHit.h.
References _xyPosition.
Referenced by TCircleFitter::fit(), TCircle::fitForCurl(), TCurlFinder::fitWDD(), TBuilder0::salvageNormal(), TSegment0::solveDualHits(), TSegment::solveDualHits(), TSegment0::updateDuality(), and TSegment::updateDuality().
00262 { 00263 return _xyPosition; 00264 }
float TMDCWireHit::_drift[2] [private] |
Definition at line 159 of file TMDCWireHit.h.
Referenced by drift(), dump(), position(), and TMDCWireHit().
float TMDCWireHit::_driftError[2] [private] |
const TMDCWireHitMC* TMDCWireHit::_mc [private] |
MdcRec_wirhit* const TMDCWireHit::_r [private] |
unsigned TMDCWireHit::_sequentialLength [mutable, private] |
unsigned TMDCWireHit::_state [mutable, private] |
const TTrack* TMDCWireHit::_track [mutable, private] |
const TMDCWire* TMDCWireHit::_wire [private] |
const HepPoint3D& TMDCWireHit::_xyPosition [private] |