diff --git a/AculData/AculCalibCsI.cpp b/AculData/AculCalibCsI.cpp index 0b3ca75abef904bee48373da84d0adcb56841ed7..003056da64bb86154d8eeb302ad21b2931a113a4 100644 --- a/AculData/AculCalibCsI.cpp +++ b/AculData/AculCalibCsI.cpp @@ -125,16 +125,6 @@ void AculCalibCsI::PrintCuts() { // return; if (fCuts) printf("Cuts loaded from file \"%s\"\n", fCuts->GetName()); - /*for (Int_t i = 0; i < NOCALFILES; i++) { - if (cTOF[i]) { - printf("TOF cut No. %d; Name: \"%s\"\n", i, cutsCol[i]->GetName()); - cout << "asdjasd" << endl; - } - else { - printf("TOF cut No. %d was not loaded. Maximal number of cuts is %d\n", i, NOCALFILES); - } - }//for */ - TCutG *curCut = 0; //cutsCol @@ -147,19 +137,6 @@ void AculCalibCsI::PrintCuts() { }*/ } -/* for (Int_t i = 0; i < NOCALFILES; i++) { - if (cQCD[i]) { - printf("QCD cut No. %d; Name: \"%s\"\n", i, cQCD[i]->GetName()); -// cout << "kasjhd" << endl; - } else { -// cout << "bhajskd" << endl; - printf("QCD cut No. %d was not loaded. Maximal number of cuts is %d\n", i, NOCALFILES); -// cout << "vsdfjks" << endl; - } - } - - printf("AculCalibCsI::PrintCuts: End of function.\n"); -*/ return; } @@ -256,11 +233,11 @@ void AculCalibCsI::DrawBeam(TCanvas *canvas, Int_t files, const char* variable) con.Form("%s[5]>200", variable); curTree->Draw(var.Data(), con.Data(), "cont"); for (Int_t j = 0; j < energyPoints; j++) { -// if ( cutsCol.At(files + j) ) { -// curCutG = (TCutG*)cutsCol.At(files + j); -// curCutG->Draw("same"); + if ( cutsCol.At(files + j) ) { + curCutG = (TCutG*)cutsCol.At(files + j); + curCutG->Draw("same"); // printf("AculCalibCsI::DrawBeam: cQCD cut No. %d cannot be drawn, need to repair this function.\n", j); -// } + } } canvas->Update(); } @@ -365,14 +342,14 @@ void AculCalibCsI::GetPeakMean(const char* variable, Int_t tree, Int_t energy, T con.Form("%s[%d]>%d && %s", variable, channel, lowRange, cutsCol.FindObject(beamcut)->GetName()); canvas->cd(i+1); hname.Form("hfull[%d][%d]", tree, i); - hfull[tree][i] = new TH1I(hname.Data(), "title", nbins, 0, 4096); + hfull[tree][i] = new TH1I(hname.Data(), "title1", nbins, 0, 4096); curTree->SetLineColor(1); curTree->Draw(var.Data(), con.Data()); var.Form("%s[%d]>>hcut[%d][%d]", variable, channel, tree, i); con.Form("%s[%d]>%d && %s[%d]<%d && %s", variable, channel, peakMin[energy][i], variable, channel, peakMax[energy][i], cutsCol.FindObject(beamcut)->GetName()); hname.Form("hcut[%d][%d]", tree, i); - hcut[tree][i] = new TH1I(hname.Data(), "title", nbins, 0, 4096); + hcut[tree][i] = new TH1I(hname.Data(), "title2", nbins, 0, 4096); hcut[tree][i]->SetLineColor(3); curTree->Draw(var.Data(), con.Data(), "same"); @@ -395,7 +372,7 @@ void AculCalibCsI::Calibrate(TCanvas *canvas, Bool_t savefile, const char* filen canvas->Divide(4,4); // cout << alphas2.GetSize()+1 << endl; - cout << energyPoints+1 << endl; + cout <<" energyPoints+1 "<SetPoint(0, 0., 0.); + g->SetPoint(0, 0., 0.); //(point number, x, y) for (Int_t i = 0; i < npoints-1; i++) { // g->SetPoint(i+1, energies[i], mean[i][graphNumber]); // g->SetPointError(i+1, 0, meanRMS[i][graphNumber]); diff --git a/macros/calibration_CsI/calibrationSQ13Alpha.cxx b/macros/calibration_CsI/calibrationSQ13Alpha.cxx index 3a337aa2b236db8941372649c5d3b52495858526..d76898a24b3595e9055b0d56dca9305fba277a56 100644 --- a/macros/calibration_CsI/calibrationSQ13Alpha.cxx +++ b/macros/calibration_CsI/calibrationSQ13Alpha.cxx @@ -1,6 +1,6 @@ { // gSystem->Load("CsICalib_C.so"); - gSystem->Load("../../libAculData.so"); + gSystem->Load("/home/dariak/AculUtils/libAculData.so"); //CsICalib cal; AculCalibCsI cal("parameters/SQ13Alpha.par"); @@ -13,14 +13,17 @@ TCanvas *c2 = new TCanvas("c2", "Plain"); TCanvas *c3 = new TCanvas("c3", "Plain"); TCanvas *c4 = new TCanvas("c4", "Plain"); +// TCanvas *myCanv = new TCanvas("myCanv", "Let's see what we see"); - cal.PrintTrees(); - cal.PrintFiles(); - cal.PrintCuts(); +// cal.PrintTrees(); +// cal.PrintFiles(); +// cal.PrintCuts(); +// cal.PrintPeakRanges(); // cal.ReadParFile("ranges.dat"); -// cal.PrintParameters(); - +// cal.PrintParameters("v"); +// cal.PrintTrees(); +// cal.DrawVariable("SQ13", 0, c1); // cal.DrawVariable("SQ13", 1, c1); @@ -28,10 +31,10 @@ // cal.DrawVariable("TDC", 2, c2); // cal.DrawVariable("QDC", 3, c3); -// cal.DrawBeam(c4, 4, "SQ13"); +// cal.DrawBeam(myCanv, 4, "SQ13"); //return; -// cal.DrawVariableCut("SQ13", 0, c1, "cutsSQ13Alpha16"); -// cal.DrawVariableCut("SQ13", 0, c1, "cutsSQ13Alpha16", "cutSQ13Alpha16Amp"); +// cal.DrawVariableCut("SQ13", 0, c2, "cutsSQ13Alpha16"); +// cal.DrawVariableCut("SQ13", 0, c2, "cutsSQ13Alpha16", "cutSQ13Alpha16Amp"); //return; // cal.DrawVariableCut("SQ13", 1, c2, "cutSQ13Alpha21", "cutSQ13Alpha21Amp"); // cal.DrawVariableCut("SQ13", 2, c3, "cutSQ13Alpha26", "cutSQ13Alpha26Amp"); @@ -50,7 +53,7 @@ // cal.SaveClbGraphs("gSQ13Alpha2points.root", "RECREATE"); // cal.SaveClbGraphs("gSQ13AlphaAlt.root", "RECREATE"); -// cal.WriteClbParameters("calSQ13Alpha.clb"); + cal.WriteClbParameters("calSQ13Alpha.clb"); // cal.WriteClbParameters("calSQ13Alpha2points.clb"); // cal.WriteClbParameters("calSQ13AlphaAlt.clb"); diff --git a/macros/calibration_CsI/calibrationSQ23Alpha.cxx b/macros/calibration_CsI/calibrationSQ23Alpha.cxx index 06fb76c2457aa40b81270cebb55ea53bd2805f24..2ddf0382a74244c5a2852576ec950b86d829c70b 100644 --- a/macros/calibration_CsI/calibrationSQ23Alpha.cxx +++ b/macros/calibration_CsI/calibrationSQ23Alpha.cxx @@ -1,8 +1,8 @@ { - gSystem->Load("CsICalib_C.so"); + gSystem->Load("/home/dariak/AculUtils/libAculData.so"); // CsICalib cal; - CsICalib cal("parameters/SQ23Alpha.par"); + AculCalibCsI cal("parameters/SQ23Alpha.par"); // cal.PrintCuts(); @@ -13,8 +13,8 @@ TCanvas *c2 = new TCanvas("c2", "Plain"); TCanvas *c3 = new TCanvas("c3", "Plain"); TCanvas *c4 = new TCanvas("c4", "Plain"); - - cal.DrawBeam(c4, 4, "SQ23"); + cal.PrintParameters(); +// cal.DrawBeam(c4, 4, "SQ23"); return;