ATLAS Offline Software
Loading...
Searching...
No Matches
BipolarFit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef BIPOLARFIT_H
6#define BIPOLARFIT_H
8// A programme to determine the parameters of
9// a bipolar pulse by chi2 minimization
10//
11// http://knikolop.home.cern.ch/knikolop/csc/bipolarfit.c
12//
13// for the function of the bipolar pulse look
14// http://positron.ps.uci.edu/~schernau/ROD/SIT/results/cluster1.html
15//
16// Konstantinos Nikolopoulos
17// 23/5/2007
18// this version : 27/7/2007
20#include<math.h>
21//#include"CLHEP/Matrix/Matrix.h"
22//#include"CLHEP/Matrix/SymMatrix.h"
24{
25 public:
26 BipolarFit();
28 int Fit(double *x,const double ex,const double pedestal, const double predefinedwidth,double *result,double *errors,double *chi2);
29
30 private:
31 void InvertMatrix(double matrix[][3],const int dim,int*);
32 void InvertSymmetric4x4(double W[][4]);
33 double FindInitValues(double*x,double *initValues,int *maxsample);
34 int TheFitter(double*x,const double ex,double *initValues, int imeas, int *meas, int ipar, int *par,double *chi2,double *result);
35 //void Derivative(HepMatrix&,HepMatrix&,HepMatrix&,bool*usemeas);
36 void Derivative(double A[][3],double fp[][1], double p0[][1],int imeas, int*meas);
37 //double dFdz(double,double *);
38 double bipolar(double*, double*);
39 double FindPow(double z);
40
41 double m_n;
44 double m_zmax;
47};
48#endif
#define x
#define z
double m_powcachez
Definition BipolarFit.h:42
double m_tsampling
Definition BipolarFit.h:46
double FindInitValues(double *x, double *initValues, int *maxsample)
int Fit(double *x, const double ex, const double pedestal, const double predefinedwidth, double *result, double *errors, double *chi2)
double m_zmax
Definition BipolarFit.h:44
void InvertSymmetric4x4(double W[][4])
void InvertMatrix(double matrix[][3], const int dim, int *)
double m_bipolarNormalization
Definition BipolarFit.h:45
double m_n
Definition BipolarFit.h:41
void Derivative(double A[][3], double fp[][1], double p0[][1], int imeas, int *meas)
double m_powcachezn
Definition BipolarFit.h:43
int TheFitter(double *x, const double ex, double *initValues, int imeas, int *meas, int ipar, int *par, double *chi2, double *result)
double bipolar(double *, double *)
double FindPow(double z)
double chi2(TH1 *h0, TH1 *h1)
hold the test vectors and ease the comparison