Analysis with Draw and Sumw2


I am doing Analysis using Draw, and I wonder how could I save the errors.
Could I use the sumw2() somehow?
I know that the trees on which I am running have errors.

chain_data->Draw("probe_pt>>data_2_2","abs(probe_eta)>2.2 "); TH1F *data_2_2 = (TH1F*)gPad->GetPrimitive("data_2_2"); data_2_2->Write();

Thank you in advance,

Hi Des,

yes, you can call sumw2 before writing if you are using an old version of ROOT. For ROOT6 you don’t even have to worry about this as the structures are by default present.


Thank you Danilo!