//#include "../../AculCalib/AculCalPars.h" //#include "../../AculCalib/AculCalibScint.h" //#include "../../AculCalib/AculCalibSi.h" //#include "TSystem.h" //#include // using std::cout; using std::endl; void parTest() { gSystem->Load("../../libTELoss.so"); gSystem->Load("../../libAculCalib.so"); /* AculCalibSi ps; ps.SetParFile("parforcal.par"); ps.Init(); ps.PrintParameters(); return; */ // AculCalParsScintFile pp; // pp.SetNoCrystals(16); // pp.Init(); // return; cout << "-----------------------" << endl; AculCalParsScint p; p.SetParFile("SQ13Alpha.par"); p.Init(); // cout << p.GetFileName(0) << endl; // cout << p.GetFileName(1) << endl; // cout << p.GetFileName(2) << endl; // cout << p.GetFileName(3) << endl; // cout << p.GetFileName(4) << endl; p.PrintParameters("all"); // return; p.Reset(); p.PrintParameters(""); // return; cout << "-----------------------" << endl; AculCalibScint c; c.SetParFile("SQ13Alpha.par"); c.Init(); c.PrintParameters(); return; // c.PrintParameters("all"); // c.OpenFiles(); // c.LoadTrees(); c.PrintTrees(); TCanvas *c1 = new TCanvas("c1", "Plain"); TCanvas *c2 = new TCanvas("c2", "Plain"); TCanvas *c3 = new TCanvas("c3", "Plain"); TCanvas *c4 = new TCanvas("c4", "Plain"); // c.DrawVariable("SQ13", 2, c1); // c.DrawBeam(c1, 4, "SQ13"); c.GetPeakMean("SQ13", 0, 0, c1, "cutSQ13Alpha16Amp", 256); c.GetPeakMean("SQ13", 1, 1, c2, "cutSQ13Alpha21Amp", 256); c.GetPeakMean("SQ13", 2, 2, c3, "cutSQ13Alpha26Amp", 256); c.GetPeakMean("SQ13", 3, 3, c4, "cutSQ13Alpha30Amp", 256); //return; // c.PrintFiles(); // c.PrintCuts(); // TCanvas *c1 = new TCanvas("c1", "Plain"); // c.GetPeakMean("SQ13", 0, 0, c1, "cutSQ13Alpha16Amp", 256); TCanvas *cCal = new TCanvas("cCal", "calibration Alpha"); c.Calibrate(cCal); return; }