Hi,
I’m a big fan of alphanumeric bin labels, like for cutflows:
TH1F* h1 = new TH1F("h1", ";X;Y", 10, 0., 10.);
char* h1BinLabel_electronTriggerCriterion = "Electron trigger fired";
h1->GetXaxis()->SetBinLabel(1, h1BinLabel_electronTriggerCriterion);
, and then using a Fill(…) function:
h1->Fill(h1BinLabel_electronTriggerCriterion, 0.5);
I wish more functions knew how to handle char* bin labels, e.g., GetBinContent(…), GetBinError(…), IsBinOverflow(…), SetBinContent(…) etc. After you reorganized bins in a cutflow, you don’t need to reorganize your Fill(…) calls, because Fill(…) takes a label as an input (which I haven’t changed), not the bin number (which I have changed). However, all GetBinContent(…) calls have to be changed accordingly, because the bins have shifted (let’s say I snuck in a new bin in place of an old first bin, thus shifting all old bins to the right), which can be painful in case of a large analysis.
Is that possible in any foreseeable future?
Thanks!