Skip to content
Snippets Groups Projects
Commit a1fc0a9b authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'editingE_gammaDef' into 'master'

Editting ElectronDef.py and PhotonDef.py to avoid creating unnecessary steps

See merge request atlas/athena!33106
parents 56e33c0d f859e7d5
No related branches found
No related tags found
No related merge requests found
...@@ -51,24 +51,19 @@ class ElectronChainConfiguration(ChainConfigurationBase): ...@@ -51,24 +51,19 @@ class ElectronChainConfiguration(ChainConfigurationBase):
# -------------------- # --------------------
# define here the names of the steps and obtain the chainStep configuration # define here the names of the steps and obtain the chainStep configuration
# -------------------- # --------------------
etcut1step = [ self.getFastCalo(doRinger=False) ]
etcut_sequence = [ self.getFastCalo(doRinger=False), self.getFastElectron(), self.getPrecisionCaloElectron()]
electron_sequence = [ self.getFastCalo(), self.getFastElectron(), self.getPrecisionCaloElectron(), self.getPrecisionElectron()]
etcut_noringer_sequence = [ self.getFastCalo(doRinger=False), self.getFastElectron(), self.getPrecisionCaloElectron()]
electron_noringer_sequence = [ self.getFastCalo(doRinger=False), self.getFastElectron(), self.getPrecisionCaloElectron(), self.getPrecisionElectron()]
stepDictionary = { stepDictionary = {
'etcut1step': etcut1step, 'etcut1step': ['getFastCaloNoRinger'],
'etcut' : etcut_sequence, 'etcut' : ['getFastCaloNoRinger', 'getFastElectron', 'getPrecisionCaloElectron'],
'lhloose' : electron_sequence, 'lhloose' : ['getFastCaloRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'lhvloose' : electron_sequence, 'lhvloose' : ['getFastCaloRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'lhmedium' : electron_sequence, 'lhmedium' : ['getFastCaloRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'lhtight' : electron_sequence, 'lhtight' : ['getFastCaloRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'etcutnoringer' : etcut_noringer_sequence, 'etcutnoringer' : ['getFastCaloNoRinger', 'getFastElectron', 'getPrecisionCaloElectron'],
'lhloosenoringer' : electron_noringer_sequence, 'lhloosenoringer' : ['getFastCaloNoRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'lhvloosenoringer' : electron_noringer_sequence, 'lhvloosenoringer' : ['getFastCaloNoRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'lhmediumnoringer' : electron_noringer_sequence, 'lhmediumnoringer' : ['getFastCaloNoRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
'lhtightnoringer' : electron_noringer_sequence, 'lhtightnoringer' : ['getFastCaloNoRinger', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'],
} }
log.debug('electron chain part = ' + str(self.chainPart)) log.debug('electron chain part = ' + str(self.chainPart))
...@@ -83,12 +78,10 @@ class ElectronChainConfiguration(ChainConfigurationBase): ...@@ -83,12 +78,10 @@ class ElectronChainConfiguration(ChainConfigurationBase):
else: else:
raise RuntimeError("Chain configuration unknown for electron chain with key: " + key ) raise RuntimeError("Chain configuration unknown for electron chain with key: " + key )
chainSteps = []
for step in steps: for step in steps:
log.debug('Adding electron trigger step ' + str(step)) log.debug('Adding electron trigger step ' + str(step))
chainSteps+=[step] chainstep = getattr(self, step)()
chainSteps+=[chainstep]
myChain = self.buildChain(chainSteps) myChain = self.buildChain(chainSteps)
...@@ -98,13 +91,14 @@ class ElectronChainConfiguration(ChainConfigurationBase): ...@@ -98,13 +91,14 @@ class ElectronChainConfiguration(ChainConfigurationBase):
# Configuration of electron steps # Configuration of electron steps
# -------------------- # --------------------
def getFastCalo(self, doRinger=True): def getFastCaloRinger(self):
if doRinger: stepName = "FastCaloRinger_electron"
stepName = "FastCaloRinger_electron" fastCaloRingerCfg = electronFastCaloRingerCfg
fastCaloCfg = electronFastCaloRingerCfg return self.getStep(1,stepName,[ fastCaloRingerCfg ])
else:
stepName = "FastCalo_electron" def getFastCaloNoRinger(self):
fastCaloCfg = electronFastCaloCfg stepName = "FastCalo_electron"
fastCaloCfg = electronFastCaloCfg
return self.getStep(1,stepName,[ fastCaloCfg]) return self.getStep(1,stepName,[ fastCaloCfg])
def getFastElectron(self): def getFastElectron(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment