FairRoot/PandaRoot
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
PndFtsRecoHit2 Class Reference

#include <PndFtsRecoHit2.h>

Inheritance diagram for PndFtsRecoHit2:
genfit::WireMeasurement genfit::AbsMeasurement

Public Member Functions

 PndFtsRecoHit2 ()
 
 PndFtsRecoHit2 (PndFtsHit *currenthit)
 
 PndFtsRecoHit2 (PndFtsHit *currenthit, const genfit::TrackCandHit *hit, TClonesArray *tubeArr)
 
virtual ~PndFtsRecoHit2 ()
 
virtual genfit::AbsMeasurementclone ()
 
virtual AbsMeasurementclone () const
 Deep copy ctor for polymorphic class. More...
 
virtual SharedPlanePtr constructPlane (const StateOnPlane &state) const
 
virtual std::vector
< MeasurementOnPlane * > 
constructMeasurementsOnPlane (const StateOnPlane &state) const
 
virtual const AbsHMatrix * constructHMatrix (const AbsTrackRep *) const
 
void setMaxDistance (double d)
 
void setLeftRightResolution (int lr)
 
virtual bool isLeftRightMeasurement () const
 If the AbsMeasurement is a wire hit, the left/right resolution will be used. More...
 
virtual int getLeftRightResolution () const
 
double getMaxDistance ()
 
TrackPoint * getTrackPoint () const
 
void setTrackPoint (TrackPoint *tp)
 
const TVectorD & getRawHitCoords () const
 
TVectorD & getRawHitCoords ()
 
const TMatrixDSym & getRawHitCov () const
 
TMatrixDSym & getRawHitCov ()
 
int getDetId () const
 
int getHitId () const
 
unsigned int getDim () const
 
void setRawHitCoords (const TVectorD &coords)
 
void setRawHitCov (const TMatrixDSym &cov)
 
void setDetId (int detId)
 
void setHitId (int hitId)
 
virtual void Print (const Option_t *="") const
 

Protected Attributes

double maxDistance_
 
signed char leftRight_
 
TVectorD rawHitCoords_
 
TMatrixDSym rawHitCov_
 
int detId_
 
int hitId_
 
TrackPoint * trackPoint_
 Pointer to TrackPoint where the measurement belongs to. More...
 

Static Protected Attributes

static const int NparHitRep = 7
 

Detailed Description

Definition at line 19 of file PndFtsRecoHit2.h.

Constructor & Destructor Documentation

PndFtsRecoHit2::PndFtsRecoHit2 ( )

Definition at line 41 of file PndFtsRecoHit2.cxx.

Referenced by clone().

43 {
44 
45 }
static const int NparHitRep
Class for measurements in wire detectors (Straw tubes and drift chambers) which do not measure the co...
PndFtsRecoHit2::PndFtsRecoHit2 ( PndFtsHit currenthit)

Definition at line 48 of file PndFtsRecoHit2.cxx.

References PndFtsTube::GetHalfLength(), PndFtsHit::GetIsochrone(), PndFtsHit::GetIsochroneError(), PndFtsTube::GetPosition(), PndFtsMapCreator::GetTubeFromTubeID(), PndFtsHit::GetTubeID(), PndFtsTube::GetWireDirection(), i, NparHitRep, genfit::AbsMeasurement::rawHitCoords_, genfit::AbsMeasurement::rawHitCov_, rtdb, and genfit::WireMeasurement::setMaxDistance().

