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

#include <GeaneTrackRep.h>

Inheritance diagram for GeaneTrackRep:
GFAbsTrackRep

Public Member Functions

 GeaneTrackRep ()
 
 GeaneTrackRep (FairGeanePro *geane, const GFDetPlane &plane, const TVector3 &mom, const TVector3 &poserr, const TVector3 &momerr, double q, int PDGCode)
 
 GeaneTrackRep (FairGeanePro *geane, const GFDetPlane &plane, const TVector3 &mom, const TVector3 &poserr, const TVector3 &momerr, int q, int PDGCode)
 
virtual ~GeaneTrackRep ()
 
virtual GFAbsTrackRepclone () const
 
virtual GFAbsTrackRepprototype () const
 
virtual double extrapolate (const GFDetPlane &, TMatrixT< double > &statePred)
 returns the tracklength spanned in this extrapolation More...
 
virtual double extrapolate (const GFDetPlane &, TMatrixT< double > &statePred, TMatrixT< double > &covPred)
 Extrapolates the track to the given detectorplane. More...
 
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. More...
 
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. More...
 
TVector3 getPocaOnLine (const TVector3 &p1, const TVector3 &p2, bool back=false)
 
virtual TVector3 getPos (const GFDetPlane &)
 
virtual TVector3 getMom (const GFDetPlane &)
 
virtual void getPosMom (const GFDetPlane &, TVector3 &pos, TVector3 &mom)
 
virtual void getPosMomCov (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov)
 method which gets position, momentum and 6x6 covariance matrix More...
 
virtual double getCharge () const
 
int getPropDir ()
 
FairGeanePro * getPropagator ()
 
int getPDG ()
 
double getSPU ()
 
void setPropagator (FairGeanePro *g)
 
void setPropDir (int d)
 
void switchDirection ()
 
double extrapolate (const GFDetPlane &plane)
 This changes the state and cov and plane of the rep. More...
 
virtual double stepalong (double h, TVector3 &point, TVector3 &dir)
 make step of h cm along the track More...
 
unsigned int getDim () const
 returns dimension of state vector More...
 
virtual void Print () const
 
TMatrixT< double > getState () const
 
TMatrixT< double > getCov () const
 
double getStateElem (int i) const
 
double getCovElem (int i, int j) const
 
TVector3 getPos ()
 
TVector3 getMom ()
 
void getPosMomCov (TVector3 &pos, TVector3 &mom, TMatrixT< double > &c)
 
TMatrixT< double > getFirstState () const
 
TMatrixT< double > getFirstCov () const
 
GFDetPlane getFirstPlane () const
 
TMatrixT< double > getLastState () const
 
TMatrixT< double > getLastCov () const
 
GFDetPlane getLastPlane () const
 
double getChiSqu () const
 
double getRedChiSqu () const
 returns chi2/ndf More...
 
unsigned int getNDF () const
 
virtual void setData (const TMatrixT< double > &st, const GFDetPlane &pl, const TMatrixT< double > *cov=NULL, const TMatrixT< double > *aux=NULL)
 Puts the track representation in a given state. More...
 
void setCov (const TMatrixT< double > &aCov)
 
void setFirstState (const TMatrixT< double > &aState)
 
void setFirstCov (const TMatrixT< double > &aCov)
 
void setFirstPlane (const GFDetPlane &aPlane)
 
void setLastState (const TMatrixT< double > &aState)
 
void setLastCov (const TMatrixT< double > &aCov)
 
void setLastPlane (const GFDetPlane &aPlane)
 
const GFDetPlanegetReferencePlane () const
 
void setChiSqu (double aChiSqu)
 
void setNDF (unsigned int n)
 
void addChiSqu (double aChiSqu)
 
void addNDF (unsigned int n)
 
void setStatusFlag (int _val)
 
bool setInverted (bool f=true)
 Deprecated. Should be removed soon. More...
 
bool getStatusFlag ()
 
virtual void reset ()
 
virtual bool hasAuxInfo ()
 See if the track representation has auxillary information stored. More...
 
virtual const TMatrixT< double > * getAuxInfo (const GFDetPlane &)
 Get auxillary information from the track representation. More...
 

Protected Attributes

unsigned int fDimension
 Dimensionality of track representation. More...
 
TMatrixT< double > fState
 The vector of track parameters. More...
 
TMatrixT< double > fCov
 The covariance matrix. More...
 
double fChiSqu
 chiSqu of the track fit More...
 
unsigned int fNdf
 
int fStatusFlag
 status of track representation: 0 means everything's OK More...
 
bool fInverted
 specifies the direction of flight of the particle More...
 
TMatrixT< double > fFirstState
 state, cov and plane for first and last point in fit More...
 
TMatrixT< double > fFirstCov
 
TMatrixT< double > fLastState
 
TMatrixT< double > fLastCov
 
GFDetPlane fFirstPlane
 
GFDetPlane fLastPlane
 
GFDetPlane fRefPlane
 

Private Member Functions

void checkState ()
 

Private Attributes

FairGeanePro * _geane
 
int _pdg
 
int _backw
 
double _spu
 

Friends

std::ostreamoperator<< (std::ostream &s, const GeaneTrackRep &me)
 

Detailed Description

Definition at line 36 of file GeaneTrackRep.h.

Constructor & Destructor Documentation

GeaneTrackRep::GeaneTrackRep ( )

Definition at line 39 of file GeaneTrackRep.cxx.

Referenced by clone(), and prototype().

40  : GFAbsTrackRep(5), _pdg(211),_backw(0), _spu(1)
41 {
42 
43 }
GeaneTrackRep::GeaneTrackRep ( FairGeanePro *  geane,
const GFDetPlane plane,
const TVector3 &  mom,
const TVector3 &  poserr,
const TVector3 &  momerr,
double  q,
int  PDGCode 
)

Definition at line 45 of file GeaneTrackRep.cxx.

References _spu, count, GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getO(), GFDetPlane::getU(), GFDetPlane::getV(), i, mom, and par.

