Belle II Software development
MassConstraint.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * Forked from https://github.com/iLCSoft/MarlinKinfit *
6 * *
7 * Further information about the fit engine and the user interface *
8 * provided in MarlinKinfit can be found at *
9 * https://www.desy.de/~blist/kinfit/doc/html/ *
10 * and in the LCNotes LC-TOOL-2009-001 and LC-TOOL-2009-004 available *
11 * from http://www-flc.desy.de/lcnotes/ *
12 * *
13 * See git log for contributors and copyright holders. *
14 * This file is licensed under LGPL-3.0, see LICENSE.md. *
15 **************************************************************************/
16
17#ifndef __MASSCONSTRAINT_H
18#define __MASSCONSTRAINT_H
19
20#include "analysis/OrcaKinFit/ParticleConstraint.h"
21
22namespace Belle2 {
28 namespace OrcaKinFit {
29
30 class ParticleFitObject;
31
32// Class MassConstraint:
34
47 public:
48
50 explicit MassConstraint(double mass_ = 0.
51 );
53 virtual ~MassConstraint();
54
56 virtual double getValue() const override;
57
60 virtual void getDerivatives(int idim,
61 double der[]
62 ) const override;
63
65 virtual double getMass(int flag = 1
66 );
67
69 virtual void setMass(double mass_
70 );
71
72 virtual int getVarBasis() const override;
73
74 protected:
75
76 double mass;
77
79 virtual bool secondDerivatives(int i,
80 int j,
81 double* derivatives
82 ) const override;
83
85 virtual bool firstDerivatives(int i,
86 double* derivatives
87 ) const override;
88
89 enum { VAR_BASIS = 0 }; // this means that the constraint knows about E,px,py,pz
90
91 };
92
93 }// end OrcaKinFit namespace
95} // end Belle2 namespace
96
97
98#endif // __MASSCONSTRAINT_H
std::vector< double > derivatives
The derivatives.
Implements constraint 0 = mass1 - mass2 - m.
virtual ~MassConstraint()
Virtual destructor.
virtual void getDerivatives(int idim, double der[]) const override
Get first order derivatives.
double mass
The mass difference between object sets 1 and 2.
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 void setMass(double mass_)
Sets the target mass of the constraint.
virtual double getMass(int flag=1)
Get the actual invariant mass of the fit objects with a given flag.
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 ...
Abstract base class for constraints of kinematic fits.
Abstract base class for different kinds of events.