////////////////////////////////////////////////////////////////////////////// // // // This class is intended for ... // // // // It work like this... User may use such functions ... in such steps. // // // Keywords in parameter file and possible comments // // Something about order of keywords // // Example of parameter file (with explanations) // // 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 // data/csi_13_Ealpha30.root // #keyword detector particle // detector SQ13 Alpha // #keyword energy [MeV/A] // energy 66.542 // #keyword; filename; number of cuts in file // cutFile cuts/cutsSQ13Alpha.root 2 // cutsSQ13Alpha16 // cutSQ13Alpha16Amp // #channel minimum maximum // 0 650 830 // 1 920 1150 //\ ... // 15 800 1000 // #CsI2, energy ~ 21 MeV/A, Alpha // energy 85.437 // #keyword; filename; number of cuts in file // cutFile cuts/cutsSQ13Alpha.root 2 // cutSQ13Alpha21 // cutSQ13Alpha21Amp // #channel minimum maximum // 0 1050 1200 //\ \... // 15 1150 1350 // #CsI2, energy ~ 26 MeV/A, Alpha // energy 105.5 // ... // //asdasd ////////////////////////////////////////////////////////////////////////////// #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; //doc of class member TTree **fTrees; TFile *fCutFile; vector< vector > fHistFull; vector< vector > fHistCut; // vector< vector > fMeanPeakPos; //doc of class member vector< vector > fMeanPeakRMS; // //todo make vector of graphs TGraphErrors *gCal[16]; // TFile *fGraphs; public: AculCalibScint(); //default constructor AculCalibScint(const char* parfile); virtual ~AculCalibScint(); ClassDef (AculCalibScint,1); //decription right after ClassDef virtual void Init(); void PrintTrees(); //Description of the function. I think it does not work. void DrawVariable(const char* variable, Int_t treeID, TCanvas *canvas, Int_t lowRange = 0, Int_t upRange = 4096); //Description of the function. I think it does not work. void DrawBeam(TCanvas *canvas, Int_t file, const char* variable); //One of the crucial function. It founds the mean of the peak related to our particle. void GetPeakMean(const char* variable, Int_t treeID, 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(); };