17 #ifndef __SOFTGAUSSPARTICLECONSTRAINT_H 
   18 #define __SOFTGAUSSPARTICLECONSTRAINT_H 
   22 #include "analysis/OrcaKinFit/BaseSoftConstraint.h" 
   23 #include "analysis/OrcaKinFit/BaseFitObject.h" 
   31   namespace OrcaKinFit {
 
   33     class ParticleFitObject;
 
   83       virtual void setFOList(std::vector <ParticleFitObject*>* fitobjects_ 
 
   86         for (
int i = 0; i < (int) fitobjects_->size(); i++) {
 
   96         flags.push_back(flag);
 
  109       virtual double getChi2() 
const override;
 
  112       virtual double getError() 
const override;
 
  118       virtual double setSigma(
double sigma_     
 
  125                                  ) 
const override = 0;
 
  140       void test1stDerivatives();
 
  141       void test2ndDerivatives();
 
  157       int getVarBasis() 
const;
 
  189       enum { VAR_BASIS = BaseDefs::VARBASIS_EPXYZ }; 
 
Abstract base class for soft constraints of kinematic fits.
Abstract base class for constraints of kinematic fits.
FitObjectContainer::iterator FitObjectIterator
Iterator through vector of pointers to ParticleFitObjects.
virtual double getValue() const override=0
Returns the value of the constraint function.
std::vector< double > derivatives
The derivatives.
FitObjectContainer fitobjects
The FitObjectContainer.
virtual void add2ndDerivativesToMatrix(double *M, int idim) const override
Adds second order derivatives to global covariance matrix M.
virtual double getError() const override
Returns the error on the value of the constraint.
double sigma
The sigma of the Gaussian.
virtual ~SoftGaussParticleConstraint()
Virtual destructor.
virtual void addToGlobalChi2DerVector(double *y, int idim) const override
Add derivatives of chi squared to global derivative matrix.
virtual bool secondDerivatives(int i, int j, double *derivatives) const =0
Second derivatives with respect to the 4-vectors of Fit objects i and j; result false if all derivati...
virtual void getDerivatives(int idim, double der[]) const override=0
Get first order derivatives.
virtual bool firstDerivatives(int i, double *derivatives) const =0
First derivatives with respect to the 4-vector of Fit objects i; result false if all derivatives are ...
virtual void addToFOList(ParticleFitObject &fitobject, int flag=1)
Adds one ParticleFitObject objects to the list.
void invalidateCache() const
Invalidates any cached values for the next event.
virtual double setSigma(double sigma_)
Sets the sigma.
std::vector< ParticleFitObject * > FitObjectContainer
Vector of pointers to ParticleFitObjects.
virtual double getSigma() const
Returns the sigma.
SoftGaussParticleConstraint(double sigma_)
Creates an empty SoftGaussParticleConstraint object.
FitObjectContainer::const_iterator ConstFitObjectIterator
Constant iterator through vector of pointers to ParticleFitObjects.
virtual void setFOList(std::vector< ParticleFitObject * > *fitobjects_)
Adds several ParticleFitObject objects to the list.
double num2ndDerivative(int ifo1, int ilocal1, double eps1, int ifo2, int ilocal2, double eps2)
Evaluates numerically the 2nd derivative w.r.t. 2 parameters.
std::vector< int > flags
The flags can be used to divide the FitObjectContainer into several subsets used for example to imple...
virtual double getChi2() const override
Returns the chi2.
double num1stDerivative(int ifo, int ilocal, double eps)
Evaluates numerically the 1st derivative w.r.t. a parameter.
virtual void resetFOList()
Resests ParticleFitObject list.
Abstract base class for different kinds of events.