LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
genf::SlTrackRep Class Referenceabstract

#include "SlTrackRep.h"

Inheritance diagram for genf::SlTrackRep:
genf::GFAbsTrackRep

Public Member Functions

 SlTrackRep ()
 
 SlTrackRep (const TMatrixT< double > &, const TMatrixT< double > &)
 
 SlTrackRep (const TMatrixT< double > &, const TMatrixT< double > &, const double)
 
 SlTrackRep (const GFDetPlane &, const TMatrixT< double > &, const TMatrixT< double > &)
 
 SlTrackRep (const TVector3 &pos, const TVector3 &dir)
 
virtual ~SlTrackRep ()
 
virtual GFAbsTrackRepclone () const
 
virtual GFAbsTrackRepprototype () const
 
void setReferencePlane (const GFDetPlane &pl)
 
virtual double extrapolate (const GFDetPlane &, TMatrixT< double > &statePred, TMatrixT< double > &covPred)
 
virtual double extrapolate (const GFDetPlane &, TMatrixT< double > &statePred)
 
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...
 
virtual TVector3 getPos (const GFDetPlane &)
 
virtual TVector3 getMom (const GFDetPlane &)
 
virtual void getPosMom (const GFDetPlane &, TVector3 &pos, TVector3 &mom)
 
virtual double getCharge () const
 
void switchDirection ()
 
virtual double extrapolate (const GFDetPlane &plane, TMatrixT< Double_t > &statePred)
 returns the tracklength spanned in this extrapolation More...
 
virtual double extrapolate (const GFDetPlane &plane, TMatrixT< Double_t > &statePred, TMatrixT< Double_t > &covPred)=0
 Extrapolates the track to the given detectorplane. More...
 
double extrapolate (const GFDetPlane &plane)
 This changes the state and cov and plane of the rep. More...
 
virtual void stepalong (double h)
 make step of h cm along the track More...
 
unsigned int getDim () const
 returns dimension of state vector More...
 
virtual void Print (std::ostream &out=std::cout) const
 
const TMatrixT< Double_t > & getState () const
 
const TMatrixT< Double_t > & getCov () const
 
double getStateElem (int i) const
 
double getCovElem (int i, int j) const
 
TVector3 getPos ()
 
TVector3 getMom ()
 
virtual void getPosMomCov (const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
 method which gets position, momentum and 6x6 covariance matrix More...
 
void getPosMomCov (TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &c)
 
TMatrixT< Double_t > getFirstState () const
 
TMatrixT< Double_t > getFirstCov () const
 
GFDetPlane getFirstPlane () const
 
TMatrixT< Double_t > getLastState () const
 
TMatrixT< Double_t > 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_t > &st, const GFDetPlane &pl, const TMatrixT< Double_t > *cov=NULL)
 
void setCov (const TMatrixT< Double_t > &aCov)
 
void setFirstState (const TMatrixT< Double_t > &aState)
 
void setFirstCov (const TMatrixT< Double_t > &aCov)
 
void setFirstPlane (const GFDetPlane &aPlane)
 
void setLastState (const TMatrixT< Double_t > &aState)
 
void setLastCov (const TMatrixT< Double_t > &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 ()
 

Protected Attributes

unsigned int fDimension
 Dimensionality of track representation. More...
 
TMatrixT< Double_t > fState
 The vector of track parameters. More...
 
TMatrixT< Double_t > 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_t > fFirstState
 state, cov and plane for first and last point in fit More...
 
TMatrixT< Double_t > fFirstCov
 
TMatrixT< Double_t > fLastState
 
TMatrixT< Double_t > fLastCov
 
GFDetPlane fFirstPlane
 
GFDetPlane fLastPlane
 
GFDetPlane fRefPlane
 

Private Attributes

int _backw
 

Detailed Description

Definition at line 7 of file SlTrackRep.h.

Constructor & Destructor Documentation

genf::SlTrackRep::SlTrackRep ( )

Definition at line 4 of file SlTrackRep.cxx.

Referenced by clone(), and prototype().

genf::SlTrackRep::SlTrackRep ( const TMatrixT< double > &  _state,
const TMatrixT< double > &  sigma 
)

Definition at line 6 of file SlTrackRep.cxx.

References genf::GFAbsTrackRep::fCov, genf::GFAbsTrackRep::fState, and setReferencePlane().

7  : GFAbsTrackRep(4), _backw(0)
8 {
9  fState = _state;
10  for (int i = 0; i < sigma.GetNrows(); ++i) {
11  fCov[i][i] = sigma[i][0];
12  }
13  setReferencePlane(GFDetPlane(TVector3(0, 0, 0), TVector3(1, 0, 0), TVector3(0, 1, 0)));
14 }
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
void setReferencePlane(const GFDetPlane &pl)
Definition: SlTrackRep.h:21
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
genf::SlTrackRep::SlTrackRep ( const TMatrixT< double > &  _state,
const TMatrixT< double > &  sigma,
const double  z 
)

Definition at line 42 of file SlTrackRep.cxx.

References genf::GFAbsTrackRep::fCov, genf::GFAbsTrackRep::fState, and setReferencePlane().

45  : GFAbsTrackRep(4), _backw(0)
46 {
47 
48  fState = _state;
49  for (int i = 0; i < sigma.GetNrows(); ++i) {
50  fCov[i][i] = sigma[i][0];
51  }
52  setReferencePlane(GFDetPlane(TVector3(0, 0, z), TVector3(1, 0, 0), TVector3(0, 1, 0)));
53 }
Double_t z
Definition: plot.C:276
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
void setReferencePlane(const GFDetPlane &pl)
Definition: SlTrackRep.h:21
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
genf::SlTrackRep::SlTrackRep ( const GFDetPlane dp,
const TMatrixT< double > &  _state,
const TMatrixT< double > &  sigma 
)

Definition at line 30 of file SlTrackRep.cxx.

References genf::GFAbsTrackRep::fCov, genf::GFAbsTrackRep::fState, and setReferencePlane().

33  : GFAbsTrackRep(4), _backw(0)
34 {
35  fState = _state;
36  for (int i = 0; i < sigma.GetNrows(); ++i) {
37  fCov[i][i] = sigma[i][0];
38  }
40 }
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
void setReferencePlane(const GFDetPlane &pl)
Definition: SlTrackRep.h:21
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
genf::SlTrackRep::SlTrackRep ( const TVector3 &  pos,
const TVector3 &  dir 
)

Definition at line 16 of file SlTrackRep.cxx.

References d, genf::GFAbsTrackRep::fCov, genf::GFAbsTrackRep::fState, and setReferencePlane().

16  : GFAbsTrackRep(4), _backw(0)
17 {
18  GFDetPlane d(pos, dir);
20  fState[0][0] = 0.;
21  fState[1][0] = 0.;
22  fState[2][0] = 0.;
23  fState[3][0] = 0.;
24  fCov[0][0] = 1.;
25  fCov[1][1] = 1.;
26  fCov[2][2] = 1.;
27  fCov[3][3] = 1.;
28 }
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
Float_t d
Definition: plot.C:235
void setReferencePlane(const GFDetPlane &pl)
Definition: SlTrackRep.h:21
TDirectory * dir
Definition: macro.C:5
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
genf::SlTrackRep::~SlTrackRep ( )
virtual

Definition at line 55 of file SlTrackRep.cxx.

55 {}

Member Function Documentation

void genf::GFAbsTrackRep::addChiSqu ( double  aChiSqu)
inlineinherited

Definition at line 264 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processHit().

264 { fChiSqu += aChiSqu; }
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:95
void genf::GFAbsTrackRep::addNDF ( unsigned int  n)
inlineinherited

Definition at line 265 of file GFAbsTrackRep.h.

References n.

Referenced by genf::GFKalman::processHit().

265 { fNdf += n; }
unsigned int fNdf
Definition: GFAbsTrackRep.h:96
Char_t n[5]
virtual GFAbsTrackRep* genf::SlTrackRep::clone ( ) const
inlinevirtual

Implements genf::GFAbsTrackRep.

Definition at line 18 of file SlTrackRep.h.

References SlTrackRep().

18 { return new SlTrackRep(*this); }
double genf::SlTrackRep::extrapolate ( const GFDetPlane pl,
TMatrixT< double > &  statePred,
TMatrixT< double > &  covPred 
)
virtual

Definition at line 94 of file SlTrackRep.cxx.

References dir, larg4::dist(), genf::GFAbsTrackRep::fCov, genf::GFAbsTrackRep::fDimension, genf::GFAbsTrackRep::fRefPlane, genf::GFAbsTrackRep::fState, genf::GFDetPlane::getO(), genf::GFDetPlane::getU(), genf::GFDetPlane::getV(), and w.

Referenced by getMom(), getPos(), and setReferencePlane().

97 {
98  //std::cout<<std::endl<<std::endl<<"extrapolate to plane with state and cov"<<std::endl<<std::endl;
99  statePred.ResizeTo(fDimension, 1);
100  covPred.ResizeTo(fDimension, fDimension);
101  TVector3 o = pl.getO();
102  TVector3 u = pl.getU();
103  TVector3 v = pl.getV();
104  TVector3 w = u.Cross(v);
105  TVector3 ofrom = fRefPlane.getO();
106  TVector3 ufrom = fRefPlane.getU();
107  TVector3 vfrom = fRefPlane.getV();
108  TVector3 wfrom = ufrom.Cross(vfrom);
109  /*
110  std::cout<<"ufrom ";
111  ufrom.Print();
112  std::cout<<"vfrom ";
113  vfrom.Print();
114  std::cout<<"wfrom ";
115  wfrom.Print();
116  */
117  TVector3 p1 = ofrom + fState[0][0] * ufrom + fState[1][0] * vfrom;
118  /*
119  std::cout<<"p1 ";
120  p1.Print();
121  */
122  TVector3 dir = (fState[2][0] * ufrom + fState[3][0] * vfrom + wfrom); //in global coordinates
123  /*
124  std::cout<<"dir ";
125  dir.Print();
126  */
127  if (w * dir == 0) {
128  std::cerr << "track paralell to detector plane" << std::endl
129  << "extrapolation impossible, aborting" << std::endl;
130  throw;
131  }
132 
133  double t = (((w * o) - (w * p1)) / (w * dir));
134 
135  double dist = t * dir.Mag();
136 
137  TVector3 p2 = p1 + t * dir;
138  /*
139  std::cout<<"xtrapolate point p2 ";
140  p2.Print();
141  */
142  double state0 = (p2 - o) * u;
143  double state1 = (p2 - o) * v;
144  double state2 = (dir * u) / (dir * w);
145  double state3 = (dir * v) / (dir * w);
146  /*
147  std::cout<<"start state:"<<std::endl;
148  std::cout<<fState[0][0]<<std::endl
149  <<fState[1][0]<<std::endl
150  <<fState[2][0]<<std::endl
151  <<fState[3][0]<<std::endl;
152  std::cout<<"end state:"<<std::endl;
153  std::cout<<fState0<<std::endl
154  <<fState1<<std::endl
155  <<fState2<<std::endl
156  <<fState3<<std::endl<<std::endl;
157  */
158  TMatrixT<double> jacobian(4, 4);
159  /*
160  cg3 = .(ufrom
161  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ufrom) * c * ufrom
162  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ufrom) * d * vfrom
163  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ufrom) *wfrom, u);
164 
165  cg4 = .(vfrom
166  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, vfrom) * c * ufrom
167  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, vfrom) * d * vfrom
168  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, vfrom) *wfrom, u);
169 
170  cg5 = .(- pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * c * ufrom * .(w, ufrom)
171  + 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, o) * ufrom
172  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * d * vfrom * .(w, ufrom)
173  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) *wfrom * .(w, ufrom)
174  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * c * ufrom * .(w, ufrom)
175  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ofrom + a * ufrom + b * vfrom) * ufrom
176  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * d * vfrom * .(w, ufrom)
177  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) *wfrom * .(w, ufrom), u);
178 
179  cg6 = .(-pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * c * ufrom * .(w, vfrom)
180  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * d * vfrom * .(w, vfrom)
181  + 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, o) * vfrom
182  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) *wfrom * .(w, vfrom)
183  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * c * ufrom * .(w, vfrom)
184  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * d * vfrom * .(w, vfrom)
185  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ofrom + a * ufrom + b * vfrom) * vfrom
186  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) *wfrom * .(w, vfrom), u);
187 
188  cg7 = .(ufrom
189  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ufrom) * c * ufrom
190  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ufrom) * d * vfrom
191  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ufrom) *wfrom, v);
192 
193  cg8 = .(vfrom
194  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, vfrom) * c * ufrom
195  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, vfrom) * d * vfrom
196  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, vfrom) *wfrom, v);
197 
198  cg9 = .(-pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * c * ufrom * .(w, ufrom)
199  + 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, o) * ufrom
200  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * d * vfrom * .(w, ufrom)
201  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) *wfrom * .(w, ufrom)
202  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * c * ufrom * .(w, ufrom)
203  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ofrom + a * ufrom + b * vfrom) * ufrom
204  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * d * vfrom * .(w, ufrom)
205  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) *wfrom * .(w, ufrom), v);
206 
207  cg10 = .(-pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * c * ufrom * .(w, vfrom)
208  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) * d * vfrom * .(w, vfrom)
209  + 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, o) * vfrom
210  - pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, o) *wfrom * .(w, vfrom)
211  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * c * ufrom * .(w, vfrom)
212  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) * d * vfrom * .(w, vfrom)
213  - 1 / .(w, c * ufrom + d * vfrom +wfrom) * .(w, ofrom + a * ufrom + b * vfrom) * vfrom
214  + pow(.(w, c * ufrom + d * vfrom +wfrom), -2) * .(w, ofrom + a * ufrom + b * vfrom) *wfrom * .(w, vfrom), v);
215 
216  cg11 = 0;
217  cg12 = 0;
218 
219  cg13 = .(ufrom, u) / .(c * ufrom + d * vfrom +wfrom, w)
220  - .(c * ufrom + d * vfrom +wfrom, u) * pow(.(c * ufrom + d * vfrom +wfrom, w), -2) * .(ufrom, w);
221 
222  cg14 = .(vfrom, u) / .(c * ufrom + d * vfrom +wfrom, w)
223  - .(c * ufrom + d * vfrom +wfrom, u) * pow(.(c * ufrom + d * vfrom +wfrom, w), -2) * .(vfrom, w);
224  cg15 = 0;
225  cg16 = 0;
226 
227  cg17 = .(ufrom, v) / .(c * ufrom + d * vfrom +wfrom, w)
228  - .(c * ufrom + d * vfrom +wfrom, v) * pow(.(c * ufrom + d * vfrom +wfrom, w), -2) * .(ufrom, w);
229 
230  cg18 = .(vfrom, v) / .(c * ufrom + d * vfrom +wfrom, w)
231  - .(c * ufrom + d * vfrom +wfrom, v) * pow(.(c * ufrom + d * vfrom +wfrom, w), -2) * .(vfrom, w);
232 
233  */
234 
235  double jacobian0 =
236  (ufrom - 1 / (w * dir) * (w * ufrom) * fState[2][0] * ufrom -
237  1 / (w * dir) * (w * ufrom) * fState[3][0] * vfrom - 1 / (w * dir) * (w * ufrom) * wfrom) *
238  u;
239 
240  double jacobian1 =
241  (vfrom - 1 / (w * dir) * (w * vfrom) * fState[2][0] * ufrom -
242  1 / (w * dir) * (w * vfrom) * fState[3][0] * vfrom - 1 / (w * dir) * (w * vfrom) * wfrom) *
243  u;
244 
245  double jacobian2 = (-pow((w * dir), -2) * (w * o) * fState[2][0] * ufrom * (w * ufrom) +
246  1 / (w * dir) * (w * o) * ufrom -
247  pow((w * dir), -2) * (w * o) * fState[3][0] * vfrom * (w * ufrom) -
248  pow((w * dir), -2) * (w * o) * wfrom * (w * ufrom) +
249  pow((w * dir), -2) * (w * p1) * fState[2][0] * ufrom * (w * ufrom) -
250  1 / (w * dir) * (w * p1) * ufrom +
251  pow((w * dir), -2) * (w * p1) * fState[3][0] * vfrom * (w * ufrom) +
252  pow((w * dir), -2) * (w * p1) * wfrom * (w * ufrom)) *
253  u;
254 
255  double jacobian3 =
256  (-pow((w * dir), -2) * (w * o) * fState[2][0] * ufrom * (w * vfrom) -
257  pow((w * dir), -2) * (w * o) * fState[3][0] * vfrom * (w * vfrom) +
258  1 / (w * dir) * (w * o) * vfrom - pow((w * dir), -2) * (w * o) * wfrom * (w * vfrom) +
259  pow((w * dir), -2) * (w * p1) * fState[2][0] * ufrom * (w * vfrom) +
260  pow((w * dir), -2) * (w * p1) * fState[3][0] * vfrom * (w * vfrom) -
261  1 / (w * dir) * (w * p1) * vfrom + pow((w * dir), -2) * (w * p1) * wfrom * (w * vfrom)) *
262  u;
263 
264  double jacobian4 =
265  (ufrom - 1 / (w * dir) * (w * ufrom) * fState[2][0] * ufrom -
266  1 / (w * dir) * (w * ufrom) * fState[3][0] * vfrom - 1 / (w * dir) * (w * ufrom) * wfrom) *
267  v;
268 
269  double jacobian5 =
270  (vfrom - 1 / (w * dir) * (w * vfrom) * fState[2][0] * ufrom -
271  1 / (w * dir) * (w * vfrom) * fState[3][0] * vfrom - 1 / (w * dir) * (w * vfrom) * wfrom) *
272  v;
273 
274  double jacobian6 = (-pow((w * dir), -2) * (w * o) * fState[2][0] * ufrom * (w * ufrom) +
275  1 / (w * dir) * (w * o) * ufrom -
276  pow((w * dir), -2) * (w * o) * fState[3][0] * vfrom * (w * ufrom) -
277  pow((w * dir), -2) * (w * o) * wfrom * (w * ufrom) +
278  pow((w * dir), -2) * (w * p1) * fState[2][0] * ufrom * (w * ufrom) -
279  1 / (w * dir) * (w * p1) * ufrom +
280  pow((w * dir), -2) * (w * p1) * fState[3][0] * vfrom * (w * ufrom) +
281  pow((w * dir), -2) * (w * p1) * wfrom * (w * ufrom)) *
282  v;
283 
284  double jacobian7 =
285  (-pow((w * dir), -2) * (w * o) * fState[2][0] * ufrom * (w * vfrom) -
286  pow((w * dir), -2) * (w * o) * fState[3][0] * vfrom * (w * vfrom) +
287  1 / (w * dir) * (w * o) * vfrom - pow((w * dir), -2) * (w * o) * wfrom * (w * vfrom) +
288  pow((w * dir), -2) * (w * p1) * fState[2][0] * ufrom * (w * vfrom) +
289  pow((w * dir), -2) * (w * p1) * fState[3][0] * vfrom * (w * vfrom) -
290  1 / (w * dir) * (w * p1) * vfrom + pow((w * dir), -2) * (w * p1) * wfrom * (w * vfrom)) *
291  v;
292  double jacobian8 = 0;
293  double jacobian9 = 0;
294 
295  double jacobian10 = ((ufrom * u) / (w * dir) - (dir * u) * pow((w * dir), -2) * (w * ufrom));
296 
297  double jacobian11 = ((vfrom * u) / (w * dir) - (dir * u) * pow((w * dir), -2) * (w * vfrom));
298  double jacobian12 = 0;
299  double jacobian13 = 0;
300 
301  double jacobian14 = ((ufrom * v) / (w * dir) - (dir * v) * pow((w * dir), -2) * (w * ufrom));
302 
303  double jacobian15 = ((vfrom * v) / (w * dir) - (dir * v) * pow((w * dir), -2) * (w * vfrom));
304 
305  jacobian[0][0] = jacobian0;
306  jacobian[0][1] = jacobian1;
307  jacobian[0][2] = jacobian2;
308  jacobian[0][3] = jacobian3;
309  jacobian[1][0] = jacobian4;
310  jacobian[1][1] = jacobian5;
311  jacobian[1][2] = jacobian6;
312  jacobian[1][3] = jacobian7;
313  jacobian[2][0] = jacobian8;
314  jacobian[2][1] = jacobian9;
315  jacobian[2][2] = jacobian10;
316  jacobian[2][3] = jacobian11;
317  jacobian[3][0] = jacobian12;
318  jacobian[3][1] = jacobian13;
319  jacobian[3][2] = jacobian14;
320  jacobian[3][3] = jacobian15;
321  TMatrixT<double> jacobianT(jacobian);
322  jacobianT.T();
323  covPred = jacobian * fCov * (jacobianT);
324  // std::cout<<"covariance[0][0]"<<covPred[0][0]<<std::endl;
325  statePred[0].Assign(state0);
326  statePred[1].Assign(state1);
327  statePred[2].Assign(state2);
328  statePred[3].Assign(state3);
329  return dist;
330 }
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:86
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
TVector3 getO() const
Definition: GFDetPlane.h:77
TVector3 getU() const
Definition: GFDetPlane.h:78
TDirectory * dir
Definition: macro.C:5
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
TVector3 getV() const
Definition: GFDetPlane.h:79
Float_t w
Definition: plot.C:20
double genf::SlTrackRep::extrapolate ( const GFDetPlane pl,
TMatrixT< double > &  statePred 
)
virtual

Definition at line 56 of file SlTrackRep.cxx.

References dir, larg4::dist(), genf::GFAbsTrackRep::fDimension, genf::GFAbsTrackRep::fRefPlane, genf::GFAbsTrackRep::fState, genf::GFDetPlane::getO(), genf::GFDetPlane::getU(), genf::GFDetPlane::getV(), and w.

57 {
58  statePred.ResizeTo(fDimension, 1);
59  TVector3 o = pl.getO();
60  TVector3 u = pl.getU();
61  TVector3 v = pl.getV();
62  TVector3 w = u.Cross(v);
63  TVector3 ofrom = fRefPlane.getO();
64  TVector3 ufrom = fRefPlane.getU();
65  TVector3 vfrom = fRefPlane.getV();
66  TVector3 wfrom = ufrom.Cross(vfrom);
67  TVector3 p1 = ofrom + fState[0][0] * ufrom + fState[1][0] * vfrom;
68 
69  TVector3 dir = (fState[2][0] * ufrom + fState[3][0] * vfrom + wfrom); //in global coordinates
70 
71  if (w * dir == 0) {
72  std::cerr << "track paralell to detector plane" << std::endl
73  << "extrapolation impossible, aborting" << std::endl;
74  throw;
75  }
76 
77  double t = (((w * o) - (w * p1)) / (w * dir));
78 
79  double dist = t * dir.Mag();
80 
81  TVector3 p2 = p1 + t * dir;
82 
83  double state0 = (p2 - o) * u;
84  double state1 = (p2 - o) * v;
85  double state2 = (dir * u) / (dir * w);
86  double state3 = (dir * v) / (dir * w);
87 
88  statePred[0].Assign(state0);
89  statePred[1].Assign(state1);
90  statePred[2].Assign(state2);
91  statePred[3].Assign(state3);
92  return dist;
93 }
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:86
TVector3 getO() const
Definition: GFDetPlane.h:77
TVector3 getU() const
Definition: GFDetPlane.h:78
TDirectory * dir
Definition: macro.C:5
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
TVector3 getV() const
Definition: GFDetPlane.h:79
Float_t w
Definition: plot.C:20
double genf::GFAbsTrackRep::extrapolate ( const GFDetPlane plane,
TMatrixT< Double_t > &  statePred 
)
virtualinherited

returns the tracklength spanned in this extrapolation

Reimplemented in genf::RKTrackRep.

Definition at line 63 of file GFAbsTrackRep.cxx.

References genf::GFAbsTrackRep::fDimension.

Referenced by genf::GFAbsTrackRep::extrapolate(), genf::GFKalman::getChi2Hit(), genf::GFTrack::getResiduals(), genf::GFKalman::processHit(), and genf::GFDaf::processTrack().

64 {
65  TMatrixT<Double_t> cov(fDimension, fDimension);
66  return extrapolate(plane, statePred, cov);
67 }
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:86
virtual double extrapolate(const GFDetPlane &plane, TMatrixT< Double_t > &statePred)
returns the tracklength spanned in this extrapolation
virtual double genf::GFAbsTrackRep::extrapolate ( const GFDetPlane plane,
TMatrixT< Double_t > &  statePred,
TMatrixT< Double_t > &  covPred 
)
pure virtualinherited

Extrapolates the track to the given detectorplane.

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

Implemented in genf::RKTrackRep.

double genf::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 53 of file GFAbsTrackRep.cxx.

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

54 {
55  TMatrixT<Double_t> statePred(fDimension, 1);
56  TMatrixT<Double_t> covPred(fDimension, fDimension);
57  double retVal = extrapolate(plane, statePred, covPred);
58  setData(statePred, plane, &covPred);
59  return retVal;
60 }
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:86
virtual void setData(const TMatrixT< Double_t > &st, const GFDetPlane &pl, const TMatrixT< Double_t > *cov=NULL)
virtual double extrapolate(const GFDetPlane &plane, TMatrixT< Double_t > &statePred)
returns the tracklength spanned in this extrapolation
void genf::SlTrackRep::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 genf::GFAbsTrackRep.

Definition at line 348 of file SlTrackRep.cxx.

References dir, genf::GFAbsTrackRep::fRefPlane, genf::GFAbsTrackRep::fState, genf::GFDetPlane::getO(), genf::GFDetPlane::getU(), genf::GFDetPlane::getV(), and t2.

Referenced by setReferencePlane().

353 {
354 
355  TVector3 ofrom = fRefPlane.getO();
356  TVector3 ufrom = fRefPlane.getU();
357  TVector3 vfrom = fRefPlane.getV();
358  TVector3 wfrom = ufrom.Cross(vfrom);
359 
360  TVector3 pfrom = ofrom + fState[0][0] * ufrom + fState[1][0] * vfrom;
361  TVector3 dir = (fState[2][0] * ufrom + fState[3][0] * vfrom + wfrom); //in global coordinates
362  TVector3 lineDir = point2 - point1;
363  //normal normal to both lineDir and Dir
364  TVector3 normal(dir.y() * lineDir.z() - dir.z() * lineDir.y(),
365  dir.x() * lineDir.z() - dir.z() * lineDir.x(),
366  dir.x() * lineDir.y() - dir.y() * lineDir.x());
367 
368  normal = normal.Unit();
369  TVector3 planeNorm = dir.Cross(normal);
370  double t = (planeNorm * point2 - planeNorm * pfrom) / (planeNorm * dir);
371  poca = pfrom + t * dir;
372  double t2 = (lineDir * poca - lineDir * point1) / (lineDir * lineDir);
373  poca_onwire = point1 + lineDir * t2;
374  dirInPoca = dir;
375 }
TVector3 getO() const
Definition: GFDetPlane.h:77
TTree * t2
Definition: plottest35.C:36
TVector3 getU() const
Definition: GFDetPlane.h:78
TDirectory * dir
Definition: macro.C:5
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
TVector3 getV() const
Definition: GFDetPlane.h:79
void genf::SlTrackRep::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.

Reimplemented from genf::GFAbsTrackRep.

Definition at line 331 of file SlTrackRep.cxx.

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

Referenced by setReferencePlane().

332 {
333 
334  TVector3 ofrom = fRefPlane.getO();
335  TVector3 ufrom = fRefPlane.getU();
336  TVector3 vfrom = fRefPlane.getV();
337  TVector3 wfrom = ufrom.Cross(vfrom);
338  TVector3 pfrom = ofrom + fState[0][0] * ufrom + fState[1][0] * vfrom;
339  TVector3 dir = (fState[2][0] * ufrom + fState[3][0] * vfrom + wfrom); //in global coordinates
340  // pfrom.Print();
341  dir = dir.Unit();
342  //dir.Print();
343  double t = (dir * pos - dir * pfrom) / (dir * dir);
344 
345  poca = pfrom + t * dir;
346  dirInPoca = dir.Unit();
347 }
TVector3 getO() const
Definition: GFDetPlane.h:77
TVector3 getU() const
Definition: GFDetPlane.h:78
TDirectory * dir
Definition: macro.C:5
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
TVector3 getV() const
Definition: GFDetPlane.h:79
virtual double genf::SlTrackRep::getCharge ( ) const
inlinevirtual

Implements genf::GFAbsTrackRep.

Definition at line 42 of file SlTrackRep.h.

42 { return 0; }
double genf::GFAbsTrackRep::getChiSqu ( ) const
inlineinherited
const TMatrixT<Double_t>& genf::GFAbsTrackRep::getCov ( ) const
inlineinherited
double genf::GFAbsTrackRep::getCovElem ( int  i,
int  j 
) const
inlineinherited
unsigned int genf::GFAbsTrackRep::getDim ( ) const
inlineinherited

returns dimension of state vector

Definition at line 182 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fDimension, and genf::GFAbsTrackRep::Print().

Referenced by genf::GFKalman::getChi2Hit(), genf::GFAbsTrackRep::getNDF(), genf::GFTrack::getResiduals(), genf::GFKalman::processHit(), and genf::GFDaf::processTrack().

182 { return fDimension; }
unsigned int fDimension
Dimensionality of track representation.
Definition: GFAbsTrackRep.h:86
TMatrixT<Double_t> genf::GFAbsTrackRep::getFirstCov ( ) const
inlineinherited

Definition at line 218 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fFirstCov.

218 { return fFirstCov; }
TMatrixT< Double_t > fFirstCov
GFDetPlane genf::GFAbsTrackRep::getFirstPlane ( ) const
inlineinherited

Definition at line 219 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fFirstPlane.

219 { return fFirstPlane; }
GFDetPlane fFirstPlane
TMatrixT<Double_t> genf::GFAbsTrackRep::getFirstState ( ) const
inlineinherited

Definition at line 217 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fFirstState.

217 { return fFirstState; }
TMatrixT< Double_t > fFirstState
state, cov and plane for first and last point in fit
TMatrixT<Double_t> genf::GFAbsTrackRep::getLastCov ( ) const
inlineinherited

Definition at line 221 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fLastCov.

221 { return fLastCov; }
TMatrixT< Double_t > fLastCov
GFDetPlane genf::GFAbsTrackRep::getLastPlane ( ) const
inlineinherited

Definition at line 222 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fLastPlane.

Referenced by trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().

222 { return fLastPlane; }
TMatrixT<Double_t> genf::GFAbsTrackRep::getLastState ( ) const
inlineinherited

Definition at line 220 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fLastState.

220 { return fLastState; }
TMatrixT< Double_t > fLastState
TVector3 genf::SlTrackRep::getMom ( const GFDetPlane pl)
virtual

Implements genf::GFAbsTrackRep.

Definition at line 382 of file SlTrackRep.cxx.

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

383 {
384  TMatrixT<double> statePred(fState);
385  if (pl != fRefPlane) { extrapolate(pl, statePred); }
386  TVector3 ret = pl.getNormal() + (statePred[2][0] * pl.getU()) + (statePred[3][0] * pl.getV());
387  ret.SetMag(1.);
388  return ret;
389 }
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred, TMatrixT< double > &covPred)
Definition: SlTrackRep.cxx:94
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
TVector3 genf::GFAbsTrackRep::getMom ( )
inlineinherited
unsigned int genf::GFAbsTrackRep::getNDF ( ) const
inlineinherited

