Belle II Software  release-05-01-25
ISRPhotonFitObject Class Reference
Inheritance diagram for ISRPhotonFitObject:
Collaboration diagram for ISRPhotonFitObject:

Public Member Functions

 ISRPhotonFitObject (double px, double py, double pz, double b_, double PzMaxB_, double PzMinB_=0.)
 
 ISRPhotonFitObject (const ISRPhotonFitObject &rhs)
 photon spectrum parametrization (see above) More...
 
ISRPhotonFitObjectoperator= (const ISRPhotonFitObject &rhs)
 Assignment. More...
 
virtual ISRPhotonFitObjectcopy () const override
 Return a new copy of itself.
 
virtual ISRPhotonFitObjectassign (const BaseFitObject &source) override
 Assign from anther object, if of same type. More...
 
virtual const char * getParamName (int ilocal) const override
 Get name of parameter ilocal. More...
 
virtual bool updateParams (double p[], int idim) override
 Read values from global vector, readjust vector; return: significant change. More...
 
virtual double getDPx (int ilocal) const override
 Return d p_x / d par_ilocal (derivative of px w.r.t. local parameter ilocal) More...
 
virtual double getDPy (int ilocal) const override
 Return d p_y / d par_ilocal (derivative of py w.r.t. local parameter ilocal) More...
 
virtual double getDPz (int ilocal) const override
 Return d p_z / d par_ilocal (derivative of pz w.r.t. local parameter ilocal) More...
 
virtual double getDE (int ilocal) const override
 Return d E / d par_ilocal (derivative of E w.r.t. local parameter ilocal) More...
 
virtual double getFirstDerivative_Meta_Local (int iMeta, int ilocal, int metaSet) const override
 
virtual double getSecondDerivative_Meta_Local (int iMeta, int ilocal, int jlocal, int metaSet) const override
 
virtual int getNPar () const override
 
virtual bool setMass (double mass_)
 Set mass of particle; return=success.
 
virtual double getMass () const
 Get mass of particle.
 
virtual std::ostream & print4Vector (std::ostream &os) const
 print the four-momentum (E, px, py, pz) More...
 
virtual FourVector getFourMomentum () const
 
virtual double getE () const
 Return E.
 
virtual double getPx () const
 Return px.
 
virtual double getPy () const
 Return py.
 
virtual double getPz () const
 Return pz.
 
virtual double getP () const
 Return p (momentum)
 
virtual double getP2 () const
 Return p (momentum) squared.
 
virtual double getPt () const
 Return pt (transverse momentum)
 
virtual double getPt2 () const
 Return pt (transverse momentum) squared.
 
virtual void getDerivatives (double der[], int idim) const override
 
virtual void addToGlobalChi2DerMatrixNum (double *M, int idim, double eps)
 Add numerically determined derivatives of chi squared to global covariance matrix. More...
 
virtual void addToGlobalChi2DerVectorNum (double *y, int idim, double eps)
 Add numerically determined derivatives of chi squared to global derivative vector. More...
 
virtual std::ostream & print (std::ostream &os) const override
 print object to ostream More...
 
void test1stDerivatives ()
 
void test2ndDerivatives ()
 
double num1stDerivative (int ilocal, double eps)
 Evaluates numerically the 1st derivative of chi2 w.r.t. a parameter. More...
 
double num2ndDerivative (int ilocal1, double eps1, int ilocal2, double eps2)
 Evaluates numerically the 2nd derivative of chi2 w.r.t. 2 parameters. More...
 
virtual double getChi2 () const override
 

Protected Types

enum  { NPAR = 3 }
 

Protected Member Functions

double PgFromPz (double pz)
 
void updateCache () const override
 

Protected Attributes

bool cachevalid
 
double pt2
 
double p2
 
double p
 
double pz
 
double dpx0
 
double dpy0
 
double dpz0
 
double dE0
 
double dpx1
 
double dpy1
 
double dpz1
 
double dE1
 
double dpx2
 
double dpy2
 
double dpz2
 
double dE2
 
double d2pz22
 
double d2E22
 
double chi2
 
double b
 
