diff --git a/Phys/FunTuple/python/FunTuple/functorcollections.py b/Phys/FunTuple/python/FunTuple/functorcollections.py index 52be7e6c604724498f826190a622434ec76096c4..c17ee44783c63f6b5660533e3ed80b4035ecebc6 100644 --- a/Phys/FunTuple/python/FunTuple/functorcollections.py +++ b/Phys/FunTuple/python/FunTuple/functorcollections.py @@ -28,6 +28,7 @@ from PyConf.Algorithms import Hlt1TisTosAlg, Hlt2TisTosAlg, Hlt1TrueSimEffAlg, H import DaVinciMCTools # type: ignore[import] from DecayTreeFitter import DecayTreeFitter # type: ignore[import] from .FunctorCollection import FunctorCollection +from PyConf.Algorithms import SMOGInfoAlg # type: ignore[import] __all__ = ( "EventInfo", @@ -46,6 +47,7 @@ __all__ = ( "DecayTreeFitterResults", "ParticleID", "MCPrimaries", + "SMOGInfo", ) @@ -1144,3 +1146,31 @@ def ParticleID(extra_info: bool = False) -> FunctorCollection: ) return FunctorCollection(pid_vars) + + +def SMOGInfo() -> FunctorCollection: + """ + Collection of SMOG conditions (injection mode, injected gas, stable injection flag) + See map of possible values at LHCb/Det/LHCbDet/include/LHCbDet/SMOGInfo.h + + Example: + import FunTuple.functorcollections as FC + from DaVinci import options + + variables = FC.SMOGInfo() + # ... + + tuple = FuntupleEvent(name="MyTuple", + fields=..., + variables=variables, + ... + ) + """ + SMOG = SMOGInfoAlg(name="SMOGInfo").Output + + SMOG_info = {} + SMOG_info["SMOG_InjectionMode"] = F.SMOG_INJECTION_MODE(SMOG) + SMOG_info["SMOG_InjectedGas"] = F.SMOG_INJECTED_GAS(SMOG) + SMOG_info["SMOG_StableInjection"] = F.SMOG_STABLE_INJECTION(SMOG) + + return FunctorCollection(SMOG_info)