parTest.cxx 1.78 KB
Newer Older
1
//#include "../../AculCalib/AculCalPars.h"
2
//#include "../../AculCalib/AculCalibScint.h"
3
//#include "../../AculCalib/AculCalibSi.h"
4
//#include "TSystem.h"
5 6 7 8
//#include <iostream>
//
using std::cout;
using std::endl;
9 10 11

void parTest()
{
12
	gSystem->Load("../../libTELoss.so");
13 14
	gSystem->Load("../../libAculCalib.so");

15 16 17 18 19 20 21 22 23 24
/*	AculCalibSi ps;
	ps.SetParFile("parforcal.par");
	ps.Init();
	ps.PrintParameters();
	return;
*/

//	AculCalParsScintFile pp;
//	pp.SetNoCrystals(16);
//	pp.Init();
25 26 27 28
//	return;

	cout << "-----------------------" << endl;

29 30
	AculCalParsScint p;
	p.SetParFile("SQ13Alpha.par");
31 32 33 34 35 36 37 38 39 40 41
	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;
42

43 44
	cout << "-----------------------" << endl;

45 46 47
	AculCalibScint c;
	c.SetParFile("SQ13Alpha.par");
	c.Init();
48 49
	c.PrintParameters();
	return;
50 51 52 53 54 55 56 57

//	c.PrintParameters("all");

//	c.OpenFiles();

//	c.LoadTrees();
	c.PrintTrees();

58 59 60 61 62 63
	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");
64

65 66 67 68 69 70
	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;
71 72 73 74 75 76
//	c.PrintFiles();
//	c.PrintCuts();

//	TCanvas *c1 = new TCanvas("c1", "Plain");
//	c.GetPeakMean("SQ13", 0, 0, c1, "cutSQ13Alpha16Amp", 256);

77 78
	TCanvas *cCal = new TCanvas("cCal", "calibration Alpha");
	c.Calibrate(cCal);
79 80 81

	return;
}