Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

ChargedParticleTrack Class Reference

A helix track of a charged particle with start and stop vertex. More...

#include <ChargedParticleTrack.h>

Inheritance diagram for ChargedParticleTrack:

Inheritance graph
[legend]
Collaboration diagram for ChargedParticleTrack:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ChargedParticleTrack (const char *name_, double kappa, double phi0, double theta, double dca, double z0, double mass, double charge_, double sstart, double sstop)
 Constructor from (kappa, phi0, theta, dca, z0, mass, sstart, sstop).

 ChargedParticleTrack (const char *name_, double kappa, double phi0, double theta, double dca, double z0, double mass, double charge_, double sstart)
 Constructor from (kappa, phi0, theta, dca, z0, mass, sstart).

 ChargedParticleTrack (const char *name_, const ThreeVector &vertex, const ThreeVector &momentum, double mass_, double charge_=1)
 Constructor from a (start) vertex and a momentum vector.

 ChargedParticleTrack (const char *name_, const float par_[5], const float cov_[15], double mass_, double charge_=1, double sstart=0, double sstop=0)
 Constructor from an array of parameters, an array of covariances.

virtual ~ChargedParticleTrack ()
 Destructor.

virtual int getNPar () const
 Get number of parameters of this FitObject.

virtual bool setParam (int ilocal, double par_, bool measured_, bool fixed_=false)
 Set value and measured flag of parameter ilocal; return=success.

virtual bool setParam (int ilocal, double par_)
 Set value of parameter ilocal; return=success.

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.

virtual const char * getParamName (int ilocal) const
 Get name of parameter ilocal.

virtual void getTrajectoryPointEx (double s, ThreeVector &p) const
 Get point along trajectory into existing 3-vector.

virtual void getVertexEx (int ivertex, ThreeVector &p) const
 Get start (ivertex=0) or stop (ivertex=1) vertex into existing 3-vector.

virtual void setVertex (int ivertex, const TwoVector &p)
 Set start (i=0) or stop (i=1) vertex to a point as close as possible to given point.

virtual void getTrajectoryDerivativeEx (double s, int ilocal, ThreeVector &p) const
 Get derivative of trajectory w.r.t. parameter ilocal into existing 3-vector.

virtual void getVertexDerivativeEx (int ivertex, int ilocal, ThreeVector &p) const
 Get derivative of vertex w.r.t. parameter ilocal into existing 3-vector.

virtual void getMomentumAtTrajectoryEx (double s, FourVector &p) const
 Get momentum along trajectory into existing 4-vector.

virtual void getMomentumEx (int ivertex, FourVector &p) const
 Get momentum at vertex into existing 4-vector.

virtual double getCharge () const
 Get charge in units of e.

virtual void getMomentumDerivativeAtTrajectoryEx (double s, int ilocal, FourVector &p) const
 Get momentum derivative along trajectory into existing 4-vector.

virtual void getMomentumDerivativeEx (int ivertex, int ilocal, FourVector &p) const
 Get derivative of momentum w.r.t. parameter ilocal into existing 4-vector.

virtual double getArcLength (int i) const
 Get s (arclength in r/phi) of vertex i.

virtual double getDChi2DParam (int ilocal) const
 Get derivative of chi squared w.r.t. parameter ilocal.

virtual double getD2Chi2DParam2 (int ilocal1, int ilocal2) const
 Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2.

virtual void addToGlobalChi2DerMatrix (int idim, double *M) const
 Add derivatives of chi squared to global covariance matrix.

virtual void addToGlobalDerMatrix (int idim, double c, double *M) const
 Add derivatives to global covariance matrix.

virtual JBLHelix getTangentialHelix (double s)
 Get helix that is tangential at a certain arc length s.

virtual double getMass () const
 get Mass

virtual bool fixVertexParam (int ivertex, bool fix=true)
 Fix parameter(s) pertaining to a vertex, or release it.


Static Public Attributes

const double parfact [NPARMAX]
 Factor between internal and external parameters.


Protected Types

enum  { NPAR = 8 }
 Number of parameters. More...


Protected Member Functions

void updateCache () const
 Update the cache values.

virtual void initCov (const float cov_[15])
 init covariance matrix from an array

double getNormalS (double s) const
 Get smallest s that corresponds to same (x, y).


Protected Attributes

double kappa
 kappa = parfact[0]*par[0]

double phi0
 phi0 = parfact[1]*par[1]

double theta
 theta = parfact[2]*par[2]

double dca
 dca = parfact[3]*par[3]

double z0
 z0 = parfact[4]*par[4]

double mass
 mass = parfact[5]*par[5]

double r
 1/kappa

double sphi0
 sin(phi0)

double cphi0
 cos(phi0)

double dcamir
 dca - r

double cottheta
 cotan (theta)

double sintheta
 sin (theta)

double sin2theta
 sin^2 (theta)

double cBq
 cB * charge

double pt
 -cBq/kappa

double momentum
 -cBq/[kappa*sin(theta)];

double momderfact
 +cBq/kappa^2;

double energy
 sqrt ((cB/[kappa*sin(theta)])^2 + mass^2)

double beta
 momentum/energy;

double charge
 charge (in units of e)


Detailed Description

A helix track of a charged particle with start and stop vertex.

Parameters:

Definition at line 38 of file ChargedParticleTrack.h.


Member Enumeration Documentation

anonymous enum [protected]
 

Number of parameters.

Enumeration values:
NPAR 

Definition at line 194 of file ChargedParticleTrack.h.


Constructor & Destructor Documentation

ChargedParticleTrack::ChargedParticleTrack const char *  name_,
double  kappa,
double  phi0,
double  theta,
double  dca,
double  z0,
double  mass,
double  charge_,
double  sstart,
double  sstop
 

Constructor from (kappa, phi0, theta, dca, z0, mass, sstart, sstop).

Definition at line 32 of file ChargedParticleTrack.C.

References TrackFitObject::initCov(), parfact, TrackFitObject::setMParam(), and setParam().

ChargedParticleTrack::ChargedParticleTrack const char *  name_,
double  kappa,
double  phi0,
double  theta,
double  dca,
double  z0,
double  mass,
double  charge_,
double  sstart
 

Constructor from (kappa, phi0, theta, dca, z0, mass, sstart).

Definition at line 60 of file ChargedParticleTrack.C.

References TrackFitObject::initCov(), parfact, TrackFitObject::setMParam(), and setParam().

ChargedParticleTrack::ChargedParticleTrack const char *  name_,
const ThreeVector vertex,
const ThreeVector momentum,
double  mass_,
double  charge_ = 1
 

Constructor from a (start) vertex and a momentum vector.

Definition at line 87 of file ChargedParticleTrack.C.

References TrackFitObject::bfield, cBq, charge, dca, FourVector::getPhi(), FourVector::getPt(), FourVector::getTheta(), ThreeVector::getX(), ThreeVector::getY(), ThreeVector::getZ(), TrackFitObject::initCov(), kappa, parfact, phi0, r, TrackFitObject::setMParam(), setParam(), setParameters(), theta, and z0.

ChargedParticleTrack::ChargedParticleTrack const char *  name_,
const float  par_[5],
const float  cov_[15],
double  mass_,
double  charge_ = 1,
double  sstart = 0,
double  sstop = 0
 

Constructor from an array of parameters, an array of covariances.

Definition at line 152 of file ChargedParticleTrack.C.

References TrackFitObject::calculateCovInv(), TrackFitObject::initCov(), parfact, TrackFitObject::setMParam(), and setParam().

ChargedParticleTrack::~ChargedParticleTrack  )  [virtual]
 

Destructor.

Definition at line 178 of file ChargedParticleTrack.C.


Member Function Documentation

virtual void ChargedParticleTrack::addToGlobalChi2DerMatrix int  idim,
double *  M
const [inline, virtual]
 

Add derivatives of chi squared to global covariance matrix.

Implements TrackFitObject.

Definition at line 165 of file ChargedParticleTrack.h.

virtual void ChargedParticleTrack::addToGlobalDerMatrix int  idim,
double  c,
double *  M
const [inline, virtual]
 

Add derivatives to global covariance matrix.

Implements TrackFitObject.

Definition at line 167 of file ChargedParticleTrack.h.

virtual bool ChargedParticleTrack::fixVertexParam int  ivertex,
bool  fix = true
[inline, virtual]
 

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

Parameters:
ivertex  Vertex number
fix  fix if true, release if false

Implements TrackFitObject.

Definition at line 179 of file ChargedParticleTrack.h.

References TrackFitObject::fixParam().

double ChargedParticleTrack::getArcLength int  i  )  const [virtual]
 

Get s (arclength in r/phi) of vertex i.

Implements TrackFitObject.

Definition at line 509 of file ChargedParticleTrack.C.

References NPAR, TrackFitObject::par, and parfact.

double ChargedParticleTrack::getCharge  )  const [virtual]
 

Get charge in units of e.

Implements TrackFitObject.

Definition at line 432 of file ChargedParticleTrack.C.

References charge, and kappa.

Referenced by K0Event::createSmearedChargedTrack().

virtual double ChargedParticleTrack::getD2Chi2DParam2 int  ilocal1,
int  ilocal2
const [inline, virtual]
 

Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2.

Implements TrackFitObject.

Definition at line 162 of file ChargedParticleTrack.h.

virtual double ChargedParticleTrack::getDChi2DParam int  ilocal  )  const [inline, virtual]
 

Get derivative of chi squared w.r.t. parameter ilocal.

Implements TrackFitObject.

Definition at line 160 of file ChargedParticleTrack.h.

double ChargedParticleTrack::getMass  )  const [virtual]
 

get Mass

Implements TrackFitObject.

Definition at line 436 of file ChargedParticleTrack.C.

References TrackFitObject::par, and parfact.

Referenced by K0Event::createSmearedChargedTrack().

void ChargedParticleTrack::getMomentumAtTrajectoryEx double  s,
FourVector p
const [virtual]
 

Get momentum along trajectory into existing 4-vector.

Implements TrackFitObject.

Definition at line 418 of file ChargedParticleTrack.C.

References TrackFitObject::cachevalid, cottheta, energy, kappa, phi0, pt, FourVector::setValues(), and updateCache().

Referenced by getMomentumEx().

void ChargedParticleTrack::getMomentumDerivativeAtTrajectoryEx double  s,
int  ilocal,
FourVector p
const [virtual]
 

Get momentum derivative along trajectory into existing 4-vector.

Implements TrackFitObject.

Definition at line 440 of file ChargedParticleTrack.C.

References beta, TrackFitObject::cachevalid, cBq, cottheta, energy, kappa, momderfact, momentum, NPAR, TrackFitObject::par, parfact, phi0, pt, FourVector::setValues(), sin2theta, and updateCache().

Referenced by getMomentumDerivativeEx().

void ChargedParticleTrack::getMomentumDerivativeEx int  ivertex,
int  ilocal,
FourVector p
const [virtual]
 

Get derivative of momentum w.r.t. parameter ilocal into existing 4-vector.

Implements TrackFitObject.

Definition at line 493 of file ChargedParticleTrack.C.

References getMomentumDerivativeAtTrajectoryEx(), NPAR, TrackFitObject::par, parfact, and FourVector::setValues().

void ChargedParticleTrack::getMomentumEx int  ivertex,
FourVector p
const [virtual]
 

Get momentum at vertex into existing 4-vector.

Implements TrackFitObject.

Definition at line 427 of file ChargedParticleTrack.C.

References getMomentumAtTrajectoryEx(), NPAR, TrackFitObject::par, and parfact.

double ChargedParticleTrack::getNormalS double  s  )  const [protected]
 

Get smallest s that corresponds to same (x, y).

Definition at line 573 of file ChargedParticleTrack.C.

References kappa, TrackFitObject::par, and parfact.

Referenced by setParameters(), and setVertex().

int ChargedParticleTrack::getNPar  )  const [virtual]
 

Get number of parameters of this FitObject.

Implements TrackFitObject.

Definition at line 181 of file ChargedParticleTrack.C.

References NPAR.

const char * ChargedParticleTrack::getParamName int  ilocal  )  const [virtual]
 

Get name of parameter ilocal.

Parameters:
ilocal  Local parameter number

Reimplemented from BaseFitObject.

Definition at line 185 of file ChargedParticleTrack.C.

JBLHelix ChargedParticleTrack::getTangentialHelix double  s  )  [virtual]
 

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

Parameters:
s  Arc length

Implements TrackFitObject.

Definition at line 563 of file ChargedParticleTrack.C.

References TrackFitObject::par, and parfact.

void ChargedParticleTrack::getTrajectoryDerivativeEx double  s,
int  ilocal,
ThreeVector p
const [virtual]
 

Get derivative of trajectory w.r.t. parameter ilocal into existing 3-vector.

Implements TrackFitObject.

Definition at line 310 of file ChargedParticleTrack.C.

References TrackFitObject::cachevalid, cottheta, cphi0, dca, dcamir, kappa, NPAR, parfact, phi0, r, ThreeVector::setValues(), sin2theta, sphi0, and updateCache().

Referenced by getVertexDerivativeEx().

void ChargedParticleTrack::getTrajectoryPointEx double  s,
ThreeVector p
const [virtual]
 

Get point along trajectory into existing 3-vector.

Implements TrackFitObject.

Definition at line 288 of file ChargedParticleTrack.C.

References TrackFitObject::cachevalid, cottheta, cphi0, dca, dcamir, kappa, phi0, r, ThreeVector::setValues(), sphi0, updateCache(), and z0.

Referenced by getVertexEx().

void ChargedParticleTrack::getVertexDerivativeEx int  ivertex,
int  ilocal,
ThreeVector p
const [virtual]
 

Get derivative of vertex w.r.t. parameter ilocal into existing 3-vector.

Implements TrackFitObject.

Definition at line 402 of file ChargedParticleTrack.C.

References getTrajectoryDerivativeEx(), NPAR, TrackFitObject::par, parfact, and ThreeVector::setValues().

void ChargedParticleTrack::getVertexEx int  ivertex,
ThreeVector p
const [virtual]
 

Get start (ivertex=0) or stop (ivertex=1) vertex into existing 3-vector.

Implements TrackFitObject.

Definition at line 375 of file ChargedParticleTrack.C.

References getTrajectoryPointEx(), NPAR, TrackFitObject::par, and parfact.

void ChargedParticleTrack::initCov const float  cov_[15]  )  [protected, virtual]
 

init covariance matrix from an array

Definition at line 547 of file ChargedParticleTrack.C.

References TrackFitObject::checkCov(), TrackFitObject::cov, TrackFitObject::covinvvalid, TrackFitObject::initCov(), and parfact.

bool ChargedParticleTrack::setParam int  ilocal,
double  par_
[virtual]
 

Set value of parameter ilocal; return=success.

Parameters:
ilocal  Local parameter number
par_  New parameter value

Reimplemented from TrackFitObject.

Definition at line 268 of file ChargedParticleTrack.C.

References TrackFitObject::invalidateCache(), NPAR, TrackFitObject::par, and parfact.

bool ChargedParticleTrack::setParam int  ilocal,
double  par_,
bool  measured_,
bool  fixed_ = false
[virtual]
 

Set value and measured flag of parameter ilocal; return=success.

Parameters:
ilocal  Local parameter number
par_  New parameter value
measured_  New "measured" flag
fixed_  New "fixed" flag

Reimplemented from TrackFitObject.

Definition at line 199 of file ChargedParticleTrack.C.

References TrackFitObject::fixed, TrackFitObject::invalidateCache(), TrackFitObject::measured, and TrackFitObject::NPARMAX.

Referenced by ChargedParticleTrack(), and setParameters().

bool ChargedParticleTrack::setParameters int  ivertex,
const ThreeVector vertex,
const FourVector momentum,
double  charge_
[virtual]
 

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

Parameters:
ivertex  Vertex number: 0=start, 1=stop
vertex  Vertex position
momentum  Four-momentum
charge_  Charge (signed, in units of e)

Implements TrackFitObject.

Definition at line 208 of file ChargedParticleTrack.C.

References TrackFitObject::bfield, cBq, charge, dca, FourVector::getMass(), getNormalS(), FourVector::getPhi(), FourVector::getPt(), FourVector::getTheta(), ThreeVector::getX(), ThreeVector::getY(), ThreeVector::getZ(), TrackFitObject::isParamFixed(), kappa, mass, NPAR, TrackFitObject::par, parfact, phi0, r, setParam(), theta, and z0.

Referenced by ChargedParticleTrack().

void ChargedParticleTrack::setVertex int  ivertex,
const TwoVector p
[virtual]
 

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

Parameters:
ivertex  Vertex number: 0=start, 1=stop
p  Vertex position

Implements TrackFitObject.

Definition at line 380 of file ChargedParticleTrack.C.

References TrackFitObject::cachevalid, cphi0, dca, dcamir, getNormalS(), TwoVector::getX(), TwoVector::getY(), kappa, NPAR, TrackFitObject::par, parfact, phi0, r, sphi0, and updateCache().

void ChargedParticleTrack::updateCache  )  const [protected]
 

Update the cache values.

Definition at line 514 of file ChargedParticleTrack.C.

References beta, TrackFitObject::bfield, TrackFitObject::cachevalid, TrackFitObject::calculateChi2(), cBq, charge, cottheta, cphi0, dca, dcamir, energy, kappa, mass, momderfact, momentum, TrackFitObject::par, parfact, phi0, pt, r, sin2theta, sintheta, sphi0, theta, and z0.

Referenced by getMomentumAtTrajectoryEx(), getMomentumDerivativeAtTrajectoryEx(), getTrajectoryDerivativeEx(), getTrajectoryPointEx(), and setVertex().


Member Data Documentation

double ChargedParticleTrack::beta [mutable, protected]
 

momentum/energy;

Definition at line 215 of file ChargedParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), and updateCache().

double ChargedParticleTrack::cBq [mutable, protected]
 

cB * charge

Definition at line 210 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getMomentumDerivativeAtTrajectoryEx(), setParameters(), and updateCache().

double ChargedParticleTrack::charge [protected]
 

charge (in units of e)

Definition at line 217 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getCharge(), setParameters(), and updateCache().

double ChargedParticleTrack::cottheta [mutable, protected]
 

cotan (theta)

Definition at line 207 of file ChargedParticleTrack.h.

Referenced by getMomentumAtTrajectoryEx(), getMomentumDerivativeAtTrajectoryEx(), getTrajectoryDerivativeEx(), getTrajectoryPointEx(), and updateCache().

double ChargedParticleTrack::cphi0 [mutable, protected]
 

cos(phi0)

Definition at line 205 of file ChargedParticleTrack.h.

Referenced by getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setVertex(), and updateCache().

double ChargedParticleTrack::dca [mutable, protected]
 

dca = parfact[3]*par[3]

Definition at line 200 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setParameters(), setVertex(), and updateCache().

double ChargedParticleTrack::dcamir [mutable, protected]
 

dca - r

