GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TXXXCalibPar.h
Go to the documentation of this file.
1// $Id: TXXXCalibPar.h 478 2009-10-29 12:26:09Z linev $
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#ifndef TXXXCalibPar_H
15#define TXXXCalibPar_H
16
17#include "TGo4Parameter.h"
18
19#define __LINESNUMBER__ 20
20#define __TEXTMAX__ 256
21#define __POLORDER__ 4
22#define __DATANAME__ "data1"
23#define __GRAPHNAME__ "graph1"
24
25class TGraph;
26class TH1;
27class TGo4Fitter;
28
30 public:
32 TXXXCalibPar(const char *name, TH1 *spectrum, TGraph *curve);
33 virtual ~TXXXCalibPar();
34
35 Bool_t UpdateFrom(TGo4Parameter *) override;
36
38 void ReadDatabase();
39
41 void SetCalibSpectrum(TH1 *h1);
42
44 Double_t Energy(Int_t channel);
45
47 Double_t fdA[__POLORDER__]; // Calibration polynom coeff
49 Bool_t fbRecalibrate{kFALSE}; // Set to kTRUE to make calibration fit in update from
51 Bool_t fbReadDatabase{kFALSE}; // Set to kTRUE to re-read energies from external ascii file
53 TString fxDatabase; // Filename for ascii file with linesname - energy
55 Int_t fiLinesChannel[__LINESNUMBER__]; // Centroid channel numbers for fitted lines
57 Float_t ffLinesEnergy[__LINESNUMBER__]; // Database energies of calibration lines
59 TString fxLinesNames[__LINESNUMBER__]; // Database names of calibration lines.
60
62 TGo4Fitter *fxLinesFinder{nullptr}; // Fitter to search lines
63
65 TGo4Fitter *fxCalibrator{nullptr}; // Fitter for calibration of channel/energies with polynom
66
68 TGraph *fxCalibCurve{nullptr};
70 TString fxGraphName; // Name of the graph to contain the calibration points
71
73 TH1 *fxCalibSpectrum{nullptr};
74
76 TString fxSpectrumName; //Name of the calibration spectrum histogram
77
78 ClassDefOverride(TXXXCalibPar,1)
79};
80
81#endif
#define __LINESNUMBER__
#define __POLORDER__
Central class of Go4Fit package.
Definition TGo4Fitter.h:38
TH1 * fxCalibSpectrum
Reference to histogram containing the calibration spectrum.
Double_t fdA[__POLORDER__]
Calibration polynom coeff.
void ReadDatabase()
Read calibration lines from database (ascii file)
Double_t Energy(Int_t channel)
calculate energy from channel number using the current polynom
Int_t fiLinesChannel[__LINESNUMBER__]
Centroid channel numbers for fitted lines.
void SetCalibSpectrum(TH1 *h1)
Reset reference to calibration spectrum in fitter.
TString fxDatabase
Filename for ascii file with linesname - energy.
TGraph * fxCalibCurve
Reference to graph containing the calibration points.
TString fxLinesNames[__LINESNUMBER__]
Database names of calibration lines.
TGo4Fitter * fxLinesFinder
Fitter to search lines.
Bool_t fbReadDatabase
Set to kTRUE to re-read energies from external ascii file.
TGo4Fitter * fxCalibrator
Fitter for calibration of channel/energies with polynom.
Bool_t fbRecalibrate
Set to kTRUE to make calibration fit in update from.
Float_t ffLinesEnergy[__LINESNUMBER__]
Database energies of calibration lines.
virtual ~TXXXCalibPar()
Bool_t UpdateFrom(TGo4Parameter *) override
Update contents of parameter class with external object.
TString fxGraphName
Reference to graph containing the calibration points.
TString fxSpectrumName
Reference to histogram containing the calibration spectrum.