Belle II Software light-2406-ragdoll
BaseConstraint.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 __BASECONSTRAINT_H
18#define __BASECONSTRAINT_H
19
20#include <iostream>
21
22namespace Belle2 {
28 namespace OrcaKinFit {
29
30 class BaseFitObject;
31
32// Class BaseConstraint:
34
72 public:
75
78 );
81 );
82
84 virtual ~BaseConstraint();
85
87 virtual double getValue() const = 0;
88
90 virtual double getError() const;
91
93 virtual const char* getName() const;
95 void setName(const char* name_);
96
99 virtual void getDerivatives(int idim,
100 double der[]
101 ) const = 0;
102
104 virtual std::ostream& print(std::ostream& os
105 ) const;
106
107 protected:
108 char* name;
109 };
110
114 inline std::ostream& operator<< (std::ostream& os,
115 const BaseConstraint& bc
116 )
117 {
118 return bc.print(os);
119 }
120
121 }// end OrcaKinFit namespace
123} // end Belle2 namespace
124
125
126#endif // __BASECONSTRAINT_H
Abstract base class for constraints of kinematic fits.
virtual double getValue() const =0
Returns the value of the constraint function.
BaseConstraint & operator=(const BaseConstraint &rhs)
Assignment.
virtual ~BaseConstraint()
Virtual destructor.
void setName(const char *name_)
Set object's name.
virtual const char * getName() const
Returns the name of the constraint.
virtual double getError() const
Returns the error on the value of the constraint.
BaseConstraint()
Creates an empty BaseConstraint object.
virtual std::ostream & print(std::ostream &os) const
print object to ostream
virtual void getDerivatives(int idim, double der[]) const =0
Get first order derivatives of the constraint function Call this with a predefined array "der" with t...
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24