Hi there,
I get an ntuple (pjmca) made by ch0:ch1:ch2:ch3 from the rootfile of the experiment.
I’ve got three linear functions to calibrate ch0 ch1 ch2 and ch3 and I need to create a new ntuple starting from the channels of the old one because in data analysis I’d like to work with calibrated quantities and not with the number of ADC’s channel.
//open file
TFile *f = new TFile("myrootfile.root");
//get ntuple
TNtuple *old_ntuple = (TNtuple*)f->Get("pjmca");
new_ntuple = new TNtuple("new_ntuple", "calibrated channel", "cch0:cch1:cch2:cch3");
Now, how can I fill new_ntuple with expression like:
new_ntuple->Fill(ch0*a+b,ch1*a+b,ch2*a+b,ch3);
Thank you