52  : GFAbsTrackRep(5), _geane(geane), _pdg(PDGCode), _backw(0), _spu(1)
53 {
54  FairTrackParP par(plane.getO(),mom,poserr,momerr,(int)TMath::Sign(1.0, q),plane.getO(),plane.getU(),plane.getV());
55 
56  _spu=par.GetSPU(); // direction of the momentum
57 
58  fState[0][0]=par.GetQp();
59  fState[1][0]=par.GetTV();
60  fState[2][0]=par.GetTW();
61  fState[3][0]=par.GetV();
62  fState[4][0]=par.GetW();
63 
64  // blow up cov-array: ROOT does not support init with symmetric data
65  // See ROOT docu source-file for TMatrixTSym
66  // i=row, j=collumn
67  double* covarray=par.GetCov();
68  int count=0;
69  for(int i=0;i<5;++i){
70  for(int j=i;j<5;++j){
71  fCov[i][j]=covarray[count];
72  if(i!=j)fCov[j][i]=covarray[count];
73  ++count;
74  }
75  }
76  fRefPlane=plane;
77 }
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
FairGeanePro * _geane
Double_t par[3]
Double_t mom
Definition: plot_dirc.C:14
GFDetPlane fRefPlane
TVector3 getU() const
Definition: GFDetPlane.h:76
int count
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
GeaneTrackRep::GeaneTrackRep ( FairGeanePro *  geane,
const GFDetPlane plane,
const TVector3 &  mom,
const TVector3 &  poserr,
const TVector3 &  momerr,
int  q,
int  PDGCode 
)

Definition at line 79 of file GeaneTrackRep.cxx.

References _spu, count, GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getO(), GFDetPlane::getU(), GFDetPlane::getV(), i, mom, and par.

86  : GFAbsTrackRep(5), _geane(geane), _pdg(PDGCode), _backw(0), _spu(1)
87 {
88  FairTrackParP par(plane.getO(),mom,poserr,momerr,q,plane.getO(),plane.getU(),plane.getV());
89 
90  _spu=par.GetSPU(); // direction of the momentum
91 
92  fState[0][0]=par.GetQp();
93  fState[1][0]=par.GetTV();
94  fState[2][0]=par.GetTW();
95  fState[3][0]=par.GetV();
96  fState[4][0]=par.GetW();
97 
98  // blow up cov-array: ROOT does not support init with symmetric data
99  // See ROOT docu source-file for TMatrixTSym
100  // i=row, j=collumn
101  double* covarray=par.GetCov();
102  int count=0;
103  for(int i=0;i<5;++i){
104  for(int j=i;j<5;++j){
105  fCov[i][j]=covarray[count];
106  if(i!=j)fCov[j][i]=covarray[count];
107  ++count;
108  }
109  }
110  fRefPlane=plane;
111 }
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
FairGeanePro * _geane
Double_t par[3]
Double_t mom
Definition: plot_dirc.C:14
GFDetPlane fRefPlane
TVector3 getU() const
Definition: GFDetPlane.h:76
int count
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
GeaneTrackRep::~GeaneTrackRep ( )
virtual

Definition at line 120 of file GeaneTrackRep.cxx.

121 {
122 
123 }

Member Function Documentation

void GFAbsTrackRep::addChiSqu ( double  aChiSqu)
inlineinherited

Definition at line 303 of file GFAbsTrackRep.h.

Referenced by GFKalman::processHit().

303  {
304  fChiSqu += aChiSqu;
305  }
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:94
void GFAbsTrackRep::addNDF ( unsigned int  n)
inlineinherited

Definition at line 306 of file GFAbsTrackRep.h.

References n.

Referenced by GFKalman::processHit().

306  {
307  fNdf += n;
308  }
int n
unsigned int fNdf
Definition: GFAbsTrackRep.h:95
void GeaneTrackRep::checkState ( )
private

Definition at line 526 of file GeaneTrackRep.cxx.

References fabs(), and GFAbsTrackRep::fState.

Referenced by extrapolate(), extrapolateToPoint(), and getPocaOnLine().

526  {
527  if(fabs(fState[3][0])<1.E-4)fState[3][0]=1.E-4;
528  if(fabs(fState[4][0])<1.E-4)fState[4][0]=1.E-4;
529 
530  //if (!(fState.Abs()>1.E-15) || !(fState.Abs()<1.E50)){
531  // GFException exc("fState out of numerical bounds",__LINE__,__FILE__);
532  // exc.setFatal();
533  // throw exc;
534  //}
535 }
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
virtual GFAbsTrackRep* GeaneTrackRep::clone ( ) const
inlinevirtual

Implements GFAbsTrackRep.

Definition at line 60 of file GeaneTrackRep.h.

References GeaneTrackRep().

60 {return new GeaneTrackRep(*this);}
double GeaneTrackRep::extrapolate ( const GFDetPlane plane,
TMatrixT< double > &  statePred 
)
virtual

returns the tracklength spanned in this extrapolation

There is a default implementation in GFAbsTrackRep.cxx which just drops the predicted covaraiance. If your trackrep has a way to extrapolate without giving a correct cov (that would be faster probably), please overwrite it.

TODO: make this faster by neglecting covariances ?

Reimplemented from GFAbsTrackRep.

Definition at line 129 of file GeaneTrackRep.cxx.

Referenced by getMom(), getPos(), getPosMom(), and getPosMomCov().

131 {
132  TMatrixT<double> covPred(5,5);
133  return extrapolate(pl,statePred,covPred);
135 }
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
double GeaneTrackRep::extrapolate ( const GFDetPlane plane,
TMatrixT< double > &  statePred,
TMatrixT< double > &  covPred 
)
virtual

Extrapolates the track to the given detectorplane.

Results are put into statePred and covPred This method does NOT alter the state of the object!

Implements GFAbsTrackRep.

Definition at line 139 of file GeaneTrackRep.cxx.

References _backw, _geane, _pdg, _spu, Bool_t, checkState(), count, GFDetPlane::dist(), fabs(), GFAbsTrackRep::fCov, GFAbsTrackRep::fDimension, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFAbsTrackRep::getMom(), GFDetPlane::getO(), GFDetPlane::getU(), GFDetPlane::getV(), i, par, Pi, pos, GFException::setFatal(), THETACUT, and v.