double PzMinB
 
double PzMaxB
 
double dp2zFact
 
double mass
 mass of particle
 
FourVector fourMomentum
 
double paramCycl [BaseDefs::MAXPAR]
 

Detailed Description

Definition at line 43 of file ISRPhotonFitObject.h.

Constructor & Destructor Documentation

◆ ISRPhotonFitObject() [1/2]

ISRPhotonFitObject ( double  px,
double  py,
double  pz,
double  b_,
double  PzMaxB_,
double  PzMinB_ = 0. 
)
Parameters
b_initial values for photon (p_x,p_y fix)

Definition at line 49 of file ISRPhotonFitObject.cc.

51  : cachevalid(false),
52  pt2(0), p2(0), p(0), pz(0),
53  dpx0(0), dpy0(0), dpz0(0), dE0(0), dpx1(0), dpy1(0), dpz1(0), dE1(0),
54  dpx2(0), dpy2(0), dpz2(0), dE2(0), d2pz22(0), d2E22(0),
55  chi2(0), b(0), PzMinB(0), PzMaxB(0), dp2zFact(0)
56  {
57 
58  assert(int(NPAR) <= int(BaseDefs::MAXPAR));
59 
60  initCov();
61  b = b_;
62  PzMinB = PzMinB_;
63  PzMaxB = PzMaxB_;
64 #ifdef DEBUG
65  B2INFO("ISRPhotonFitObject: b: " << b << " PzMinB: " << PzMinB << " PzMaxB: " << PzMaxB);
66 #endif
67 
68  if (b <= 0. || b >= 1.) {
69  B2INFO("ISRPhotonFitObject: b must be from ]0,1[ ");
70  }
71  assert(b > 0. && b < 1.);
72  if (PzMinB < 0. || PzMaxB <= PzMinB) {
73  B2INFO("ISRPhotonFitObject: PzMinB and PzMaxB must be chosen such that 0 <= PzMinB < PzMaxB");
74  }
75  assert(PzMinB >= 0.);
76  assert(PzMaxB > PzMinB);
77  dp2zFact = (PzMaxB - PzMinB) / b * sqrt(2. / pi_);
78  double pg = PgFromPz(ppz); // using internally Gauss-distributed parameter p_g instead of p_z
79  setParam(0, px, true, true);
80  setParam(1, py, true, true);
81  setParam(2, pg, true);
82  setMParam(0, 0.); // all measured parameters
83  setMParam(1, 0.); // are assumed to be zero
84  setMParam(2, 0.); // in this photon parametrization
85 #ifdef DEBUG
86  B2INFO("ISRPhotonFitObject: Initial pg: " << pg);
87 #endif
88  setError(2, 1.);
89  setMass(0.);
90  invalidateCache();
91  }

◆ ISRPhotonFitObject() [2/2]

photon spectrum parametrization (see above)

Copy constructor

Parameters
rhsright hand side

Definition at line 97 of file ISRPhotonFitObject.cc.

Member Function Documentation

◆ addToGlobalChi2DerMatrixNum()

void addToGlobalChi2DerMatrixNum ( double *  M,
int  idim,
double  eps 
)
virtualinherited

Add numerically determined derivatives of chi squared to global covariance matrix.

Parameters
MGlobal covariance matrix
idimFirst dimension of global covariance matrix
epsParameter variation

Definition at line 162 of file ParticleFitObject.cc.

163  {
164  for (int ilocal1 = 0; ilocal1 < getNPar(); ++ilocal1) {
165  int iglobal1 = getGlobalParNum(ilocal1);
166  for (int ilocal2 = ilocal1; ilocal2 < getNPar(); ++ilocal2) {
167  int iglobal2 = getGlobalParNum(ilocal2);
168  M[idim * iglobal1 + iglobal2] += num2ndDerivative(ilocal1, eps, ilocal2, eps);
169  }
170  }
171  }

◆ addToGlobalChi2DerVectorNum()

void addToGlobalChi2DerVectorNum ( double *  y,
int  idim,
double  eps 
)
virtualinherited

Add numerically determined derivatives of chi squared to global derivative vector.

