Commit c1566d0a authored by Vratislav Chudoba's avatar Vratislav Chudoba

Very beginning of new class for calibration of Si detectors added.

Some cosmetic changes in Acul*Scint classes.
parent 51b9c968
......@@ -33,3 +33,8 @@ void AculCalPars::SetParFile(const char* parfile) {
fParFileName = parfile;
return;
}
void AculCalPars::Reset() {
fParFileName = "";
fEtab.clear();
}
......@@ -18,6 +18,7 @@
#include "TCutG.h"
using std::cout;
using std::cerr;
using std::endl;
using std::vector;
......@@ -27,26 +28,11 @@ protected:
//general
TString fParFileName;
vector<Double_t> fEtab; //energy which will be used for calibration
//todo energies used for calibration should be in this class
//CsI parameters
// Int_t fNoCrystals;
//
// TString fDetName;
//
// Int_t fNoFiles;
// vector<TString> fFileName;
//
// Int_t fEnergyPoints;
// TArrayD fE;
//
//Si parameteres
//first
//second
//others
public:
AculCalPars();
......@@ -77,7 +63,7 @@ public:
void SetParFile(const char* parfile);
virtual void PrintParameters(const char* option = "") {};
virtual void Reset() {};
virtual void Reset();
protected:
virtual void SetPars() {};
......
......@@ -37,6 +37,7 @@ public:
virtual void Init();
void SetParFile(const char* parfile);
const char* GetParFileName() {return fParFileName.Data();}
void PrintParameters(const char* option = "");
void PrintCalibParameters();
......
......@@ -8,31 +8,39 @@ ACULCALIBLIBS := -lCore -lCint -lRIO -lTree -lNet -lThread -lHist -lMatrix -lMat
ACULCALIB_HEADERS += \
$(ACULCALIB)/AculCalib.h \
$(ACULCALIB)/AculCalibScint.h \
$(ACULCALIB)/AculCalibSi.h \
$(ACULCALIB)/AculCalPars.h \
$(ACULCALIB)/AculCalParsScint.h \
$(ACULCALIB)/AculCalParsScintFile.h \
$(ACULCALIB)/AculCalParsSi.h \
$(ACULCALIB)/linkdef.h
ACULCALIBCPP_SRCS += \
$(ACULCALIB)/AculCalib.cpp \
$(ACULCALIB)/AculCalibScint.cpp \
$(ACULCALIB)/AculCalibSi.cpp \
$(ACULCALIB)/AculCalPars.cpp \
$(ACULCALIB)/AculCalParsScint.cpp \
$(ACULCALIB)/AculCalParsScintFile.cpp \
$(ACULCALIB)/AculCalParsSi.cpp \
$(ACULCALIB)/AculCalibCint.cpp
ACULCALIBOBJS += \
$(ACULCALIB)/AculCalib.o \
$(ACULCALIB)/AculCalibScint.o \
$(ACULCALIB)/AculCalibSi.o \
$(ACULCALIB)/AculCalPars.o \
$(ACULCALIB)/AculCalParsScint.o \
$(ACULCALIB)/AculCalParsScintFile.o \
$(ACULCALIB)/AculCalParsSi.o \
$(ACULCALIB)/AculCalibCint.o
ACULCALIBCPP_DEPS += \
$(ACULCALIB)/AculCalib.d \
$(ACULCALIB)/AculCalibScint.d \
$(ACULCALIB)/AculCalibSi.d \
$(ACULCALIB)/AculCalPars.d \
$(ACULCALIB)/AculCalParsScint.d \
$(ACULCALIB)/AculCalParsScintFile.d \
$(ACULCALIB)/AculCalParsSi.d \
$(ACULCALIB)/AculCalibCint.d
\ No newline at end of file
/*
* AculCalibSi.cpp
*
* Created on: Oct 26, 2016
* Author: vratik
*/
#include "AculCalibSi.h"
#include "AculCalParsSi.h"
ClassImp(AculCalibSi);
AculCalibSi::AculCalibSi() {
printf("AculCalibScint::Default constructor called.\n");
// fInFiles = 0;
// fTrees = 0;
// fCutFile = 0;
}
AculCalibSi::AculCalibSi(const char* parfile) {
printf("AculCalibScint::Constructor called.\n");
SetParFile(parfile);
Init();
}
AculCalibSi::~AculCalibSi() {
printf("AculCalibScint::Destructor called.\n");
}
void AculCalibSi::Init() {
fPars = new AculCalParsSi(fParFileName.Data());
}
/*
* AculCalibSi.h
*
* Created on: Oct 26, 2016
* Author: vratik
*/
#ifndef ACULCALIB_ACULCALIBSI_H_
#define ACULCALIB_ACULCALIBSI_H_
#include "AculCalib.h"
class AculCalibSi: public AculCalib {
private:
// Double_t something;
public:
AculCalibSi();
AculCalibSi(const char* parfile);
virtual ~AculCalibSi();
ClassDef(AculCalibSi, 1);
void Init();
// Bool_t 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); //calculate calibration parameters for given block in given file
//function is not completely ready to use
//
//function for calculation of calibrate parameters for DAQ system based on "Go4"
//
// inputfile: root file with calibration spectra
// block: block name to be calibrated
// lowerchannel: minimal channel from which the spectrum will be analysed
// upperchannel: maximal channel up to which the spectrum will be analysed
// lowersubaddress: block subaddress
// uppersubaddress: block subbaddress
};
#endif /* ACULCALIB_ACULCALIBSI_H_ */
......@@ -7,9 +7,11 @@
//#pragma link C++ class AculConvert;
#pragma link C++ class AculCalib;
#pragma link C++ class AculCalibScint;
#pragma link C++ class AculCalibSi;
#pragma link C++ class AculCalPars;
#pragma link C++ class AculCalParsScint;
#pragma link C++ class AculCalParsScintFile;
#pragma link C++ class AculCalParsSi;
#endif
......@@ -2,6 +2,7 @@ energies 4 #number of energy points
crystals 16 #number of crystals in detector
files 4
#fileID fileName
#fileID not implemented yet
data/csi_13_Ealpha16.root
data/csi_13_Ealpha21.root
data/csi_13_Ealpha26.root
......
//#include "../../AculCalib/AculCalPars.h"
//#include "../../AculCalib/AculCalibScint.h"
//#include "../../AculCalib/AculCalibSi.h"
//#include "TSystem.h"
//#include <iostream>
//
......@@ -8,11 +9,19 @@ using std::endl;
void parTest()
{
gSystem->Load("../../libTELoss.so");
gSystem->Load("../../libAculCalib.so");
AculCalParsScintFile pp;
pp.SetNoCrystals(16);
pp.Init();
/* AculCalibSi ps;
ps.SetParFile("parforcal.par");
ps.Init();
ps.PrintParameters();
return;
*/
// AculCalParsScintFile pp;
// pp.SetNoCrystals(16);
// pp.Init();
// return;
cout << "-----------------------" << endl;
......@@ -31,10 +40,13 @@ void parTest()
p.PrintParameters("");
// return;
cout << "-----------------------" << endl;
AculCalibScint c;
c.SetParFile("SQ13Alpha.par");
c.Init();
// return;
c.PrintParameters();
return;
// c.PrintParameters("all");
......
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