142 {
143  if(fabs(getMom(fRefPlane).Theta()/TMath::Pi()*180.) < THETACUT){
144  GFException exc("GEANE propagation not possible for p.theta<THETACUT",__LINE__,__FILE__);
145  exc.setFatal();
146  throw exc;
147  }
148  statePred.ResizeTo(fDimension,1);
149  covPred.ResizeTo(fDimension,fDimension);
150  TVector3 o=pl.getO();
151  TVector3 u=pl.getU();
152  TVector3 v=pl.getV();
153 
154  TVector3 ofrom=fRefPlane.getO();
155  TVector3 ufrom=fRefPlane.getU();
156  TVector3 vfrom=fRefPlane.getV();
157 
158  _geane->PropagateFromPlane(ufrom,vfrom);
159  _geane->PropagateToPlane(o,u,v);
160 
161  FairTrackParP result;
162  FairTrackParH result2;
163 
164  //std::cout<<"Before prop:"<<std::endl;
165  //Print();
166 
167 
168 
169  double cova[15];
170  int count=0;;
171  for(int i=0; i<5;++i){
172  for(int j=i;j<5;++j){
173  cova[count++]=fCov[i][j];
174  }
175  }
176  //protect against low momentum:
177  if(fabs(fState[0][0])>200){
178  GFException exc("GeaneTrackRep: PROTECT AGAINST LOW MOMENTA",__LINE__,__FILE__);
179  exc.setFatal();
180  throw exc;
181  }
182 
183  checkState();
184 
185 
186  FairTrackParP par(fState[3][0],fState[4][0],fState[1][0],fState[2][0],fState[0][0],cova,ofrom,ufrom,vfrom,_spu);
187  bool backprop=_backw<0;
188  if(_backw==0){
189  //Try to guess if we are doing a forward or backward step:
190  TVector3 pos(par.GetX(),par.GetY(),par.GetZ());
191  TVector3 dir=pl.dist(pos); // direction from pos to plane;
192  //Assume B=(0,0,BZ) -> compare signs of dir.Z and mom.Z:
193  //backprop= (dir.Z()*par.GetPz())<0 ? true : false;
194  backprop= (dir*getMom(fRefPlane))<0;
195  }
196  if(backprop){
197  _geane->setBackProp();
198  //std::cout<<"GEANETRACKREP: USING BACKPROPAGATION!" << std::endl;
199  }
200 
201  Bool_t prop = kTRUE;
202  prop = _geane->Propagate(&par,&result,_pdg); //211
203  if (prop==kFALSE){
204  GFException exc("GEANE propagation failed",__LINE__,__FILE__);
205  //exc.setFatal();
206  throw exc;
207  }
208 
209 
210  double l=_geane->GetLengthAtPCA();
211 
212  statePred[0][0]=result.GetQp();
213  statePred[1][0]=result.GetTV();
214  statePred[2][0]=result.GetTW();
215  statePred[3][0]=result.GetV();
216  statePred[4][0]=result.GetW();
217 
218 
219 
220  double* rescov=result.GetCov();
221  count=0;
222  for(int i=0;i<5;++i){
223  for(int j=i;j<5;++j){
224  covPred[i][j]=rescov[count];
225  if(i!=j)covPred[j][i]=rescov[count];
226  ++count;
227  }
228  }
229 
230  // if(result.GetSPU()!=_spu)std::cout<<"SPU HAS CHANGED! "<<_spu<<" --> "<<result.GetSPU()<<std::endl;
231  _spu=result.GetSPU();
232 
233  //std::cout<<"AFTER EXTRAPOLATE:"<<std::endl;
234  //result.Print();
235  //pl.Print();
236  //statePred.Print();
237  //covPred.Print();
238 
239 
240 
241  return l;
242 }
TVector3 getMom()
TVector3 pos
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
FairGeanePro * _geane
Double_t par[3]
__m128 v
Definition: P4_F32vec4.h:4
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:85
GFDetPlane fRefPlane
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:45
TVector3 getU() const
Definition: GFDetPlane.h:76
#define THETACUT
int count
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
Double_t Pi
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
double GFAbsTrackRep::extrapolate ( const GFDetPlane plane)
inherited

This changes the state and cov and plane of the rep.

This method extrapolates to to the plane and sets the results of state, cov and also plane in itself.

Definition at line 33 of file GFAbsTrackRep.cxx.

References GFAbsTrackRep::extrapolate(), GFAbsTrackRep::fDimension, and GFAbsTrackRep::setData().

