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

NeutralParticleTrack Class Reference

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

#include <NeutralParticleTrack.h>

Inheritance diagram for NeutralParticleTrack:

Inheritance graph
[legend]
Collaboration diagram for NeutralParticleTrack:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NeutralParticleTrack (const char *name_, double pt, double phi0, double theta, double dca, double z0, double mass, double sstart, double sstop)
 Constructor from (pt, phi0, theta, dca, z0, mass, sstart, sstop).

 NeutralParticleTrack (const char *name_, double pt, double phi0, double theta, double dca, double z0, double mass, double sstart)
 Constructor from (pt, phi0, theta, dca, z0, mass, sstart).

 NeutralParticleTrack (const char *name_, const ThreeVector &vertex, const ThreeVector &momentum, double mass)
 Constructor from a (start) vertex and a momentum vector.

virtual ~NeutralParticleTrack ()
 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 double getMass () const
 Get mass in GeV.

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 void addToGlobCov (double *glcov, int idim) const
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 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

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

void updateCache () const
 Update the cache values.


Protected Attributes

double pt
 pt = 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 sphi0
 sin(phi0)

double cphi0
 cos(phi0)

double px
 px = pt*cos(phi0)

double py
 py = pt*sin(phi0)

double x0
 x0 = dca*sin(phi0)

double y0
 y0 = -dca*cos(phi0)

double cottheta
 cotan (theta)

double sintheta
 sin (theta)

double sin2theta
 sin^2 (theta)

double momentum
 pt/sin(theta);

double momderfact
 cB/kappa^2;

double energy
 sqrt (momentum^2 + mass^2)

double beta
 momentum/energy;


Detailed Description

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

Parameters:

Definition at line 30 of file NeutralParticleTrack.h.


Member Enumeration Documentation

anonymous enum [protected]
 

Number of parameters.

Enumeration values:
NPAR 

Definition at line 178 of file NeutralParticleTrack.h.


Constructor & Destructor Documentation

NeutralParticleTrack::NeutralParticleTrack const char *  name_,
double  pt,
double  phi0,
double  theta,
double  dca,
double  z0,
double  mass,
double  sstart,
double  sstop
 

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

Definition at line 31 of file NeutralParticleTrack.C.

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

NeutralParticleTrack::NeutralParticleTrack const char *  name_,
double  pt,
double  phi0,
double  theta,
double  dca,
double  z0,
double  mass,
double  sstart
 

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

Definition at line 59 of file NeutralParticleTrack.C.

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

NeutralParticleTrack::NeutralParticleTrack const char *  name_,
const ThreeVector vertex,
const ThreeVector momentum,
double  mass
 

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

Definition at line 86 of file NeutralParticleTrack.C.

References cphi0, dca, ThreeVector::getPhi(), ThreeVector::getPt(), ThreeVector::getTheta(), ThreeVector::getX(), ThreeVector::getY(), ThreeVector::getZ(), TrackFitObject::initCov(), mass, phi0, pt, TrackFitObject::setMParam(), setParam(), sphi0, theta, and z0.

NeutralParticleTrack::~NeutralParticleTrack  )  [virtual]
 

Destructor.

Definition at line 132 of file NeutralParticleTrack.C.


Member Function Documentation

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

Add derivatives of chi squared to global covariance matrix.

Implements TrackFitObject.

Definition at line 153 of file NeutralParticleTrack.h.

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

Add derivatives to global covariance matrix.

Implements TrackFitObject.

Definition at line 155 of file NeutralParticleTrack.h.

void NeutralParticleTrack::addToGlobCov double *  glcov,
int  idim
const [virtual]
 

Add covariance matrix elements to global covariance matrix of size idim x idim

Reimplemented from TrackFitObject.

Definition at line 369 of file NeutralParticleTrack.C.

References TrackFitObject::cov, TrackFitObject::getGlobalParNum(), getNPar(), TrackFitObject::isParamFixed(), TrackFitObject::isParamMeasured(), and TrackFitObject::NPARMAX.

virtual bool NeutralParticleTrack::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 162 of file NeutralParticleTrack.h.

References TrackFitObject::fixParam().

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

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

Implements TrackFitObject.

Definition at line 364 of file NeutralParticleTrack.C.

References NPAR, TrackFitObject::par, and parfact.

double NeutralParticleTrack::getCharge  )  const [virtual]
 

Get charge in units of e.

Implements TrackFitObject.

Definition at line 305 of file NeutralParticleTrack.C.

virtual double NeutralParticleTrack::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 150 of file NeutralParticleTrack.h.

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

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

Implements TrackFitObject.

Definition at line 148 of file NeutralParticleTrack.h.

double NeutralParticleTrack::getMass  )  const [virtual]
 

Get mass in GeV.

Implements TrackFitObject.

Definition at line 309 of file NeutralParticleTrack.C.

References TrackFitObject::par, and parfact.

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

Get momentum along trajectory into existing 4-vector.

Implements TrackFitObject.

Definition at line 291 of file NeutralParticleTrack.C.

References TrackFitObject::cachevalid, cottheta, energy, pt, px, py, FourVector::setValues(), and updateCache().

Referenced by getMomentumEx().

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

Get momentum derivative along trajectory into existing 4-vector.

Implements TrackFitObject.

Definition at line 313 of file NeutralParticleTrack.C.

References beta, TrackFitObject::cachevalid, cottheta, cphi0, energy, getNPar(), momentum, NPAR, TrackFitObject::par, parfact, pt, px, py, FourVector::setValues(), sin2theta, sintheta, sphi0, and updateCache().

Referenced by getMomentumDerivativeEx().

void NeutralParticleTrack::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 348 of file NeutralParticleTrack.C.

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

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

Get momentum at vertex into existing 4-vector.

