Belle II Software  release-08-01-10
ISRPhotonFitObject.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 __ISRPHOTONFITOBJECT_H
18 #define __ISRPHOTONFITOBJECT_H
19 
20 #include "analysis/OrcaKinFit/ParticleFitObject.h"
21 
22 namespace Belle2 {
27  namespace OrcaKinFit {
28 
30  public:
31  ISRPhotonFitObject(double px, double py, double pz,
32  double b_, double PzMaxB_, double PzMinB_ = 0.);
33 
36  );
39 
40  virtual ~ISRPhotonFitObject();
41 
43  virtual ISRPhotonFitObject* copy() const override;
44 
46  virtual ISRPhotonFitObject& assign(const BaseFitObject& source
47  ) override;
48 
50  virtual const char* getParamName(int ilocal
51  ) const override;
52 
54  virtual bool updateParams(double p[],
55  int idim
56  ) override;
57 
58 
59  // // these depend on actual parametrisation!
60  virtual double getDPx(int ilocal) const override;
61  virtual double getDPy(int ilocal) const override;
62  virtual double getDPz(int ilocal) const override;
63  virtual double getDE(int ilocal) const override;
64 
65  virtual double getFirstDerivative_Meta_Local(int iMeta, int ilocal, int metaSet) const override;
66  virtual double getSecondDerivative_Meta_Local(int iMeta, int ilocal, int jlocal, int metaSet) const override;
67 
68  virtual int getNPar() const override {return NPAR;}
69 
70  protected:
71 
72  enum {NPAR = 3}; // well, it's actually 1...Daniel should update
73 
74  double PgFromPz(double pz);
75 
76  void updateCache() const override;
77 
78  mutable bool cachevalid;
79 
80  mutable double pt2, p2, p, pz,
81  dpx0, dpy0, dpz0, dE0, dpx1, dpy1, dpz1, dE1,
82  dpx2, dpy2, dpz2, dE2, d2pz22, d2E22,
83  chi2,
84  b, PzMinB, PzMaxB, dp2zFact;
85  };
86 
87  }// end OrcaKinFit namespace
89 } // end Belle2 namespace
90 
91 #endif // __ISRPHOTONFITOBJECT_H
virtual double getDPx(int ilocal) const override
Return d p_x / d par_ilocal (derivative of px w.r.t. local parameter ilocal)
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.
virtual double getDE(int ilocal) const override
Return d E / d par_ilocal (derivative of E w.r.t. local parameter ilocal)
ISRPhotonFitObject & operator=(const ISRPhotonFitObject &rhs)
Assignment.
virtual ISRPhotonFitObject & assign(const BaseFitObject &source) override
Assign from anther object, if of same type.
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 bool updateParams(double p[], int idim) override
Read values from global vector, readjust vector; return: significant change.
ISRPhotonFitObject(double px, double py, double pz, double b_, double PzMaxB_, double PzMinB_=0.)
virtual ISRPhotonFitObject * copy() const override
Return a new copy of itself.
Abstract base class for different kinds of events.