Hello Experts,
I’m trying to add the error bars to my histogram. But I do see only the squares with black dot.
I have weighed histogram by model.Applied sumW2 option before filling the histogram.(At this stage also I see just squares)
Then I need to add separate error for my histogram.
TH1F h_model_gen //Used 100 bins;
h_model_gen->SumW2();
//fill the histogram
h_model_gen->Fill(mass_pipi, model);
//I haven't seen error bars even in this stage(errors bars from sumW2)
//create another error histogram
error=X
h_error-> Fill(mass_pipi,error);
//Add this error histogram to my h_model_gen histogram
for(int ibin=1;ibin<=h_model_gen->GetNbinsX();ibin++){
error_total_1=h_mpipi_gen->GetBinError(ibin);
error_total =sqrt(error_total_1*error_total_1+h_error>GetBinContent(ibin));
h_model_gen->SetBinError(ibin,error_total);
}
h_mode_gen->Draw();
I don’t see the error bars clearly. Is that because I have 100 bins?
Please see attached
Thanks
Dil