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

Merge branch 'rm_LArRODJo' into 'main'

delete obsolete jobO in LArROD + jobOptions.DigTB_LArH6-2004.py

See merge request !65368
parents 5188d2ea dac1b007
No related branches found
No related tags found
5 merge requests!66406ZDC & ZDC LED monitoring updates,!66102ZDC & RPD monitoring update,!65937Draft: Updated post-processing and plotting scripts for 2023 data in ZLumi_Scripts directory,!65537ZDC - Fix problem with swapping of low and high gain data,!65368delete obsolete jobO in LArROD + jobOptions.DigTB_LArH6-2004.py
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#==============================================================
#
# Job options file for Digitization
#
# CTB_G4Sim: H6 CTB (2004) digitization
#
#==============================================================
# Number of events to be processed (default is 10)
if ("EvtMax" not in dir()):
EvtMax = 10
if ("doCaloNoise" not in dir()):
doCaloNoise = True
if ("PoolHitsInput" not in dir()):
PoolHitsInput = [ "Test.pool.root" ]
if ("PoolRDOOutput" not in dir()):
PoolRDOOutput = "TestDigi.pool.root"
if ("SkipEvents" not in dir()):
SkipEvents = 0
import AthenaCommon.AtlasUnixStandardJob
#--- Detector flags -------------------------------------------
from AthenaCommon.DetFlags import DetFlags
# - Select detectors
DetFlags.ID_setOff()
DetFlags.LAr_setOn()
DetFlags.Tile_setOff()
DetFlags.Muon_setOff()
DetFlags.Truth_setOff() # not ready !!!!!!!!!!
#DetFlags.LVL1_setOn()
# - Switch off tasks
DetFlags.pileup.all_setOff()
DetFlags.simulate.all_setOff()
DetFlags.makeRIO.all_setOff()
DetFlags.writeBS.all_setOff()
DetFlags.readRDOBS.all_setOff()
DetFlags.readRIOBS.all_setOff()
DetFlags.readRIOPool.all_setOff()
DetFlags.writeRIOPool.all_setOff()
DetFlags.writeRDOPool.all_setOff()
#DetFlags.writeRDOPool.Calo_setOn()
DetFlags.writeRDOPool.LAr_setOn()
#---------- Global Flags
from AthenaCommon.GlobalFlags import globalflags
globalflags.DetGeo.set_Value_and_Lock('ctbh6')
globalflags.Luminosity.set_Value_and_Lock('zero')
globalflags.DataSource.set_Value_and_Lock('geant4')
globalflags.InputFormat.set_Value_and_Lock('pool')
#--- Event related parameters ---------------------------------
theApp.EvtMax = EvtMax
#--- Pool specific --------------------------------------------
# - General Pool converters
include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
# - AthenaPool converter (read hits)
include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
# - EventInfo Converters
include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
# - TB specific
#include( "LArG4TBSimEvent/LArG4TBSimEventDict_joboptions.py" )
include( "LArG4TBSimEventAthenaPool/LArG4TBSimEventAthenaPool_joboptions.py" )
theApp.Dlls += [ "TBEventAthenaPoolPoolCnv" ]
theApp.Dlls += [ "LArHV" ]
# - Pool input (Change this to use a different file)
from AthenaCommon.AppMgr import ServiceMgr
if not hasattr(ServiceMgr, 'EventSelector'):
import AthenaPoolCnvSvc.ReadAthenaPool
ServiceMgr.EventSelector.InputCollections = PoolHitsInput
ServiceMgr.EventSelector.SkipEvents = SkipEvents
if DetFlags.writeRDOPool.any_on():
# Pool Output
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream1 = AthenaPoolOutputStream("Stream1")
Stream1.ItemList+=["EventInfo#*"]
Stream1.ItemList+=["TBEventInfo#*"]
Stream1.ItemList+=["McEventCollection#*"]
Stream1.OutputFile = PoolRDOOutput
#--- Initial checks -------------------------------------------
#print job configuration
DetFlags.Print()
#check job configuration
if not(DetFlags.geometry.any_on()):
AthError( "this digitization job needs some DetFlags.geometry On" )
if not(DetFlags.digitize.any_on()):
AthError( "this *digitization* job needs some DetFlags.digitize On" )
if not(DetFlags.writeRDOPool.any_on()):
log.warning( "this digitization job will not write any RDO object" )
#--- GeoModel stuff -------------------------------------------
from AthenaCommon.GlobalFlags import globalflags
globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-H6-2004-00')
DetDescrVersion = 'ATLAS-H6-2004-00'
from AthenaCommon.JobProperties import jobproperties
jobproperties.Global.DetDescrVersion = "ATLAS-H6-2004-00"
#--- Conditions global tag ------
from AthenaCommon.GlobalFlags import globalflags
globalflags.ConditionsTag = "OFLCOND-CSC-00-00-00"
from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc
#--- Detector digitization configuration ----------------------
if DetFlags.LAr_on():
# Pool Converters
include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
include( "IOVDbSvc/IOVDbSvc_jobOptions.py" )
include( "LArConditionsCommon/LArConditionsCommon_H6G4_jobOptions.py" )
# Common for the Calo
include.block ( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py" )
include.block ( "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py" )
# the LAr and Calo detector description package
include( "CaloConditions/CaloConditions_jobOptions.py" )
include( "CaloIdCnv/CaloIdCnv_joboptions.py" )
#include( "LArCondCnv/LArCondCnv_IdMapH6_jobOptions.py" )
# -- Digitization - LArCalorimeter
include("LArDetDescr/LArDetDescr_H6_joboptions.py")
theApp.Dlls += [ "LArG4H6SDTools" ]
from LArG4H6SD.LArG4H6SDToolsConf import LArTBH6TriggerTimeTool
from AthenaCommon.AppMgr import ToolSvc
ToolSvc += LArTBH6TriggerTimeTool()
ToolSvc.LArTBH6TriggerTimeTool.isFixed=True
ToolSvc.LArTBH6TriggerTimeTool.FixedTime = 83. #maybe this one
ToolSvc.LArTBH6TriggerTimeTool.OutputLevel = 4
include( "H6G4Sim/LArDigitization_H6G4_jobOptions.py" )
DetDescrCnvSvc.DecodeIdDict = True
include( "LArROD/LArROD_jobOptions.py" )
LArRawChannelBuilder.Ecut=0
#DetDescrCnvSvc.LArIDFileName = "IdDictParser/IdDictLArCalorimeter_H6_2004.xml"
if DetFlags.writeRDOPool.LAr_on():
Stream1.ItemList+=["LArRawChannelContainer#*"]
Stream1.ItemList+=["LArDigitContainer#*"]
Stream1.ItemList+=["LArHitContainer#*"]
Stream1.ItemList+=["CaloCalibrationHitContainer#*"]
Stream1.ItemList+=["LArG4H6FrontHitCollection#*"]
# Stream1.ItemList+=["LArTBLeakHitCollection#*"]
Stream1.ItemList+=["LArG4H6WarmTCHitCollection#*"]
theApp.Dlls += [ "RootHistCnv" ]
theApp.HistogramPersistency = "ROOT"
NTupleSvc = Service("NTupleSvc")
NTupleSvc.Output += [ "MYFILE DATAFILE='mynt.root' TYP='ROOT' OPT='NEW'" ]
## Track reco
from LArG4H6SD.LArG4H6SDToolsConf import LArTBH6BeamInfo
BeamTrack =LArTBH6BeamInfo("BeamTrack")
BeamTrack.OutputLevel = 4
BeamTrack.HitsContainer += [ "Movable::Hits" ]
BeamTrack.HitsContainer += [ "Front::Hits" ]
topSequence += BeamTrack
if DetFlags.writeRDOPool.LAr_on():
Stream1.ItemList+=["TBTrack#*"]
# --------- Try my additions ----------------------
#include( "MyInspect/MyInspection_jobOption.py" )
# Open the ntuple
#--- Output printout level -----------------------------------
#output threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
#you can override this for individual modules if necessary
MessageSvc = Service( "MessageSvc" )
MessageSvc.OutputLevel = 4
MessageSvc.verboseLimit = 100000000
MessageSvc.debugLimit = 100000000
AthenaEventLoopMgr = Service( "AthenaEventLoopMgr" )
AthenaEventLoopMgr.OutputLevel = 5 #get event printout
if not 'CafJobInputs' in dir():
CafJobInputs=[["/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"]]
print "No input file given, use ",CafJobInputs[0]
if not 'CafJobOutputs' in dir():
CafJobOutputs=["LArTiming.root"]
from AthenaCommon.AppMgr import (theApp, ServiceMgr as svcMgr,ToolSvc)
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
include("LArConditionsCommon/LArMinimalSetup.py")
svcMgr.IOVDbSvc.GlobalTag="COMCOND-ES1C-001-00"
#Specify the input file(s)
svcMgr.EventSelector.Input=CafJobInputs[0]
# Specify the object you want to read from ByteStream
theByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
theByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/FREE"]
theByteStreamAddressProviderSvc.TypeNames += ["LArFebHeaderContainer/LArFebHeader"]
#Setting up the CBNTAA
from CBNT_Athena.CBNT_AthenaAwareCfg import CBNT_AthenaAware
theCBNT_AthenaAware= CBNT_AthenaAware()
CBNT_AthenaAware = topSequence.CBNT_AthenaAware
include( "CBNT_Athena/CBNT_EventInfo_jobOptions.py" )
from LArROD.LArRODConf import CBNTAA_LArDigits
theCBNTAA_LArDigits = CBNTAA_LArDigits("CBNTAA_LArDigits")
theCBNTAA_LArDigits.MaxChannels = 200000
theCBNTAA_LArDigits.NEvents=-1 # Dump all
#theCBNTAA_LArDigits.DumpIterResults=True
theCBNTAA_LArDigits.SaveId=True
theCBNTAA_LArDigits.SaveSCAAddress = False
theCBNTAA_LArDigits.DumpCut=1300
theCBNTAA_LArDigits.ContainerKey = "FREE"
#theCBNTAA_LArDigits.DumpDisconnected=False
#theCBNTAA_LArDigits.SaveSCAAddress=False
theCBNTAA_LArDigits.OutputLevel=VERBOSE
CBNT_AthenaAware +=theCBNTAA_LArDigits
#Setting up the CBNTAA Output Stream
from AnalysisTools.AthAnalysisToolsConf import AANTupleStream
topSequence +=AANTupleStream()
AANTupleStream = topSequence.AANTupleStream
AANTupleStream.ExtraRefNames = [ "" ]
AANTupleStream.OutputName = CafJobOutputs[0]
AANTupleStream.ExistDataHeader = False
theApp.HistogramPersistency = "ROOT"
from GaudiSvc.GaudiSvcConf import THistSvc
svcMgr += THistSvc()
svcMgr.THistSvc.Output += ["AANT DATAFILE='"+CafJobOutputs[0]+"' OPT='RECREATE'"]
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
theAuditorSvc = svcMgr.AuditorSvc
theAuditorSvc.Auditors += [ "ChronoAuditor"]
#svcMgr.ChronoStatSvc.ChronoDestinationCout = True
svcMgr.ChronoStatSvc.PrintUserTime = True
svcMgr.ChronoStatSvc.PrintSystemTime = True
svcMgr.ChronoStatSvc.PrintEllapsedTime = True
#svcMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 1
#svcMgr.ChronoStatSvc.AsciiStatsOutputFile = "chronoStats.ascii"
svcMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True
theApp.AuditAlgorithms = True
#Hack to load the right dict to write vector< vector < X > > to TTRee
import AthenaPython.PyAthena as PyAthena
PyAthena.load_library('AtlasSTLAddReflexDict')
#################################################################
#
# This job option fragment is to create LArRaw Channels
# from LAr Digits
#
#################################################################
# Properties for ROD:
# OBSOLETE, JUST REDIRECT TO LArROD_jobOptions.py
include( "LArROD/LArROD_jobOptions.py" )
#################################################################
#
# This job option fragment is to create LArRaw Channels
# from LAr Digits
#
#################################################################
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
from LArROD.LArRODConf import LArRawChannelBuilder
LArRawChannelBuilder = LArRawChannelBuilder( "LArRawChannelBuilder" )
topSequence += LArRawChannelBuilder
LArRawChannelBuilder.DataLocation = "LArDigitContainer_MC"
LArRawChannelBuilder.LArRawChannelContainerName = "LArRawChannels"
from LArRecUtils.LArADC2MeVCondAlgDefault import LArADC2MeVCondAlgDefault
LArADC2MeVCondAlgDefault()
from LArRecUtils.LArOFCCondAlgDefault import LArOFCCondAlgDefault
LArOFCCondAlgDefault()
from Digitization.DigitizationFlags import digitizationFlags
if digitizationFlags.doDigiTruth():
print "Running LAr Raw Channel DigiTruth"
LArRawChannelBuilder_DigiHSTruth = LArRawChannelBuilder( "LArRawChannelBuilder_DigiHSTruth" )
topSequence += LArRawChannelBuilder_DigiHSTruth
LArRawChannelBuilder_DigiHSTruth.DataLocation = "LArDigitContainer_DigiHSTruth"
LArRawChannelBuilder_DigiHSTruth.LArRawChannelContainerName = "LArRawChannels_DigiHSTruth"
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