Hello,
I am having this particular problem I am trying to add several histograms with weights, where one of the histogram has monoenergetic peak.
If I superimpose them without weights the peak is shown.
When I introduce weights the peak “disappears” and only a small vertical line is shown.
I tried it using three different ways
//by adding ----------------
TH1F *h_etotAll_added = new TH1F("etot simply added", "etot All simply added", hreso , 0, 4000);
*h_etotAll_added = (*h1)+(*h2)+(*h3);
h_etotAll_added->Draw();
c1.SaveAs(outFile+"etot_all_added.ps");
//by filling on histogram and weighting at the sametime---the filling is done in a loop
... h_etotAll->Fill(f_etot); //filling h1 entries
h_etotAll->Fill(f_etot,BF_2);//filling h2 entries with weight BF_2
h_etotAll->Fill(f_etot,BF_3);)//filling h3 entries with weight BF_3 ...
h_etotAll->Draw();
c1.SaveAs(outFile+"etot_Fill_weighted.ps");
//stack------------------------------------------------------------------------------------------------
THStack hs("hs","test stacked histograms");
hs.Add(h3); //these histograms were previously filled in a loop with weights
hs.Add(h2);
hs.Add(h1);
hs.Draw();
c1.SaveAs(outFile+"etot_Stacked.ps");
When I just overlay them one on the top of another the monochromatic peak is visible. When I add them the peak is lost
just to note h1 has monoenergetic peak