10#include "KVTGIDFitter.h"
12#include "KVIDZAGrid.h"
13#include "KVIDGridManager.h"
14#include "KVTGIDGrid.h"
28 fLight = fType = fZorA = 0;
29 fPar = zd = ad = xd = yd = 0;
70 Error(
"Fit(KVIDGraph*)",
71 "Can only fit graphs inheriting from KVIDZAGrid");
100 for (
int i = 0; i <
id->GetN(); i++) {
101 id->GetPoint(i,
x,
y);
106 cout <<
"Points to fit = " << npts << endl;
108 Error(
"Fit(KVIDGraph*)",
109 "Too few points for fit");
115 if (
zd)
delete []
zd;
116 if (
ad)
delete []
ad;
117 if (
xd)
delete []
xd;
118 if (
yd)
delete []
yd;
127 for (
int i = 0; i <
id->GetN(); i++) {
128 id->GetPoint(i,
x,
y);
132 zd[npts] =
id->GetZ();
133 ad[npts] =
id->GetA();
181 "addressing problem between Fortran and C",
182 "too few data points",
183 "no identification line with at least 2 points",
184 "convergence reached",
185 "convergence reached, but not well marked minimum",
186 "too many iterations, convergence not reached"
188 return message[
irc + 3].
Data();
223 if (irc < 0 || irc > 1)
return;
262 Error(
"FitPanel",
"Set grid to fit with SetGrid(KVIDGraph*)");
271 Warning(
"FitPanel",
"Fit failed. Status of fit = %d",
irc);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
char * Form(const char *fmt,...)
Base class for particle identification in a 2D map.
const TList * GetIDTelescopes() const
void Draw(Option_t *opt="")
Int_t GetMassFormula() const
virtual Bool_t HasMassIDCapability() const
const KVNumberList & GetRuns() const
void FindAxisLimits()
Calculate X/Y min/max of all objects in graph.
const KVList * GetIdentifiers() const
void SetMassFormula(Int_t)
const Char_t * GetName() const
virtual void Initialize()=0
virtual void SetOnlyZId(Bool_t yes=kTRUE)
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
Base class for graphical cuts used in particle identification.
virtual TObject * Last() const
virtual TObject * First() const
Float_t * fPar
array of fit parameters
Int_t GetFitStatus() const
Float_t * yd
array of Y coordinates
Float_t * xd
array of X coordinates
virtual void Fit(KVIDGraph *)
virtual ~KVTGIDFitter()
Destructor.
Int_t * GetStatusOfParameters() const
Int_t fZorA
is grid for Z&A or only Z identification ?
void FitPanel(Int_t functional_type=1, Bool_t with_csi_light_energy=kTRUE, Int_t first_Z=-1, Int_t last_Z=-1, Double_t xmin=0.0, Double_t xmax=0.0)
void MakeTGID()
Make a KVTGID out of fit result, if fit converged (irc<2)
Int_t * istate
status of parameters
Double_t fXmin
limit for fit
Double_t fXmax
limit for fit
Int_t fType
type of functional
const Char_t * GetFitStatusString() const
String with meaning of fit status codes (see GetFitStatus)
KVTGID * fTGID
KVTGID object representing fit result.
Int_t fLight
handles CsI total light-energy conversion
void SetFunctionalType(Int_t t)
Grid representing result of fit.
virtual void Generate(Double_t xmax, Double_t xmin, Int_t ID_min=0, Int_t ID_max=0, Int_t npoints=50, Bool_t logscale=kTRUE)
void SetIDTelescopes(const TCollection *)
void SetIDmax(Double_t x)
void SetVarX(const Char_t *x)
static KVTGID * MakeTGID(const Char_t *name, Int_t type, Int_t light, Int_t ZorA, Int_t mass)
void SetValidRuns(const KVNumberList &r)
void SetIDmin(Double_t x)
void SetVarY(const Char_t *x)
void SetLTGParameters(Double_t *par)
static Int_t GetNumberOfLTGParameters(Int_t type, Int_t light)
TVirtualPad * fPad
the pad in which grid is drawn (=0 if not drawn)
KVIDGraph * fGrid
the grid to fit
const char * GetVarX() const
const char * GetVarY() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Error(const char *method, const char *msgfmt,...) const
const char * Data() const
virtual void Modified(Bool_t flag=1)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0