// runs[runi]->compareHistogramClassVector.push_back(runs[runi]->histogramfixedthreshold);
// runs[runi]->plotCompareHistograms();
runs[runi]->plotAllHistograms(runs[runi]->histogramthreshold);
- compareHistogramClassVector.push_back(runs[runi]->histogramthreshold->calibrated);
-// compareHistogramClassVector2.push_back(runs[runi]->histogram->calibrated);
+ compareHistogramClassVector.push_back(runs[runi]->histogramthreshold);
+ //compareHistogramClassVector.push_back(runs[runi]->histogram);
// runs[runi]->plot1DHistogram(runs[runi]->histogramthreshold, runs[runi]->histogramthreshold->Veto, "gaus");
// runs[runi]->plot1DHistogram(runs[runi]->histogramthreshold, runs[runi]->histogramthreshold->SeedPerc, "landau", 0);
- compareHistogramVector.push_back(runs[runi]->histogramthreshold->calibrated->Seed);
+ compareHistogramVector.push_back(runs[runi]->histogramthreshold->Seed);
runs[runi]->writeAllHistogramsToFile();
}
//cout << runs[runi]->histogram
// Tl.SetNDC();
// Tl.DrawText(0.3, 0.2, "Titel titel");
//TPaveText *t = new TPaveText(0.0, 0.9, 0.3, 1.0, "brNDC"); // left-up
-// curhistogramclone->SetLineColor(rootcolors[histogrami]);
-
+ curhistogramclone->SetLineColor(rootcolors[histogrami%13]);
curhistogramclone->Draw("SAME");
legendEntry = Form("%d %s", curhistogramclassp->labbook->runnumber, curhistogramclone->GetTitle());
leg1->AddEntry(curhistogramclone, legendEntry, "l");
canvas->cd(2);
curhistogramclone = (TH1F*) curhistogramclassp->Sum->Clone();
-// curhistogramclone->SetLineColor(rootcolors[histogrami]);
+ curhistogramclone->SetLineColor(rootcolors[histogrami%13]);
curhistogramclone->Draw("SAME");
leg1->Draw("SAME");
lastbin2 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,1))>lastbin2)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,1)):lastbin2;
canvas->cd(3);
curhistogramclone = (TH1F*) curhistogramclassp->Veto->Clone();
-// curhistogramclone->SetLineColor(rootcolors[histogrami]);
+ curhistogramclone->SetLineColor(rootcolors[histogrami%13]);
curhistogramclone->Draw("SAME");
leg1->Draw("SAME");
lastbin3 = (curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,1))>lastbin3)?curhistogramclone->GetBinCenter(curhistogramclone->FindLastBinAbove(2,1)):lastbin3;
canvas->cd(4);
curhistogramclone = (TH1F*) curhistogramclassp->Noise->Clone();
-// curhistogramclone->SetLineColor(rootcolors[histogrami]);
+ curhistogramclone->SetLineColor(rootcolors[histogrami%13]);
curhistogramclone->Draw("SAME");
legendEntry = Form("%d Noise: %.2f + %.2f - %.2f",curhistogramclassp->labbook->runnumber, curhistogramclassp->avgNoise, curhistogramclassp->avgNoisePlus, curhistogramclassp->avgNoiseMinus);
leg2->AddEntry(curhistogramclone, legendEntry, "l");
f->Append(img);
f->Write();
+ MSaveBigPNG(savepathresults + "/" + canvastitle + ".png");
+
return 0;
}
return 1;
}
cout << "---------------------------------" << endl;
cout << colorwhite << "integrateSr90Spectra():" << endlr;
+// histogramthreshold->noisethresholdborder = 35.0; // TODO remove the overwriting of automatic noise threshold setting
histogramthreshold->integrateSr90Spectra(histogramthreshold->Seed, frames_found, -1, true);
histogramfixedthreshold->integrateSr90Spectra(histogramfixedthreshold->Seed, frames_found, 0);
rescaleHistogramClasses();
void Run::initRootParameters()
{
- rootcolors = new Int_t[13]{1, 2, 4, 6, 8, 13, 46, 28, 32, 33, 12, 20, 40};
rootlinestyle = new Int_t[13]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
}
};
pixelinfo curpixelinfo;
- Int_t* rootcolors;
Int_t* rootlinestyle;
/** @brief calls #initCluster for each structure of type @c Run::histogram
#include "TStopwatch.h"
#include <TCanvas.h>
+#include <Rtypes.h>
#define MAXHITS 1000000
//####################################################################
const TString colorcyan = "\033[1;36m";
const TString colorreset = "\033[0m";
const TString endlr = "\033[0m\n";
+Int_t* rootcolors = new Int_t[13]{1, 2, 4, 6, 8, 13, 46, 28, 32, 33, 12, 20, 40};
/**
* @brief stores information from the SQL database
// return 0;
}
+void MSaveBigPNG(TString filename="", double scale=2) {
+ TCanvas* old_canv = gPad->GetCanvas();
+
+ gROOT->SetBatch(kTRUE);
+ gROOT->ForceStyle(kTRUE);
+
+ Int_t orig_msz = gStyle->GetMarkerSize();
+ Int_t orig_mst = gStyle->GetMarkerStyle();
+ Int_t orig_lt = gStyle->GetLineWidth();
+
+ gStyle->SetMarkerSize(1.0+scale/5);
+ gStyle->SetMarkerStyle(20);
+ gStyle->SetLineWidth(orig_lt*scale);
+ gStyle->SetHistLineWidth(orig_lt*scale);
+ gStyle->SetFuncWidth(orig_lt*scale);
+
+ if(filename == "") {
+ filename = old_canv->GetName();
+ filename += ".png";
+ }
+
+ Int_t old_width = old_canv->GetWindowWidth();
+ Int_t old_height = old_canv->GetWindowHeight();
+
+ Int_t new_width = old_width * scale;
+ Int_t new_height= old_height* scale;
+
+ TCanvas* temp_canvas = new TCanvas("temp", "", new_width, new_height);
+ old_canv->DrawClonePad();
+
+ temp_canvas->Draw();
+ temp_canvas->SaveAs(filename);
+ temp_canvas->Close();
+
+ gStyle->SetMarkerSize(orig_msz);
+ gStyle->SetMarkerStyle(orig_mst);
+ gStyle->SetLineWidth(orig_lt);
+ gStyle->SetHistLineWidth(orig_lt);
+ gStyle->SetFuncWidth(orig_lt);
+
+ gROOT->ForceStyle(kFALSE);
+ gROOT->SetBatch(kFALSE);
+
+ return;
+}
+
//####################################################################
#endif
\ No newline at end of file