33  {
34  TMatrixT<double> statePred(fDimension,1);
35  TMatrixT<double> covPred(fDimension,fDimension);
36  double retVal = extrapolate(plane,statePred,covPred);
37  setData(statePred,plane,&covPred);
38  return retVal;
39 }
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:85
virtual double extrapolate(const GFDetPlane &plane, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
virtual void setData(const TMatrixT< double > &st, const GFDetPlane &pl, const TMatrixT< double > *cov=NULL, const TMatrixT< double > *aux=NULL)
Puts the track representation in a given state.
void GeaneTrackRep::extrapolateToLine ( const TVector3 &  point1,
const TVector3 &  point2,
TVector3 &  poca,
TVector3 &  normVec,
TVector3 &  poca_onwire 
)
virtual

This method extrapolates to the point of closest approach to a line.

This method extrapolates to the POCA to a line, i.e. a wire. There is a default implementation just like for the extrapolateToPoca for trackReps which do not need this feature, which will abort the execution if it is ever called.

Reimplemented from GFAbsTrackRep.

Definition at line 334 of file GeaneTrackRep.cxx.

References _geane, _pdg, _spu, Double_t, fabs(), GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFAbsTrackRep::getMom(), GFDetPlane::getO(), GFAbsTrackRep::getPos(), getPropDir(), GFDetPlane::getU(), GFDetPlane::getV(), i, par, Pi, point, GFException::setFatal(), and THETACUT.

339 {
340  if(fabs(getMom(fRefPlane).Theta()/TMath::Pi()*180.) < THETACUT){
341  GFException exc("GEANE propagation not possible for p.theta<THETACUT",__LINE__,__FILE__);
342  exc.setFatal();
343  throw exc;
344  }
345 
346  // call propagation to closest approach to a wire
347  Int_t pca = 2;
348 
349  // calculate a very large track length
350  TVector3 start = getPos(fRefPlane);
351  Double_t distance1, distance2;
352  distance1 = (point1 - start).Mag();
353  distance2 = (point2 - start).Mag();
354  Double_t maxdistance;
355  if(distance1 < distance2) maxdistance = distance2;
356  else maxdistance = distance1;
357  maxdistance *= 2.;
358 
359  // variables for FindPCA:
360  TVector3 point(0,0,0);
361  Double_t Rad = 0.;
362  // poca = vpf = point of closest approach on track
363  // poca_onwire = vwi = point of closest approach on wire
364  Double_t Di = 0.;
365  Float_t trklength = 0.;
366 
367  // covariance matrix
368  FairGeaneUtil util;
369  Double_t cov55[5][5];
370  for(int i = 0; i < 5; i++) for(int j = 0; j < 5; j++) cov55[i][j] = fCov[i][j];
371  Double_t cova[15];
372  util.FromMat25ToVec15(cov55, cova);
373 
374  TVector3 o = fRefPlane.getO();
375  TVector3 dj = fRefPlane.getU();
376  TVector3 dk = fRefPlane.getV();
377 
378  FairTrackParP par(fState[3][0],fState[4][0],fState[1][0],fState[2][0],fState[0][0],cova,o,dj,dk,_spu);
379 
380  // get propagation direction
381  Int_t direction = getPropDir();
382 
383  _geane->ActualFindPCA(pca, &par, direction);
384  Int_t findpca = _geane->FindPCA(pca, _pdg, point, point1, point2, maxdistance, Rad, poca, poca_onwire, Di, trklength);
385 
386  if(findpca != 0) {
387  GFException exc("findpca failure", __LINE__,__FILE__);
388  throw exc;
389  }
390 
391  // dir in poca not filled now
392  dirInPoca.SetXYZ(0., 0., 0.);
393 
394 }
TVector3 getMom()
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
FairGeanePro * _geane
Double_t par[3]
Double_t
TClonesArray * point
Definition: anaLmdDigi.C:29
GFDetPlane fRefPlane
TVector3 getPos()
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:45
TVector3 getU() const
Definition: GFDetPlane.h:76
#define THETACUT
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
Double_t Pi
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
void GeaneTrackRep::extrapolateToPoint ( const TVector3 &  point,
TVector3 &  poca,
TVector3 &  normVec 
)
virtual

This method is to extrapolate the track to point of closest approach to a point in space.

There is an empty implementation of this method in GFAbsTrackRep.cxx, which will just abort with an error message. One can overwrite this method if one wishes to implement a track representation, which should have this feature. An example of an experiment in which you would not need this feature would be track fitting (not so much vertexing) in an experiment with only planar trackers like silicons or planar wire chambers and such. An example where you would need it, would be a TPC where you have to fit the track to space points, or other drift chambers with complicated hit topology.

Reimplemented from GFAbsTrackRep.

Definition at line 247 of file GeaneTrackRep.cxx.

References _backw, _geane, _pdg, _spu, Bool_t, checkState(), count, GFDetPlane::dist(), fabs(), GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFAbsTrackRep::getDim(), GFAbsTrackRep::getMom(), GFDetPlane::getO(), GFDetPlane::getU(), GFDetPlane::getV(), i, par, Pi, GFException::setFatal(), and THETACUT.

249  {
250  if(fabs(getMom(fRefPlane).Theta()/TMath::Pi()*180.) < THETACUT){
251  GFException exc("GEANE propagation not possible for p.theta<THETACUT",__LINE__,__FILE__);
252  exc.setFatal();
253  throw exc;
254  }
255  int dim = getDim();
256  TMatrixT<double> statePred(dim,1);
257  TMatrixT<double> covPred(dim,dim);
258  //std::cout<<"GeaneTrackRep::extrapolateToPoint"<<std::endl;
259  //fRefPlane.Print();
260 
261  TVector3 ofrom=fRefPlane.getO();
262  TVector3 ufrom=fRefPlane.getU();
263  TVector3 vfrom=fRefPlane.getV();
264 
265  _geane->SetPoint(pos);
266  _geane->PropagateFromPlane(ufrom,vfrom);
267 
268  double cova[15];
269  int count=0;;
270  for(int i=0; i<5;++i){
271  for(int j=i;j<5;++j){
272  cova[count++]=fCov[i][j];
273  }
274  }
275  //protect against low momentum:
276  if(fabs(fState[0][0])>200){
277  GFException exc("GeaneTrackRep: PROTECT AGAINST LOW MOMENTA",__LINE__,__FILE__);
278  exc.setFatal();
279  throw exc;
280  }
281 
282  checkState();
283 
284  FairTrackParP par(fState[3][0],fState[4][0],fState[1][0],fState[2][0],fState[0][0],cova,ofrom,ufrom,vfrom,_spu);
285  //par.Print();
286  bool backprop=_backw<0;
287  if(_backw==0){
288  // check if new point is after or before my position
289  TVector3 dir=fRefPlane.dist(pos); // direction from pos to plane;
290  backprop= (dir*getMom(fRefPlane))>0;
291  }
292  if(!backprop){ // point lies in same direction of flight as momentum
293  //std::cout<<" Propagate in flight direction"<<std::endl;
294  _geane->PropagateToVirtualPlaneAtPCA(1);
295  }
296  else{
297  //std::cout<<" backPropagate"<<std::endl;
298  _geane->BackTrackToVirtualPlaneAtPCA(1);
299  }
300 
301  FairTrackParP result;
302  Bool_t prop = kTRUE;
303  prop = _geane->Propagate(&par,&result,_pdg); //211
304  if (prop==kFALSE) {
305  GFException exc("GEANE propagation failed",__LINE__,__FILE__);
306  //exc.setFatal();
307  throw exc;
308  //pl=fRefPlane;
309  //return pos;
310  }
311 
312  statePred[0][0]=result.GetQp();
313  statePred[1][0]=result.GetTV();
314  statePred[2][0]=result.GetTW();
315  statePred[3][0]=result.GetV();
316  statePred[4][0]=result.GetW();
317 
318  double* rescov=result.GetCov();
319  count=0;
320  for(int i=0;i<5;++i){
321  for(int j=i;j<5;++j){
322  covPred[i][j]=rescov[count];
323  if(i!=j)covPred[j][i]=rescov[count];
324  ++count;
325  }
326  }
327 
328  poca.SetXYZ(result.GetX(),result.GetY(),result.GetZ());
329  dirInPoca = result.GetJVer().Cross( result.GetKVer() );
330 }
TVector3 getMom()
TVector3 pos
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
FairGeanePro * _geane
Double_t par[3]
unsigned int getDim() const
returns dimension of state vector
GFDetPlane fRefPlane
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:45
TVector3 getU() const
Definition: GFDetPlane.h:76
#define THETACUT
int count
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
Double_t Pi
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
TVector3 dist(const TVector3 &point) const
Definition: GFDetPlane.cxx:207
virtual const TMatrixT<double>* GFAbsTrackRep::getAuxInfo ( const GFDetPlane )
inlinevirtualinherited

Get auxillary information from the track representation.

AuxInfo is a mechanism which allows creators of track repersentations to hand out any information they like (as long as it is compatible with a TMatrixT<double>). It should be used if setData requires additional information to update the representation, but it can also be used for debugging information if needed. See also the documentation of GFAbsTrackRep::setData().

Reimplemented in RKTrackRep.

Definition at line 342 of file GFAbsTrackRep.h.

Referenced by GFKalman::processHit().

342  { //(const GFDetPlane& pl)
343  return NULL;
344  }
virtual double GeaneTrackRep::getCharge ( ) const
inlinevirtual

Implements GFAbsTrackRep.

Definition at line 101 of file GeaneTrackRep.h.

References GFAbsTrackRep::fState.

Referenced by PndHypMicroWriter::Exec().

101 {return fState[0][0] > 0 ? 1.: -1.;}
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
double GFAbsTrackRep::getChiSqu ( ) const
inlineinherited

Definition at line 244 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fChiSqu.

Referenced by GFTrack::getChiSqu(), and GFAbsTrackRep::getRedChiSqu().

244  {
245  return fChiSqu;
246  }
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:94
TMatrixT<double> GFAbsTrackRep::getCov ( ) const
inlineinherited

Definition at line 198 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fCov.

Referenced by GFTrack::blowUpCovs(), GFKalman::processHit(), and GFKalman::processTrack().

198  {
199  return fCov;
200  }
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
double GFAbsTrackRep::getCovElem ( int  i,
int  j 
) const
inlineinherited

Definition at line 203 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fCov.

203 {return fCov(i,j);}
Int_t i
Definition: run_full.C:25
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
unsigned int GFAbsTrackRep::getDim ( ) const
inlineinherited

returns dimension of state vector

Definition at line 191 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fDimension.

Referenced by extrapolateToPoint(), GFKalman::getChi2Hit(), GFAbsTrackRep::getNDF(), GFTrack::getResiduals(), and GFKalman::processHit().

191 {return fDimension;}
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:85
TMatrixT<double> GFAbsTrackRep::getFirstCov ( ) const
inlineinherited

Definition at line 229 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fFirstCov.

Referenced by GenfitTrack2PndTrack().

229  {
230  return fFirstCov;
231  }
TMatrixT< double > fFirstCov
GFDetPlane GFAbsTrackRep::getFirstPlane ( ) const
inlineinherited

Definition at line 232 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fFirstPlane.

Referenced by GenfitTrack2PndTrack().

232  {
233  return fFirstPlane;
234  }
GFDetPlane fFirstPlane
TMatrixT<double> GFAbsTrackRep::getFirstState ( ) const
inlineinherited

Definition at line 226 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fFirstState.

Referenced by GenfitTrack2PndTrack().

226  {
227  return fFirstState;
228  }
TMatrixT< double > fFirstState
state, cov and plane for first and last point in fit
TMatrixT<double> GFAbsTrackRep::getLastCov ( ) const
inlineinherited

Definition at line 238 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fLastCov.

Referenced by GenfitTrack2PndTrack().

238  {
239  return fLastCov;
240  }
TMatrixT< double > fLastCov
GFDetPlane GFAbsTrackRep::getLastPlane ( ) const
inlineinherited

Definition at line 241 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fLastPlane.

Referenced by GenfitTrack2PndTrack().

241  {
242  return fLastPlane;
243  }
GFDetPlane fLastPlane
TMatrixT<double> GFAbsTrackRep::getLastState ( ) const
inlineinherited

Definition at line 235 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fLastState.

Referenced by GenfitTrack2PndTrack().

235  {
236  return fLastState;
237  }
TMatrixT< double > fLastState
TVector3 GeaneTrackRep::getMom ( const GFDetPlane pl)
virtual

Implements GFAbsTrackRep.

Definition at line 467 of file GeaneTrackRep.cxx.

References _spu, extrapolate(), fabs(), GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getNormal(), GFDetPlane::getU(), GFDetPlane::getV(), and mom.

468 {
469  TMatrixT<double> statePred(fState);
470  if(pl!=fRefPlane)extrapolate(pl,statePred);
471  double fSPU = _spu;
472  TVector3 mom = fSPU*pl.getNormal()+fSPU*statePred[1][0]*pl.getU()+fSPU*statePred[2][0]*pl.getV();
473  mom.SetMag(1./fabs(statePred[0][0]));
474  return mom;
475 }
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
TVector3 getV() const
Definition: GFDetPlane.h:77
Double_t mom
Definition: plot_dirc.C:14
GFDetPlane fRefPlane
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 getU() const
Definition: GFDetPlane.h:76
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getNormal() const
Definition: GFDetPlane.cxx:138
TVector3 GFAbsTrackRep::getMom ( )
inlineinherited

Definition at line 221 of file GFAbsTrackRep.h.

References GFAbsTrackRep::getMom().

Referenced by extrapolate(), extrapolateToLine(), extrapolateToPoint(), and GFAbsTrackRep::getMom().

221 {return getMom(fRefPlane);}
TVector3 getMom()
GFDetPlane fRefPlane
unsigned int GFAbsTrackRep::getNDF ( ) const
inlineinherited

Definition at line 252 of file GFAbsTrackRep.h.

References GFAbsTrackRep::getDim().

Referenced by GFTrack::getNDF(), and GFAbsTrackRep::getRedChiSqu().

252  {
253  if(fNdf>getDim()) return fNdf-getDim();
254  return 0;
255  }
unsigned int fNdf
Definition: GFAbsTrackRep.h:95
unsigned int getDim() const
returns dimension of state vector
int GeaneTrackRep::getPDG ( )
inline

Definition at line 104 of file GeaneTrackRep.h.

References _pdg.

104 {return _pdg;};
TVector3 GeaneTrackRep::getPocaOnLine ( const TVector3 &  p1,
const TVector3 &  p2,
bool  back = false 
)

Definition at line 402 of file GeaneTrackRep.cxx.

References _geane, _pdg, _spu, Bool_t, checkState(), count, fabs(), GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getO(), GFDetPlane::getU(), GFDetPlane::getV(), i, par, and GFException::setFatal().

402  {
403 
404  //std::cout<<"GeaneTrackRep::getPocaToWire"<<std::endl;
405 
406  TVector3 ofrom=fRefPlane.getO();
407  TVector3 ufrom=fRefPlane.getU();
408  TVector3 vfrom=fRefPlane.getV();
409 
410  _geane->SetWire(p1,p2);
411  _geane->PropagateFromPlane(ufrom,vfrom);
412  double cova[15];
413  int count=0;;
414  for(int i=0; i<5;++i){
415  for(int j=i;j<5;++j){
416  cova[count++]=fCov[i][j];
417  }
418  }
419  // protect against low momentum:
420  if(fabs(fState[0][0])>200){
421  GFException exc("GeaneTrackRep: PROTECT AGAINST LOW MOMENTA",__LINE__,__FILE__);
422  exc.setFatal();
423  throw exc;
424  }
425 
426  checkState();
427 
428  FairTrackParP par(fState[3][0],fState[4][0],fState[1][0],fState[2][0],fState[0][0],cova,ofrom,ufrom,vfrom,_spu);
429 
430 
431  if(!back){ // point lies in same direction of flight as momentum
432  //std::cout<<" Propagate in flight direction"<<std::endl;
433  _geane->PropagateToVirtualPlaneAtPCA(2); // option 2 means wire!
434  }
435  else{
436  //std::cout<<" backPropagate"<<std::endl;
437  _geane->BackTrackToVirtualPlaneAtPCA(2);
438  }
439 
440  FairTrackParP result;
441  Bool_t prop = kTRUE;
442 
443  prop = _geane->Propagate(&par,&result,_pdg);
444  if (prop==kFALSE) {
445  GFException exc("GEANE propagation failed",__LINE__,__FILE__);
446  //exc.setFatal();
447  throw exc;
448  }
449 
450  return _geane->GetPCAOnWire();
451 }
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
FairGeanePro * _geane
Double_t par[3]
GFDetPlane fRefPlane
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TPad * p2
Definition: hist-t7.C:117
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:45
TVector3 getU() const
Definition: GFDetPlane.h:76
TPad * p1
Definition: hist-t7.C:116
int count
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
TVector3 GeaneTrackRep::getPos ( const GFDetPlane pl)
virtual

Implements GFAbsTrackRep.

Definition at line 459 of file GeaneTrackRep.cxx.

References extrapolate(), GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getO(), GFDetPlane::getU(), and GFDetPlane::getV().

460 {
461  TMatrixT<double> statePred(fState);
462  if(pl!=fRefPlane)extrapolate(pl,statePred);
463  return pl.getO()+(statePred[3][0]*pl.getU())+(statePred[4][0]*pl.getV());
464 }
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
TVector3 getV() const
Definition: GFDetPlane.h:77
GFDetPlane fRefPlane
TVector3 getU() const
Definition: GFDetPlane.h:76
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getO() const
Definition: GFDetPlane.h:75
TVector3 GFAbsTrackRep::getPos ( )
inlineinherited

Definition at line 220 of file GFAbsTrackRep.h.

References GFAbsTrackRep::getPos().

Referenced by extrapolateToLine(), and GFAbsTrackRep::getPos().

220 {return getPos(fRefPlane);}
GFDetPlane fRefPlane
TVector3 getPos()
void GeaneTrackRep::getPosMom ( const GFDetPlane pl,
TVector3 &  pos,
TVector3 &  mom 
)
virtual

Implements GFAbsTrackRep.

Definition at line 477 of file GeaneTrackRep.cxx.

References extrapolate(), fabs(), GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getNormal(), GFDetPlane::getO(), GFDetPlane::getU(), and GFDetPlane::getV().

478 {
479  TMatrixT<double> statePred(fState);
480  if(pl!=fRefPlane)extrapolate(pl,statePred);
481  mom = pl.getNormal()+statePred[1][0]*pl.getU()+statePred[2][0]*pl.getV();
482 
483  mom.SetMag(1./fabs(statePred[0][0]));
484  pos = pl.getO()+(statePred[3][0]*pl.getU())+(statePred[4][0]*pl.getV());
485 }
TVector3 pos
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
TVector3 getV() const
Definition: GFDetPlane.h:77
Double_t mom
Definition: plot_dirc.C:14
GFDetPlane fRefPlane
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 getU() const
Definition: GFDetPlane.h:76
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getNormal() const
Definition: GFDetPlane.cxx:138
TVector3 getO() const
Definition: GFDetPlane.h:75
void GeaneTrackRep::getPosMomCov ( const GFDetPlane pl,
TVector3 &  pos,
TVector3 &  mom,
TMatrixT< double > &  cov 
)
virtual

method which gets position, momentum and 6x6 covariance matrix

default implementation in cxx file, if a ConcreteTrackRep can not implement this functionality

Reimplemented from GFAbsTrackRep.

Definition at line 489 of file GeaneTrackRep.cxx.

References _spu, extrapolate(), fabs(), GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, GFDetPlane::getNormal(), GFDetPlane::getO(), GFDetPlane::getU(), GFDetPlane::getV(), and i.

489  {
490  cov.ResizeTo(6,6);
491 
492  TMatrixT<double> statePred(fState), covPred(fCov);
493  if(pl!=fRefPlane)extrapolate(pl, statePred, covPred);
494 
495  // position
496  pos = pl.getO()+(statePred[3][0]*pl.getU())+(statePred[4][0]*pl.getV());
497 
498  // momentum
499  double fSPU = _spu;
500  mom = fSPU*pl.getNormal()+fSPU*statePred[1][0]*pl.getU()+fSPU*statePred[2][0]*pl.getV();
501  mom.SetMag(1./fabs(statePred[0][0]));
502 
503  // covariance matrix
504  FairGeaneUtil util;
505  // covPred 5 X 5 ==> cov55[5][5]
506  double cov55[5][5];
507  for(int i = 0; i < 5; i++) for(int j = 0; j < 5; j++) cov55[i][j] = covPred[i][j];
508  // cov55[5][5] ==> cov15[15]
509  double cov15[15];
510  util.FromMat25ToVec15(cov55, cov15);
511 
512  FairTrackParP parPred(statePred[3][0],
513  statePred[4][0], statePred[1][0],
514  statePred[2][0], statePred[0][0],
515  cov15,
516  pl.getO(), pl.getU(), pl.getV(),
517  _spu);
518  double cov66[6][6];
519  parPred.GetMARSCov(cov66);
520  for(int i = 0; i < 6; i++) for(int j = 0; j < 6; j++) cov[i][j] = cov66[i][j];
521 
522 }
TVector3 pos
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred)
returns the tracklength spanned in this extrapolation
TVector3 getV() const
Definition: GFDetPlane.h:77
Int_t i
Definition: run_full.C:25
Double_t mom
Definition: plot_dirc.C:14
GFDetPlane fRefPlane
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 getU() const
Definition: GFDetPlane.h:76
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TVector3 getNormal() const
Definition: GFDetPlane.cxx:138
TVector3 getO() const
Definition: GFDetPlane.h:75
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
void GFAbsTrackRep::getPosMomCov ( TVector3 &  pos,
TVector3 &  mom,
TMatrixT< double > &  c 
)
inlineinherited