Definition at line 230 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::getDim().

Referenced by genf::GFTrack::getNDF(), genf::GFAbsTrackRep::getRedChiSqu(), trkf::Track3DKalman::produce(), and trkf::Track3DKalmanSPS::produce().

231  {
232  if (fNdf > getDim()) return fNdf - getDim();
233  return 0;
234  }
unsigned int fNdf
Definition: GFAbsTrackRep.h:96
unsigned int getDim() const
returns dimension of state vector
TVector3 genf::SlTrackRep::getPos ( const GFDetPlane pl)
virtual

Implements genf::GFAbsTrackRep.

Definition at line 376 of file SlTrackRep.cxx.

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

377 {
378  TMatrixT<double> statePred(fState);
379  if (pl != fRefPlane) { extrapolate(pl, statePred); }
380  return pl.getO() + (statePred[0][0] * pl.getU()) + (statePred[1][0] * pl.getV());
381 }
virtual double extrapolate(const GFDetPlane &, TMatrixT< double > &statePred, TMatrixT< double > &covPred)
Definition: SlTrackRep.cxx:94
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
TVector3 genf::GFAbsTrackRep::getPos ( )
inlineinherited
void genf::SlTrackRep::getPosMom ( const GFDetPlane pl,
TVector3 &  pos,
TVector3 &  mom 
)
virtual

