ATLAS Offline Software
Functions
TCAL1 Namespace Reference

Functions

def TCAL1TrackToolsCfg (flags, **kwargs)
 
def TCAL1TileCellsMuonDecoratorCfg (flags, **kwargs)
 
def TCAL1StringSkimmingToolCfg (flags, **kwargs)
 
def TCAL1MuonTPThinningToolCfg (flags, streamName, **kwargs)
 
def TCAL1KernelCfg (flags, name='TCAL1Kernel', **kwargs)
 
def TCAL1Cfg (flags)
 

Function Documentation

◆ TCAL1Cfg()

def TCAL1.TCAL1Cfg (   flags)
Configure the TCAL1 derivation framework

Definition at line 130 of file TCAL1.py.

130 def TCAL1Cfg(flags):
131  """Configure the TCAL1 derivation framework"""
132 
133  TCAL1Prefix = 'TCAL1_'
134  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
135  TCAL1TriggerListsHelper = TriggerListsHelper(flags)
136 
137  acc = ComponentAccumulator()
138  acc.merge(TCAL1KernelCfg(flags, name="TCAL1Kernel", StreamName="StreamDAOD_TCAL1", Prefix=TCAL1Prefix, TriggerListsHelper=TCAL1TriggerListsHelper))
139 
140  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
141  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
142  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
143  TCAL1SlimmingHelper = SlimmingHelper("TCAL1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
144  TCAL1SlimmingHelper.SmartCollections = ['EventInfo', 'Muons', 'AntiKt4EMTopoJets', 'AntiKt4EMPFlowJets', 'MET_Baseline_AntiKt4EMTopo', 'MET_Baseline_AntiKt4EMPFlow', 'PrimaryVertices', 'BTagging_AntiKt4EMPFlow']
145 
146  TCAL1ExtraVariables = f'Muons.{TCAL1Prefix}etrkcone40'
147 
148  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_'.join(['', 'energy', 'et', 'eta', 'phi', 'gain', 'bad', 'time', 'quality'])
149  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_'.join(['', 'sampling', 'sinTh', 'cosTh', 'cotTh', 'x', 'y', 'z'])
150 
151  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_'.join(['', 'side', 'section', 'module', 'tower', 'sample'])
152  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_'.join(['', 'r', 'dx', 'dy', 'dz', 'dr', 'dphi', 'deta', 'volume'])
153 
154  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_muon_'.join(['', 'dx', 'dedx', 'x', 'y', 'z', 'eta', 'phi'])
155  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_to_muon_'.join(['', 'dx', 'dy', 'dz', 'deta', 'dphi'])
156 
157  for pmt in ['pmt1', 'pmt2']:
158  TCAL1ExtraVariables += f'.{TCAL1Prefix}cells_{pmt}_'.join(['', 'ros', 'drawer', 'channel', 'energy', 'time', 'quality', 'qbit', 'bad', 'gain'])
159 
160  TCAL1SlimmingHelper.ExtraVariables = [TCAL1ExtraVariables]
161 
162  # Trigger matching
163  # Run 2
164  if flags.Trigger.EDMVersion == 2:
165  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
166  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = TCAL1SlimmingHelper,
167  OutputContainerPrefix = "TrigMatch_",
168  TriggerList = TCAL1TriggerListsHelper.Run2TriggerNamesTau)
169  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = TCAL1SlimmingHelper,
170  OutputContainerPrefix = "TrigMatch_",
171  TriggerList = TCAL1TriggerListsHelper.Run2TriggerNamesNoTau)
172  # Run 3, or Run 2 with navigation conversion
173  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
174  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
176 
177  TCAL1ItemList = TCAL1SlimmingHelper.GetItemList()
178  acc.merge(OutputStreamCfg(flags, "DAOD_TCAL1", ItemList=TCAL1ItemList, AcceptAlgs=["TCAL1Kernel"]))
179  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_TCAL1", AcceptAlgs=["TCAL1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
180 
181  return acc

◆ TCAL1KernelCfg()

