FairRoot/PandaRoot
PndRiemannHit.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // Conformal Mapping of a PndTpc Cluster (x,y)->(r,phi)-> riemann sphere
7 //
8 //
9 // Environment:
10 // Software developed for the PANDA Detector at FAIR.
11 //
12 // Author List:
13 // Sebastian Neubert TUM (original author)
14 //
15 //
16 //-----------------------------------------------------------
17 
18 #ifndef PNDRIEMANNHIT_HH
19 #define PNDRIEMANNHIT_HH
20 
21 // Base Class Headers ----------------
22 #include "TObject.h"
23 
24 // Collaborating Class Headers -------
25 #include <ostream> // remove if you do not need streaming op
26 #include "TVector3.h"
27 #include "TMatrixD.h"
28 #include "FairHit.h"
29 #include "TMath.h"
30 
31 // Collaborating Class Declarations --
32 //class PndTpcCluster;
33 class PndRiemannTrack;
34 
35 class PndRiemannHit : public TObject{
36 public:
37 
38  // Constructors/Destructors ---------
39  PndRiemannHit() : fX(0.,0.,0.), fSigmaX(0.,0.,0.), fCovX(3,3), fHit(0), fHitID(-1), fS(-1.), fZ(-1.), fDeltaZ(-1.), fAlpha(-1.), fVerbose(0) {};
40  PndRiemannHit(double x,double y, double z, double dx, double dy, double dz);
41  PndRiemannHit(FairHit* cl, int hitID = -1);
43 
44  //Copy-/Assignment-Operator
45  PndRiemannHit(const PndRiemannHit& myHit): TObject(myHit), fX(myHit.fX), fSigmaX(myHit.fSigmaX),
46  fCovX(myHit.fCovX), fHit(myHit.fHit), fHitID(myHit.fHitID), fS(myHit.fS),
47  fZ(myHit.fZ), fDeltaZ(myHit.fDeltaZ), fAlpha(myHit.fAlpha), fVerbose(myHit.fVerbose)
48  {}
49 
51  {
52  if (this != &myHit){
53  fX = myHit.fX;
54  fSigmaX = myHit.fSigmaX;
55  fCovX = myHit.fCovX;
56  fHit = myHit.fHit;
57  fHitID = myHit.fHitID;
58  fS = myHit.fS;
59  fZ = myHit.fZ;
60  fDeltaZ = myHit.fDeltaZ;
61  fAlpha = myHit.fAlpha;
62  fVerbose = myHit.fVerbose;
63  }
64  return *this;
65  }
66 
67  // Accessors -----------------------
68  void setXYZ(double x, double y, double z);
69  void setDXYZ(double dx, double dy, double dz);
70  void setHit(FairHit* cl);
71  const TVector3& x() const {return fX;}
72  const FairHit* hit() const {return fHit;}
73  int hitID() const {return fHitID;}
74  double s() const {return fS;}
75  double z() const;
76  double alpha() const {return fAlpha;}
77  double sigmaXY() const;
78  double sigmaX() const{return TMath::Sqrt(fCovX[0][0]);}
79  double sigmaY() const{return TMath::Sqrt(fCovX[1][1]);}
80  double sigmaW() const{return TMath::Sqrt(TMath::Power(2*x().x()*sigmaX(),2) + TMath::Power(2*x().y()*sigmaY(),2));} // error of z-Coordinate (x2+y2) in RiemannSpace
81  const TMatrixD& covX() const {return fCovX;}
82  double covX(int row, int col) const {return fCovX[row][col];}
83  bool operator< (const PndRiemannHit& aHit) const{
84  if (s() >= 0 && aHit.s() >= 0){
85  return s() < aHit.s();
86  }
87  else if (s() <= 0 && aHit.s() <= 0){
88  return -s() < -aHit.s();
89  }
90  else
91  return s() < aHit.s();
92  }
93 
94  // Modifiers -----------------------
95  // Operations ----------------------
97 
98 private:
99 
100  // Private Data Members ------------
101  TVector3 fX;
102  TVector3 fSigmaX;
104  FairHit* fHit; //-> //no ownership over this pointer!
105  int fHitID;
106  double fS;
107  double fZ;
108  double fDeltaZ;
109  double fAlpha;
110  int fVerbose;
111 
112  // Private Methods -----------------
113 
114 public:
115  ClassDef(PndRiemannHit,2)
116 
117 };
118 
119 #endif
120 
121 //--------------------------------------------------------------
122 // $Log$
123 //--------------------------------------------------------------
FairHit * fHit
int row
Definition: anaLmdDigi.C:67
double dy
double covX(int row, int col) const
Definition: PndRiemannHit.h:82
TVector3 fSigmaX
Sigma Error of fX (should be replaced by covariance matrix)
double sigmaXY() const
double fS
pathlength along track
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
const FairHit * hit() const
Definition: PndRiemannHit.h:72
int col
Definition: anaLmdDigi.C:67
PndRiemannHit & operator=(const PndRiemannHit &myHit)
Definition: PndRiemannHit.h:50
double s() const
Definition: PndRiemannHit.h:74
void setDXYZ(double dx, double dy, double dz)
bool operator<(const PndRiemannHit &aHit) const
Definition: PndRiemannHit.h:83
double sigmaW() const
Definition: PndRiemannHit.h:80
void setXYZ(double x, double y, double z)
double sigmaX() const
Definition: PndRiemannHit.h:78
double fDeltaZ
error in z
PndRiemannHit(const PndRiemannHit &myHit)
Definition: PndRiemannHit.h:45
const TMatrixD & covX() const
Definition: PndRiemannHit.h:81
int hitID() const
Definition: PndRiemannHit.h:73
double dx
GFTrack * trk
Definition: checkgenfit.C:13
double alpha() const
Definition: PndRiemannHit.h:76
double z() const
void setHit(FairHit *cl)
double fAlpha
angle along track
const TVector3 & x() const
Definition: PndRiemannHit.h:71
double fZ
z-coordinate of hit
Double_t y
void calcPosOnTrk(PndRiemannTrack *trk)
TMatrixD fCovX
Covariance Matrix of the hit.
double sigmaY() const
Definition: PndRiemannHit.h:79
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52