MarlinKinfit  0.4.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TrackParticleFitObject Class Reference
Inheritance diagram for TrackParticleFitObject:
ParticleFitObject BaseFitObject

Public Types

enum  {
  iD0 =0, iPhi0, iOmega, iZ0,
  iTanL, iStart, iEnd, NPAR
}
 

Public Member Functions

 TrackParticleFitObject (const EVENT::Track *trk, double m)
 
 TrackParticleFitObject (const EVENT::TrackState *trk, double m)
 
 TrackParticleFitObject (const double *_ppars, const double *_cov, double m, const double *refPt_=0)
 
 TrackParticleFitObject (const TrackParticleFitObject &rhs)
 
TrackParticleFitObjectoperator= (const TrackParticleFitObject &rhs)
 
virtual TrackParticleFitObjectcopy () const
 Return a new copy of itself.
 
virtual TrackParticleFitObjectassign (const BaseFitObject &source)
 Assign from anther object, if of same type. More...
 
virtual const char * getParamName (int ilocal) const
 Get name of parameter ilocal. More...
 
virtual bool updateParams (double p[], int idim)
 Read values from global vector, readjust vector; return: significant change. More...
 
virtual double getDPx (int ilocal) const
 Return d p_x / d par_ilocal (derivative of px w.r.t. local parameter ilocal)
 
virtual double getDPy (int ilocal) const
 Return d p_y / d par_ilocal (derivative of py w.r.t. local parameter ilocal)
 
virtual double getDPz (int ilocal) const
 Return d p_z / d par_ilocal (derivative of pz w.r.t. local parameter ilocal)
 
virtual double getDE (int ilocal) const
 Return d E / d par_ilocal (derivative of E w.r.t. local parameter ilocal)
 
virtual double getFirstDerivative_Meta_Local (int iMeta, int ilocal, int metaSet) const
 
virtual double getSecondDerivative_Meta_Local (int iMeta, int ilocal, int jlocal, int metaSet) const
 
virtual double getChi2 () const
 Get chi squared from measured and fitted parameters.
 
virtual int getNPar () const
 Get total number of parameters of this FitObject.
 
virtual ThreeVector getTrackPlaneNormal () const
 
virtual ThreeVector getTrackPcaVector () const
 
virtual int getCharge () const
 
virtual ThreeVector getVertex (int ivertex) const
 Get start (i=0) or stop (i=1) vertex.
 
virtual void setVertex (int ivertex, const TwoVector &v)
 Set start (i=0) or stop (i=1) vertex to a point as close as possible to given point. More...
 
virtual FourVector getMomentum (int ivertex) const
 Get momentum at vertex.
 
virtual bool setParameters (int ivertex, const ThreeVector &vertex, const FourVector &momentum, double charge_)
 Set parameters such that track passes through a vertex with a given 4-momentum; return=success. More...
 
virtual bool fixVertexParam (int ivertex, bool fix=true)
 Get helix that is tangential at a certain arc length s. More...
 
virtual bool releaseVertexParam (int ivertex)
 Release parameter(s) pertaining to a vertex. More...
 
virtual ThreeVector getVertexDerivative (int ivertex, int ilocal) const
 Get derivative of vertex w.r.t. parameter ilocal. More...
 
virtual JBLHelix getJBLHelix ()
 Get JBLhelix.
 
virtual JBLHelix getJBLHelix (const ThreeVector &newRefPoint)
 
- Public Member Functions inherited from ParticleFitObject
 ParticleFitObject ()
 Default constructor.
 
 ParticleFitObject (const ParticleFitObject &rhs)
 Copy constructor. More...
 
ParticleFitObjectoperator= (const ParticleFitObject &rhs)
 Assignment. More...
 
virtual ~ParticleFitObject ()
 Virtual destructor.
 
virtual bool setMass (double mass_)
 Set mass of particle; return=success.
 
virtual double getMass () const
 Get mass of particle.
 
virtual std::ostream & print4Vector (std::ostream &os) const
 print the four-momentum (E, px, py, pz) More...
 
virtual FourVector getFourMomentum () const
 
virtual double getE () const
 Return E.
 
virtual double getPx () const
 Return px.
 
virtual double getPy () const
 Return py.
 
virtual double getPz () const
 Return pz.
 
virtual double getP () const
 Return p (momentum)
 
virtual double getP2 () const
 Return p (momentum) squared.
 
