| /sipmScan/src/RTUtil.cpp |
|---|
| 11,12 → 11,19 |
| style->SetStatColor(0); |
| style->SetPalette(1, 0); |
| style->SetPadTopMargin(0.13); |
| style->SetPadBottomMargin(0.13); |
| style->SetPadLeftMargin(0.13); |
| style->SetPadRightMargin(0.2); |
| style->SetMarkerStyle(kFullDotLarge); |
| //style->SetMarkerSize(7); |
| style->SetPadTopMargin(0.15); |
| style->SetPadBottomMargin(0.15); |
| style->SetPadLeftMargin(0.15); |
| style->SetPadRightMargin(0.15); |
| style->SetTitleOffset(1.3, "y"); |
| gStyle->SetPalette(1, 0); |
| //gStyle->SetPaperSize(TStyle::kA4); |
| } |
| //########################################################################################## |
| RTCanvas::RTCanvas() |
| /sipmScan/examples/thresholdScan.C |
|---|
| 32,7 → 32,7 |
| {0,2,21,23,8,10,29,31} |
| }; |
| // Set draw style |
| RTSetStyle(gStyle); |
| // open the file with histograms |
| 59,17 → 59,18 |
| h_threshold->Draw("colz"); |
| TCanvas* canvas2 = new TCanvas("canvas2","",1600,800); |
| canvas2->Divide(2); |
| //canvas2->Divide(2); |
| TH1D* h_projection1 = h_threshold->ProjectionY("Ch 37",38,38); |
| canvas2->cd(1); |
| canvas2->cd(); |
| //h_projection1->GetYaxis()->SetRangeUser(0,1000); |
| //gPad->SetLogy(); |
| h_projection1->SetTitle("Channel 37;Threshold [V]; Events"); |
| h_projection1->Draw(); |
| /* |
| TH1D* h_projection2 = h_threshold->ProjectionY("Ch 38",39,39); |
| canvas2->cd(2); |
| //gPad->SetLogy(); |
| h_projection2->Draw(); |
| h_projection2->Draw(); */ |
| } |
| if(strstr(plopt, "tdc") != NULL) { |
| /sipmScan/examples/sipm.C |
|---|
| 42,24 → 42,7 |
| } |
| // set draw style |
| gStyle->SetOptStat("ne"); |
| gStyle->SetPalette(1, 0); |
| gStyle->SetPaperSize(TStyle::kA4); |
| gStyle->SetStatBorderSize(1); |
| gStyle->SetFrameBorderMode(0); |
| gStyle->SetFrameFillColor(0); |
| gStyle->SetCanvasBorderMode(0); |
| gStyle->SetPadBorderMode(0); |
| gStyle->SetPadColor(0); |
| gStyle->SetCanvasColor(0); |
| gStyle->SetStatColor(0); |
| gStyle->SetOptFit(11); |
| gStyle->SetOptStat(); |
| gStyle->SetPadRightMargin(0.15); |
| gStyle->SetPadLeftMargin(0.12); |
| //gStyle->SetTitleYOffset(1.4); |
| RTSetStyle(gStyle); |
| if( strstr(plopt, "all") != NULL ) { |
| TCanvas *canvas2 = new TCanvas("canvas2","Hits x;;",2000,2000); |
| /sipmScan/examples/biasScan.C |
|---|
| 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,11 → 143,27 |
| 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 ) { |