calibrationSQ13Alpha.cxx 1.71 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
{
//	gSystem->Load("CsICalib_C.so");
	gSystem->Load("../../libAculData.so");

	//CsICalib cal;
	AculCalibCsI cal("parameters/SQ13Alpha.par");
//	CsICalib cal("SQ13AlphaAlt.par");

//	cal.OpenSQ13AlphaTrees();
//	cal.LoadCutsSQ13A();

	TCanvas *c1 = new TCanvas("c1", "Plain");	
	TCanvas *c2 = new TCanvas("c2", "Plain");
	TCanvas *c3 = new TCanvas("c3", "Plain");
	TCanvas *c4 = new TCanvas("c4", "Plain");

	cal.PrintTrees();
	cal.PrintFiles();
	cal.PrintCuts();

//	cal.ReadParFile("ranges.dat");
//	cal.PrintParameters();



//	cal.DrawVariable("SQ13", 1, c1);
//return;
//	cal.DrawVariable("TDC", 2, c2);
//	cal.DrawVariable("QDC", 3, c3);

//	cal.DrawBeam(c4, 4, "SQ13");
//return;
//	cal.DrawVariableCut("SQ13", 0, c1, "cutsSQ13Alpha16");
34
//	return;
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
//	cal.DrawVariableCut("SQ13", 0, c1, "cutsSQ13Alpha16", "cutSQ13Alpha16Amp");
//return;
//	cal.DrawVariableCut("SQ13", 1, c2, "cutSQ13Alpha21", "cutSQ13Alpha21Amp");
//	cal.DrawVariableCut("SQ13", 2, c3, "cutSQ13Alpha26", "cutSQ13Alpha26Amp");
//	cal.DrawVariableCut("SQ13", 3, c4, "cutSQ13Alpha30", "cutSQ13Alpha30Amp");
//return;

	cal.GetPeakMean("SQ13", 0, 0, c1, "cutSQ13Alpha16Amp", 256);
	cal.GetPeakMean("SQ13", 1, 1, c2, "cutSQ13Alpha21Amp", 256);
	cal.GetPeakMean("SQ13", 2, 2, c3, "cutSQ13Alpha26Amp", 256);
	cal.GetPeakMean("SQ13", 3, 3, c4, "cutSQ13Alpha30Amp", 256);

	TCanvas *cCal = new TCanvas("cCal", "calibration Alpha");
	cal.Calibrate(cCal);

//	cal.SaveClbGraphs("gSQ13Alpha.root", "RECREATE");
//	cal.SaveClbGraphs("gSQ13Alpha2points.root", "RECREATE");
//	cal.SaveClbGraphs("gSQ13AlphaAlt.root", "RECREATE");

//	cal.WriteClbParameters("calSQ13Alpha.clb");
//	cal.WriteClbParameters("calSQ13Alpha2points.clb");
//	cal.WriteClbParameters("calSQ13AlphaAlt.clb");

return;
}