Definition at line 222 of file GFAbsTrackRep.h.

References GFAbsTrackRep::getPosMomCov().

222  {
224  }
TVector3 pos
Double_t mom
Definition: plot_dirc.C:14
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< double > &cov)
method which gets position, momentum and 6x6 covariance matrix
GFDetPlane fRefPlane
FairGeanePro* GeaneTrackRep::getPropagator ( )
inline

Definition at line 103 of file GeaneTrackRep.h.

References _geane.

103 {return _geane;}
FairGeanePro * _geane
int GeaneTrackRep::getPropDir ( )
inline

Definition at line 102 of file GeaneTrackRep.h.

References _backw.

Referenced by extrapolateToLine().

102 {return _backw;}
double GFAbsTrackRep::getRedChiSqu ( ) const
inlineinherited

returns chi2/ndf

Definition at line 248 of file GFAbsTrackRep.h.

References GFAbsTrackRep::getChiSqu(), and GFAbsTrackRep::getNDF().

Referenced by GFTrack::getRedChiSqu().

248  {
249  if(getNDF()>0) return getChiSqu()/getNDF();
250  return 0;
251  }
double getChiSqu() const
unsigned int getNDF() const
const GFDetPlane& GFAbsTrackRep::getReferencePlane ( ) const
inlineinherited

