Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 49 → Rev 50

/sipmScan/examples/biasScan.C
99,6 → 99,103
canvas01->cd();
TH2F* h_bias = (TH2F*) rootfile->Get("h_bias");
h_bias->Draw("colz");
 
TCanvas* canvas02 = new TCanvas("canvas02","",800, 800);
//canvas02->Divide(2,2);
canvas02->cd();
TH3F* h_biasThreshold = (TH3F*) rootfile->Get("h_biasThreshold");
//h_biasThreshold->Draw();
//canvas02->cd(2);
//h_biasThreshold->GetXaxis()->SetRange(1,5);
h_biasThreshold->Project3D("zy");
h_biasThreshold_zy->DrawCopy("colz");
 
TCanvas* canvas03 = new TCanvas("canvas03","",1200, 1200);
canvas03->Divide(4,4);
int x1=0;
int x2=3;
int y1=0;
int y2=3;
for(int j=x1; j<=x2; j++){
for(int k=y1; k<=y2; k++){
int channel = map[j][k];
int canvasPosition = 4*(4-k-1) + 4 - j;
canvas03->cd(canvasPosition);
h_biasThreshold->GetXaxis()->SetRange(channel+1,channel+1);
char histoName[128];
sprintf(histoName, "Ch %d", channel);
h_biasThreshold->Project3D("zy");
//sprintf(option, "h_biasThresholsd_zy%f", channel);
h_biasThreshold_zy->SetTitle(histoName);
h_biasThreshold_zy->DrawCopy("colz");
 
}
}
TCanvas* canvas04 = new TCanvas("canvas04","",1200, 1200);
canvas04->Divide(4,4);
int x1=0;
int x2=3;
int y1=4;
int y2=7;
for(int j=x1; j<=x2; j++){
for(int k=y1; k<=y2; k++){
int channel = map[j][k];
int canvasPosition = 4*(8-k-1) + 4 - j;
canvas04->cd(canvasPosition);
h_biasThreshold->GetXaxis()->SetRange(channel+1,channel+1);
char histoName[128];
sprintf(histoName, "Ch %d", channel);
h_biasThreshold->Project3D("zy");
//sprintf(option, "h_biasThresholsd_zy%f", channel);
h_biasThreshold_zy->SetTitle(histoName);
h_biasThreshold_zy->DrawCopy("colz");
 
}
}
TCanvas* canvas05 = new TCanvas("canvas05","",1200, 1200);
canvas05->Divide(4,4);
int x1=4;
int x2=7;
int y1=0;
int y2=3;
for(int j=x1; j<=x2; j++){
for(int k=y1; k<=y2; k++){
int channel = map[j][k];
int canvasPosition = 4*(4-k-1) + 8 - j;
canvas05->cd(canvasPosition);
h_biasThreshold->GetXaxis()->SetRange(channel+1,channel+1);
char histoName[128];
sprintf(histoName, "Ch %d", channel);
h_biasThreshold->Project3D("zy");
//sprintf(option, "h_biasThresholsd_zy%f", channel);
h_biasThreshold_zy->SetTitle(histoName);
h_biasThreshold_zy->DrawCopy("colz");
 
}
}
 
TCanvas* canvas06 = new TCanvas("canvas06","",1200, 1200);
canvas06->Divide(4,4);
int x1=4;
int x2=7;
int y1=4;
int y2=7;
for(int j=x1; j<=x2; j++){
for(int k=y1; k<=y2; k++){
int channel = map[j][k];
int canvasPosition = 4*(8-k-1) + 8 - j;
canvas06->cd(canvasPosition);
h_biasThreshold->GetXaxis()->SetRange(channel+1,channel+1);
char histoName[128];
sprintf(histoName, "Ch %d", channel);
h_biasThreshold->Project3D("zy");
//sprintf(option, "h_biasThresholsd_zy%f", channel);
h_biasThreshold_zy->SetTitle(histoName);
h_biasThreshold_zy->DrawCopy("colz");
 
}
}
 
}
if (strstr(plopt, "th") != NULL) {