00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013 #ifndef __PCONSTRAINT_H
00014 #define __PCONSTRAINT_H
00015
00016 #include "jbltools/kinfit/ParticleConstraint.h"
00017
00018 class ParticleFitObject;
00019
00020 class PConstraint : public ParticleConstraint {
00021 public:
00022 PConstraint (double pxfact_=1, double pyfact_=0, double pzfact_=0,
00023 double efact_=0, double value_ = 0);
00024 virtual ~PConstraint();
00025 virtual double getValue() const;
00026 virtual void getDerivatives (int idim, double der[]) const;
00027 virtual void add1stDerivativesToMatrix(int idim, double *M) const;
00028 virtual void add2ndDerivativesToMatrix(int idim, double *M, double lambda) const;
00029
00030 virtual void addToGlobalDerMatrix (double lambda, int idim, double *M) const;
00031
00032 virtual void invalidateCache() const;
00033
00034 protected:
00035 void updateCache() const;
00036
00037
00038 double pxfact;
00039 double pyfact;
00040 double pzfact;
00041 double efact;
00042 double value;
00043
00044 mutable bool cachevalid;
00045 mutable int nparams;
00046 };
00047
00048 #endif // __PCONSTRAINT_H