Hello rooters,
I have some TTree of events. For each event, I'd like to perform
a complex calculation (e.g. calculate the value of a pdf based
on a variable in the event or combine multiple pdf values).
I currently have a method in this calculation class to which
I can give a TTree and it plots the distribution of this value
(possibly after some cuts).
However, I would find it much more convenient, if I could
use such a calculation directly in TTree::Draw (as a value,
as a cut would also be useful !).
I'm thinking of the following example:
TTree *signal_events, *background_events, *data_events;
...
MyCalculation *calc = new MyCalculation;
calc->calculate_pdfs_from_mc(signal_events,background_events);
calc->SetName("final_discriminant");
...
data_events->Draw("final_discriminant");
data_events->Draw("mass","final_discriminant>0.9");
So here's my question: Is it possible in root
to have a class (which e.g. inherits from TTreeFormula ??)
which can be registered in some dictionary and then can be
used in TTree::Draw in an expression ?
thanks for the advice,
André
--
------------------+----------------------------------
Andre Holzner | +41 22 76 76750
Bureau 32 2-C13 | Building 32
CERN | Office 2-C13
CH-1211 Geneve 23 | http://wwweth.cern.ch/~holzner/
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:00 MET