42 void SetMaxIter(
int maxiter) { fMaxIter=maxiter;}
43 void SetMaxCuts(
int maxcuts) { fMaxCuts=maxcuts;}
44 void SetDebug(
int deb=1) { fDebug=deb;}
46 double ErMx(
int jcol,
int jrow)
const;
49 int PriStep(
const char *tit=
"");
93 enum {kMEAS=0,kSLAC=1,kCNSR=2};
96 TCFitData(
const char *name,
const char *title=
"");
103 int AddPar(
int tyPar,
int idPar,
double *par,
int nPars=1,
const char *name=
"",
double tiny=0.);
105 int GetId(
const char *name)
const;
109 int GetId(
int jd)
const;
110 int GetJd(
int id)
const;
111 const char *GetNam(
int idx)
const;
112 int GetType(
int id)
const;
114 void FixPar (
int id,
int yes=1);
115 int IsFixed(
int id)
const ;
119 virtual int Approx()=0;
120 virtual double Fcn()=0;
121 virtual double DFcn(
int ipar);
122 virtual double DDFcn(
int ipar,
int jpar);
124 virtual double Con(
int icon);
125 virtual double DCon(
int icon,
int ipar);
127 virtual void Update()=0;
131 virtual void Print(
const char *name)
const;
135 void SetFitter(
const TCFit *fitter) {fFitter = fitter;}
136 void SetFail(
int ifail) {fFail = ifail ;}
137 int GetFail()
const {
return fFail;}
138 int Modified()
const {
return fModi;}
139 void Modify(
int m=1) {
fModi = m;}
141 double &GetPar (
int ipar);
142 double GetPar (
int ipar)
const ;
143 double GetTiny(
int ipar)
const {
return fTiny[ipar];}
144 double GetFcn ()
const {
return fFcn[0];}
145 void SetFcn (
double fcn) {fFcn[0] = fcn ;}
146 void SetFcn (
double tiny,
double big) {fFcn[1] = tiny; fFcn[2]=big;}
147 double GetBigFcn()
const {
return fFcn[2];}
148 double GetTinyFcn()
const {
return fFcn[1];}
151 int GetNMeas()
const {
return fNPars[0];}
152 int GetNSlac()
const {
return fNPars[1];}
153 int GetNCons()
const {
return fNPars[2];}
158 int GetNDF()
const {
return GetUCons()-GetUSlac();}
159 double ErMx(
int icol,
int irow)
const;
165 const TCFit *fFitter;
175 double fTiny[kMaxId+1];
177 short fFixs[kMaxId+1];
178 char fIndx[kMaxId+1];
179 char fJndx[kMaxId+1];
182 TString fNams[kMaxId];
191 class TLorentzVector;
199 TkPars() { Reset(); SetHz();}
202 void Print(
const char *tit)
const;
203 double *Arr() {
return &
dca;}
204 const double *Arr()
const {
return &
dca;}
205 double P()
const {
return sqrt(1.+
tanl*
tanl)/fabs(
ptin);}
207 TLorentzVector P4()
const;
208 void P4D(
double D[4][5])
const;
211 void Set(
const TVector3 &v3,
const TVector3 &d3 ,
double pts );
212 void Get( TVector3 *v3, TVector3 *d3=0,
double *pts=0)
const;
213 void Rand(
const TkErrs &errs);
214 void SetHz(
double factor=1.);
216 static const char* Name(
int mem);
217 static double Tiny(
int mem);
242 void Set(
int i,
int j,
double err);
243 double Get(
int i,
int j)
const;
245 double Xi2(
const TkPars &pars)
const;
246 void Mpy(
const TkPars &pars,
double der[5])
const;
254 VxPars() {memset(x,0,
sizeof(x));}
269 enum eTCFitV0 { kDCA_0= 0,kZ_0 = 1,kPHI_0= 2,kPTIN_0= 3,kTANL_0= 4
270 , kDCA_1=10,kZ_1 =11,kPHI_1=12,kPTIN_1=13,kTANL_1=14
271 , kLEN_0=20,kLEN_1=21,kLEN_2=22
272 , kCX_0 =30,kCY_0 =31,kCZ_0 =32
273 , kCX_1 =33,kCY_1 =34,kCZ_1 =35
278 virtual double Fcn();
279 virtual double DFcn(
int ipar);
280 virtual double DDFcn(
int ipar,
int jpar);
282 virtual double Con(
int icon);
283 virtual double DCon(
int icon,
int ipar);
286 virtual void Update();
287 virtual void Print(
const char *name)
const;
290 static void Test(
int mode=0);
308 double mDConDL[3][3];
309 double mP4d[2][4][5];
int fModi
fail flag, fit is impossible
double tanl
tangent of the track momentum dip angle
int fNPars[3]
&1=1 fcn calculated from error matrix
double mass
Mass of track.
short fTyps[kMaxId+1]
Tiny values still modifying fcn.
double curv
signed curvature [sign = sign(-qB)]
double hz
Z component magnetic field in units Pt(Gev) = Hz * RCurv(cm)
double phi
angle between track direction and X-axis in xy plane
double * fPars[kMaxId+1]
number of "slack" parameters
char fEnd[1]
Current value of fcn [1].
double ptin
signed invert pt [sign = sign(-qB)]
int fNFixs[3]
number of "measured" ,slack, constrains
int AddPar(int tyPar, int idPar, double *par, int nPars=1, const char *name="", double tiny=0.)