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

#include <PndSdsRecoHit2.h>

Inheritance diagram for PndSdsRecoHit2:
genfit::PlanarMeasurement genfit::AbsMeasurement

Public Member Functions

 PndSdsRecoHit2 ()
 
 PndSdsRecoHit2 (PndSdsMCPoint *point)
 
 PndSdsRecoHit2 (PndSdsHit *hit, const genfit::TrackCandHit *candHit)
 
virtual ~PndSdsRecoHit2 ()
 
virtual genfit::AbsMeasurementclone ()
 
virtual AbsMeasurementclone () const
 Deep copy ctor for polymorphic class. More...
 
int getPlaneId () const
 
virtual SharedPlanePtr constructPlane (const StateOnPlane &state) const
 
virtual std::vector
< MeasurementOnPlane * > 
constructMeasurementsOnPlane (const StateOnPlane &state) const
 
virtual const AbsHMatrix * constructHMatrix (const AbsTrackRep *) const
 
virtual void setPlane (const SharedPlanePtr &physicalPlane, int planeId=-1)
 
void setStripV (bool v=true)
 Use if the coordinate for 1D hits measured in V direction. More...
 
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
 
virtual bool isLeftRightMeasurement () const
 If the AbsMeasurement is a wire hit, the left/right resolution will be used. More...
 
virtual int getLeftRightResolution () 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

SharedPlanePtr physicalPlane_
 
int planeId_
 This is persistent, but '!' makes ROOT shut up. More...
 
bool stripV_
 
TVectorD rawHitCoords_
 
TMatrixDSym rawHitCov_
 
int detId_
 
int hitId_
 
TrackPoint * trackPoint_
 Pointer to TrackPoint where the measurement belongs to. More...
 

Private Member Functions

 ClassDef (PndSdsRecoHit2, 1)
 

Private Attributes

PndGeoHandlingfGeoH
 

Static Private Attributes

static const Int_t fNparHitRep = 2
 

Detailed Description

Definition at line 40 of file PndSdsRecoHit2.h.

Constructor & Destructor Documentation

PndSdsRecoHit2::PndSdsRecoHit2 ( )

Definition at line 42 of file PndSdsRecoHit2.cxx.

Referenced by clone().

44 {
45 }
static const Int_t fNparHitRep
PndSdsRecoHit2::PndSdsRecoHit2 ( PndSdsMCPoint point)

Definition at line 48 of file PndSdsRecoHit2.cxx.

References genfit::AbsMeasurement::rawHitCoords_, genfit::AbsMeasurement::rawHitCov_, genfit::PlanarMeasurement::setPlane(), and v.

50 {
51  std::cout<<" -I- PndSdsRecoHit2::PndSdsRecoHit2(PndSdsMCPoint*) called."<<std::endl;
52 
53  rawHitCoords_[0] = point->GetX();
54  rawHitCoords_[1] = point->GetY();
55 
56  // we set the covariances to (50mu)^2 by hand.
57  rawHitCov_[0][0] = 0.0050 * 0.0050;//cm //TODO: cm is rigt?
58  rawHitCov_[1][1] = 0.0050 * 0.0050;//cm //TODO: cm is rigt?
59 
60  TVector3 o(0.,0.,point->GetZ()),
61  u(1.,0.,0.),
62  v(0.,1.,0.);
63 
65  setPlane(plane);
66 
67 }
Detector plane.
Definition: DetPlane.h:61
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
__m128 v
Definition: P4_F32vec4.h:4
static const Int_t fNparHitRep
virtual void setPlane(const SharedPlanePtr &physicalPlane, int planeId=-1)
PndSdsRecoHit2::PndSdsRecoHit2 ( PndSdsHit hit,
const genfit::TrackCandHit candHit 
)

Definition at line 69 of file PndSdsRecoHit2.cxx.

References fGeoH, PndSdsHit::GetCov(), genfit::TrackCandHit::getDetId(), genfit::TrackCandHit::getHitId(), PndGeoHandling::GetOUVShortId(), PndGeoHandling::GetPath(), genfit::TrackCandHit::getPlaneId(), PndSdsHit::GetPosition(), PndSdsHit::GetSensorID(), PndGeoHandling::Instance(), PndGeoHandling::MasterToLocalErrorsShortId(), PndGeoHandling::MasterToLocalShortId(), genfit::AbsMeasurement::rawHitCoords_, genfit::AbsMeasurement::rawHitCov_, genfit::AbsMeasurement::setDetId(), genfit::AbsMeasurement::setHitId(), genfit::PlanarMeasurement::setPlane(), and TString.

