calibration2.cxx 666 Bytes
Newer Older
Kostyleva D.A's avatar
Kostyleva D.A committed
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("/home/dariak/Utilities/libAculData.so");

	AculCalibration cal;
	cal->SetInputParameters();


	TCanvas *c1 = new TCanvas();

	TFile fr("SQ22[]E.root");
//	TH1F *h1 = (TH1F*)fr.Get("HistSQ22[10]E");
//	h1->Draw();

	cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;

	TList *histList = fr.GetListOfKeys();
	const Int_t noHist = histList->GetEntries();

	const Double_t minE = 3;
	const Double_t maxE = 8;
	Int_t minBin, maxBin;

	TH1 *hWork = 0;
	c1->Clear();
	c1->Divide(6, 6);
	for (Int_t i = 0; i < 32; i++) {
		fr.GetObject(histList->At(i)->GetName(), hWork);		
		c1->cd(i+1);
		cal->PeaksFitting(hWork);
		hWork->Draw();
	}

}