Belle II Software  release-08-01-10
SoftBWMassConstraint.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 #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
Abstract base class for different kinds of events.