def TCAL1.TCAL1KernelCfg (   flags,
  name = 'TCAL1Kernel',
**  kwargs 
)
Configure the TCAL1 derivation framework driving algorithm (kernel)

Definition at line 102 of file TCAL1.py.

102 def TCAL1KernelCfg(flags, name='TCAL1Kernel', **kwargs):
103  """Configure the TCAL1 derivation framework driving algorithm (kernel)"""
104 
105  acc = ComponentAccumulator()
106 
107  prefix = kwargs.pop('Prefix', 'TCAL1_')
108  streamName = kwargs.pop('StreamName', 'StreamDAOD_TCAL1')
109 
110  # Common augmentations
111  triggerListsHelper = kwargs.pop('TriggerListsHelper', 'TriggerListsHelper')
112  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
113  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = triggerListsHelper))
114 
115  cellsMuonDecorator = acc.getPrimaryAndMerge( TCAL1TileCellsMuonDecoratorCfg(flags, Prefix=prefix) )
116  kwargs.setdefault('AugmentationTools', [cellsMuonDecorator])
117 
118  skimmingTool = acc.getPrimaryAndMerge(TCAL1StringSkimmingToolCfg(flags, Prefix=prefix))
119  kwargs.setdefault('SkimmingTools', [skimmingTool])
120 
121  thinningTool = acc.getPrimaryAndMerge(TCAL1MuonTPThinningToolCfg(flags, streamName=streamName))
122  kwargs.setdefault('ThinningTools', [thinningTool])
123 
124  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
125  acc.addEventAlgo(DerivationKernel(name, **kwargs))
126 
127  return acc
128 
129 

◆ TCAL1MuonTPThinningToolCfg()

def TCAL1.TCAL1MuonTPThinningToolCfg (   flags,
  streamName,
**  kwargs 
)
Configure TCAL1 derivation framework thinning tool

Definition at line 84 of file TCAL1.py.

84 def TCAL1MuonTPThinningToolCfg(flags, streamName, **kwargs):
85  """Configure TCAL1 derivation framework thinning tool"""
86 
87  acc = ComponentAccumulator()
88 
89  kwargs['StreamName'] = streamName
90  kwargs.setdefault('name', 'TCAL1MuonTPThinningTool')
91  kwargs.setdefault('MuonKey', 'Muons')
92  kwargs.setdefault('InDetTrackParticlesKey', 'InDetTrackParticles')
93 
94  from DerivationFrameworkInDet.InDetToolsConfig import MuonTrackParticleThinningCfg
95  muonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(flags, **kwargs))
96 
97  acc.addPublicTool(muonTPThinningTool, primary = True)
98 
99  return acc
100 
101 

◆ TCAL1StringSkimmingToolCfg()

def TCAL1.TCAL1StringSkimmingToolCfg (   flags,
**  kwargs 
)
Configure TCAL1 derivation framework skimming tool

Definition at line 57 of file TCAL1.py.

57 def TCAL1StringSkimmingToolCfg(flags, **kwargs):
58  """Configure TCAL1 derivation framework skimming tool"""
59 
60  prefix = kwargs.pop('Prefix', 'TCAL1_')
61 
62  from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg
63  acc = ComponentAccumulator()
64  tdt = acc.getPrimaryAndMerge(TrigDecisionToolCfg(flags))
65 
66  selectionExpression = ""
67  if flags.Beam.Type is BeamType.Collisions:
68  selectionExpression = f'(Muons.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500 + 0.4 * Muons.neflowisol20) / Muons.pt < 0.18 && Muons.{prefix}SelectedMuon'
69  else:
70  selectionExpression = 'abs(Muons.eta) < 1.7'
71 
72  skimmingExpression = f'count({selectionExpression}) > 0'
73 
74  kwargs.setdefault('name', 'TCAL1StringSkimmingTool')
75  kwargs.setdefault('expression', skimmingExpression)
76  kwargs.setdefault('TrigDecisionTool', tdt)
77 
78  xAODStringSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool
79  acc.addPublicTool(xAODStringSkimmingTool(**kwargs), primary = True)
80 
81  return acc
82 
83 

◆ TCAL1TileCellsMuonDecoratorCfg()

def TCAL1.TCAL1TileCellsMuonDecoratorCfg (   flags,
**  kwargs 
)
Configure the Tile Cells Muon decorator augmentation tool 

Definition at line 25 of file TCAL1.py.

25 def TCAL1TileCellsMuonDecoratorCfg(flags, **kwargs):
26  """ Configure the Tile Cells Muon decorator augmentation tool """
27 
28  acc = ComponentAccumulator()
29 
30  from TileGeoModel.TileGMConfig import TileGMCfg
31  acc.merge(TileGMCfg(flags))
32 
33  from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
34  acc.merge(TileCablingSvcCfg(flags))
35 
36  kwargs.setdefault('name', 'TCAL1TileCellsMuonDecorator')
37  kwargs.setdefault('Prefix', 'TCAL1_')
38  kwargs.setdefault('SelectMuons', flags.Beam.Type is BeamType.Collisions)
39  kwargs.setdefault('MinMuonPt', 10 * GeV)
40  kwargs.setdefault('MaxAbsMuonEta', 1.7)
41  kwargs.setdefault('IsoCone', 0.4)
42  kwargs.setdefault('MaxRelETrkInIsoCone', 100000)
43 
44  kwargs.setdefault('TrackTools', acc.popToolsAndMerge(TCAL1TrackToolsCfg(flags)) )
45 
46  TileCellsDecorator = CompFactory.DerivationFramework.TileCellsDecorator
47  kwargs.setdefault('CellsDecorator', TileCellsDecorator(Prefix=kwargs['Prefix']))
48 
49  kwargs.setdefault('TracksInConeTool', CompFactory.xAOD.TrackParticlesInConeTool())
50 
51  TileCellsMuonDecorator = CompFactory.DerivationFramework.TileCellsMuonDecorator
52  acc.addPublicTool(TileCellsMuonDecorator(**kwargs), primary = True)
53 
54  return acc
55 
56 

◆ TCAL1TrackToolsCfg()

def TCAL1.TCAL1TrackToolsCfg (   flags,
**  kwargs 
)
Configure the TrackTools tool 

Definition at line 9 of file TCAL1.py.

9 def TCAL1TrackToolsCfg(flags, **kwargs):
10  """ Configure the TrackTools tool """
11 
12  acc = ComponentAccumulator()
13 
14  from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
15  kwargs.setdefault('ParticleCaloExtensionTool', acc.popToolsAndMerge(
17 
18  kwargs.setdefault('IsCollision', flags.Beam.Type is BeamType.Collisions)
19 
20  TrackTools = CompFactory.TileCal.TrackTools
21  acc.setPrivateTools(TrackTools(**kwargs))
22 
23  return acc
24 
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
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
TCAL1.TCAL1TileCellsMuonDecoratorCfg
def TCAL1TileCellsMuonDecoratorCfg(flags, **kwargs)
Definition: TCAL1.py:25
TrackTools
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:19
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
TCAL1.TCAL1MuonTPThinningToolCfg
def TCAL1MuonTPThinningToolCfg(flags, streamName, **kwargs)
Definition: TCAL1.py:84
TCAL1.TCAL1StringSkimmingToolCfg
def TCAL1StringSkimmingToolCfg(flags, **kwargs)
Definition: TCAL1.py:57
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
TCAL1.TCAL1Cfg
def TCAL1Cfg(flags)
Definition: TCAL1.py:130
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
TCAL1.TCAL1KernelCfg
def TCAL1KernelCfg(flags, name='TCAL1Kernel', **kwargs)
Definition: TCAL1.py:102
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11
TrackToCaloConfig.ParticleCaloExtensionToolCfg
def ParticleCaloExtensionToolCfg(flags, name='ParticleCaloExtensionTool', **kwargs)
Definition: TrackToCaloConfig.py:10
TCAL1.TCAL1TrackToolsCfg
def TCAL1TrackToolsCfg(flags, **kwargs)
Definition: TCAL1.py:9
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7