#pragma once //#include "TObject.h" //#include "TROOT.h" #include #include //#include #include "TFile.h" #include "TTree.h" //#include "TCanvas.h" #include "TH1I.h" #include "TGraphErrors.h" //#include "TArrayD.h" #include "TF1.h" #include "./AculCalib.h" using std::cout; using std::endl; //using std::vector; class AculCalibScint : public AculCalib { private: // //todo delete this strange double array somewhere TFile **fInFiles; TTree **fTrees; TFile *fCutFile; vector< vector > fHistFull; vector< vector > fHistCut; // vector< vector > fMeanPeakPos; vector< vector > fMeanPeakRMS; // //todo make vector of graphs TGraphErrors *gCal[16]; // TFile *fGraphs; public: // AculCalibScint() : a(0), b(0), c(0), p(0){}; AculCalibScint(); AculCalibScint(const char* parfile); virtual ~AculCalibScint(); // Define the class for the cint dictionary ClassDef (AculCalibScint,1); virtual void Init(); // void SetParFile(const char* parfile); void PrintTrees(); // void PrintParameters(const char* option = ""); // void PrintPeakRanges(); void DrawVariable(const char* variable, Int_t treeID, TCanvas *canvas, Int_t lowRange = 0, Int_t upRange = 4096); void DrawBeam(TCanvas *canvas, Int_t file, const char* variable); void GetPeakMean(const char* variable, Int_t treeID, /*Int_t energy,*/ TCanvas *canvas, const char* beamcut, const Int_t nbins = 4096, Int_t lowRange = 0); void Calibrate(TCanvas *canvas, Bool_t savefile = 0, const char* filename = "", const char* option = "READ"); void WriteClbParameters(const char* filename); TTree* GetTree(Int_t treeID); //private functions: // void LoadCuts(); private: void OpenFiles(); void LoadTrees(); void SaveClbGraphs(const char* filename, const char* option = "READ"); void FillGraph(TGraphErrors *g, Int_t npoints, /*Double_t *energies,*/ Int_t graphNumber, const char* option = ""); // void SetPars(); };