MarlinKinfit  0.4.0
JetFitObject.h
Go to the documentation of this file.
1 
39 #ifndef __JETFITOBJECT_H
40 #define __JETFITOBJECT_H
41 
42 #include "ParticleFitObject.h"
43 
44 // Class JetFitObject
46 
58  public:
59  JetFitObject(double E, double theta, double phi,
60  double DE, double Dtheta, double Dphi,
61  double m = 0);
62 
64  JetFitObject (const JetFitObject& rhs
65  );
68  );
69 
70  virtual ~JetFitObject();
71 
73  virtual JetFitObject *copy() const;
74 
76  virtual JetFitObject& assign (const BaseFitObject& source
77  );
78 
80  virtual const char *getParamName (int ilocal
81  ) const;
82 
84  virtual bool updateParams (double p[],
85  int idim
86  );
87 
88  virtual int getNPar() const {return NPAR;}
89 
90  // these depend on actual parametrisation!
91 
92  virtual double getDPx(int ilocal) const;
93  virtual double getDPy(int ilocal) const;
94  virtual double getDPz(int ilocal) const;
95  virtual double getDE(int ilocal) const;
96 
97  virtual double getCov (int ilocal,
98  int jlocal
99  ) const ;
100 
102  virtual double getError (int ilocal
103  ) const;
104 
105 
108 // virtual void addToDerivatives (double der[], ///< Derivatives vector, length idim
109 // int idim, ///< Length of derivatives vector
110 // double efact=0, ///< Factor for dE/dx_i
111 // double pxfact=0, ///< Factor for dpx/dx_i
112 // double pyfact=0, ///< Factor for dpy/dx_i
113 // double pzfact=0 ///< Factor for dpz/dx_i
114 // ) const;
115 
116  // daniel's new method
117  // derivatives of intermediate variable wrt local variable
118  virtual double getFirstDerivative_Meta_Local( int iMeta, int ilocal , int metaSet ) const;
119  virtual double getSecondDerivative_Meta_Local( int iMeta, int ilocal , int jlocal , int metaSet ) const;
120 
122  // virtual double getChi2() const;
123 
124  protected:
125 
126  enum {NPAR=3};
127 
128  void updateCache() const;
129 
130  mutable double ctheta, stheta, cphi, sphi,
131  p2, p, pt, px, py, pz, dpdE, dptdE,
132  dpxdE, dpydE, dpzdE, dpxdtheta, dpydtheta,
133  chi2;
134  // d2pdE2, d2ptsE2;
135 
137  static bool adjustEThetaPhi (double& m, double &E, double& theta, double& phi);
138 
140  // double calcChi2 () const;
141 
142 };
143 
144 
145 
146 #endif // __JETFITOBJECT_H
147 
static bool adjustEThetaPhi(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...
Definition: JetFitObject.cc:399
virtual bool updateParams(double p[], int idim)
Read values from global vector, readjust vector; return: significant change.
Definition: JetFitObject.cc:165
virtual double getCov(int ilocal, int jlocal) const
Get covariance between parameters ilocal and jlocal.
Definition: JetFitObject.cc:251
virtual JetFitObject * copy() const
Return a new copy of itself.
Definition: JetFitObject.cc:138
virtual double getDPz(int ilocal) const
Return d p_z / d par_ilocal (derivative of pz w.r.t. local parameter ilocal)
Definition: JetFitObject.cc:224
virtual double getFirstDerivative_Meta_Local(int iMeta, int ilocal, int metaSet) const
add derivatives to vector der of size idim pxfact*dpx/dx_i + pyfact*dpy/dx_i + pzfact*dpz/dx_i + efac...
Definition: JetFitObject.cc:281
Class for jets with (E, eta, phi) in kinematic fits.
Definition: JetFitObject.h:57
virtual JetFitObject & assign(const BaseFitObject &source)
Assign from anther object, if of same type.
Definition: JetFitObject.cc:142
Abstract base class for particle objects of kinematic fits.
Definition: ParticleFitObject.h:63
virtual double getDPy(int ilocal) const
Return d p_y / d par_ilocal (derivative of py w.r.t. local parameter ilocal)
Definition: JetFitObject.cc:213
virtual double getDPx(int ilocal) const
Return d p_x / d par_ilocal (derivative of px w.r.t. local parameter ilocal)
Definition: JetFitObject.cc:202
Declares class ParticleFitObject.
virtual double getError(int ilocal) const
Get error of parameter ilocal.
Definition: JetFitObject.cc:245
virtual const char * getParamName(int ilocal) const
Get name of parameter ilocal.
Definition: JetFitObject.cc:155
virtual int getNPar() const
Get total number of parameters of this FitObject.
Definition: JetFitObject.h:88
virtual double getDE(int ilocal) const
Return d E / d par_ilocal (derivative of E w.r.t. local parameter ilocal)
Definition: JetFitObject.cc:235
Abstract base class for particle objects of kinematic fits.
Definition: BaseFitObject.h:110
JetFitObject & operator=(const JetFitObject &rhs)
Assignment.
Definition: JetFitObject.cc:131