Implements genf::GFAbsTrackRep.

Definition at line 390 of file SlTrackRep.cxx.

References genf::GFAbsTrackRep::getMom(), and genf::GFAbsTrackRep::getPos().

Referenced by setReferencePlane().

391 {
392  pos = getPos(pl);
393  mom = getMom(pl);
394 }
void genf::GFAbsTrackRep::getPosMomCov ( const GFDetPlane pl,
TVector3 &  pos,
TVector3 &  mom,
TMatrixT< Double_t > &  cov 
)
virtualinherited

method which gets position, momentum and 6x6 covariance matrix

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

Definition at line 101 of file GFAbsTrackRep.cxx.

References genf::GFAbsTrackRep::Abort().

Referenced by genf::GFAbsTrackRep::getCovElem(), genf::GFAbsTrackRep::getPosMomCov(), and genf::GFTrack::getPosMomCov().

105 {
106  Abort("getPosMomCov()");
107 }
void Abort(std::string method)
void genf::GFAbsTrackRep::getPosMomCov ( TVector3 &  pos,
TVector3 &  mom,
TMatrixT< Double_t > &  c 
)
inlineinherited

Definition at line 212 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::getPosMomCov().

213  {
214  getPosMomCov(fRefPlane, pos, mom, c);
215  }
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
method which gets position, momentum and 6x6 covariance matrix
double genf::GFAbsTrackRep::getRedChiSqu ( ) const
inlineinherited