Parameters
yVector of chi2 derivatives
idimVector size
epsParameter variation

Definition at line 152 of file ParticleFitObject.cc.

◆ assign()

ISRPhotonFitObject & assign ( const BaseFitObject &  source)
overridevirtual

Assign from anther object, if of same type.

Parameters
sourceThe source object

Reimplemented from ParticleFitObject.

Definition at line 120 of file ISRPhotonFitObject.cc.

◆ getDE()

double getDE ( int  ilocal) const
overridevirtual

Return d E / d par_ilocal (derivative of E w.r.t. local parameter ilocal)

Parameters
ilocalLocal parameter number

Implements ParticleFitObject.

Definition at line 194 of file ISRPhotonFitObject.cc.

◆ getDPx()

double getDPx ( int  ilocal) const
overridevirtual

Return d p_x / d par_ilocal (derivative of px w.r.t. local parameter ilocal)

Parameters
ilocalLocal parameter number

Implements ParticleFitObject.

Definition at line 158 of file ISRPhotonFitObject.cc.

◆ getDPy()

double getDPy ( int  ilocal) const
overridevirtual

Return d p_y / d par_ilocal (derivative of py w.r.t. local parameter ilocal)

Parameters
ilocalLocal parameter number

Implements ParticleFitObject.

Definition at line 170 of file ISRPhotonFitObject.cc.

◆ getDPz()

double getDPz ( int  ilocal) const
overridevirtual

Return d p_z / d par_ilocal (derivative of pz w.r.t. local parameter ilocal)

Parameters
ilocalLocal parameter number

Implements ParticleFitObject.

Definition at line 182 of file ISRPhotonFitObject.cc.

◆ getParamName()

const char * getParamName ( int  ilocal) const
overridevirtual

Get name of parameter ilocal.

Parameters
ilocalLocal parameter number

Definition at line 133 of file ISRPhotonFitObject.cc.

◆ num1stDerivative()

double num1stDerivative ( int  ilocal,
double  eps 
)
inherited

Evaluates numerically the 1st derivative of chi2 w.r.t. a parameter.

Parameters
ilocalLocal parameter number
epsvariation of local parameter

Definition at line 230 of file ParticleFitObject.cc.

◆ num2ndDerivative()

double num2ndDerivative ( int  ilocal1,
double  eps1,
int  ilocal2,
double  eps2 
)
inherited

Evaluates numerically the 2nd derivative of chi2 w.r.t. 2 parameters.

Parameters
ilocal11st local parameter number
eps1variation of 1st local parameter
ilocal21st local parameter number
eps2variation of 2nd local parameter

Definition at line 242 of file ParticleFitObject.cc.

◆ operator=()

ISRPhotonFitObject & operator= ( const ISRPhotonFitObject rhs)

Assignment.

right hand side

Definition at line 107 of file ISRPhotonFitObject.cc.

◆ print()

std::ostream & print ( std::ostream &  os) const
overridevirtualinherited

print object to ostream

Parameters
osThe output stream

Definition at line 140 of file ParticleFitObject.cc.

◆ print4Vector()

std::ostream & print4Vector ( std::ostream &  os) const
virtualinherited

print the four-momentum (E, px, py, pz)

Parameters
osThe output stream

Definition at line 94 of file ParticleFitObject.cc.

◆ updateParams()

bool updateParams ( double  p[],
int  idim 
)
overridevirtual

Read values from global vector, readjust vector; return: significant change.

Parameters
pThe parameter vector
idimLength of the vector

Definition at line 143 of file ISRPhotonFitObject.cc.


The documentation for this class was generated from the following files:
Belle2::OrcaKinFit::ParticleFitObject::setMass
virtual bool setMass(double mass_)
Set mass of particle; return=success.
Definition: ParticleFitObject.cc:63
Belle2::OrcaKinFit::ParticleFitObject::num2ndDerivative
double num2ndDerivative(int ilocal1, double eps1, int ilocal2, double eps2)
Evaluates numerically the 2nd derivative of chi2 w.r.t. 2 parameters.
Definition: ParticleFitObject.cc:242