17#ifndef __MOMENTUMCONSTRAINT_H
18#define __MOMENTUMCONSTRAINT_H
20#include "analysis/OrcaKinFit/ParticleConstraint.h"
28 namespace OrcaKinFit {
30 class ParticleFitObject;
50 virtual double getValue()
const override;
62 virtual int getVarBasis()
const override;
65 void updateCache()
const;
74 mutable bool cachevalid;
87 enum { VAR_BASIS = 0 };
std::vector< double > derivatives
The derivatives.
Implements a constraint of the form efact*sum(E)+pxfact*sum(px)+pyfact*sum(py)+pzfact*sum(pz)=value.
virtual void getDerivatives(int idim, double der[]) const override
Get first order derivatives.
virtual double getValue() const override
Returns the value of the constraint.
virtual bool secondDerivatives(int i, int j, double *derivatives) const override
Second derivatives with respect to the 4-vectors of Fit objects i and j; result false if all derivati...
virtual bool firstDerivatives(int i, double *derivatives) const override
First derivatives with respect to the 4-vector of Fit objects i; result false if all derivatives are ...
virtual void invalidateCache() const override
Invalidates any cached values for the next event.
Abstract base class for constraints of kinematic fits.
Abstract base class for different kinds of events.