MCTupleTool allows list of single-precision-float, bool and int branches
FYI @masmith @erodrigu @mramospe
See discussion at #4 (closed).
See related (but no interdependency) merge request Phys!878 (merged), which implements the equivalent functionality for DecayTreeTuple
Tested with
from DecayTreeTuple.Configuration import *
from Configurables import DaVinci
DaVinci().TupleFile = 'DVntuple.root'
DaVinci().Simulation = True
DaVinci().DataType = '2016'
DaVinci().EvtMax = 1000
DaVinci().PrintFreq = 100
from GaudiConf import IOHelper
IOHelper().inputFiles(['root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2016/ALLSTREAMS.DST/00065692/0000/00065692_00000548_7.AllStreams.dst'])
from Configurables import MCDecayTreeTuple
FSR_electrons = ' {e+} {e-} {e+} {e-} '
mcdttW = MCDecayTreeTuple("mcdttW")
mcdttW.ToolList = []
mcdttW.Decay = '[W+ => ^mu+ ^nu_mu' + FSR_electrons + ']CC'
mcdttW.addBranches({
"W": '^[W+ => mu+ nu_mu' + FSR_electrons + ']CC',
"mu": '[W+ => ^mu+ nu_mu' + FSR_electrons + ']CC',
"nu": '[W+ => mu+ ^nu_mu' + FSR_electrons + ']CC'
})
atool = mcdttW.W.addTupleTool("LoKi::Hybrid::MCTupleTool/LoKi_MC")
atool.IntVariables = {"ID": "MCID"}
atool.FloatVariables = {
"ETA": "MCETA",
"PT": "MCPT",
"PHI": "MCPHI",
}
DaVinci().UserAlgorithms.append(mcdttW)
Edited by Mark Smith