Belle II Software  release-05-01-25
SoftGaussMomentumConstraint.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 __SOFTGAUSSMOMENTUMCONSTRAINT_H
18 #define __SOFTGAUSSMOMENTUMCONSTRAINT_H
19 
20 #include "analysis/OrcaKinFit/SoftGaussParticleConstraint.h"
21 
22 namespace Belle2 {
28  namespace OrcaKinFit {
29 
30  class ParticleFitObject;
31 
32 // Class SoftGaussMomentumConstraint:
34 
49  class SoftGaussMomentumConstraint : public SoftGaussParticleConstraint {
50  public:
51 
53  SoftGaussMomentumConstraint(double sigma_ = 0,
54  double efact_ = 0,
55  double pxfact_ = 0,
56  double pyfact_ = 0,
57  double pzfact_ = 0,
58  double value_ = 0
59  );
62 
64  virtual double getValue() const override;
65 
68  virtual void getDerivatives(int idim,
69  double der[]
70  ) const override;
71 
72  protected:
73 
74 
75  double efact;
76  double pxfact;
77  double pyfact;
78  double pzfact;
79  double value;
80 
81 
83  virtual bool secondDerivatives(int i,
84  int j,
85  double* derivatives
86  ) const override;
88  virtual bool firstDerivatives(int i,
89  double* derivatives
90  ) const override;
91  };
92 
93  }// end OrcaKinFit namespace
95 } // end Belle2 namespace
96 
97 #endif // __SOFTGAUSSMOMENTUMCONSTRAINT_H
Belle2::OrcaKinFit::SoftGaussMomentumConstraint::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: SoftGaussMomentumConstraint.cc:100
Belle2::OrcaKinFit::SoftGaussMomentumConstraint::getValue
virtual double getValue() const override
Returns the value of the constraint function.
Definition: SoftGaussMomentumConstraint.cc:61
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::SoftGaussMomentumConstraint::~SoftGaussMomentumConstraint
virtual ~SoftGaussMomentumConstraint()
Virtual destructor.
Belle2::OrcaKinFit::SoftGaussMomentumConstraint::getDerivatives
virtual void getDerivatives(int idim, double der[]) const override
Get first order derivatives.
Definition: SoftGaussMomentumConstraint.cc:81
Belle2::OrcaKinFit::SoftGaussMomentumConstraint::SoftGaussMomentumConstraint
SoftGaussMomentumConstraint(double sigma_=0, double efact_=0, double pxfact_=0, double pyfact_=0, double pzfact_=0, double value_=0)
Constructor.
Definition: SoftGaussMomentumConstraint.cc:47
Belle2::OrcaKinFit::SoftGaussMomentumConstraint::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: SoftGaussMomentumConstraint.cc:110