Implements TrackFitObject.

Definition at line 299 of file NeutralParticleTrack.C.

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

int NeutralParticleTrack::getNPar  )  const [virtual]
 

Get number of parameters of this FitObject.

Implements TrackFitObject.

Definition at line 135 of file NeutralParticleTrack.C.

References NPAR.

Referenced by addToGlobCov(), and getMomentumDerivativeAtTrajectoryEx().

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

Get name of parameter ilocal.

Parameters:
ilocal  Local parameter number

Reimplemented from BaseFitObject.

Definition at line 139 of file NeutralParticleTrack.C.

JBLHelix NeutralParticleTrack::getTangentialHelix double  s  )  [virtual]
 

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

Parameters:
s  Arc length

Implements TrackFitObject.

Definition at line 433 of file NeutralParticleTrack.C.

References TrackFitObject::par, and parfact.

void NeutralParticleTrack::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 228 of file NeutralParticleTrack.C.

References TrackFitObject::cachevalid, cottheta, cphi0, NPAR, parfact, ThreeVector::setValues(), sin2theta, sphi0, updateCache(), x0, and y0.

Referenced by getVertexDerivativeEx().

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

Get point along trajectory into existing 3-vector.

Implements TrackFitObject.

Definition at line 221 of file NeutralParticleTrack.C.

References TrackFitObject::cachevalid, cottheta, cphi0, ThreeVector::setValues(), sphi0, updateCache(), x0, y0, and z0.

Referenced by getVertexEx().

void NeutralParticleTrack::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 275 of file NeutralParticleTrack.C.

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

void NeutralParticleTrack::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 261 of file NeutralParticleTrack.C.

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

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

init covariance matrix from an array

Definition at line 418 of file NeutralParticleTrack.C.

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

bool NeutralParticleTrack::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 162 of file NeutralParticleTrack.C.

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

bool NeutralParticleTrack::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 153 of file NeutralParticleTrack.C.

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

Referenced by NeutralParticleTrack(), and setParameters().

bool NeutralParticleTrack::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 184 of file NeutralParticleTrack.C.

References cphi0, dca, FourVector::getPhi(), FourVector::getPt(), FourVector::getTheta(), ThreeVector::getX(), ThreeVector::getY(), ThreeVector::getZ(), TrackFitObject::isParamFixed(), mass, NPAR, parfact, phi0, pt, setParam(), sphi0, theta, and z0.

void NeutralParticleTrack::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 266 of file NeutralParticleTrack.C.

References TrackFitObject::cachevalid, cphi0, dca, TwoVector::getX(), TwoVector::getY(), NPAR, TrackFitObject::par, parfact, sphi0, and updateCache().

void NeutralParticleTrack::updateCache  )  const [protected]
 

Update the cache values.

Definition at line 389 of file NeutralParticleTrack.C.

References beta, TrackFitObject::cachevalid, TrackFitObject::calculateChi2(), cottheta, cphi0, dca, energy, mass, momentum, TrackFitObject::par, parfact, phi0, pt, px, py, sin2theta, sintheta, sphi0, theta, x0, y0, and z0.

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


Member Data Documentation

double NeutralParticleTrack::beta [mutable, protected]
 

momentum/energy;

Definition at line 201 of file NeutralParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), and updateCache().

double NeutralParticleTrack::cottheta [mutable, protected]
 

cotan (theta)

Definition at line 195 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::cphi0 [mutable, protected]
 

cos(phi0)

Definition at line 189 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::dca [mutable, protected]
 

dca = parfact[3]*par[3]

Definition at line 184 of file NeutralParticleTrack.h.

Referenced by NeutralParticleTrack(), setParameters(), setVertex(), and updateCache().

double NeutralParticleTrack::energy [mutable, protected]
 

sqrt (momentum^2 + mass^2)

Definition at line 200 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::mass [mutable, protected]
 

mass = parfact[5]*par[5]

Definition at line 186 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::momderfact [mutable, protected]
 

cB/kappa^2;

Definition at line 199 of file NeutralParticleTrack.h.

double NeutralParticleTrack::momentum [mutable, protected]
 

pt/sin(theta);

Definition at line 198 of file NeutralParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), and updateCache().

const double NeutralParticleTrack::parfact [static]
 

Initial value:

 
  {1., 1., 1., 1., 1., 1., 1., 1.}
Factor between internal and external parameters.

Definition at line 28 of file NeutralParticleTrack.C.

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

double NeutralParticleTrack::phi0 [mutable, protected]
 

phi0 = parfact[1]*par[1]

Definition at line 182 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::pt [mutable, protected]
 

pt = parfact[0]*par[0]

Definition at line 181 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::px [mutable, protected]
 

px = pt*cos(phi0)

Definition at line 190 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::py [mutable, protected]
 

py = pt*sin(phi0)

Definition at line 191 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::sin2theta [mutable, protected]
 

sin^2 (theta)

Definition at line 197 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::sintheta [mutable, protected]
 

sin (theta)

Definition at line 196 of file NeutralParticleTrack.h.

Referenced by getMomentumDerivativeAtTrajectoryEx(), and updateCache().

double NeutralParticleTrack::sphi0 [mutable, protected]
 

sin(phi0)

Definition at line 188 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::theta [mutable, protected]
 

theta = parfact[2]*par[2]

Definition at line 183 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::x0 [mutable, protected]
 

x0 = dca*sin(phi0)

Definition at line 192 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::y0 [mutable, protected]
 

y0 = -dca*cos(phi0)

Definition at line 193 of file NeutralParticleTrack.h.

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

double NeutralParticleTrack::z0 [mutable, protected]
 

z0 = parfact[4]*par[4]

Definition at line 185 of file NeutralParticleTrack.h.

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


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