returns chi2/ndf

Definition at line 225 of file GFAbsTrackRep.h.

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

Referenced by genf::GFTrack::getRedChiSqu().

226  {
227  if (getNDF() > 0) return getChiSqu() / getNDF();
228  return 0;
229  }
unsigned int getNDF() const
double getChiSqu() const
const GFDetPlane& genf::GFAbsTrackRep::getReferencePlane ( ) const
inlineinherited
const TMatrixT<Double_t>& genf::GFAbsTrackRep::getState ( ) const
inlineinherited
double genf::GFAbsTrackRep::getStateElem ( int  i) const
inlineinherited

Definition at line 189 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::fState.

189 { return fState(i, 0); }
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
bool genf::GFAbsTrackRep::getStatusFlag ( )
inlineinherited
void genf::GFAbsTrackRep::Print ( std::ostream &  out = std::cout) const
virtualinherited

Definition at line 122 of file GFAbsTrackRep.cxx.

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

Referenced by genf::GFAbsTrackRep::getDim(), and genf::GFTrack::Print().

123 {
124  out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
125  out << "GFAbsTrackRep::Parameters at reference plane ";
126  fRefPlane.Print(out);
127  out << "GFAbsTrackRep::State" << std::endl;
128  PrintROOTmatrix(out, fState);
129  out << "GFAbsTrackRep::Covariances" << std::endl;
130  PrintROOTmatrix(out, fCov);
131  out << "GFAbsTrackRep::chi^2" << std::endl;
132  out << fChiSqu << std::endl;
133  out << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
134 }
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:95
void PrintROOTmatrix(std::ostream &out, const TMatrixT< T > &m)
Small utility functions which print some ROOT objects into an output stream.
Definition: GFException.h:133
void Print(std::ostream &out=std::cout) const
Definition: GFDetPlane.cxx:228
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
virtual GFAbsTrackRep* genf::SlTrackRep::prototype ( ) const
inlinevirtual

