Belle II Software  release-05-01-25
SoftBWMassConstraint.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * See https://github.com/tferber/OrcaKinfit, forked from *
4  * https://github.com/iLCSoft/MarlinKinfit *
5  * *
6  * Further information about the fit engine and the user interface *
7  * provided in MarlinKinfit can be found at *
8  * https://www.desy.de/~blist/kinfit/doc/html/ *
9  * and in the LCNotes LC-TOOL-2009-001 and LC-TOOL-2009-004 available *
10  * from http://www-flc.desy.de/lcnotes/ *
11  * *
12  * Adopted by: Torben Ferber (torben.ferber@desy.de) (TF) *
13  * *
14  * This software is provided "as is" without any warranty. *
15  **************************************************************************/
16 
17 #ifdef MARLIN_USE_ROOT
18 
19 #ifndef __SOFTBWMASSCONSTRAINT_H
20 #define __SOFTBWMASSCONSTRAINT_H
21 
22 #include "analysis/OrcaKinFit/SoftBWParticleConstraint.h"
23 
24 #include <limits>
25 
26 namespace Belle2 {
31  namespace OrcaKinFit {
32 
33  class ParticleFitObject;
34 
35 // Class SoftBWMassConstraint:
37 
49  class SoftBWMassConstraint : public SoftBWParticleConstraint {
50  public:
51 
53  explicit SoftBWMassConstraint(double gamma_,
54  double mass_ = 0.,
55  double massmin_ = -std::numeric_limits<double>::infinity(),
56  double massmax_ = std::numeric_limits<double>::infinity()
57  );
59  virtual ~SoftBWMassConstraint();
60 
62  virtual double getValue() const override;
63 
66  virtual void getDerivatives(int idim,
67  double der[]
68  ) const override;
69 
71  virtual double getMass(int flag = 1
72  );
73 
75  virtual void setMass(double mass_
76  );
77 
78 
79  protected:
80  double mass;
81 
82 
84  virtual bool secondDerivatives(int i,
85  int j,
86  double* derivatives
87  ) const override;
89  virtual bool firstDerivatives(int i,
90  double* derivatives
91  ) const override;
92  };
93 
94  }// end OrcaKinFit namespace
96 } // end Belle2 namespace
97 
98 
99 #endif // __SOFTBWMASSCONSTRAINT_H
100 
101 #endif // MARLIN_USE_ROOT
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19