Definition at line 206 of file ChargedParticleTrack.h.

Referenced by getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setVertex(), and updateCache().

double ChargedParticleTrack::energy [mutable, protected]
 

sqrt ((cB/[kappa*sin(theta)])^2 + mass^2)

Definition at line 214 of file ChargedParticleTrack.h.

Referenced by getMomentumAtTrajectoryEx(), getMomentumDerivativeAtTrajectoryEx(), and updateCache().

double ChargedParticleTrack::kappa [mutable, protected]
 

kappa = parfact[0]*par[0]

Definition at line 197 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getCharge(), getMomentumAtTrajectoryEx(), getMomentumDerivativeAtTrajectoryEx(), getNormalS(), getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setParameters(), setVertex(), and updateCache().

double ChargedParticleTrack::mass [mutable, protected]
 

mass = parfact[5]*par[5]

Definition at line 202 of file ChargedParticleTrack.h.

Referenced by setParameters(), and updateCache().

double ChargedParticleTrack::momderfact [mutable, protected]
 

+cBq/kappa^2;

Definition at line 213 of file ChargedParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), and updateCache().

double ChargedParticleTrack::momentum [mutable, protected]
 

-cBq/[kappa*sin(theta)];

Definition at line 212 of file ChargedParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), and updateCache().

const double ChargedParticleTrack::parfact [static]
 

Initial value:

 
  {0.0001, 0.001, 0.01, 0.01, 1., 1., 1., 1.}
Factor between internal and external parameters.

Definition at line 29 of file ChargedParticleTrack.C.

Referenced by ChargedParticleTrack(), K0Event::createSmearedChargedTrack(), getArcLength(), getMass(), getMomentumDerivativeAtTrajectoryEx(), getMomentumDerivativeEx(), getMomentumEx(), getNormalS(), getTangentialHelix(), getTrajectoryDerivativeEx(), getVertexDerivativeEx(), getVertexEx(), initCov(), setParam(), setParameters(), setVertex(), and updateCache().

double ChargedParticleTrack::phi0 [mutable, protected]
 

phi0 = parfact[1]*par[1]

Definition at line 198 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getMomentumAtTrajectoryEx(), getMomentumDerivativeAtTrajectoryEx(), getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setParameters(), setVertex(), and updateCache().

double ChargedParticleTrack::pt [mutable, protected]
 

-cBq/kappa

Definition at line 211 of file ChargedParticleTrack.h.

Referenced by getMomentumAtTrajectoryEx(), getMomentumDerivativeAtTrajectoryEx(), and updateCache().

double ChargedParticleTrack::r [mutable, protected]
 

1/kappa

Definition at line 203 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setParameters(), setVertex(), and updateCache().

double ChargedParticleTrack::sin2theta [mutable, protected]
 

sin^2 (theta)

Definition at line 209 of file ChargedParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), getTrajectoryDerivativeEx(), and updateCache().

double ChargedParticleTrack::sintheta [mutable, protected]
 

sin (theta)

Definition at line 208 of file ChargedParticleTrack.h.

Referenced by updateCache().

double ChargedParticleTrack::sphi0 [mutable, protected]
 

sin(phi0)

Definition at line 204 of file ChargedParticleTrack.h.

Referenced by getTrajectoryDerivativeEx(), getTrajectoryPointEx(), setVertex(), and updateCache().

double ChargedParticleTrack::theta [mutable, protected]
 

theta = parfact[2]*par[2]

Definition at line 199 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), setParameters(), and updateCache().

double ChargedParticleTrack::z0 [mutable, protected]
 

z0 = parfact[4]*par[4]

Definition at line 201 of file ChargedParticleTrack.h.

Referenced by ChargedParticleTrack(), getTrajectoryPointEx(), setParameters(), and updateCache().


The documentation for this class was generated from the following files:
Generated on Fri Sep 14 17:38:35 2007 for Kinfit by doxygen 1.3.2