11,6 → 11,7 |
#include "TGraph.h" |
#include "TSpectrum.h" |
#include "stdio.h" |
#include "THStack.h" |
|
#include "include/RTUtil.h" |
|
32,7 → 33,7 |
{0,2,21,23,8,10,29,31} |
}; |
|
|
// Set draw style |
RTSetStyle(gStyle); |
|
// open the file with histograms |
129,9 → 130,11 |
{ |
TH2F* h_threshold = (TH2F*) rootfile->Get("h_bias"); |
TCanvas* canvas = new TCanvas("canvas","",1600,1600); |
TCanvas* canvas11 = new TCanvas("canvas11","",800,800); |
canvas->cd(); |
TVirtualPad *main = new TPad("main","main",0,0,1,1,10,1); |
main->Draw(); |
main->cd(); |
main->Divide(4,4); |
for(int i=chXstart; i<chXend; i++) { |
for(int j=chYstart; j<chYend; j++) { |
140,12 → 143,28 |
int canvasPosition = i-chXend+4*(chYend-j)+1; |
printf(" %d ", canvasPosition); |
main->cd(canvasPosition); |
gPad->SetMargin(0.08, 0.08, 0.08, 0.08); |
char name[128]; |
sprintf(name,"Channel %d",channel); |
h_projection->SetTitle(name); |
h_projection->DrawCopy("ex0"); |
h_projection->GetYaxis()->SetRangeUser(0,10000); |
h_projection->DrawCopy("pe1x0"); |
canvas11->cd(); |
if (canvasPosition == 1) { |
h_projection->SetMarkerStyle(kFullDotMedium); |
h_projection->GetYaxis()->SetRangeUser(0,10000); |
h_projection->DrawCopy("Pl"); |
} |
else { |
h_projection->SetMarkerStyle(kFullDotMedium); |
h_projection->SetLineColor(canvasPosition); |
h_projection->SetMarkerColor(canvasPosition); |
h_projection->SetTitle(""); |
h_projection->DrawCopy("plsame"); |
} |
} |
|
} |
printf("\n"); |
} |
|
152,7 → 171,7 |
if(strstr(plopt, "1ch") != NULL) |
{ |
TH2F* h_bias = (TH2F*) rootfile->Get("h_bias"); |
TCanvas* canvas = new TCanvas("canvas","",1600,1600); |
TCanvas* canvas = new TCanvas("canvas","",800,800); |
canvas->cd(); |
int channel = map[chXstart][chXend]; |
TH1D* h_projection = h_bias->ProjectionY("",channel+1,channel+1); |
159,7 → 178,10 |
char name[128]; |
sprintf(name,"Channel %d",channel); |
h_projection->SetTitle(name); |
h_projection->DrawCopy("ex0"); |
h_projection->SetMarkerStyle(kFullDotMedium); |
//h_projection->SetMarkerSize(8); |
gPad->SetMargin(0.1,0.1,0.1,0.1); |
h_projection->Draw("pe1x0"); |
} |
|
if( strstr(plopt, "all") != NULL ) { |