I am trying to apply a trigger correction to my pT spectra. I have created the trigger efficiency as a TH1F in a ROOT file. What I want to do is import this histogram and divide my RooDataSet (with RooRealVar pT) with it. Importing is ok, but the trouble is converting the RooDataSet into a TH1F so that I may call TH1::Divide() and convert this histo back into a RooDataHist. Any ideas? Thanks in advance.
Thanks for the help. So if I perform the weighting procedure, I could fit the trigger efficiency to a Fermi function, which would allow for a parameterization that may be used in place of (x*x+10) in the weighting function argument:
// Construct formula to calculate (fake) weight for events
RooFormulaVar wFunc(“w”,“event weight”,"(x*x+10)",x) ;
but how do I obtain this parameterization using RooFit?
If you want to make a likelihood fit for an efficiency, should should use both the
accepted and rejected data to construct the likelihood, rather than dividing things
and using approximate error bars (which in any case can only be used in a chiˆ2 fit
and not a likelihood fit). A complete example on how to do this is provided here