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

void parTest()
{
	gSystem->Load("../../libAculCalib.so");

13 14 15 16 17 18 19
	AculCalParsScintFile pp;
	pp.SetNoCrystals(16);
	pp.Init();
//	return;

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

20 21
	AculCalParsScint p;
	p.SetParFile("SQ13Alpha.par");
22 23 24 25 26 27 28 29 30 31 32
	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;
33 34 35 36 37 38 39 40 41 42 43 44 45

	AculCalibScint c;
	c.SetParFile("SQ13Alpha.par");
	c.Init();
//	return;

//	c.PrintParameters("all");

//	c.OpenFiles();

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

46 47 48 49 50 51
	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");
52

53 54 55 56 57 58
	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;
59 60 61 62 63 64
//	c.PrintFiles();
//	c.PrintCuts();

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

65 66
	TCanvas *cCal = new TCanvas("cCal", "calibration Alpha");
	c.Calibrate(cCal);
67 68 69

	return;
}