Belle II Software  release-05-01-25
SoftGaussMassConstraint.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 #ifndef __SOFTGAUSSMASSCONSTRAINT_H
18 #define __SOFTGAUSSMASSCONSTRAINT_H
19 
20 #include "analysis/OrcaKinFit/SoftGaussParticleConstraint.h"
21 
22 namespace Belle2 {
27  namespace OrcaKinFit {
28 
29  class ParticleFitObject;
30 
31 // Class SoftGaussMassConstraint:
33 
45  class SoftGaussMassConstraint : public SoftGaussParticleConstraint {
46  public:
47 
49  explicit SoftGaussMassConstraint(double sigma_,
50  double mass_ = 0.
51  );
53  virtual ~SoftGaussMassConstraint();
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 
73  protected:
74  double mass;
75 
76 
78  virtual bool secondDerivatives(int i,
79  int j,
80  double* derivatives
81  ) const override;
83  virtual bool firstDerivatives(int i,
84  double* derivatives
85  ) const override;
86  };
87 
88  }// end OrcaKinFit namespace
90 } // end Belle2 namespace
91 
92 
93 #endif // __SOFTGAUSSMASSCONSTRAINT_H
Belle2::OrcaKinFit::SoftGaussMassConstraint::secondDerivatives
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...
Definition: SoftGaussMassConstraint.cc:159
Belle2::OrcaKinFit::SoftGaussMassConstraint::mass
double mass
The mass difference between object sets 1 and 2.
Definition: SoftGaussMassConstraint.h:88
Belle2::OrcaKinFit::SoftGaussMassConstraint::getDerivatives
virtual void getDerivatives(int idim, double der[]) const override
Get first order derivatives.
Definition: SoftGaussMassConstraint.cc:82
Belle2::OrcaKinFit::SoftGaussMassConstraint::SoftGaussMassConstraint
SoftGaussMassConstraint(double sigma_, double mass_=0.)
Constructor.
Definition: SoftGaussMassConstraint.cc:49
Belle2::OrcaKinFit::SoftGaussMassConstraint::setMass
virtual void setMass(double mass_)
Sets the target mass of the constraint.
Definition: SoftGaussMassConstraint.cc:154
Belle2::OrcaKinFit::SoftGaussMassConstraint::~SoftGaussMassConstraint
virtual ~SoftGaussMassConstraint()
Virtual destructor.
Belle2::OrcaKinFit::SoftGaussMassConstraint::getMass
virtual double getMass(int flag=1)
Get the actual invariant mass of the fit objects with a given flag.
Definition: SoftGaussMassConstraint.cc:137
Belle2::OrcaKinFit::SoftGaussMassConstraint::getValue
virtual double getValue() const override
Returns the value of the constraint function.
Definition: SoftGaussMassConstraint.cc:58
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::OrcaKinFit::SoftGaussParticleConstraint::derivatives
std::vector< double > derivatives
The derivatives.
Definition: SoftGaussParticleConstraint.h:195
Belle2::OrcaKinFit::SoftGaussMassConstraint::firstDerivatives
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 ...
Definition: SoftGaussMassConstraint.cc:205