Belle II Software light-2406-ragdoll
JetFitObject.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 __JETFITOBJECT_H
18#define __JETFITOBJECT_H
19
20#include "analysis/OrcaKinFit/ParticleFitObject.h"
21
22namespace Belle2 {
28 namespace OrcaKinFit {
29
30// Class JetFitObject
32
44 public:
45 JetFitObject(double E, double theta, double phi,
46 double DE, double Dtheta, double Dphi,
47 double m = 0);
48
50 JetFitObject(const JetFitObject& rhs
51 );
54 );
55
56 virtual ~JetFitObject();
57
59 virtual JetFitObject* copy() const override;
60
62 virtual JetFitObject& assign(const BaseFitObject& source
63 ) override;
64
66 virtual const char* getParamName(int ilocal
67 ) const override;
68
70 virtual bool updateParams(double p[],
71 int idim
72 ) override;
73
74 virtual int getNPar() const override {return NPAR;}
75
76 // these depend on actual parametrisation!
77
78 virtual double getDPx(int ilocal) const override;
79 virtual double getDPy(int ilocal) const override;
80 virtual double getDPz(int ilocal) const override;
81 virtual double getDE(int ilocal) const override;
82
83 virtual double getCov(int
84 ilocal,
85 int jlocal
86 ) const override;
87
89 virtual double getError(int ilocal
90 ) const override;
91
92
95// virtual void addToDerivatives (double der[], ///< Derivatives vector, length idim
96// int idim, ///< Length of derivatives vector
97// double efact=0, ///< Factor for dE/dx_i
98// double pxfact=0, ///< Factor for dpx/dx_i
99// double pyfact=0, ///< Factor for dpy/dx_i
100// double pzfact=0 ///< Factor for dpz/dx_i
101// ) const;
102
103 // daniel's new method
104 // derivatives of intermediate variable wrt local variable
105 virtual double getFirstDerivative_Meta_Local(int iMeta, int ilocal, int metaSet) const override;
106 virtual double getSecondDerivative_Meta_Local(int iMeta, int ilocal, int jlocal, int metaSet) const override;
107
109 // virtual double getChi2() const;
110
111 protected:
112
113 enum {NPAR = 3};
114
115 void updateCache() const override;
116
117 mutable double ctheta, stheta, cphi, sphi,
118 p2, p, pt, px, py, pz, dpdE, dptdE,
119 dpxdE, dpydE, dpzdE, dpxdtheta, dpydtheta,
120 chi2;
121 // d2pdE2, d2ptsE2;
122
124 static bool adjustEThetaPhi(const double& m, double& E, double& theta, double& phi);
125
127 // double calcChi2 () const;
128
129 };
130
131
132 }// end OrcaKinFit namespace
134} // end Belle2 namespace
135
136
137#endif // __JETFITOBJECT_H
138
Class for jets with (E, eta, phi) in kinematic fits.
Definition: JetFitObject.h:43
virtual double getDPx(int ilocal) const override
Return d p_x / d par_ilocal (derivative of px w.r.t. local parameter ilocal)
virtual JetFitObject & assign(const BaseFitObject &source) override
Assign from anther object, if of same type.
static bool adjustEThetaPhi(const double &m, double &E, double &theta, double &phi)
Adjust E, theta and phi such that E>=m, 0<=theta<=pi, -pi <= phi < pi; returns true if anything was c...
virtual double getDPy(int ilocal) const override
Return d p_y / d par_ilocal (derivative of py w.r.t. local parameter ilocal)
virtual int getNPar() const override
Get total number of parameters of this FitObject.
Definition: JetFitObject.h:74
virtual double getDE(int ilocal) const override
Return d E / d par_ilocal (derivative of E w.r.t. local parameter ilocal)
JetFitObject & operator=(const JetFitObject &rhs)
Assignment.
Definition: JetFitObject.cc:90
virtual JetFitObject * copy() const override
Return a new copy of itself.
Definition: JetFitObject.cc:98
virtual const char * getParamName(int ilocal) const override
Get name of parameter ilocal.
virtual double getDPz(int ilocal) const override
Return d p_z / d par_ilocal (derivative of pz w.r.t. local parameter ilocal)
virtual double getFirstDerivative_Meta_Local(int iMeta, int ilocal, int metaSet) const override
add derivatives to vector der of size idim pxfact*dpx/dx_i + pyfact*dpy/dx_i + pzfact*dpz/dx_i + efac...
virtual bool updateParams(double p[], int idim) override
Read values from global vector, readjust vector; return: significant change.
virtual double getCov(int ilocal, int jlocal) const override
Get covariance between parameters ilocal and jlocal.
virtual double getError(int ilocal) const override
Get error of parameter ilocal.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24