71 {
72 
73  // std::cout<<" -I- PndSdsRecoHit::PndSdsRecoHit(PndSdsHit*) called."<<std::endl;
74  // std::cout<<*hit<<std::endl;
75 
76  setDetId(candHit->getDetId());
77  setHitId(candHit->getHitId());
78 
79  Int_t id = hit->GetSensorID();
80 
81  // FairRootManager* ioman = FairRootManager::Instance();
82  // TString fGeoFile = ioman->GetInFile()->GetName();
84  TString path = fGeoH->GetPath(id);
85  // std::cout<<"Detector path: "<<path.Data()<<std::endl;
86  TVector3 oo, uu, vv;
87  fGeoH->GetOUVShortId(id, oo,uu,vv);
88 
89  TVector3 position = hit->GetPosition();
90  TVector3 localpos = fGeoH->MasterToLocalShortId(position, id);
91 
92  rawHitCoords_[0] = localpos.X();
93  rawHitCoords_[1] = localpos.Y();
94 
95  TMatrixD cova = fGeoH->MasterToLocalErrorsShortId(hit->GetCov(), id);
96  // project only the 2 dimensions of cov.
97  rawHitCov_[0][0] = cova[0][0];
98  rawHitCov_[0][1] = cova[0][1];
99  rawHitCov_[1][0] = cova[1][0];
100  rawHitCov_[1][1] = cova[1][1];
101 
102 // std::cout<<" -I- PndSdsRecoHit::PndSdsRecoHit: Wrote a hit with"
103 // <<"\n(x,y) = ("<<localpos.X()<<","<<localpos.Y()<<")."
104 // <<"\nCovariance Matrix is";
105 // rawHitCov_.Print();
106 // std::cout<<"From 3D hit matrix";
107 // cova.Print();
108 
109  genfit::SharedPlanePtr plane(new genfit::DetPlane(oo,uu,vv));
110  setPlane(plane, candHit->getPlaneId());
111 }
int getDetId() const
Definition: TrackCandHit.h:48
int getPlaneId() const
Definition: TrackCandHit.h:50
Detector plane.
Definition: DetPlane.h:61
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
void GetOUVShortId(Int_t shortId, TVector3 &o, TVector3 &u, TVector3 &v)
TVector3 GetPosition() const
Definition: PndSdsHit.h:93
PndGeoHandling * fGeoH
int getHitId() const
Definition: TrackCandHit.h:49
TMatrixD MasterToLocalErrorsShortId(const TMatrixD &master, const Int_t &shortId)
TString GetPath(Int_t shortID)
for a given shortID the path is returned
void setDetId(int detId)
TMatrixD GetCov() const
Definition: PndSdsHit.h:98
static PndGeoHandling * Instance()
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
static const Int_t fNparHitRep
void setHitId(int hitId)
Int_t GetSensorID() const
Definition: PndSdsHit.h:90
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
virtual void setPlane(const SharedPlanePtr &physicalPlane, int planeId=-1)
PndSdsRecoHit2::~PndSdsRecoHit2 ( )
virtual

Definition at line 38 of file PndSdsRecoHit2.cxx.

39 {
40 }

Member Function Documentation

PndSdsRecoHit2::ClassDef ( PndSdsRecoHit2  ,
 
)
private
virtual genfit::AbsMeasurement* PndSdsRecoHit2::clone ( )
inlinevirtual

Definition at line 51 of file PndSdsRecoHit2.h.

References PndSdsRecoHit2().

51 {return new PndSdsRecoHit2(*this);};
virtual AbsMeasurement* genfit::PlanarMeasurement::clone ( ) const
inlinevirtualinherited

Deep copy ctor for polymorphic class.

Implements genfit::AbsMeasurement.

Definition at line 52 of file PlanarMeasurement.h.

References genfit::PlanarMeasurement::PlanarMeasurement().

52 {return new PlanarMeasurement(*this);}
virtual const AbsHMatrix* genfit::PlanarMeasurement::constructHMatrix ( const AbsTrackRep ) const
virtualinherited

Returns a new AbsHMatrix object. Caller must take ownership.

Implements genfit::AbsMeasurement.

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

Construct MeasurementOnPlane on plane of the state and wrt the states TrackRep. The state will usually be the prediction or reference state, and has to be defined AT the measurement. The AbsMeasurement will be projected onto the plane. It's possible to make corrections to the coordinates here (e.g. by using the state coordinates). Usually the vector will contain only one element. But in the case of e.g. a WireMeasurement, it will be 2 (left and right).

Implements genfit::AbsMeasurement.

virtual SharedPlanePtr genfit::PlanarMeasurement::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.

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::AbsMeasurement::getLeftRightResolution ( ) const
inlinevirtualinherited

Reimplemented in genfit::WireMeasurementNew, and genfit::WireMeasurement.

Definition at line 67 of file AbsMeasurement.h.

67 {return 0;}
int genfit::PlanarMeasurement::getPlaneId ( ) const
inlineinherited

Definition at line 54 of file PlanarMeasurement.h.

References genfit::PlanarMeasurement::planeId_.

54 {return planeId_;}
int planeId_
This is persistent, but &#39;!&#39; makes ROOT shut up.
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::AbsMeasurement::isLeftRightMeasurement ( ) const
inlinevirtualinherited

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

Reimplemented in genfit::WireMeasurement.

Definition at line 66 of file AbsMeasurement.h.

66 {return false;}
virtual void genfit::AbsMeasurement::Print ( const Option_t *  = "") const
virtualinherited
void genfit::AbsMeasurement::setDetId ( int  detId)
inlineinherited
void genfit::AbsMeasurement::setHitId ( int  hitId)
inlineinherited
virtual void genfit::PlanarMeasurement::setPlane ( const SharedPlanePtr physicalPlane,
int  planeId = -1 
)
inlinevirtualinherited

Definition at line 62 of file PlanarMeasurement.h.

References genfit::PlanarMeasurement::physicalPlane_, and genfit::PlanarMeasurement::planeId_.

Referenced by PndGemRecoHit2::PndGemRecoHit2(), and PndSdsRecoHit2().

62 {physicalPlane_ = physicalPlane; planeId_ = planeId;}
int planeId_
This is persistent, but &#39;!&#39; makes ROOT shut up.
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::PlanarMeasurement::setStripV ( bool  v = true)
inlineinherited

Use if the coordinate for 1D hits measured in V direction.

Per default for 1D planar hits, the coordinate is measured in U direction. With this function you can set it to be measured in V direction. This affects the outcoe of constructHMatrix().

Definition at line 70 of file PlanarMeasurement.h.

References genfit::PlanarMeasurement::stripV_, and v.

70 {stripV_ = v;}
__m128 v
Definition: P4_F32vec4.h:4
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
PndGeoHandling* PndSdsRecoHit2::fGeoH
private

Definition at line 58 of file PndSdsRecoHit2.h.

Referenced by PndSdsRecoHit2().

const Int_t PndSdsRecoHit2::fNparHitRep = 2
staticprivate

Definition at line 57 of file PndSdsRecoHit2.h.

int genfit::AbsMeasurement::hitId_
protectedinherited
SharedPlanePtr genfit::PlanarMeasurement::physicalPlane_
protectedinherited

Definition at line 73 of file PlanarMeasurement.h.

Referenced by genfit::PlanarMeasurement::setPlane().

int genfit::PlanarMeasurement::planeId_
protectedinherited

This is persistent, but '!' makes ROOT shut up.

Definition at line 74 of file PlanarMeasurement.h.

Referenced by genfit::PlanarMeasurement::getPlaneId(), and genfit::PlanarMeasurement::setPlane().

TVectorD genfit::AbsMeasurement::rawHitCoords_
protectedinherited
TMatrixDSym genfit::AbsMeasurement::rawHitCov_
protectedinherited
bool genfit::PlanarMeasurement::stripV_
protectedinherited

Definition at line 75 of file PlanarMeasurement.h.

Referenced by genfit::PlanarMeasurement::setStripV().

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: