EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeaneTrackRep.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GeaneTrackRep.h
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();
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 
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
64  friend std::ostream& operator<< (std::ostream& s, const GeaneTrackRep& me);
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;}
104  int getPDG() {return _pdg;};
105  double getSPU() {return _spu;}
106 
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  public:
120  private:
121  double _spu; // sign of z-component of momentum
122  int _pdg; // pdg code of the particle to be tracked
123  int _backw; // (-1,0,1) -> (backward prop,decide myself,forward)
124 
125  // Private Methods -----------------
126 
127  // calculate jacobian of extrapolation
128  //void Jacobian(const GFDetPlane& pl,
129  // const TMatrixT<double>& statePred,
130  // TMatrixT<double>& jacResult);
131 
132  public:
133  ClassDef(GeaneTrackRep,1)
134 
135 };
136 
137 
138 #endif
139 
140 //--------------------------------------------------------------
141 // $Log$
142 //--------------------------------------------------------------
143