Implements genf::GFAbsTrackRep.

Definition at line 19 of file SlTrackRep.h.

References SlTrackRep().

19 { return new SlTrackRep(); }
void genf::GFAbsTrackRep::reset ( )
virtualinherited

Definition at line 109 of file GFAbsTrackRep.cxx.

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

Referenced by genf::GFAbsTrackRep::getStatusFlag().

110 {
111  std::cout << "GFAbsTrackRep::reset" << std::endl;
112  TVector3 nullVec(0., 0., 0.);
113  fRefPlane.set(nullVec, nullVec, nullVec);
114  fState.Zero();
115  fCov.Zero();
116  fFirstState.Zero();
117  fFirstCov.Zero();
118  fLastState.Zero();
119  fLastCov.Zero();
120 }
void set(const TVector3 &o, const TVector3 &u, const TVector3 &v)
Definition: GFDetPlane.cxx:86
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
TMatrixT< Double_t > fFirstCov
TMatrixT< Double_t > fLastState
TMatrixT< Double_t > fLastCov
TMatrixT< Double_t > fFirstState
state, cov and plane for first and last point in fit
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
void genf::GFAbsTrackRep::setChiSqu ( double  aChiSqu)
inlineinherited

Definition at line 262 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::fittingPass().

262 { fChiSqu = aChiSqu; }
double fChiSqu
chiSqu of the track fit
Definition: GFAbsTrackRep.h:95
void genf::GFAbsTrackRep::setCov ( const TMatrixT< Double_t > &  aCov)
inlineinherited