49 
50  FairRuntimeDb* rtdb = FairRunAna::Instance()->GetRuntimeDb();
51  PndGeoFtsPar *ftsParameters = (PndGeoFtsPar*) rtdb->getContainer("PndGeoFtsPar");
52  Int_t tubeID = currenthit->GetTubeID();
53  PndFtsMapCreator *mapper = new PndFtsMapCreator(ftsParameters);
54  PndFtsTube *tube = (PndFtsTube*) mapper->GetTubeFromTubeID(tubeID);
55 
56  // wire1(3), wire2(3), rdrift
57  TVector3 wiredirection = tube->GetWireDirection();
58  TVector3 wiredirection2 = tube->GetHalfLength() * wiredirection;
59  TVector3 cenposition = tube->GetPosition();
60  TVector3 wire1, wire2;
61  wire1 = cenposition - wiredirection2;
62  wire2 = cenposition + wiredirection2;
63  // cout << "Wiredirection, wire1, wire2 " << endl;
64  // wiredirection.Print();
65  // wire1.Print();
66  // wire2.Print();
67  rawHitCoords_[0] = wire1.X();
68  rawHitCoords_[1] = wire1.Y();
69  rawHitCoords_[2] = wire1.Z();
70  rawHitCoords_[3] = wire2.X();
71  rawHitCoords_[4] = wire2.Y();
72  rawHitCoords_[5] = wire2.Z();
73  rawHitCoords_[6] = currenthit->GetIsochrone();
74 
75  // errors on drift radius
76  for(int i = 0; i < NparHitRep; i++) for(int j = 0; j < NparHitRep; j++) rawHitCov_[i][j] = 0.;
77  // rawHitCov_[6][6] = 0.0100 * 0.0100;
78  rawHitCov_[6][6] = pow(currenthit->GetIsochroneError(), 2);
79 
80  // cut on distance
81  setMaxDistance(0.5);
82 }
Int_t i
Definition: run_full.C:25
TVector3 GetWireDirection() const
Definition: PndFtsTube.cxx:83
Int_t GetTubeID() const
Definition: PndFtsHit.h:70
PndFtsTube * GetTubeFromTubeID(Int_t tubeid)
static const int NparHitRep
Class for measurements in wire detectors (Straw tubes and drift chambers) which do not measure the co...
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
TVector3 GetPosition() const
Definition: PndFtsTube.cxx:68
void setMaxDistance(double d)
Double_t GetHalfLength() const
Definition: PndFtsTube.cxx:80
Double_t GetIsochrone() const
Definition: PndFtsHit.h:57
Double_t GetIsochroneError() const
Definition: PndFtsHit.h:58
PndFtsRecoHit2::PndFtsRecoHit2 ( PndFtsHit currenthit,
const genfit::TrackCandHit hit,
TClonesArray *  tubeArr 
)

Definition at line 85 of file PndFtsRecoHit2.cxx.

References genfit::TrackCandHit::getDetId(), PndFtsTube::GetHalfLength(), genfit::TrackCandHit::getHitId(), PndFtsHit::GetIsochrone(), PndFtsHit::GetIsochroneError(), PndFtsTube::GetPosition(), PndFtsHit::GetTubeID(), PndFtsTube::GetWireDirection(), i, NparHitRep, genfit::AbsMeasurement::rawHitCoords_, genfit::AbsMeasurement::rawHitCov_, genfit::AbsMeasurement::setDetId(), genfit::AbsMeasurement::setHitId(), and genfit::WireMeasurement::setMaxDistance().

86 
87  setDetId(hit->getDetId());
88  setHitId(hit->getHitId());
89 
90  Int_t tubeID = currenthit->GetTubeID();
91  PndFtsTube *tube = (PndFtsTube *) tubeArray->At(tubeID);
92 
93  // wire1(3), wire2(3), rdrift
94  TVector3 wiredirection = tube->GetWireDirection();
95  TVector3 wiredirection2 = tube->GetHalfLength() * wiredirection;
96  TVector3 cenposition = tube->GetPosition();
97  TVector3 wire1, wire2;
98  wire1 = cenposition - wiredirection2;
99  wire2 = cenposition + wiredirection2;
100  // cout << "Wiredirection, wire1, wire2 " << endl;
101  // wiredirection.Print();
102  // wire1.Print();
103  // wire2.Print();
104  rawHitCoords_[0] = wire1.X();
105  rawHitCoords_[1] = wire1.Y();
106  rawHitCoords_[2] = wire1.Z();
107  rawHitCoords_[3] = wire2.X();
108  rawHitCoords_[4] = wire2.Y();
109  rawHitCoords_[5] = wire2.Z();
110  rawHitCoords_[6] = currenthit->GetIsochrone();
111 
112  // errors on drift radius
113  for(int i = 0; i < NparHitRep; i++) for(int j = 0; j < NparHitRep; j++) rawHitCov_[i][j] = 0.;
114  // rawHitCov_[6][6] = 0.0100 * 0.0100;
115  rawHitCov_[6][6] = pow(currenthit->GetIsochroneError(), 2);
116 
117  // cut on distance
118  setMaxDistance(0.5);
119 }
int getDetId() const
Definition: TrackCandHit.h:48
Int_t i
Definition: run_full.C:25
int getHitId() const
Definition: TrackCandHit.h:49
TVector3 GetWireDirection() const
Definition: PndFtsTube.cxx:83
Int_t GetTubeID() const
Definition: PndFtsHit.h:70
void setDetId(int detId)
static const int NparHitRep
Class for measurements in wire detectors (Straw tubes and drift chambers) which do not measure the co...
TVector3 GetPosition() const
Definition: PndFtsTube.cxx:68
void setMaxDistance(double d)
Double_t GetHalfLength() const
Definition: PndFtsTube.cxx:80
void setHitId(int hitId)
Double_t GetIsochrone() const
Definition: PndFtsHit.h:57
Double_t GetIsochroneError() const
Definition: PndFtsHit.h:58
PndFtsRecoHit2::~PndFtsRecoHit2 ( )
virtual

Definition at line 38 of file PndFtsRecoHit2.cxx.

39 {}

Member Function Documentation

virtual genfit::AbsMeasurement* PndFtsRecoHit2::clone ( )
inlinevirtual

Definition at line 29 of file PndFtsRecoHit2.h.

References PndFtsRecoHit2().

29 {return new PndFtsRecoHit2(*this);};
virtual AbsMeasurement* genfit::WireMeasurement::clone ( ) const
inlinevirtualinherited

Deep copy ctor for polymorphic class.

Implements genfit::AbsMeasurement.

Reimplemented in genfit::WirePointMeasurement.

Definition at line 60 of file WireMeasurement.h.

References genfit::WireMeasurement::WireMeasurement().

60 {return new WireMeasurement(*this);}
WireMeasurement(int nDim=7)
virtual const AbsHMatrix* genfit::WireMeasurement::constructHMatrix ( const AbsTrackRep ) const
virtualinherited

Returns a new AbsHMatrix object. Caller must take ownership.

Implements genfit::AbsMeasurement.

Reimplemented in genfit::WirePointMeasurement.

virtual std::vector<MeasurementOnPlane*> genfit::WireMeasurement::constructMeasurementsOnPlane ( const StateOnPlane state) const
virtualinherited

Hits with a small drift distance get a higher weight, whereas hits with big drift distances become weighted down. When these initial weights are used by the DAF, the smoothed track will be closer to the real trajectory than if both sides are weighted with 0.5 regardless of the drift distance. This helps a lot when resolving l/r ambiguities with the DAF. The idea is that for the first iteration of the DAF, the wire positions are taken. For small drift radii, the wire position does not bend the fit away from the trajectory, whereas the wire position for hits with large drift radii is further away from the trajectory and will therefore bias the fit if not weighted down.

Implements genfit::AbsMeasurement.

Reimplemented in genfit::WirePointMeasurement.

virtual SharedPlanePtr genfit::WireMeasurement::constructPlane ( const StateOnPlane state) const
virtualinherited

