Commit 1c8ae8c1 authored by Elmar Ritsch's avatar Elmar Ritsch Committed by Graeme Stewart
Browse files

remove unused TruthService from ParticleKiller configuration (ISF_Example-00-02-45)

	* python/ISF_iParticleKillerConfig.py, python/iParticleKiller.py - remove
	unused TruthService from ParticleKiller configuration
	* Tagging: ISF_Example-00-02-45

2014-10-20  John Chapman  <John.Chapman@cern.ch>

	* python/ISF_iParticleKillerConfig.py - use ISF_Flags.TruthService
	to specify the TruthService name. Requires ISF_Config-00-01-00 or
	later. ATLASSIM-1603.

	* Tagging: ISF_Example-00-02-44

2014-10-16  John Chapman  <John.Chapman@cern.ch>

	* python/ISF_Output.py: Adding a line for the pass-through of a
	truth xAODJet::JetContainer from EVNT to
	HITS. ATLASSIM-1636.

	* Tagging: ISF_Example-00-02-43
...
(Long ChangeLog diff - truncated)
parent 630d58c5
......@@ -29,23 +29,27 @@ class ISF_Input:
if athenaCommonFlags.SkipEvents.statusOn:
svcMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
## Read input file metadata
## Allow the input check to be skipped. This should only be done in production
## jobs, in order to avoid peeking and spoiling performance on some systems
import os
import PyUtils.AthFile as af
hitfile = athenaCommonFlags.PoolEvgenInput.get_Value()[0]
f = af.fopen(hitfile)
## Check that event type is SIMULATION (as it must be)
if "evt_type" in f.infos.keys():
evttypes = f.infos["evt_type"]
evttype0 = str(evttypes[0])
if not evttype0.startswith("IS_SIMULATION"):
msg = "ERROR: ISF_Input :: This input file has incorrect evt_type: %s\n" % str(evttypes)
msg += "Please make sure you have set input file metadata correctly - "
msg += "consider using the job transforms for earlier steps if you aren't already doing so."
print msg
raise SystemExit("Input file evt_type is incorrect: please check your evgen jobs.")
else:
print "WARNING: ISF_Input :: Could not find 'evt_type' key in athfile.infos. Unable to that check evt_type is correct."
if not ('G4ATLAS_SKIPFILEPEEK' in os.environ and os.environ['G4ATLAS_SKIPFILEPEEK']):
## Read input file metadata
hitfile = athenaCommonFlags.PoolEvgenInput.get_Value()[0]
f = af.fopen(hitfile)
## Check that event type is SIMULATION (as it must be)
if "evt_type" in f.infos.keys():
evttypes = f.infos["evt_type"]
evttype0 = str(evttypes[0])
if not evttype0.startswith("IS_SIMULATION"):
msg = "ERROR: ISF_Input :: This input file has incorrect evt_type: %s\n" % str(evttypes)
msg += "Please make sure you have set input file metadata correctly - "
msg += "consider using the job transforms for earlier steps if you aren't already doing so."
print msg
raise SystemExit("Input file evt_type is incorrect: please check your evgen jobs.")
else:
print "WARNING: ISF_Input :: Could not find 'evt_type' key in athfile.infos. Unable to that check evt_type is correct."
else:
## No input file so assume that we are running a Generator in the same job
......
......@@ -14,7 +14,7 @@ class ISF_HITSStream:
from ISF_Config.ISF_jobProperties import ISF_Flags
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
from AthenaCommon.AppMgr import ServiceMgr
if athenaCommonFlags.PoolHitsOutput.statusOn:
if athenaCommonFlags.PoolHitsOutput.statusOn or (hasattr(simFlags, "WriteTR") and simFlags.WriteTR.statusOn):
## Write hits in POOL
print "ISF_HITSStream starting"
......@@ -40,7 +40,9 @@ class ISF_HITSStream:
stream1.ForceRead = True
stream1.ItemList = ["EventInfo#*",
"McEventCollection#TruthEvent",
"JetCollection#*"]
"JetCollection#*",
"xAOD::JetContainer_v1#*",
"xAOD::JetAuxContainer_v1#*"]
## Make stream aware of aborted events
stream1.AcceptAlgs = ['ISF_Kernel_'+ISF_Flags.Simulator()]#,"G4AtlasAlg"]
......@@ -212,6 +214,7 @@ class ISF_HITSStream:
import os
dbFiller.addSimParam('G4Version', str(os.environ['G4VERS']))
dbFiller.addSimParam('RunType', 'atlas')
from AthenaCommon.BeamFlags import jobproperties
dbFiller.addSimParam('beamType', jobproperties.Beam.beamType.get_Value())
## Simulated detector flags: add each enabled detector to the simulatedDetectors list
......
......@@ -26,8 +26,8 @@ def getIParticleKiller():
if 'iParticleKiller' in cache:
i = cache['iParticleKiller']
else:
from iParticleKiller import iParticleKiller
i = iParticleKiller(getService('ISF_TruthService'))
from iParticleKiller import iParticleKiller
i = iParticleKiller()
cache['iParticleKiller'] = i
return i
......
......@@ -3,7 +3,7 @@
from Gaudi.Configuration import *
class iParticleKiller:
def __init__(self, TruthService):
def __init__(self):
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from ISF_Services.ISF_ServicesConf import ISF__ParticleKillerSimSvc
......
from AthenaCommon.DetFlags import DetFlags
DetFlags.ID_setOn()
DetFlags.Calo_setOff()
DetFlags.Muon_setOff()
import MagFieldServices.SetupField
from InDetRecExample.InDetJobProperties import InDetFlags
InDetFlags.doBremRecovery.set_Value_and_Lock(False)
InDetFlags.doStandardPlots.set_Value_and_Lock(True)
#from GaudiSvc.GaudiSvcConf import THistSvc
# --- controls what is written out. ESD includes AOD, so it's normally enough
# --- ESD writing temporarily disabled post 2013 migration - to be reinstated!
from ParticleBuilderOptions.AODFlags import AODFlags
AODFlags.TrackParticleSlimmer=False
AODFlags.TrackParticleLastHitAndPerigeeSlimmer=False
#rec.doESD.set_Value_and_Lock (True)
#rec.doWriteESD.set_Value_and_Lock (True)###
#rec.doAOD.set_Value_and_Lock (True)
#rec.doWriteAOD.set_Value_and_Lock (True)
#rec.doDPD.set_Value_and_Lock (False)
#rec.doCBNT.set_Value_and_Lock (False)
#rec.doWriteTAG.set_Value_and_Lock (False)
# --- turn on InDet
rec.doInDet.set_Value_and_Lock (True)
# --- turn off calo
rec.doCalo.set_Value_and_Lock (False)
# --- turn off muons
rec.doMuon.set_Value_and_Lock (False)
# --- turn off forward detectors
rec.doForwardDet.set_Value_and_Lock (False)
# --- turn off trigger
rec.doTrigger.set_Value_and_Lock (False)
# --- turn off combined reconstruction
rec.doEgamma.set_Value_and_Lock (False)
rec.doMuonCombined.set_Value_and_Lock (False)
rec.doTau.set_Value_and_Lock (False)
rec.doJetMissingETTag.set_Value_and_Lock (False)
# --- turn of calo stuff we don't need anyway
from CaloRec.CaloRecFlags import jobproperties
jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock (False)
jobproperties.CaloRecFlags.doCaloEMTopoCluster.set_Value_and_Lock(False)
jobproperties.CaloRecFlags.doCaloTopoTower.set_Value_and_Lock (False)
# --- turn of jets (Hack!!!)
from JetRec.JetRecFlags import jetFlags
jetFlags.Enabled.set_Value_and_Lock (False)
# --- turn off egamma Brem
recAlgs.doEgammaBremReco.set_Value_and_Lock (False)
# --- turn off Eflow and missing ET
recAlgs.doEFlow.set_Value_and_Lock (False)
recAlgs.doEFlowJet.set_Value_and_Lock (False)
recAlgs.doMissingET.set_Value_and_Lock (False)
recAlgs.doMissingETSig.set_Value_and_Lock (False)
recAlgs.doObjMissingET.set_Value_and_Lock (False)
# --- turn off combined muons
recAlgs.doMuGirl.set_Value_and_Lock (False)
recAlgs.doMuTag.set_Value_and_Lock (False)
recAlgs.doMuidLowPt.set_Value_and_Lock (False)
recAlgs.doMuonIDCombined.set_Value_and_Lock (False)
recAlgs.doMuonIDStandAlone.set_Value_and_Lock(False)
recAlgs.doMuonSpShower.set_Value_and_Lock (False)
recAlgs.doStaco.set_Value_and_Lock (False)
recAlgs.doCaloTrkMuId.set_Value_and_Lock (False)
recAlgs.doTileMuID.set_Value_and_Lock (False)
# --- trigger
recAlgs.doTrigger.set_Value_and_Lock (False)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment