00001
00017 #ifndef __CHARGEDPARTICLETRACK_H
00018 #define __CHARGEDPARTICLETRACK_H
00019
00020 #include "jbltools/kinfit/TrackFitObject.h"
00021
00022 #include <cassert>
00023
00024
00026
00038 class ChargedParticleTrack: public TrackFitObject {
00039 public:
00041 ChargedParticleTrack (const char *name_,
00042 double kappa,
00043 double phi0,
00044 double theta,
00045 double dca,
00046 double z0,
00047 double mass,
00048 double charge_,
00049 double sstart,
00050 double sstop
00051 );
00053 ChargedParticleTrack (const char *name_,
00054 double kappa,
00055 double phi0,
00056 double theta,
00057 double dca,
00058 double z0,
00059 double mass,
00060 double charge_,
00061 double sstart
00062 );
00064 ChargedParticleTrack (const char *name_,
00065 const ThreeVector& vertex,
00066 const ThreeVector& momentum,
00067 double mass_,
00068 double charge_ = 1
00069 );
00071 ChargedParticleTrack (const char *name_,
00072 const float par_[5],
00073 const float cov_[15],
00074 double mass_,
00075 double charge_ = 1,
00076 double sstart = 0,
00077 double sstop = 0
00078 );
00080 virtual ~ChargedParticleTrack();
00081
00083 virtual int getNPar() const;
00084
00086 virtual bool setParam (int ilocal,
00087 double par_,
00088 bool measured_,
00089 bool fixed_ = false
00090 );
00092 virtual bool setParam (int ilocal,
00093 double par_
00094 );
00095
00097 virtual bool setParameters (int ivertex,
00098 const ThreeVector& vertex,
00099 const FourVector& momentum,
00100 double charge_
00101 );
00102
00104 virtual const char *getParamName (int ilocal
00105 ) const;
00106
00108 virtual void getTrajectoryPointEx (double s,
00109 ThreeVector& p
00110 ) const;
00111
00113 virtual void getVertexEx (int ivertex,
00114 ThreeVector& p
00115 ) const;
00116
00118 virtual void setVertex (int ivertex,
00119 const TwoVector& p
00120 );
00121
00123 virtual void getTrajectoryDerivativeEx (double s,
00124 int ilocal,
00125 ThreeVector& p
00126 ) const;
00128 virtual void getVertexDerivativeEx (int ivertex,
00129 int ilocal,
00130 ThreeVector& p
00131 ) const;
00132
00134 virtual void getMomentumAtTrajectoryEx (double s,
00135 FourVector& p
00136 ) const;
00138 virtual void getMomentumEx (int ivertex,
00139 FourVector& p
00140 ) const;
00141
00143 virtual double getCharge () const;
00144
00146 virtual void getMomentumDerivativeAtTrajectoryEx (double s,
00147 int ilocal,
00148 FourVector& p
00149 ) const;
00151 virtual void getMomentumDerivativeEx (int ivertex,
00152 int ilocal,
00153 FourVector& p
00154 ) const;
00156 virtual double getArcLength (int i
00157 ) const;
00158
00160 virtual double getDChi2DParam(int ilocal) const {assert (0);};
00162 virtual double getD2Chi2DParam2(int ilocal1, int ilocal2) const {assert (0);};
00163
00165 virtual void addToGlobalChi2DerMatrix (int idim, double *M) const {assert (0);};
00167 virtual void addToGlobalDerMatrix (int idim, double c, double *M) const {assert (0);};
00168
00170 virtual JBLHelix getTangentialHelix (double s
00171 );
00173 virtual double getMass() const;
00174
00176 static const double parfact[NPARMAX];
00177
00179 virtual bool fixVertexParam (int ivertex,
00180 bool fix=true
00181 ) { return fixParam (6+ivertex, fix); }
00182
00183 protected:
00185 void updateCache() const;
00186
00188 virtual void initCov(const float cov_[15]);
00189
00191 double getNormalS (double s) const;
00192
00194 enum {NPAR = 8};
00195
00196
00197 mutable double kappa;
00198 mutable double phi0;
00199 mutable double theta;
00200 mutable double dca;
00201 mutable double z0;
00202 mutable double mass;
00203 mutable double r;
00204 mutable double sphi0;
00205 mutable double cphi0;
00206 mutable double dcamir;
00207 mutable double cottheta;
00208 mutable double sintheta;
00209 mutable double sin2theta;
00210 mutable double cBq;
00211 mutable double pt;
00212 mutable double momentum;
00213 mutable double momderfact;
00214 mutable double energy;
00215 mutable double beta;
00216
00217 double charge;
00218
00219
00220 };
00221
00222 #endif // __CHARGEDPARTICLETRACK_H