FairRoot/PandaRoot
GeaneTrackRep.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // a GEANE (sd-system) track representation
7 // (q/p, v',w',v,w)
8 // (v,w) refers to DetPlane system
9 //
10 // Environment:
11 // Software developed for the PANDA Detector at FAIR.
12 //
13 // Author List:
14 // Sebastian Neubert TUM (original author)
15 // Andrea Fontana INFN
16 //
17 //
18 //-----------------------------------------------------------
19 
20 #ifndef GeaneTRACKREP_HH
21 #define GeaneTRACKREP_HH
22 
23 // Base Class Headers ----------------
24 #include "GFAbsTrackRep.h"
25 #include "FairTrackParP.h"
26 
27 // Collaborating Class Headers -------
28 #include <ostream> // remove if you do not need streaming op
29 #include "TVectorT.h"
30 
31 
32 // Collaborating Class Declarations --
33 class FairGeanePro;
34 
35 
36 class GeaneTrackRep : public GFAbsTrackRep {
37 public:
38 
39  // Constructors/Destructors ---------
40  GeaneTrackRep();
41  GeaneTrackRep(FairGeanePro* geane,
42  const GFDetPlane& plane, // will be defined at origin of plane
43  const TVector3& mom,
44  const TVector3& poserr,
45  const TVector3& momerr,
46  double q,
47  int PDGCode);
48 
49  GeaneTrackRep(FairGeanePro* geane,
50  const GFDetPlane& plane, // will be defined at origin of plane
51  const TVector3& mom,
52  const TVector3& poserr,
53  const TVector3& momerr,
54  int q,
55  int PDGCode);
56 
57  virtual ~GeaneTrackRep();
58 
59 
60  virtual GFAbsTrackRep* clone() const {return new GeaneTrackRep(*this);}
61  virtual GFAbsTrackRep* prototype()const{return new GeaneTrackRep();}
62 
63  // Operators
65 
66  // Accessors -----------------------
67 
68  // Modifiers
69 
70  // Operations ----------------------
71 
72  virtual double extrapolate(const GFDetPlane&, TMatrixT<double>& statePred);
73  //virtual void extrapolate(const GFDetPlane&,
74  // const TMatrixT<double>& stateFrom
75  // TMatrixT<double>& stateResult);
76 
77  virtual double extrapolate(const GFDetPlane&,
78  TMatrixT<double>& statePred,
79  TMatrixT<double>& covPred);
80 
81  //these two are overwritting ABsTrackRep methods
82  void extrapolateToPoint(const TVector3& pos,
83  TVector3& poca,
84  TVector3& dirInPoca);
85 
86  void extrapolateToLine(const TVector3& point1,
87  const TVector3& point2,
88  TVector3& poca,
89  TVector3& dirInPoca,
90  TVector3& poca_onwire);
91 
92 
93  TVector3 getPocaOnLine(const TVector3& p1,
94  const TVector3& p2,
95  bool back=false);
96 
97  virtual TVector3 getPos(const GFDetPlane&) ;
98  virtual TVector3 getMom(const GFDetPlane&) ;
99  virtual void getPosMom(const GFDetPlane&,TVector3& pos,TVector3& mom) ;
100  virtual void getPosMomCov(const GFDetPlane& pl,TVector3& pos,TVector3& mom,TMatrixT<double>& cov);
101  virtual double getCharge()const {return fState[0][0] > 0 ? 1.: -1.;}
102  int getPropDir() {return _backw;}
103  FairGeanePro* getPropagator() {return _geane;}
104  int getPDG() {return _pdg;};
105  double getSPU() {return _spu;}
106 
107  void setPropagator(FairGeanePro* g){_geane=g;}
108  void setPropDir(int d){_backw=d;}
110 
111  // (-1,0,1) -> (backward prop,decide myself,forward)
112 
113 private:
114 
115  void checkState(); // checks if state vector is inside numerical limits
116 
117  // Private Data Members ------------
118  FairGeanePro* _geane;
119  int _pdg; // pdg code of the particle to be tracked
120  int _backw; // (-1,0,1) -> (backward prop,decide myself,forward)
121  double _spu; // sign of z-component of momentum
122 
123  // Private Methods -----------------
124 
125  // calculate jacobian of extrapolation
126  //void Jacobian(const GFDetPlane& pl,
127  // const TMatrixT<double>& statePred,
128  // TMatrixT<double>& jacResult);
129 
130  public:
131  ClassDef(GeaneTrackRep,1)
132 
133 };
134 
135 
136 #endif
137 
138 //--------------------------------------------------------------
139 // $Log$
140 //--------------------------------------------------------------
141 
TVector3 getMom()
TVector3 pos
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov)
method which gets position, momentum and 6x6 covariance matrix
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
Base Class for genfit track representations. Defines interface for track parameterizations.
Definition: GFAbsTrackRep.h:80
TObjArray * d
void setPropagator(FairGeanePro *g)
static const double me
Definition: mzparameters.h:12
Detector plane genfit geometry class.
Definition: GFDetPlane.h:59
FairGeanePro * _geane
FairGeanePro * getPropagator()
TLorentzVector s
Definition: Pnd2DStar.C:50
virtual GFAbsTrackRep * clone() const
Definition: GeaneTrackRep.h:60
friend std::ostream & operator<<(std::ostream &s, const GeaneTrackRep &me)
TFile * g
void extrapolateToLine(const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &dirInPoca, TVector3 &poca_onwire)
This method extrapolates to the point of closest approach to a line.
Double_t mom
Definition: plot_dirc.C:14
virtual ~GeaneTrackRep()
void extrapolateToPoint(const TVector3 &pos, TVector3 &poca, TVector3 &dirInPoca)
This method is to extrapolate the track to point of closest approach to a point in space...
virtual void getPosMom(const GFDetPlane &, TVector3 &pos, TVector3 &mom)
virtual double getCharge() const
void setPropDir(int d)
TVector3 getPos()
void switchDirection()
TPad * p2
Definition: hist-t7.C:117
TPad * p1
Definition: hist-t7.C:116
double getSPU()
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
virtual GFAbsTrackRep * prototype() const
Definition: GeaneTrackRep.h:61
TVector3 getPocaOnLine(const TVector3 &p1, const TVector3 &p2, bool back=false)