Commit a0882328 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Function AculCalibration::CalibrateRawSpectra() added.

parent ff00f341
This diff is collapsed.
......@@ -75,12 +75,14 @@ public:
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
//tyto promenne jsou smyslem tridy, mely by tedy byt snad jako jedine verejne
Double_t fA[BLOCKSNUMBER][ADDRESSNUMBER]; //kalibracni parametry, f(x) = fA*x + fB
Double_t fB[BLOCKSNUMBER][ADDRESSNUMBER]; //kalibracni parametry, f(x) = fA*x + fB
//these variables are the main for the class
Double_t fAOld[BLOCKSNUMBER][ADDRESSNUMBER]; //calibration parameter, f(x) = fAOld*x + fBOld
Double_t fBOld[BLOCKSNUMBER][ADDRESSNUMBER]; //calibration parameter, f(x) = fAOld*x + fBOld
Double_t fC[BLOCKSNUMBER][ADDRESSNUMBER]; //treti kalibracni parametr, jine zavislosti nez pol1
Double_t fD[BLOCKSNUMBER][ADDRESSNUMBER]; //ctvrty kalibracni parametr
TArrayD fA;
TArrayD fB;
......@@ -126,7 +128,7 @@ public:
Bool_t SetCalibrationParameters(const char* calparfile);
//Loads the file with calibration parameters
//
// calparfile: file containing calibration parameters in format: crate number, address, subaddress, fA, fB, fC, fD
// calparfile: file containing calibration parameters in format: crate number, address, subaddress, fAOld, fBOld, fC, fD
//
// allowed comment characters: *, #, %, //
......@@ -134,7 +136,7 @@ public:
//I hope this is selfunderstanding function
void PrintCalibrationParameters(const Int_t blockmin = 1, const Int_t blockmax = BLOCKSNUMBER - 1);
//Print calibration parameters fA, fB, fC, fD which are currently saved in object AculCalibration
//Print calibration parameters fAOld, fBOld, fC, fD which are currently saved in object AculCalibration
//
// blockmin: minimum block data are displayed for
// blockmax: maximum block data are displayed for
......@@ -154,6 +156,23 @@ public:
// lowersubaddress: block subaddress
// uppersubaddress: block subbaddress
void CalibrateRawSpectra();
UShort_t SomeFunction(UShort_t x, int len);
template<typename T> T SomeFunction(T x, int len)
{
/*T max = x[0];
for(int i = 1; i < len; i++)
if(max < x[i])
max = x[i];*/
// return max;
return x;
}
void CalibrateRawSpectra(const char* inputfile, const char* block, const Int_t address, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
// Bool_t EnergyPositions(const char* inputfile, const char* block,
......
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