Definition at line 295 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fRefPlane.

Referenced by GFKalman::processHit(), and GFKalman::processTrack().

295 {return fRefPlane;}
GFDetPlane fRefPlane
double GeaneTrackRep::getSPU ( )
inline

Definition at line 105 of file GeaneTrackRep.h.

References _spu.

105 {return _spu;}
TMatrixT<double> GFAbsTrackRep::getState ( ) const
inlineinherited

Definition at line 195 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fState.

Referenced by GFTrack::fillGeoTrack(), GFTrack::getResiduals(), GFKalman::processHit(), and GFKalman::processTrack().

195  {
196  return fState;
197  }
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
double GFAbsTrackRep::getStateElem ( int  i) const
inlineinherited

Definition at line 202 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fState.

202 {return fState(i,0);}
Int_t i
Definition: run_full.C:25
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
bool GFAbsTrackRep::getStatusFlag ( )
inlineinherited

Definition at line 318 of file GFAbsTrackRep.h.

References GFAbsTrackRep::fStatusFlag.

Referenced by GFTrack::blowUpCovs(), PndHypMicroWriter::Exec(), PndHypMicroIdealWriter::Exec(), PndHypDKalmanTask::Exec(), GFKalman::fittingPass(), for(), and GFDaf::processTrack().

318  {
319  return fStatusFlag;
320  }
int fStatusFlag
status of track representation: 0 means everything's OK
Definition: GFAbsTrackRep.h:98
virtual bool GFAbsTrackRep::hasAuxInfo ( )
inlinevirtualinherited

See if the track representation has auxillary information stored.

See if auxillary information is stored in the track representation. See the documentation of GFAbsTrackRep::getAuxInfo() for details.

Reimplemented in RKTrackRep.

Definition at line 329 of file GFAbsTrackRep.h.

Referenced by GFDaf::copySmoothing(), GFTools::getBiasedSmoothedData(), GFTools::getSmoothedData(), GFKalman::processHit(), and GFKalman::processTrack().

329  {
330  return false;
331  }
void GFAbsTrackRep::Print ( ) const
virtualinherited

Definition at line 97 of file GFAbsTrackRep.cxx.

References GFAbsTrackRep::fChiSqu, GFAbsTrackRep::fCov, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, and GFDetPlane::Print().

Referenced by PndLmdBPRungeKuttaTask::Exec(), PndHypDKalmanTask::Exec(), and GFTrack::Print().

97  {
98  std::cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
99  std::cout<<"GFAbsTrackRep::Parameters at reference plane ";
100  fRefPlane.Print();
101  std::cout<<"GFAbsTrackRep::State"<<std::endl;
102  fState.Print();
103  std::cout<<"GFAbsTrackRep::Covariances"<<std::endl;
104  fCov.Print();
105  std::cout<<"GFAbsTrackRep::chi^2"<<std::endl;
106  std::cout<<fChiSqu<<std::endl;
107  std::cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
108 }
GFDetPlane fRefPlane
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:94
void Print() const
Definition: GFDetPlane.cxx:238
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
virtual GFAbsTrackRep* GeaneTrackRep::prototype ( ) const
inlinevirtual

Implements GFAbsTrackRep.

Definition at line 61 of file GeaneTrackRep.h.

References GeaneTrackRep().

61 {return new GeaneTrackRep();}
void GFAbsTrackRep::reset ( )
virtualinherited

Definition at line 84 of file GFAbsTrackRep.cxx.

References GFAbsTrackRep::fCov, GFAbsTrackRep::fFirstCov, GFAbsTrackRep::fFirstState, GFAbsTrackRep::fLastCov, GFAbsTrackRep::fLastState, GFAbsTrackRep::fRefPlane, GFAbsTrackRep::fState, and GFDetPlane::set().

84  {
85  std::cout<<"GFAbsTrackRep::reset"<<std::endl;
86  TVector3 nullVec(0.,0.,0.);
87  fRefPlane.set(nullVec,nullVec,nullVec);
88  fState.Zero();
89  fCov.Zero();
90  fFirstState.Zero();
91  fFirstCov.Zero();
92  fLastState.Zero();
93  fLastCov.Zero();
94 }
void set(const TVector3 &o, const TVector3 &u, const TVector3 &v)
Definition: GFDetPlane.cxx:83
TMatrixT< double > fLastState
TMatrixT< double > fFirstCov
TMatrixT< double > fFirstState
state, cov and plane for first and last point in fit
GFDetPlane fRefPlane
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TMatrixT< double > fLastCov
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
void GFAbsTrackRep::setChiSqu ( double  aChiSqu)
inlineinherited

Definition at line 297 of file GFAbsTrackRep.h.

Referenced by GFKalman::fittingPass().

297  {
298  fChiSqu = aChiSqu;
299  }
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:94
void GFAbsTrackRep::setCov ( const TMatrixT< double > &  aCov)
inlineinherited

Definition at line 273 of file GFAbsTrackRep.h.

Referenced by GFTrack::blowUpCovs().

273  {
274  fCov=aCov;
275  }
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
virtual void GFAbsTrackRep::setData ( const TMatrixT< double > &  st,
const GFDetPlane pl,
const TMatrixT< double > *  cov = NULL,
const TMatrixT< double > *  aux = NULL 
)
inlinevirtualinherited

Puts the track representation in a given state.

This is used to update the track representation after the update of the Kalman filter was calculated.

IMPORTANT: One should be able to set the track representation to arbitraty values using this method. If the track representation needs additional information beside the state vector, the plane and the covariance, it has to be handed over via the "aux" Matrix. GFAbsTrackRep::getAuxInfo() should return the appropriate information. This is mandatory if smoothing is used.

Reimplemented in RKTrackRep.

Definition at line 267 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::extrapolate(), GFTools::getBiasedSmoothedData(), GFTools::getSmoothedData(), GFKalman::processHit(), and RKTrackRep::setData().

