Commit ec951094 authored by Kostyleva D.A's avatar Kostyleva D.A

Commiting changes to CsI scripts

parent 6ba655bd
......@@ -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 "<<energyPoints+1<< endl;
TString gName;
TString gTitle;
......@@ -432,7 +409,7 @@ void AculCalibCsI::FillGraph(TGraphErrors *g, Int_t npoints, Double_t *energies,
TString opt = option;
//all available energy points and (0,0)
g->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]);
......
{
// 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");
......
{
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment