MarlinKinfit  0.4.0
MassConstraint.h
Go to the documentation of this file.
1 
24 #ifndef __MASSCONSTRAINT_H
25 #define __MASSCONSTRAINT_H
26 
27 #include "ParticleConstraint.h"
28 
29 class ParticleFitObject;
30 
31 // Class MassConstraint:
33 
46  public:
47 
49  MassConstraint (double mass_ = 0.
50  );
52  virtual ~MassConstraint();
53 
55  virtual double getValue() const;
56 
59  virtual void getDerivatives(int idim,
60  double der[]
61  ) const;
62 
64  virtual double getMass (int flag = 1
65  );
66 
68  virtual void setMass (double mass_
69  );
70 
71  virtual int getVarBasis() const;
72 
73  protected:
74 
75  double mass;
76 
78  virtual bool secondDerivatives (int i,
79  int j,
80  double *derivatives
81  ) const;
82 
84  virtual bool firstDerivatives (int i,
85  double *derivatives
86  ) const;
87 
88  enum { VAR_BASIS=0 }; // this means that the constraint knows about E,px,py,pz
89 
90 };
91 
92 #endif // __MASSCONSTRAINT_H
virtual void setMass(double mass_)
Sets the target mass of the constraint.
Definition: MassConstraint.cc:149
virtual void getDerivatives(int idim, double der[]) const
Get first order derivatives.
Definition: MassConstraint.cc:63
virtual bool secondDerivatives(int i, int j, double *derivatives) const
Second derivatives with respect to the 4-vectors of Fit objects i and j; result false if all derivati...
Definition: MassConstraint.cc:153
Implements constraint 0 = mass1 - mass2 - m.
Definition: MassConstraint.h:45
Declares class ParticleConstraint.
virtual ~MassConstraint()
Virtual destructor.
Definition: MassConstraint.cc:33
virtual double getValue() const
Returns the value of the constraint.
Definition: MassConstraint.cc:38
Abstract base class for constraints of kinematic fits.
Definition: ParticleConstraint.h:89
virtual bool firstDerivatives(int i, double *derivatives) const
First derivatives with respect to the 4-vector of Fit objects i; result false if all derivatives are ...
Definition: MassConstraint.cc:200
MassConstraint(double mass_=0.)
Constructor.
Definition: MassConstraint.cc:28
Abstract base class for particle objects of kinematic fits.
Definition: ParticleFitObject.h:63
double mass
The mass difference between object sets 1 and 2.
Definition: MassConstraint.h:75
virtual double getMass(int flag=1)
Get the actual invariant mass of the fit objects with a given flag.
Definition: MassConstraint.cc:130
std::vector< double > derivatives
The derivatives.
Definition: BaseHardConstraint.h:173