From ec95109444beee659b37081a1780345dc3b23c79 Mon Sep 17 00:00:00 2001 From: "Kostyleva D.A" Date: Wed, 26 Oct 2016 12:42:36 +0300 Subject: [PATCH] Commiting changes to CsI scripts --- AculData/AculCalibCsI.cpp | 39 ++++--------------- .../calibration_CsI/calibrationSQ13Alpha.cxx | 23 ++++++----- .../calibration_CsI/calibrationSQ23Alpha.cxx | 8 ++-- 3 files changed, 25 insertions(+), 45 deletions(-) diff --git a/AculData/AculCalibCsI.cpp b/AculData/AculCalibCsI.cpp index 0b3ca75..003056d 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 3a337aa..d76898a 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 06fb76c..2ddf038 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; -- 2.18.1