Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 630 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 630 Bytes

Rebalance and smear

Flexible implementation of the rebalance and smear method in python + RooFit.

Example

from rebalance import Jet, RebalanceWSFactory

# Event with two arbitrary reco-level jets
jets = [
    Jet(pt=100, eta=1.3, phi=0.),
    Jet(pt=100, eta=1.3, phi=2.8),
]

# Factory creates RooWorkspace for us
# default workspace has dummy assumptions for priors, resolution functions
# -> Simple extension possible via inheritance!
rbwsfac = RebalanceWSFactory(jets)
rbwsfac.build()
ws = rbwsfac.get_ws()

# Ready to minize the negative log likelihood!
m = r.RooMinimizer(ws.function("nll"))
m.migrad()