GENFIT
Rev:NoNumberAvailable
|
Go to the documentation of this file.
25 #include <TDatabasePDG.h>
32 pdgCode_(0), propDir_(0), debugLvl_(0)
38 pdgCode_(pdgCode), propDir_(propDir), debugLvl_(0)
44 TObject(rep), pdgCode_(rep.pdgCode_), propDir_(rep.propDir_), debugLvl_(rep.debugLvl_)
53 bool calcJacobianNoise)
const {
65 stateVec(0) = pos.X();
66 stateVec(1) = pos.Y();
67 stateVec(2) = pos.Z();
69 stateVec(3) = mom.X();
70 stateVec(4) = mom.Y();
71 stateVec(5) = mom.Z();
83 stateVec(0) = pos.X();
84 stateVec(1) = pos.Y();
85 stateVec(2) = pos.Z();
87 stateVec(3) = mom.X();
88 stateVec(4) = mom.Y();
89 stateVec(5) = mom.Z();
94 TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(
pdgCode_);
95 assert(particle != NULL);
96 return particle->Charge()/(3.);
101 return TDatabasePDG::Instance()->GetParticle(
pdgCode_)->Mass();
107 TMatrixD& jacobian)
const {
119 const double defaultStepX = 1.E-5;
130 for (
size_t i = 0; i <
getDim(); ++i) {
133 double temp = stateCopy.
getState()(i) + defaultStepX / 2;
147 stepX = 2 * (temp - stateCopy.
getState()(i));
154 (stateCopy.
getState())(i) -= stepX / 2;
173 for (
size_t j = 0; j <
getDim(); ++j) {
174 double derivFull = (rightFull(j) - leftFull(j)) / 2 / stepX;
175 double derivShort = (rightShort(j) - leftShort(j)) / stepX;
177 jacobian(j, i) = 1./3.*(4*derivShort - derivFull);
184 TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(-
pdgCode_);
185 if(particle != NULL) {
virtual void getPosMomCov(const MeasuredStateOnPlane &state, TVector3 &pos, TVector3 &mom, TMatrixDSym &cov) const =0
Translates MeasuredStateOnPlane into 3D position, momentum and 6x6 covariance.
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
virtual double extrapolateToPlane(StateOnPlane &state, const genfit::SharedPlanePtr &plane, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to plane, and returns the extrapolation length and, via reference,...
StateOnPlane with additional covariance matrix.
double getPDGCharge() const
Get the charge of the particle of the pdg code.
Defines for I/O streams used for error and debug printing.
int pdgCode_
Particle code.
double getMass(const StateOnPlane &state) const
Get tha particle mass in GeV/c^2.
Abstract base class for a track representation.
void calcJacobianNumerically(const genfit::StateOnPlane &origState, const genfit::SharedPlanePtr destPlane, TMatrixD &jacobian) const
Calculate Jacobian of transportation numerically. Slow but accurate. Can be used to validate (semi)an...
virtual void getPosMom(const StateOnPlane &state, TVector3 &pos, TVector3 &mom) const =0
Get cartesian position and momentum vector of a state.
Contains the measurement and covariance in raw detector coordinates.
double extrapolateToMeasurement(StateOnPlane &state, const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
extrapolate to an AbsMeasurement
A state with arbitrary dimension defined in a DetPlane.
virtual SharedPlanePtr constructPlane(const StateOnPlane &state) const =0
char propDir_
propagation direction (-1, 0, 1) -> (backward, auto, forward)
virtual unsigned int getDim() const =0
Get the dimension of the state vector used by the track representation.
const TVectorD & getState() const
virtual void Print(const Option_t *="") const
virtual void get6DStateCov(const MeasuredStateOnPlane &state, TVectorD &stateVec, TMatrixDSym &cov) const
Translates MeasuredStateOnPlane into 6D state vector (x, y, z, p_x, p_y, p_z) and 6x6 covariance.
bool switchPDGSign()
try to multiply pdg code with -1. (Switch from particle to anti-particle and vice versa).
virtual TVectorD get6DState(const StateOnPlane &state) const
Get the 6D state vector (x, y, z, p_x, p_y, p_z).