virtual double getPt () const
 Return pt (transverse momentum)
 
virtual double getPt2 () const
 Return pt (transverse momentum) squared.
 
virtual void getDerivatives (double der[], int idim) const
 
virtual void addToGlobalChi2DerMatrixNum (double *M, int idim, double eps)
 Add numerically determined derivatives of chi squared to global covariance matrix. More...
 
virtual void addToGlobalChi2DerVectorNum (double *y, int idim, double eps)
 Add numerically determined derivatives of chi squared to global derivative vector. More...
 
virtual std::ostream & print (std::ostream &os) const
 print object to ostream More...
 
void test1stDerivatives ()
 
void test2ndDerivatives ()
 
double num1stDerivative (int ilocal, double eps)
 Evaluates numerically the 1st derivative of chi2 w.r.t. a parameter. More...
 
double num2ndDerivative (int ilocal1, double eps1, int ilocal2, double eps2)
 Evaluates numerically the 2nd derivative of chi2 w.r.t. 2 parameters. More...
 
- Public Member Functions inherited from BaseFitObject
 BaseFitObject ()
 Default constructor.
 
 BaseFitObject (const BaseFitObject &rhs)
 Copy constructor. More...
 
BaseFitObjectoperator= (const BaseFitObject &rhs)
 Assignment. More...
 
virtual ~BaseFitObject ()
 Virtual destructor.
 
virtual bool setParam (int ilocal, double par_, bool measured_, bool fixed_=false)
 Set value and measured flag of parameter i; return: significant change. More...
 
virtual bool setParam (int ilocal, double par_)
 Set value of parameter ilocal; return: significant change. More...
 
virtual bool setMParam (int ilocal, double mpar_)
 Set measured value of parameter ilocal; return: success. More...
 
virtual bool setError (int ilocal, double err_)
 Set error of parameter ilocal; return: success. More...
 
virtual bool setCov (int ilocal, int jlocal, double cov_)
 Set covariance of parameters ilocal and jlocal; return: success. More...
 
virtual bool setGlobalParNum (int ilocal, int iglobal)
 Set number of parameter ilocal in global list return true signals OK. More...
 
virtual bool fixParam (int ilocal, bool fix=true)
 Fix a parameter (fix=true), or release it (fix=false) More...
 
virtual bool releaseParam (int ilocal)
 Release a parameter. More...
 
virtual bool isParamFixed (int ilocal) const
 Returns whether parameter is fixed. More...
 
virtual double getParam (int ilocal) const
 Get current value of parameter ilocal. More...
 
virtual const char * getName () const
 Get object's name.
 
virtual void setName (const char *name_)
 Set object's name.
 
virtual double getMParam (int ilocal) const
 Get measured value of parameter ilocal. More...
 
virtual double getError (int ilocal) const
 Get error of parameter ilocal. More...
 
virtual double getCov (int ilocal, int jlocal) const
 Get covariance between parameters ilocal and jlocal. More...
 
virtual double getRho (int ilocal, int jlocal) const
 Get correlation coefficient between parameters ilocal and jlocal. More...
 
virtual bool isParamMeasured (int ilocal) const
 Get measured flag for parameter ilocal. More...
 
virtual int getGlobalParNum (int ilocal) const
 Get global parameter number of parameter ilocal. More...
 
virtual int getNMeasured () const
 Get number of measured parameters of this FitObject.
 
virtual int getNUnmeasured () const
 Get number of unmeasured parameters of this FitObject.
 
virtual int getNFree () const
 Get number of free parameters of this FitObject.
 
virtual int getNFixed () const
 Get number of fixed parameters of this FitObject.
 
virtual double getDChi2DParam (int ilocal) const
 Get derivative of chi squared w.r.t. parameter ilocal. More...
 
virtual double getD2Chi2DParam2 (int ilocal, int jlocal) const
 Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2. More...
 
virtual std::ostream & printParams (std::ostream &os) const
 print the parameters and errors More...
 
virtual std::ostream & printRhoValues (std::ostream &os) const
 print the correlation coefficients More...
 
virtual std::ostream & print1stDerivatives (std::ostream &os) const
 print the 1st derivatives wrt metaSet 0 (E, px, py, pz) More...
 
virtual std::ostream & print2ndDerivatives (std::ostream &os) const
 print the 2nd derivatives wrt metaSet 0 (E, px, py, pz) More...
 
virtual void invalidateCache () const
 invalidate any cached quantities
 
virtual void addToGlobCov (double *glcov, int idim) const
 Add covariance matrix elements to global covariance matrix of size idim x idim. More...
 
virtual void addToGlobalChi2DerVector (double *y, int idim) const
 Add derivatives of chi squared to global derivative vector. More...
 
virtual void addToGlobalChi2DerMatrix (double *M, int idim) const
 Add 2nd derivatives of chi squared to global derivative matrix. More...
 
virtual void addToGlobalChi2DerVector (double *y, int idim, double lambda, double der[], int metaSet) const
 Add derivatives of momentum vector to global derivative vector. More...
 
virtual void addTo1stDerivatives (double M[], int idim, double der[], int kglobal, int metaSet) const
 
virtual void addTo2ndDerivatives (double der2[], int idim, double factor[], int metaSet) const
 
virtual void addTo2ndDerivatives (double M[], int idim, double lambda, double der[], int metaSet) const
 
virtual void initCov ()
 
virtual double getError2 (double der[], int metaset) const
 

Static Public Member Functions

static double setBfield (double bfield_)
 Set the B field for all tracks. More...
 
static double getBfield ()
 Get the B field for all tracks (in Tesla)
 

Static Public Attributes

static double bfield = 3.5
 Global B field in Tesla(!)
 
static const double omega_pt_conv = 2.99792458e-4
 
static const double maxpt = 500
 

Protected Member Functions

virtual void initialise (const double *_pars, const double *_cov, double m)
 
void updateCache () const
 
void updateMomentumDerivatives () const
 
void updateNormalDerivatives () const
 
void updateTrajectoryDerivatives () const
 
void resetMomentumFirstDerivatives () const
 
void resetMomentumSecondDerivatives () const
 
void resetNormalFirstDerivatives () const
 
void resetNormalSecondDerivatives () const
 
void resetTrajectoryFirstDerivatives () const
 
void resetTrajectorySecondDerivatives () const
 
void setMomentumFirstDerivatives (int iMeta, int jLocal, double x) const
 
void setMomentumSecondDerivatives (int iMeta, int jLocal, int kLocal, double x) const
 
void setNormalFirstDerivatives (int iMeta, int jLocal, double x) const
 
void setNormalSecondDerivatives (int iMeta, int jLocal, int kLocal, double x) const
 
void setTrajectoryStartFirstDerivatives (int iMeta, int jLocal, double x) const
 
void setTrajectoryStartSecondDerivatives (int iMeta, int jLocal, int kLocal, double x) const
 
void setTrajectoryEndFirstDerivatives (int iMeta, int jLocal, double x) const
 
void setTrajectoryEndSecondDerivatives (int iMeta, int jLocal, int kLocal, double x) const
 
virtual double getMomentumFirstDerivatives (int iMeta, int jLocal) const
 
virtual double getMomentumSecondDerivatives (int iMeta, int jLocal, int kLocal) const
 
virtual double getNormalFirstDerivatives (int iMeta, int jLocal) const
 
virtual double getNormalSecondDerivatives (int iMeta, int jLocal, int kLocal) const
 
virtual double getTrajectoryStartFirstDerivatives (int iMeta, int jLocal) const
 
virtual double getTrajectoryStartSecondDerivatives (int iMeta, int jLocal, int kLocal) const
 
virtual double getTrajectoryEndFirstDerivatives (int iMeta, int jLocal) const
 
virtual double getTrajectoryEndSecondDerivatives (int iMeta, int jLocal, int kLocal) const
 
- Protected Member Functions inherited from BaseFitObject
virtual bool calculateCovInv () const
 Calculate the inverse of the covariance matrix.
 

Protected Attributes

ThreeVector trackReferencePoint
 
ThreeVector trackPlaneNormal
 
ThreeVector trackPcaVector
 
ThreeVector trajectoryPointAtPCA
 
ThreeVector trajectoryPointAtStart
 
ThreeVector trajectoryPointAtEnd
 
ThreeVector momentumAtPCA
 
ThreeVector momentumAtStart
 
ThreeVector momentumAtEnd
 
double momentumFirstDerivatives [4][NPAR]
 
double momentumSecondDerivatives [4][NPAR][NPAR]
 
double normalFirstDerivatives [3][NPAR]
 
double normalSecondDerivatives [3][NPAR][NPAR]
 
double trajectoryStartFirstDerivatives [3][NPAR]
 
double trajectoryStartSecondDerivatives [3][NPAR][NPAR]
 
double trajectoryEndFirstDerivatives [3][NPAR]
 
double trajectoryEndSecondDerivatives [3][NPAR][NPAR]
 
double phi0
 
double omega
 
double tanl
 
double d0
 
double z0
 
double s_start
 
double s_end
 
double chi2
 
- Protected Attributes inherited from ParticleFitObject
double mass
 mass of particle
 
FourVector fourMomentum
 
double paramCycl [BaseDefs::MAXPAR]
 
- Protected Attributes inherited from BaseFitObject
char * name
 
double par [BaseDefs::MAXPAR]
 fit parameters
 
double mpar [BaseDefs::MAXPAR]
 measured parameters
 
bool measured [BaseDefs::MAXPAR]
 measured flag
 
bool fixed [BaseDefs::MAXPAR]
 fixed flag
 
int globalParNum [BaseDefs::MAXPAR]
 global paramter number for each parameter
 
double cov [BaseDefs::MAXPAR][BaseDefs::MAXPAR]
 local covariance matrix
 
double covinv [BaseDefs::MAXPAR][BaseDefs::MAXPAR]
 inverse pf local covariance matrix
 
bool covinvvalid
 flag for valid inverse covariance matrix
 
bool cachevalid
 flag for valid cache
 

Static Protected Attributes

static const double parfact [NPAR] = {1.e-2, 1., 1.e-3, 1.e-2, 1., 1., 1.}
 
- Static Protected Attributes inherited from BaseFitObject
static const double eps2 = 0.0001
 

Additional Inherited Members

Member Function Documentation

TrackParticleFitObject & TrackParticleFitObject::assign ( const BaseFitObject source)
virtual

Assign from anther object, if of same type.

Parameters
sourceThe source object

Reimplemented from ParticleFitObject.

References ParticleFitObject::assign().

bool TrackParticleFitObject::fixVertexParam ( int  ivertex,
bool  fix = true 
)
virtual

Get helix that is tangential at a certain arc length s.

Fix parameter(s) pertaining to a vertex, or release it

Parameters
ivertexVertex number
fixfix if true, release if false

References BaseFitObject::fixParam().

Referenced by releaseVertexParam().

const char * TrackParticleFitObject::getParamName ( int  ilocal) const
virtual

Get name of parameter ilocal.

Parameters
ilocalLocal parameter number

Reimplemented from BaseFitObject.

ThreeVector TrackParticleFitObject::getVertexDerivative ( int  ivertex,
int  ilocal 
) const
virtual

Get derivative of vertex w.r.t. parameter ilocal.

Parameters
ivertexvertex number: 0=start, 1=stop
ilocalLocal parameter number

Referenced by VertexConstraint::getDerivatives().

bool TrackParticleFitObject::releaseVertexParam ( int  ivertex)
virtual

Release parameter(s) pertaining to a vertex.

< Vertex number: 0=start, 1=stop

Parameters
ivertexVertex number: 0=start, 1=stop

References fixVertexParam().

double TrackParticleFitObject::setBfield ( double  bfield_)
static

Set the B field for all tracks.

Parameters
bfield_New Value of B field (in Tesla)

References bfield.

virtual bool TrackParticleFitObject::setParameters ( int  ivertex,
const ThreeVector vertex,
const FourVector &  momentum,
double  charge_ 
)
inlinevirtual

Set parameters such that track passes through a vertex with a given 4-momentum; return=success.

Parameters
ivertexVertex number: 0=start, 1=stop
vertexVertex position
momentumFour-momentum
charge_Charge (signed, in units of e)
void TrackParticleFitObject::setVertex ( int  ivertex,
const TwoVector v 
)
virtual

Set start (i=0) or stop (i=1) vertex to a point as close as possible to given point.

Parameters
ivertexVertex number: 0=start, 1=stop
vVertex position // DANIEL why is this 2d vertex?

References BaseFitObject::cachevalid, JBLHelix::getClosestS(), and getJBLHelix().

bool TrackParticleFitObject::updateParams ( double  p[],
int  idim 
)
virtual

Read values from global vector, readjust vector; return: significant change.

Parameters
pThe parameter vector
idimLength of the vector

Reimplemented from BaseFitObject.

References BaseFitObject::cov, getBfield(), BaseFitObject::getGlobalParNum(), getNPar(), BaseFitObject::invalidateCache(), and BaseFitObject::par.


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