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

PConstraint.h

Go to the documentation of this file.
00001 
00002 // Class PConstraint
00003 //
00004 // Author: Jenny Boehme, Bennmo List
00005 // Last update: $Date: 2005/01/12 10:11:45 $
00006 //          by: $Author: blist $
00007 // 
00008 // Description: constraint 
00009 // a*sum(px)+b*sum(py)+c*sum(pz)+d*sum(E)=e
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

Generated on Fri Sep 14 17:38:21 2007 for Kinfit by doxygen 1.3.2