//////////////////////////////////////////
// This is an example macro to obtain //
// some calibration parameter for TDC //
// by test pulse, so called "T-Scan". //
//////////////////////////////////////////

{
gROOT->SetStyle("Plain");
gSystem->Load("../libFemCalib.so");
Scan sc;
// FOR IR


sc.SetRange(118,128,32); // Fit Rane (minmum value,maximum value,number of PMT)

sc.Read("ntctscan@12-06-2001.root",Scan::easy); // Read rootfile (input filename)


sc.Fill(); // Fill to histogram
sc.Fit(Scan::TDC0); // Fit distribution (Scan::TDC0)


sc.DumpPar("ntctscan@12-06-2001.dat"); // Dump parameter (output filename)

sc.Draw(Scan::TDC0); // Draw histogram (Scan::TDC0 or TDC1)
sc.Dist(Scan::TDC0); // Show distribution (Scan::TDC0 or TDC1)


sc.WriteHist("ntctscan@12-06-2001_hist.root");

}