Commit 3f051ee0 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Probably patch to previous commit.

parent 6c480de9
......@@ -24,7 +24,7 @@
#include "../TELoss/TELoss.h"
#define DEFAULTNOPEAKS 20
//#define DEFAULTNOPEAKS 20
#define ADDRESSNUMBER 32
using std::cout;
......@@ -58,15 +58,10 @@ private:
//dodelat current histograms
TObjArray fCurrentHistList;
// TRandom3 *fRanGen;
// static TRandom3 fRanGen; //!
// THStack *fHStack;
//parameters to be read from file
Int_t kRaNOPEAKS;
Double_t fEnergy[DEFAULTNOPEAKS];
TArrayD fEnergy;
TArrayD fEnergyInput;
Double_t fLowerChannel;
Double_t fUpperChannel;
Double_t fLowerPeakRelativeHight; //pouziva se, private
......@@ -75,26 +70,23 @@ private:
Width_t fFitFuncLineWidth; //private
Double_t fFitMinSigma; //pouziva se, private
Double_t fFitPeakThreshold; //pouziva se, private, prozkoumat, k cemu vlastne slouzi ve fci ShowPeaks, popremyslet o vhodnem prednastaveni v konstruktoru
Double_t fDeadLayer; //in mcm; it will be used for recalculation of energies outcomming from the alpha source
private:
//these variables are the main for the class
TArrayD fA; //calibration parameter, f(x) = fA*x + fB
TArrayD fB; //calibration parameter, f(x) = fA*x + fB
// TArrayD fC;
// TArrayD fD;
TArrayD fPeak; //v teto promenne je ulozena momentalni hodnota piku v kanalech, zejmena v jedne fci, mozno udelat ji jako lokalni, bude navratovou hodnotou fce PeaksFitting, predelat delku pole
TELoss fAlphaSi;
public:
TString fParFileName;
//it is very doubtful that we need this class variable
TFile *fCalInformation;
Double_t GetA(Int_t i); //to obtain calib parameter A
Double_t GetB(Int_t i); //to obtain calib parameter B
private:
Double_t fPeak[DEFAULTNOPEAKS]; //v teto promenne je ulozena momentalni hodnota piku v kanalech, zejmena v jedne fci, mozno udelat ji jako lokalni, bude navratovou hodnotou fce PeaksFitting, predelat delku pole
public:
AculCalibration();
//default constructor
......@@ -104,7 +96,10 @@ public:
void Init();
Bool_t SetInputParameters(const char* inputparfile = "parforcal.par");
Double_t GetA(Int_t i); //to obtain calib parameter A
Double_t GetB(Int_t i); //to obtain calib parameter B
void SetParFileName(const char* parfile = "");
// Function which loads text file containing parameters for calibration
//
// -inputparfile: file containing information on calibration source
......@@ -223,24 +218,25 @@ public:
// xaxismin: Minimum channel, which will be displayed
// xaxismax: Maximum channel, which will be displayed
void DivideCanvas(TCanvas *c1, Int_t inputs);
//dodelat funkce TTree* Get...(...) pro raw, anal i E spectra
// Bool_t AddCalFileToList(const char* calfilelist = "CalFileList.log");
//dodelat funkce TTree* Get...(...) pro raw, anal i E spectra
void ClearHistograms(Option_t* option = "");
void DeleteStacks(Option_t* option = "");
// void MakeCalibrationFile(Char_t* calibrationfile, Char_t* calfilelist);
void Reset();
//reset calibration parameters fA, fB to zero
private:
void DivideCanvas(TCanvas *c1, Int_t inputs);
void SetInputParameters();
void SetELosses();
void SetCalEnergies();
};
......@@ -2,7 +2,7 @@
# AculData input with some variables
################################################################################
ACULDATALIBS := -lCore -lCint -lRIO -lTree -lNet -lThread -lHist -lMatrix -lMathCore -lGpad -lGraf -lSpectrum -lTELoss
ACULDATALIBS := -lCore -lCint -lRIO -lTree -lNet -lThread -lHist -lMatrix -lMathCore -lGpad -lGraf -lSpectrum #-lTELoss
# Add inputs and outputs from these tool invocations to the build variables
ACULDATA_HEADERS += \
......
#include <TSystem.h>
#include <iostream>
using namespace std;
void calibration1()
{
gSystem->Load("/home/dariak/AculUtils/libAculData.so");
// gSystem->Load("/home/vratik/workspace/AculUtils/libAculData.so");
// gSystem->Load("/home/dariak/AculUtils/libAculData.so");
gSystem->Load("/home/vratik/workspace/AculUtils/libTELoss.so");
gSystem->Load("/home/vratik/workspace/AculUtils/libAculData.so");
AculCalibration cal;
cal.SetInputParameters("/home/dariak/AculUtils/parforcal.par"); //from .par
// cal.SetParFileName("/home/dariak/AculUtils/parforcal.par"); //from .par
cal.SetParFileName("/home/vratik/workspace/AculUtils/parforcal.par"); //from .par
cal.Init();
//return;
cal.PrintInputParameters();
cal.CalculateCalibParameters("/home/dariak/AculUtils/exp1016/clb_raw_files/sq22/clb07_0001.root", "SQ22", "AnalysisxTree", 100, 1500);
TCanvas *c1 = new TCanvas();
cal.ShowEnergySpectra("SQ22[]E.root", c1, 32);
// return;
// cal.CalculateCalibParameters("/home/dariak/AculUtils/exp1016/clb_raw_files/sq22/clb07_0001.root", "SQ22", "AnalysisxTree", 100, 1500);
// cal.CalculateCalibParameters("/home/vratik/workspace/AculUtils/exp1016/clb_raw_files/clb07_0001.root", "SQ22", "AnalysisxTree", 100, 1500);
return;
// CalculateCalibParameters(const char* inputfile, const char* block, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
cal.PrintCalibrationParameters();
......
//226Ra
//relative units are normalized to 1
4 nopeaks //number of peaks
4 noPeaks //number of peaks
4.784 E1 //in MeV
5.490 E2 //in MeV
6.002 E3 //in MeV
7.687 E4 //in MeV
100 lowerchannel //in channels
800 upperchannel //in channels
0.5 lowerpeakhight //in relative units
0.5 upperpeakhight //in relative units
0.1 peakpositiontolerance //in relative units
2 fitfunctionlinewidth //integer 1 - 10
2 minfitsigma //minimal sigma of the peaks to be fitted
0.3 fithightthreshold //
0. deadLayer //in mcm; dead layer from the side which is irradiated during calibration
100 lowerChannel //in channels
800 upperChannel //in channels
0.5 lowerPeakHight //in relative units; minimal range of the peak
0.5 upperPeakHight //in relative units; minimal range of the peak
0.1 peakPositionTolerance //in relative units; for check of the peaks positions in channels
2 fitFunctionLineWidth //integer 1 - 10; graphics
2 minFitSigma //minimal sigma of the peaks to be fitted
0.3 fitHightThreshold //in relative units; the minimal height of the treated peak
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment