calibrationSQ23Trit.cxx 1.43 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 34 35 36 37 38 39 40 41 42 43 44 45 46
{
	gSystem->Load("CsICalib_C.so");

	CsICalib cal("SQ23Trit.par");

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

//	cal.LoadCutsSQ23T();
	cal.PrintCuts();

//	cal.PrintTrees();
//	cal.PrintFiles();
//	cal.PrintCuts();
//	cal.ReadPeakRanges();
//	cal.PrintPeakRanges();
//	cal.ReadParFile("ranges.dat");
//	cal.PrintParameters();
//	return;


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

//	cal.DrawVariableCut("SQ23", 0, c1, "cutAlpha16", "cutAlpha16Amp");
//	cal.DrawVariableCut("SQ23", 0, c2, "cutAlpha20", "cutAlpha20Amp");
//	cal.DrawVariableCut("SQ23", 0, c3, "cutAlpha25", "cutAlpha25Amp");
//	cal.DrawVariableCut("SQ23", 0, c4, "cutAlpha30", "cutAlpha30Amp");

//	cal.GetPeakMean("SQ23", 0, c1, "cutAlpha16Amp", minAlpha16, maxAlpha16);
//	cal.GetPeakMean("SQ23", 1, c2, "cutAlpha20Amp", minAlpha20, maxAlpha20);
//	cal.GetPeakMean("SQ23", 2, c3, "cutAlpha25Amp", minAlpha25, maxAlpha25);
//	cal.GetPeakMean("SQ23", 3, c4, "cutAlpha30Amp", minAlpha30, maxAlpha30);

	cal.GetPeakMean("SQ23", 0, 0, c1, "cutTrit13Amp");
	cal.GetPeakMean("SQ23", 1, 1, c2, "cutTrit20Amp");
	cal.GetPeakMean("SQ23", 2, 2, c3, "cutTrit24Amp");

	TCanvas *cCal = new TCanvas("cCal", "calibration SQ23 Alpha");
	cal.Calibrate(cCal);
	cal.SaveClbGraphs("gSQ23Trit.root", "RECREATE");
	cal.WriteClbParameters("calSQ23Trit.clb");

}