267  {
268  fState=st;
269  fRefPlane=pl;
270  if(cov!=NULL) fCov=*cov;
271  if(aux!=NULL) {;}
272  }
GFDetPlane fRefPlane
TMatrixT< double > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:88
TMatrixT< double > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:91
void GFAbsTrackRep::setFirstCov ( const TMatrixT< double > &  aCov)
inlineinherited

Definition at line 279 of file GFAbsTrackRep.h.

279  {
280  fFirstCov = aCov;
281  }
TMatrixT< double > fFirstCov
void GFAbsTrackRep::setFirstPlane ( const GFDetPlane aPlane)
inlineinherited

Definition at line 282 of file GFAbsTrackRep.h.

282  {
283  fFirstPlane = aPlane;;
284  }
GFDetPlane fFirstPlane
void GFAbsTrackRep::setFirstState ( const TMatrixT< double > &  aState)
inlineinherited

Definition at line 276 of file GFAbsTrackRep.h.

276  {
277  fFirstState = aState;
278  }
TMatrixT< double > fFirstState
state, cov and plane for first and last point in fit
bool GFAbsTrackRep::setInverted ( bool  f = true)
inlineinherited

Deprecated. Should be removed soon.

Definition at line 316 of file GFAbsTrackRep.h.

References f.

316 {fInverted=f; return true;}
bool fInverted
specifies the direction of flight of the particle
TFile * f
Definition: bump_analys.C:12
void GFAbsTrackRep::setLastCov ( const TMatrixT< double > &  aCov)
inlineinherited

Definition at line 288 of file GFAbsTrackRep.h.

288  {
289  fLastCov = aCov;
290  }
TMatrixT< double > fLastCov
void GFAbsTrackRep::setLastPlane ( const GFDetPlane aPlane)
inlineinherited

Definition at line 291 of file GFAbsTrackRep.h.

291  {
292  fLastPlane = aPlane;;
293  }
GFDetPlane fLastPlane
void GFAbsTrackRep::setLastState ( const TMatrixT< double > &  aState)
inlineinherited

Definition at line 285 of file GFAbsTrackRep.h.

285  {
286  fLastState = aState;
287  }
TMatrixT< double > fLastState
void GFAbsTrackRep::setNDF ( unsigned int  n)
inlineinherited

Definition at line 300 of file GFAbsTrackRep.h.

References n.

Referenced by GFKalman::fittingPass().

300  {
301  fNdf = n;
302  }
int n
unsigned int fNdf
Definition: GFAbsTrackRep.h:95
void GeaneTrackRep::setPropagator ( FairGeanePro *  g)
inline

Definition at line 107 of file GeaneTrackRep.h.

References _geane, and g.

107 {_geane=g;}
FairGeanePro * _geane
TFile * g
void GeaneTrackRep::setPropDir ( int  d)
inline

Definition at line 108 of file GeaneTrackRep.h.

References _backw, and d.

Referenced by PndHypDKalmanTask::Exec(), PndRecoDafFit::Fit(), and PndRecoKalmanFit::Fit().

108 {_backw=d;}
TObjArray * d
void GFAbsTrackRep::setStatusFlag ( int  _val)
inlineinherited

Definition at line 309 of file GFAbsTrackRep.h.

Referenced by GFKalman::fittingPass(), and GFDaf::processTrack().

309  {
310  fStatusFlag = _val;
311  }
int fStatusFlag
status of track representation: 0 means everything's OK
Definition: GFAbsTrackRep.h:98
double GFAbsTrackRep::stepalong ( double  h,
TVector3 &  point,
TVector3 &  dir 
)
virtualinherited

make step of h cm along the track

There is an emply implementation in GFAbsTrackRep.cxx which will abort (see one of the extrapolate methods above). This can be overwritten, if this feature is needed.

Reimplemented in RKTrackRep.

Definition at line 71 of file GFAbsTrackRep.cxx.

References GFAbsTrackRep::Abort().

Referenced by trackProximity().

73  {//TVector3& dir){
74  Abort("stepalong()");
75  return -1.;
76 }
void Abort(std::string method)
void GeaneTrackRep::switchDirection ( )
inlinevirtual

Implements GFAbsTrackRep.

Definition at line 109 of file GeaneTrackRep.h.

References _backw.

109 {_backw=-_backw;}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream s,
const GeaneTrackRep me 
)
friend

Member Data Documentation

int GeaneTrackRep::_backw
private
FairGeanePro* GeaneTrackRep::_geane
private
int GeaneTrackRep::_pdg
private
double GeaneTrackRep::_spu
private
double GFAbsTrackRep::fChiSqu
protectedinherited

chiSqu of the track fit

Definition at line 94 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getChiSqu(), and GFAbsTrackRep::Print().

TMatrixT<double> GFAbsTrackRep::fCov
protectedinherited
unsigned int GFAbsTrackRep::fDimension
protectedinherited

Dimensionality of track representation.

Definition at line 85 of file GFAbsTrackRep.h.

Referenced by extrapolate(), GFAbsTrackRep::extrapolate(), and GFAbsTrackRep::getDim().

TMatrixT<double> GFAbsTrackRep::fFirstCov
protectedinherited

Definition at line 104 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getFirstCov(), and GFAbsTrackRep::reset().

GFDetPlane GFAbsTrackRep::fFirstPlane
protectedinherited

Definition at line 108 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getFirstPlane().

TMatrixT<double> GFAbsTrackRep::fFirstState
protectedinherited

state, cov and plane for first and last point in fit

Definition at line 103 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getFirstState(), and GFAbsTrackRep::reset().

bool GFAbsTrackRep::fInverted
protectedinherited

specifies the direction of flight of the particle

Definition at line 100 of file GFAbsTrackRep.h.

TMatrixT<double> GFAbsTrackRep::fLastCov
protectedinherited

Definition at line 107 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getLastCov(), and GFAbsTrackRep::reset().

GFDetPlane GFAbsTrackRep::fLastPlane
protectedinherited

Definition at line 109 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getLastPlane().

TMatrixT<double> GFAbsTrackRep::fLastState
protectedinherited

Definition at line 106 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getLastState(), and GFAbsTrackRep::reset().

unsigned int GFAbsTrackRep::fNdf
protectedinherited

Definition at line 95 of file GFAbsTrackRep.h.

GFDetPlane GFAbsTrackRep::fRefPlane
protectedinherited
TMatrixT<double> GFAbsTrackRep::fState
protectedinherited
int GFAbsTrackRep::fStatusFlag
protectedinherited

status of track representation: 0 means everything's OK

Definition at line 98 of file GFAbsTrackRep.h.

Referenced by GFAbsTrackRep::getStatusFlag().


The documentation for this class was generated from the following files: