FairRoot/PandaRoot
tracking/GenfitTools/trackrep/RKTrackRep/RKTrackRep.h
Go to the documentation of this file.
1 /* Copyright 2008-2009, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /*
21  */
22 
28 #ifndef RKTRACKREP_H
29 #define RKTRACKREP_H
30 
31 
32 #include "GFAbsTrackRep.h"
33 #include "GFDetPlane.h"
34 #include "GFTrackCand.h"
35 #include <TMatrixT.h>
36 
49 class RKTrackRep : public GFAbsTrackRep {
50 
51  public:
52 
53  // Constructors/Destructors ---------
54  RKTrackRep();
55  RKTrackRep(const TVector3& pos,
56  const TVector3& mom,
57  const TVector3& poserr,
58  const TVector3& momerr,
59  const int& PDGCode);
60 
61  RKTrackRep(const GFTrackCand* aGFTrackCandPtr);
62 
63  RKTrackRep(const TVector3& pos,
64  const TVector3& mom,
65  const int& PDGCode);
66 
67  RKTrackRep(const GFDetPlane& pl,
68  const TVector3& mom,
69  const int& PDGCode);
70 
71  virtual ~RKTrackRep();
72 
73 
74  virtual GFAbsTrackRep* clone() const {return new RKTrackRep(*this);}
75  virtual GFAbsTrackRep* prototype()const{return new RKTrackRep();}
76 
78 
100  double extrapolate(const GFDetPlane&,
101  TMatrixT<double>& statePred,
102  TMatrixT<double>& covPred);
103 
105  double extrapolate(const GFDetPlane&,
106  TMatrixT<double>& statePred);
107 
109  void extrapolateToPoint(const TVector3& pos,
110  TVector3& poca,
111  TVector3& dirInPoca);
112 
114  void extrapolateToLine(const TVector3& point1,
115  const TVector3& point2,
116  TVector3& poca,
117  TVector3& dirInPoca,
118  TVector3& poca_onwire);
119 
121 
124  double stepalong(double h,
125  TVector3& point,
126  TVector3& dir);
127 
129 
132  TVector3 getPos(const GFDetPlane&);
134 
137  TVector3 getMom(const GFDetPlane&);
139 
142  void getPosMom(const GFDetPlane&,TVector3& pos,TVector3& mom);
144  double getCharge()const {return fCharge;}
145 
146  int getPDG() {return fPdg;};
147 
151  void setPDG(int);
152 
154 
158  void setData(const TMatrixT<double>& st, const GFDetPlane& pl, const TMatrixT<double>* cov=NULL, const TMatrixT<double>* aux=NULL);
159 
160  const TMatrixT<double>* getAuxInfo(const GFDetPlane& pl);
161 
162  bool hasAuxInfo() { return true; }
163 
164  void getPosMomCov(const GFDetPlane& pl, TVector3& pos, TVector3& mom, TMatrixT<double>& cov); //to be implemented soon
165 
166  private:
167 
168  RKTrackRep& operator=(const RKTrackRep* ){return *this;}; // rhs // [R.K.03/2017] unused variable(s)
169 
171 
181  bool RKutta (const GFDetPlane& plane,double* P, double& coveredDistance, std::vector<TVector3>& points, std::vector<double>& pointLengths, const double& maxLen=-1, bool calcCov=true) const;
182 
183  TVector3 poca2Line(const TVector3& extr1,const TVector3& extr2,const TVector3& point) const;
184 
186 
193  double Extrap(const GFDetPlane& plane, TMatrixT<double>* state, TMatrixT<double>* cov=NULL) const;
194 
195  //RKTrackRep(const RKTrackRep& rhs){};
196 
197  // data members
198 
200 
202  int fPdg;
204  double fMass;
206  double fCharge;
207 
209  double fCacheSpu;
210  double fSpu;
211  TMatrixT<double> fAuxInfo;
212 
213  public:
214  ClassDef(RKTrackRep,4)
215 
216 };
217 
218 #endif
219 
TVector3 getMom()
TVector3 pos
Base Class for genfit track representations. Defines interface for track parameterizations.
Definition: GFAbsTrackRep.h:80
void setData(const TMatrixT< double > &st, const GFDetPlane &pl, const TMatrixT< double > *cov=NULL, const TMatrixT< double > *aux=NULL)
Sets state, plane and (optionally) covariance.
Definition: RKTrackRep.cxx:43
double Extrap(const GFDetPlane &plane, TMatrixT< double > *state, TMatrixT< double > *cov=NULL) const
Handles propagation and material effects.
Definition: RKTrackRep.cxx:991
Detector plane genfit geometry class.
Definition: GFDetPlane.h:59
void getPosMom(const GFDetPlane &, TVector3 &pos, TVector3 &mom)
Gets position and momentum in the plane.
Definition: RKTrackRep.cxx:312
RKTrackRep & operator=(const RKTrackRep *)
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.
Definition: RKTrackRep.cxx:390
Double_t mom
Definition: plot_dirc.C:14
bool RKutta(const GFDetPlane &plane, double *P, double &coveredDistance, std::vector< TVector3 > &points, std::vector< double > &pointLengths, const double &maxLen=-1, bool calcCov=true) const
Propagates the particle through the magnetic field.
Definition: RKTrackRep.cxx:640
double getCharge() const
Returns charge.
virtual GFAbsTrackRep * prototype() const
virtual ~RKTrackRep()
Definition: RKTrackRep.cxx:69
Track Representation module based on a Runge-Kutta algorithm including a full material model...
bool hasAuxInfo()
See if the track representation has auxillary information stored.
void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov)
method which gets position, momentum and 6x6 covariance matrix
virtual GFAbsTrackRep * clone() const
Track candidate – a list of cluster indices.
Definition: GFTrackCand.h:55
TVector3 getPos()
double stepalong(double h, TVector3 &point, TVector3 &dir)
make step of h cm along the track, returns the tracklength spanned in this extrapolation ...
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...
Definition: RKTrackRep.cxx:329
TVector3 poca2Line(const TVector3 &extr1, const TVector3 &extr2, const TVector3 &point) const
Definition: RKTrackRep.cxx:376
GeV c P
void setPDG(int)
Set PDG particle code.
Definition: RKTrackRep.cxx:274
double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred, TMatrixT< double > &covPred)
returns the tracklength spanned in this extrapolation
Definition: RKTrackRep.cxx:442
const TMatrixT< double > * getAuxInfo(const GFDetPlane &pl)
Get auxillary information from the track representation.
Definition: RKTrackRep.cxx:57
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72