Hi everyone, I plotted an energy plot (in the macro line 1738, TCanvas c15). Now I need an energy cut, i.e. I want to select just the events that in the lead glass 0 (Calo_EndDep[0] of my root file) have energy in the range 3281 +/- 361 ADC.
So in the line 1923 I built a new TCanvas (TCanvas c25) and I defined the energy cut
TCut cutene22 = TString::Format("TMath::Abs(Calo_EnDep[%d] - (%f)) < (%d)*(%f) ", e, ene22mean, csig, ene22sigma).Data();
So that I plotted by using conditions
t->Draw(henea5sub2string, cut && !cut3sub && !cut4sub && cut5sub && cutene22);
Unfortunately I get an empty plot. Was I wrong to define the Tcut?
caloeff.cpp (104.1 KB)
In attachment the macro
Here the root file https://we.tl/t-oaP8GrJ5EV
Thank you
ROOT Version: 5 3436
Platform: Windows
Compiler: Not Provided