ATLAS Offline Software
Functions | Variables
python.HLT.Electron.PrecisionElectronRecoSequences Namespace Reference

Functions

def precisionElectronRecoSequence (flags, RoIs, ion=False, doGSF=True, doLRT=False)
 

Variables

 log
 

Function Documentation

◆ precisionElectronRecoSequence()

def python.HLT.Electron.PrecisionElectronRecoSequences.precisionElectronRecoSequence (   flags,
  RoIs,
  ion = False,
  doGSF = True,
  doLRT = False 
)

Definition at line 12 of file PrecisionElectronRecoSequences.py.

12 def precisionElectronRecoSequence(flags, RoIs, ion=False, doGSF=True, doLRT=False):
13 
14  acc = ComponentAccumulator()
15  """ With this function we will setup the sequence of offline EgammaAlgorithms so to make a electron for TrigEgamma
16 
17  Sequence of algorithms is the following:
18  - egammaRecBuilder/TrigEgammaRecElectron creates egammaObjects out of clusters and tracks.
19  - electronSuperClusterBuilder algorithm will create superclusters out of the topoclusters and tracks in egammaRec under the electron hypothesis
20  https://gitlab.cern.ch/atlas/athena/blob/master/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py#L26
21  - TopoEgammBuilder will create photons and electrons out of trakcs and SuperClusters. Here at HLT electrons the aim is to ignore photons.
22  https://gitlab.cern.ch/atlas/athena/blob/master/Reconstruction/egamma/egammaAlgs/src/xAODEgammaBuilder.cxx
23  """
24 
25  log.debug('precisionElectronRecoSequence(RoIs = %s, ion = %s, doGSF = %s, doLRT = %s)',RoIs,ion,doGSF,doLRT)
26 
27  tag = '_ion' if ion is True else ''
28 
29  # create a Variant string out of the options above
30  variant = '_'
31  if doLRT:
32  variant+='LRT'
33  if doGSF:
34  variant+='GSF'
35 
36  if not doLRT and not doGSF:
37  variant+='noGSF'
38 
39  tag += variant
40 
41  from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys
42 
43  # makes datakeys based on LRT, GSF, noGSF, LRTGSF
44  TrigEgammaKeys = getTrigEgammaKeys(flags, variant, ion=ion)
45 
46  # taking care of VDV before GSF related data comes in
47  if doLRT:
48  TrigEgammaKeys_noGSF = getTrigEgammaKeys(flags, '_LRT')
49  else:
50  TrigEgammaKeys_noGSF = getTrigEgammaKeys(flags)
51 
52  # following reduces if-else checking for later implementations
53  if doGSF:
54  useBremAssoc = True
55  trackParticles = TrigEgammaKeys.precisionElectronTrackParticleContainerGSF
56  else:
57  useBremAssoc = False
58  trackParticles = TrigEgammaKeys_noGSF.precisionTrackingContainer
59 
60  # Arranging required data keys
61  caloClusters = TrigEgammaKeys.precisionElectronCaloClusterContainer
62  egammaRecContainer = TrigEgammaKeys.precisionEgammaRecCollection
63  superElectronRecCollectionName = TrigEgammaKeys.precisionElectronSuperClusterCollection
64  superPhotonRecCollectionName = TrigEgammaKeys.precisionPhotonSuperClusterCollection
65  photonOutputName = TrigEgammaKeys.precisionPhotonContainer
66  trackParticles_noGSF = TrigEgammaKeys_noGSF.precisionTrackingContainer
67  TrackParticleLocation = TrigEgammaKeys.precisionTrackingContainer
68  electronOutputName = TrigEgammaKeys.precisionElectronContainer
69  #electronCollectionContainerName_noGSF = TrigEgammaKeys_noGSF.precisionElectronContainer
70  OutputClusterContainerName = TrigEgammaKeys.precisionElectronEMClusterContainer
71  #useBremAssoc = True
72 
73  from TrigInDetConfig.InDetTrigCollectionKeys import TrigTRTKeys, TrigPixelKeys
74 
75  cellsName = "CaloCells" if not ion else "CorrectedRoICaloCells"
76  dataObjects = [( 'CaloCellContainer' , 'StoreGateSvc+%s' % cellsName ),
77  ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+%s' % caloClusters ),
78  ( 'xAOD::TrackParticleContainer','StoreGateSvc+%s' % trackParticles_noGSF)]
79  if doGSF:
80  dataObjects += [
81  # verifier object needed by GSF
82  ( 'xAOD::TrackParticleContainer','StoreGateSvc+%s' % trackParticles),
83  ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing' ),
84  ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+%s' % TrigPixelKeys.PixelClusterAmbiguitiesMap ),
85  ( 'InDet::TRT_DriftCircleContainer' , 'StoreGateSvc+%s' % TrigTRTKeys.DriftCircles ),
86  ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' )]
87 
88  if flags.Input.isMC:
89  dataObjects += [( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' )]
90  else:
91  dataObjects += [( 'IDCInDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' )]
92  dataObjects += [( 'TRT_RDO_Cache' , f'StoreGateSvc+{flags.Trigger.InDetTracking.TRTRDOCacheKey}' )]
93 
94  precisionElectronVDV = CompFactory.AthViews.ViewDataVerifier("precisionElectron"+tag+"VDV")
95  precisionElectronVDV.DataObjects = dataObjects
96  acc.addEventAlgo(precisionElectronVDV)
97 
98  """ Retrieve the factories now """
99  from TriggerMenuMT.HLT.Electron.TrigElectronFactoriesCfg import TrigEgammaRecElectronCfg, TrigElectronSuperClusterBuilderCfg, TrigTopoEgammaElectronCfg, TrigElectronIsoBuilderCfg
100 
101  # Create the sequence of steps:
102  # - TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectron
103  #The sequence of these algorithms
104 
105 
106  TrigEgammaRecAlgo = TrigEgammaRecElectronCfg(flags, tag, trackParticles, caloClusters, egammaRecContainer)
107  acc.merge(TrigEgammaRecAlgo)
108 
109 
110  TrigSuperElectronAlgo = TrigElectronSuperClusterBuilderCfg(flags, tag, egammaRecContainer, superElectronRecCollectionName,trackParticles)
111  acc.merge(TrigSuperElectronAlgo)
112 
113 
114  TrigTopoEgammaAlgo = TrigTopoEgammaElectronCfg(flags, tag, variant, cellsName, superElectronRecCollectionName, superPhotonRecCollectionName, electronOutputName, photonOutputName,OutputClusterContainerName)
115 
116  acc.merge(TrigTopoEgammaAlgo)
117 
118  collectionOut = electronOutputName
119 
120 
121  isoBuilder = TrigElectronIsoBuilderCfg(flags, tag, TrackParticleLocation, electronOutputName, useBremAssoc)
122  acc.merge(isoBuilder)
123 
124  isoVarKeys = [ '%s.ptcone20' % collectionOut,
125  '%s.ptvarcone20' % collectionOut,
126  '%s.ptcone30' % collectionOut,
127  '%s.ptvarcone30' % collectionOut ]
128 
129  #online monitoring for topoEgammaBuilder_GSF
130  from TriggerMenuMT.HLT.Electron.TrigElectronFactoriesCfg import PrecisionElectronTopoMonitorCfg
131  PrecisionElectronRecoMonAlgo = PrecisionElectronTopoMonitorCfg(flags, tag, collectionOut, isoVarKeys)
132 
133  acc.merge(PrecisionElectronRecoMonAlgo)
134 
135  #online monitoring for TrigElectronSuperClusterBuilder
136  from TriggerMenuMT.HLT.Electron.TrigElectronFactoriesCfg import PrecisionElectronSuperClusterMonitorCfg
137  PrecisionElectronSuperClusterMonAlgo = PrecisionElectronSuperClusterMonitorCfg(flags, tag, superElectronRecCollectionName)
138 
139  acc.merge(PrecisionElectronSuperClusterMonAlgo)
140 
141  return acc
142 
143 

Variable Documentation

◆ log

python.HLT.Electron.PrecisionElectronRecoSequences.log

Definition at line 10 of file PrecisionElectronRecoSequences.py.

python.HLT.Electron.PrecisionElectronRecoSequences.precisionElectronRecoSequence
def precisionElectronRecoSequence(flags, RoIs, ion=False, doGSF=True, doLRT=False)
Definition: PrecisionElectronRecoSequences.py:12
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.HLT.Electron.TrigElectronFactoriesCfg.TrigElectronIsoBuilderCfg
def TrigElectronIsoBuilderCfg(flags, tag, TrackParticleLocation, electronCollectionContainerName, useBremAssoc)
Definition: TrigElectronFactoriesCfg.py:115
python.HLT.Electron.TrigElectronFactoriesCfg.TrigTopoEgammaElectronCfg
def TrigTopoEgammaElectronCfg(flags, tag, variant, cellsName, InputElectronRecCollectionName, InputPhotonRecCollectionName, ElectronOutputName, PhotonOutputName, OutputClusterContainerName)
Definition: TrigElectronFactoriesCfg.py:79
python.HLT.Electron.TrigElectronFactoriesCfg.TrigEgammaRecElectronCfg
def TrigEgammaRecElectronCfg(flags, tag, trackparticles, calocluster, egammaRecContainer)
Definition: TrigElectronFactoriesCfg.py:39
python.HLT.Electron.TrigElectronFactoriesCfg.PrecisionElectronSuperClusterMonitorCfg
def PrecisionElectronSuperClusterMonitorCfg(flags, tag, inputEgammaRecContainerName)
Definition: TrigElectronFactoriesCfg.py:146
python.HLT.Electron.TrigElectronFactoriesCfg.PrecisionElectronTopoMonitorCfg
def PrecisionElectronTopoMonitorCfg(flags, tag, electronKey, isoVarKeys)
Definition: TrigElectronFactoriesCfg.py:133
python.HLT.Egamma.TrigEgammaKeys.getTrigEgammaKeys
def getTrigEgammaKeys(AthConfigFlags flags, name='', ion=False)
Definition: TrigEgammaKeys.py:138
python.HLT.Electron.TrigElectronFactoriesCfg.TrigElectronSuperClusterBuilderCfg
def TrigElectronSuperClusterBuilderCfg(flags, tag, InputEgammaRecContainerName, SuperElectronRecCollectionName, trackparticles)
Definition: TrigElectronFactoriesCfg.py:51