10 #define MAX_STRING_LENGTH 50
25 void DemoCo60(Double_t xmin=0, Double_t xmax=4096)
29 str =
"gaus(0) + gaus(3) + [6]*x + [7]";
30 TF1 f(
"Co60raw",str.Data(),0,10000);
31 f.SetParameters(1000,2256.23,1.,800,2596.17,1.5,0.01,10);
32 TH1D *hraw =
new TH1D(
"RAWhisto",
"Raw Data",4096,0,4096);
33 hraw->FillRandom(
"Co60raw",100000);
37 hraw->GetXaxis()->SetRange(xmin,xmax);
38 TF1 *calfunction =
new TF1 (
"CalibrationFunction",
"pol1(0)");
61 str =
"gaus(0) + gaus(3) + [6]*x + [7]";
62 TF1 f(
"Co60raw",str.Data(),0,10000);
63 f.SetParameters(1000,2256.23,1.,800,2596.17,1.5,0.01,10);
64 TH1D *hraw =
new TH1D(
"RAWhisto",
"Raw Data",4096,0,4096);
65 hraw->FillRandom(
"Co60raw",100000);
70 TF1 *calfunction =
new TF1 (
"CalibrationFunction",
"pol1(0)");
72 calibrator->
Calibrate(hraw,calfunction,channel1,channel2);
void DemoCo60(Double_t xmin=0, Double_t xmax=4096)
Function to calibrate a Co60 spectrum with the CalibCo60 service class.
void Calibrate(const TH1 *, const TF1 *, const Option_t *AxisOption="x")
void Calibrate(const TH1 *histo, TF1 *function, Double_t channel1, Double_t channel2, Option_t *AxisOption="x")
Perform the calibration "by hand".
H1Calibrator is a service class in order to calibrate a TH1 The raw histogram must never be changed T...
void DemoCo60ByHand(Double_t channel1=2256, Double_t channel2=2596)
Function to calibrate a Co60 spectrum with the CalibCo60 service class.
CalibCo60 is a service class in order to find calibration coefficients for a TH1 espacially with Co60...