Construct (virtual) detector plane (use state's AbsTrackRep). It's possible to make corrections to the plane here. The state should be defined somewhere near the measurement. For virtual planes, the state will be extrapolated to the POCA to point (SpacepointMeasurement) or line (WireMeasurement), and from this info the plane will be constructed.

Implements genfit::AbsMeasurement.

Reimplemented in genfit::WirePointMeasurement.

int genfit::AbsMeasurement::getDetId ( ) const
inlineinherited

Definition at line 62 of file AbsMeasurement.h.

References genfit::AbsMeasurement::detId_.

62 {return detId_;}
unsigned int genfit::AbsMeasurement::getDim ( ) const
inlineinherited

Definition at line 69 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCoords_.

69 {return rawHitCoords_.GetNrows();}
int genfit::AbsMeasurement::getHitId ( ) const
inlineinherited

Definition at line 63 of file AbsMeasurement.h.

References genfit::AbsMeasurement::hitId_.

63 {return hitId_;}
virtual int genfit::WireMeasurement::getLeftRightResolution ( ) const
inlinevirtualinherited

Reimplemented from genfit::AbsMeasurement.

Definition at line 91 of file WireMeasurement.h.

References genfit::WireMeasurement::leftRight_.

91 {return leftRight_;}
double genfit::WireMeasurement::getMaxDistance ( )
inlineinherited

Definition at line 93 of file WireMeasurement.h.

References genfit::WireMeasurement::maxDistance_.

93 {return maxDistance_;}
const TVectorD& genfit::AbsMeasurement::getRawHitCoords ( ) const
inlineinherited

Definition at line 58 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCoords_.

58 {return rawHitCoords_;}
TVectorD& genfit::AbsMeasurement::getRawHitCoords ( )
inlineinherited

Definition at line 60 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCoords_.

60 {return rawHitCoords_;}
const TMatrixDSym& genfit::AbsMeasurement::getRawHitCov ( ) const
inlineinherited

Definition at line 59 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCov_.

59 {return rawHitCov_;}
TMatrixDSym& genfit::AbsMeasurement::getRawHitCov ( )
inlineinherited

Definition at line 61 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCov_.

61 {return rawHitCov_;}
TrackPoint* genfit::AbsMeasurement::getTrackPoint ( ) const
inlineinherited

Definition at line 55 of file AbsMeasurement.h.

References genfit::AbsMeasurement::trackPoint_.

55 {return trackPoint_;}
TrackPoint * trackPoint_
Pointer to TrackPoint where the measurement belongs to.
virtual bool genfit::WireMeasurement::isLeftRightMeasurement ( ) const
inlinevirtualinherited

If the AbsMeasurement is a wire hit, the left/right resolution will be used.

Reimplemented from genfit::AbsMeasurement.

Definition at line 90 of file WireMeasurement.h.

90 {return true;}
virtual void genfit::AbsMeasurement::Print ( const Option_t *  = "") const
virtualinherited
void genfit::AbsMeasurement::setDetId ( int  detId)
inlineinherited
void genfit::AbsMeasurement::setHitId ( int  hitId)
inlineinherited
void genfit::WireMeasurement::setLeftRightResolution ( int  lr)
inherited

select how to resolve the left/right ambiguity: -1: negative (left) side on vector (track direction) x (wire direction) 0: auto select (take side with smallest distance to track) 1: positive (right) side on vector (track direction) x (wire direction)

void genfit::WireMeasurement::setMaxDistance ( double  d)
inlineinherited

Set maximum drift distance. This is used to calculate the start weights of the two measurementsOnPlane.

Definition at line 81 of file WireMeasurement.h.

References d, and genfit::WireMeasurement::maxDistance_.

Referenced by PndFtsRecoHit2(), and PndSttRecoHit2::PndSttRecoHit2().

81 {maxDistance_ = d;}
TObjArray * d
void genfit::AbsMeasurement::setRawHitCoords ( const TVectorD &  coords)
inlineinherited

Definition at line 71 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCoords_.

71 {rawHitCoords_ = coords;}
void genfit::AbsMeasurement::setRawHitCov ( const TMatrixDSym &  cov)
inlineinherited

Definition at line 72 of file AbsMeasurement.h.

References genfit::AbsMeasurement::rawHitCov_.

72 {rawHitCov_ = cov;}
void genfit::AbsMeasurement::setTrackPoint ( TrackPoint tp)
inlineinherited

Definition at line 56 of file AbsMeasurement.h.

References genfit::AbsMeasurement::trackPoint_.

Referenced by genfit::TrackPoint::addRawMeasurement().

56 {trackPoint_ = tp;}
TrackPoint * trackPoint_
Pointer to TrackPoint where the measurement belongs to.

Member Data Documentation

int genfit::AbsMeasurement::detId_
protectedinherited
int genfit::AbsMeasurement::hitId_
protectedinherited
signed char genfit::WireMeasurement::leftRight_
protectedinherited

Definition at line 98 of file WireMeasurement.h.

Referenced by genfit::WireMeasurement::getLeftRightResolution().

double genfit::WireMeasurement::maxDistance_
protectedinherited
const int PndFtsRecoHit2::NparHitRep = 7
staticprotected

Definition at line 37 of file PndFtsRecoHit2.h.

Referenced by PndFtsRecoHit2().

TVectorD genfit::AbsMeasurement::rawHitCoords_
protectedinherited
TMatrixDSym genfit::AbsMeasurement::rawHitCov_
protectedinherited
TrackPoint* genfit::AbsMeasurement::trackPoint_
protectedinherited

Pointer to TrackPoint where the measurement belongs to.

Definition at line 119 of file AbsMeasurement.h.

Referenced by genfit::AbsMeasurement::getTrackPoint(), and genfit::AbsMeasurement::setTrackPoint().


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