Pattern in spectrum bins after ttree->draw (multiplication)

just a question - maybe there already exists some simple solution in TTree:

I have discrete dE and E telescope data. dE+E = Etot.
I have different calibrations, so I have to do something like
tree->Draw("dE:dE+Efactor >> histoEtot").
If multiplication factor is not integer, obviously, I get a pattern
in Etot spectrum. Normally, one can make ‘randomization’ of each bin each time
it enters the histogram filling routine (Eprime=factor
(gRandom->Uniform(0,1)+E-0.5) ).
But for this, one must create a “Selector” and things are more complex…

Hi Jaromir,

You could consider creating a free standing auxiliary routine:double GetFactor(double E, double factor) { return factor*(gRandom->Uniform(0,1) + E - 0.5; }and load it either via CINT or ACLiC and use it from Draw: