ATLAS Offline Software
Functions
python.HION5 Namespace Reference

Functions

def HION5SkimmingToolCfg (flags)
 
def HION5Thinning (flags)
 
def HION5KernelCfg (flags, name="HION5Kernel", **kwargs)
 
def HION5Cfg (flags)
 

Function Documentation

◆ HION5Cfg()

def python.HION5.HION5Cfg (   flags)

Definition at line 106 of file HION5.py.

106 def HION5Cfg(flags):
107  acc = ComponentAccumulator()
108 
109  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
110  HION5TriggerListsHelper = TriggerListsHelper(flags)
111 
112  acc.merge(HION5KernelCfg(flags, name="HION5Kernel", StreamName="StreamDAOD_HION5", TriggerListsHelper = HION5TriggerListsHelper,))
113 
114  # configure slimming
115  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
116  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
117  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
118  from DerivationFrameworkHI import ListSlimming
119 
120  HION5SlimmingHelper = SlimmingHelper("HION5SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
121 
122  HION5SlimmingHelper.SmartCollections = ListSlimming.HION5SmartCollections()
123  HION5SlimmingHelper.AllVariables = ListSlimming.HION5AllVariables()
124  HION5SlimmingHelper.ExtraVariables = ListSlimming.HION5Extravariables()
125 
126  HION5ItemList = HION5SlimmingHelper.GetItemList()
127 
128  acc.merge(OutputStreamCfg(flags, "DAOD_HION5", ItemList=HION5ItemList, AcceptAlgs=["HION5Kernel"]))
129  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_HION5", AcceptAlgs=["HION5Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
130 
131  return acc

◆ HION5KernelCfg()

def python.HION5.HION5KernelCfg (   flags,
  name = "HION5Kernel",
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel)
for HION5

Definition at line 79 of file HION5.py.

79 def HION5KernelCfg(flags, name="HION5Kernel", **kwargs):
80  """Configure the derivation framework driving algorithm (kernel)
81  for HION5"""
82  acc = ComponentAccumulator()
83 
84  # Common augmentations which include DFCommon
85  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
86 
87  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper=kwargs["TriggerListsHelper"]))
88 
89  # skimming
90  skimmingTool = acc.getPrimaryAndMerge(HION5SkimmingToolCfg(flags))
91 
92  # Thinning
93  thinningTool= acc.getPrimaryAndMerge(HION5Thinning(flags))
94 
95  # setup the kernel
96  acc.addEventAlgo(
97  CompFactory.DerivationFramework.DerivationKernel(
98  name,
99  SkimmingTools = [skimmingTool],
100  ThinningTools = [thinningTool],
101  AugmentationTools = [],
102  ))
103 
104  return acc
105 

◆ HION5SkimmingToolCfg()

def python.HION5.HION5SkimmingToolCfg (   flags)
Configure the example skimming tool

Definition at line 9 of file HION5.py.

9 def HION5SkimmingToolCfg(flags):
10  """Configure the example skimming tool"""
11  acc = ComponentAccumulator()
12 
13  ExtraData = []
14  ExtraData += ['xAOD::MuonContainer/Muons']
15  ExtraData += ['xAOD::ElectronContainer/Electrons']
16  ExtraData += ['xAOD::PhotonContainer/Photons']
17  ExtraData += ['xAOD::TrackParticleContainer/InDetTrackParticles']
18  ExtraData += ['xAOD::TrackParticleContainer/InDetTrackPaasdasdrticles']
19 
20  acc.addSequence( seqAND("HION5Sequence") )
21  acc.getSequence("HION5Sequence").ExtraDataForDynamicConsumers = ExtraData
22  acc.getSequence("HION5Sequence").ProcessDynamicDataDependencies = True
23 
24  from DerivationFrameworkHI import ListTriggers
25 
26  triggers = ListTriggers.HION5SkimmingTriggers()
27 
28  req_electrons = 'count( Electrons.DFCommonElectronsLHLoose && ( Electrons.pt > 15*GeV ))>0'
29  req_muons = 'count( Muons.DFCommonMuonPassPreselection && (Muons.pt > 15*GeV) && ( abs(Muons.eta) < 2.7))>0'
30  req_photons = 'count( Photons.DFCommonPhotonsIsEMLoose && (Photons.pt > 30*GeV) ) > 0'
31  req_total = '(' + req_electrons + ' || ' + req_muons + ' || ' + req_photons + ')'
32 
33  expression = ' ( ' +' || '.join(triggers) + ' ) && ' + req_total
34 
35 
36  from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg
37  tdt = acc.getPrimaryAndMerge(TrigDecisionToolCfg(flags))
38  acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "HION5StringSkimmingTool",
39  expression = expression,
40  TrigDecisionTool=tdt),
41  primary = True)
42 
43  return acc
44 

◆ HION5Thinning()

def python.HION5.HION5Thinning (   flags)

Definition at line 45 of file HION5.py.

45 def HION5Thinning(flags):
46  from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg,JetTrackParticleThinningCfg
47  acc = ComponentAccumulator()
48 
49  track_thinning_expression = "InDetTrackParticles.pt > 0.9*GeV"
50  TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
51  flags,
52  name = "PHYSTrackParticleThinningTool",
53  StreamName = "streamDAOD_HION5",
54  SelectionString = track_thinning_expression,
55  InDetTrackParticlesKey = "InDetTrackParticles"))
56 
57  AntiKt2HIJetsThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(
58  flags,
59  name = "AntiKt2HIJetsThinningTool",
60  StreamName = "streamDAOD_HION5",
61  JetKey = "AntiKt2HIJets",
62  SelectionString = "AntiKt2HIJets.pt > 15*GeV",
63  InDetTrackParticlesKey = "InDetTrackParticles"))
64 
65  AntiKt4HIJetsThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(
66  flags,
67  name = "AntiKt4HIJetsThinningTool",
68  StreamName = "streamDAOD_HION5",
69  JetKey = "AntiKt4HIJets",
70  SelectionString = "AntiKt4HIJets.pt > 15*GeV",
71  InDetTrackParticlesKey = "InDetTrackParticles"))
72 
73  acc.addPublicTool(TrackParticleThinningTool,primary = True)
74  acc.addPublicTool(AntiKt2HIJetsThinningTool)
75  acc.addPublicTool(AntiKt4HIJetsThinningTool)
76 
77  return acc
78 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.InDetToolsConfig.TrackParticleThinningCfg
def TrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:458
python.HION5.HION5KernelCfg
def HION5KernelCfg(flags, name="HION5Kernel", **kwargs)
Definition: HION5.py:79
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
python.HION5.HION5SkimmingToolCfg
def HION5SkimmingToolCfg(flags)
Definition: HION5.py:9
python.HION5.HION5Cfg
def HION5Cfg(flags)
Definition: HION5.py:106
python.InDetToolsConfig.JetTrackParticleThinningCfg
def JetTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:560
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.TriggerInterface.TrigDecisionToolCfg
def TrigDecisionToolCfg(flags)
Definition: TriggerInterface.py:14
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION5.HION5Thinning
def HION5Thinning(flags)
Definition: HION5.py:45