Definition at line 244 of file GFAbsTrackRep.h.

Referenced by genf::GFDaf::blowUpCovs(), genf::GFKalman::blowUpCovs(), and genf::GFKalman::blowUpCovsDiag().

244 { fCov = aCov; }
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
virtual void genf::GFAbsTrackRep::setData ( const TMatrixT< Double_t > &  st,
const GFDetPlane pl,
const TMatrixT< Double_t > *  cov = NULL 
)
inlinevirtualinherited

Definition at line 236 of file GFAbsTrackRep.h.

Referenced by genf::GFAbsTrackRep::extrapolate(), genf::GFKalman::processHit(), genf::GFDaf::processTrack(), genf::RKTrackRep::setData(), and genf::RKTrackRep::switchDirection().

239  {
240  fState = st;
241  fRefPlane = pl;
242  if (cov != NULL) fCov = *cov;
243  }
TMatrixT< Double_t > fCov
The covariance matrix.
Definition: GFAbsTrackRep.h:92
TMatrixT< Double_t > fState
The vector of track parameters.
Definition: GFAbsTrackRep.h:89
void genf::GFAbsTrackRep::setFirstCov ( const TMatrixT< Double_t > &  aCov)
inlineinherited

Definition at line 246 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processTrack().

246 { fFirstCov = aCov; }
TMatrixT< Double_t > fFirstCov
void genf::GFAbsTrackRep::setFirstPlane ( const GFDetPlane aPlane)
inlineinherited

Definition at line 247 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processTrack().

248  {
249  fFirstPlane = aPlane;
250  ;
251  }
GFDetPlane fFirstPlane
void genf::GFAbsTrackRep::setFirstState ( const TMatrixT< Double_t > &  aState)
inlineinherited

Definition at line 245 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processTrack().

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

Deprecated. Should be removed soon.

Definition at line 271 of file GFAbsTrackRep.h.

References f.

272  {
273  fInverted = f;
274  return true;
275  }
bool fInverted
specifies the direction of flight of the particle
TFile f
Definition: plotHisto.C:6
void genf::GFAbsTrackRep::setLastCov ( const TMatrixT< Double_t > &  aCov)
inlineinherited

Definition at line 253 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processTrack().

253 { fLastCov = aCov; }
TMatrixT< Double_t > fLastCov
void genf::GFAbsTrackRep::setLastPlane ( const GFDetPlane aPlane)
inlineinherited

Definition at line 254 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processTrack().

255  {
256  fLastPlane = aPlane;
257  ;
258  }
void genf::GFAbsTrackRep::setLastState ( const TMatrixT< Double_t > &  aState)
inlineinherited

Definition at line 252 of file GFAbsTrackRep.h.

Referenced by genf::GFKalman::processTrack().

252 { fLastState = aState; }
TMatrixT< Double_t > fLastState
void genf::GFAbsTrackRep::setNDF ( unsigned int  n)
inlineinherited

Definition at line 263 of file GFAbsTrackRep.h.

References n.

Referenced by genf::GFKalman::fittingPass().

263 { fNdf = n; }
unsigned int fNdf
Definition: GFAbsTrackRep.h:96
Char_t n[5]
void genf::SlTrackRep::setReferencePlane ( const GFDetPlane pl)
inline
void genf::GFAbsTrackRep::setStatusFlag ( int  _val)
inlineinherited

Definition at line 266 of file GFAbsTrackRep.h.

References genf::GFAbsTrackRep::switchDirection().

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

266 { fStatusFlag = _val; }
int fStatusFlag
status of track representation: 0 means everything&#39;s OK
Definition: GFAbsTrackRep.h:99
void genf::GFAbsTrackRep::stepalong ( double  h)
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.

Definition at line 96 of file GFAbsTrackRep.cxx.

References genf::GFAbsTrackRep::Abort().

97 {
98  Abort("stepalong()");
99 }
void Abort(std::string method)
void genf::SlTrackRep::switchDirection ( )
inlinevirtual

Implements genf::GFAbsTrackRep.

Definition at line 44 of file SlTrackRep.h.

References _backw.

44 { _backw = -_backw; }

Member Data Documentation

int genf::SlTrackRep::_backw
private

Definition at line 48 of file SlTrackRep.h.

Referenced by switchDirection().

double genf::GFAbsTrackRep::fChiSqu
protectedinherited

chiSqu of the track fit

Definition at line 95 of file GFAbsTrackRep.h.

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

unsigned int genf::GFAbsTrackRep::fDimension
protectedinherited

Dimensionality of track representation.

Definition at line 86 of file GFAbsTrackRep.h.

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

TMatrixT<Double_t> genf::GFAbsTrackRep::fFirstCov
protectedinherited
GFDetPlane genf::GFAbsTrackRep::fFirstPlane
protectedinherited

Definition at line 109 of file GFAbsTrackRep.h.

Referenced by genf::GFAbsTrackRep::getFirstPlane().

TMatrixT<Double_t> genf::GFAbsTrackRep::fFirstState
protectedinherited

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

Definition at line 104 of file GFAbsTrackRep.h.

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

bool genf::GFAbsTrackRep::fInverted
protectedinherited

specifies the direction of flight of the particle

Definition at line 101 of file GFAbsTrackRep.h.

TMatrixT<Double_t> genf::GFAbsTrackRep::fLastCov
protectedinherited

Definition at line 108 of file GFAbsTrackRep.h.

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

GFDetPlane genf::GFAbsTrackRep::fLastPlane
protectedinherited

Definition at line 110 of file GFAbsTrackRep.h.

Referenced by genf::GFAbsTrackRep::getLastPlane().

TMatrixT<Double_t> genf::GFAbsTrackRep::fLastState
protectedinherited
unsigned int genf::GFAbsTrackRep::fNdf
protectedinherited

Definition at line 96 of file GFAbsTrackRep.h.

int genf::GFAbsTrackRep::fStatusFlag
protectedinherited

status of track representation: 0 means everything's OK

Definition at line 99 of file GFAbsTrackRep.h.

Referenced by genf::GFAbsTrackRep::getStatusFlag().


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