Commit 897cbf52 authored by Keerthi Nakkalil's avatar Keerthi Nakkalil
Browse files

The underflow and overflow bins are also accounted to have the correct statistics.

parent 76fb2d50
...@@ -65,13 +65,22 @@ void profilehist(){ ...@@ -65,13 +65,22 @@ void profilehist(){
// cout << " avr : " << avr << " " << " rms : " << rms << std::endl; // cout << " avr : " << avr << " " << " rms : " << rms << std::endl;
if(avr >= 0 && rms >=0){ if(avr >= 0 && rms >=0){
histo_bl->Fill(row,col,avr); histo_bl->Fill(row,col,avr);
histo_rms->Fill(row,col,rms); histo_rms->Fill(row,col,rms);
int globalbin = histo_rms->FindBin(row,col);
if (histo_rms->IsBinOverflow(globalbin)!=0){
cout << "overflow for row " << row << " col " << col << endl;
}
if (0!= histo_rms->IsBinUnderflow(globalbin)){
cout << "underflow for row " << row << " col " << col << endl;
}
} }
/* else{ else{
cout<< " Foldername : " << foldername.str() << " " << " filename : " << filename.str() << " " cout<< " Foldername : " << foldername.str() << " " << " filename : " << filename.str() << " "
<< " avr : " << avr << " " << " rms : " << rms << std::endl; << " avr : " << avr << " " << " rms : " << rms << std::endl;
}*/ }
} }
else{ else{
...@@ -93,7 +102,7 @@ void profilehist(){ ...@@ -93,7 +102,7 @@ void profilehist(){
histo_bl->GetZaxis()->SetRangeUser(1000,1200); histo_bl->GetZaxis()->SetRangeUser(1000,1200);
c1->cd(2); c1->cd(2);
histo_rms->SetStats(0); histo_rms->SetStats(0);
// gStyle->SetOptStat(111100); // gStyle->SetOptStat(111100);
histo_rms->Draw("COLZ"); histo_rms->Draw("COLZ");
...@@ -104,19 +113,25 @@ void profilehist(){ ...@@ -104,19 +113,25 @@ void profilehist(){
histo_rms->GetZaxis()->SetRangeUser(5,25); histo_rms->GetZaxis()->SetRangeUser(5,25);
c1->cd(3); c1->cd(3);
TProfile *px = histo_rms->ProfileX("px",0.,256.); TProfile *px = histo_rms->ProfileX("profx",0,257);
//histo_rms->SetEntries(histo_rms->GetEffectiveEntries());
gStyle->SetOptStat(111111);
px->Draw("HIST"); px->Draw("HIST");
c1->cd(4); c1->cd(4);
TProfile *py = histo_rms->ProfileY("py",0.,256.); TProfile *py = histo_rms->ProfileY("profy",0,257);
// histo_rms->SetEntries(histo_rms->GetEffectiveEntries());
gStyle->SetOptStat(111111);
py->Draw("HIST"); py->Draw("HIST");
c1->cd(5); c1->cd(5);
TH1D *projx = histo_rms->ProjectionX("projx", 0., 256.); TH1D *projx = histo_rms->ProjectionX("projx", 0, 257);
gStyle->SetOptStat(111111);
projx->Draw("HIST"); projx->Draw("HIST");
c1->cd(6); c1->cd(6);
TH1D *projy = histo_rms->ProjectionY("projy", 0., 256.); TH1D *projy = histo_rms->ProjectionY("projy", 0, 257);
gStyle->SetOptStat(111111);
projy->Draw("HIST"); projy->Draw("HIST");
} }
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