# testing jobOption for LAr commissioning monitoring on phase1 bytestream files # make it possible to override following variables RS 06.01.06 # DetDescrVersion = "ATLAS-DC3-05" if not 'run_number' in dir(): run_number = 7812 if not 'LArDigitKey' in dir(): LArDigitKey = "HIGH" if not 'EvtNo' in dir(): EvtNo=10 #SkipEvents=2600 if not 'InputDir' in dir(): #InputDir = "/tmp/data/" InputDir = "/castor/cern.ch/atlas/P1commisioning/calo/cosmic" from os import system,popen if not 'OutputDir' in dir(): OutputDir="/tmp/CaloReco-"+str(run_number) system('mkdir -p %s' %(OutputDir)) FilePreFix = "daq_EB-1_Cosmic" if not 'LArRawChannelKey' in dir(): LArRawChannelKey="LArRawChannels" CBNTAthenaAware =False if "RootHistFileName" not in dir(): RootHistFileName = '/tmp/CaloReco-'+str(run_number)+'/larmon_cosmics.'+str(run_number)+'.hist.root' if "PoolOutputFileName" not in dir(): PoolOutputFileName = '/tmp/CaloReco-'+str(run_number)+'/CaloReco_cosmics.'+str(run_number)+'.pool.root' if "NtupleFileName" not in dir(): NtupleFileName = '/tmp/CaloReco-'+str(run_number)+'/CaloReco_cosmics.'+str(run_number)+'.ntuple.root' #------------------------ from AthenaCommon.GlobalFlags import GlobalFlags GlobalFlags.DataSource.set_data() GlobalFlags.InputFormat.set_bytestream() GlobalFlags.DetGeo.set_atlas() from AthenaCommon.DetFlags import DetFlags DetFlags.Calo_setOn() DetFlags.ID_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.digitize.all_setOff() DetFlags.Print() #---------------------------------------------------------- include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" ) # include( "ByteStreamCnvSvc/TBEventSelector_jobOptions.py" ) include ("AtlasGeoModel/SetGeometryVersion.py") include ("AtlasGeoModel/GeoModelInit.py") # start with ATLAS MC conditions data, overwrite later. include( "LArRawConditions/LArRawConditions_MC_jobOptions.py" ) include( "LArRawConditions/LArIdMap_ATLAS_jobOptions.py" ) include( "LArIdCnv/LArIdCnv_joboptions.py" ) include ("CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py") include( "TileIdCnv/TileIdCnv_jobOptions.py" ) #include("LArTools/LArTools_jobOptions.py") #added by Bin # ------------------------------------------------------------------- # Tile Raw Channels include( "TileMonitoring/TileRec_FlagOptions.py" ) include( "TileTBRec/TileTBDefaults_jobOptions.py" ) include( "TileConditions/TileTBConditions_jobOptions.py" ) # load calibration constants from TileMobi.* files TileInfoLoader.CalibFilePrefix = "TileMobi" TileInfoLoader.GeV2pCbA = TileGeV2pCb; # samplings A,B,D5,D6 TileInfoLoader.GeV2pCbD = TileGeV2pCb; # sampling D in barrel and C10,D4 TileInfoLoader.GeV2pCbE = TileGeV2pCb; # gap scintillators # read ByteStream and reconstruct data include( "TileTBRec/TileTBRec_jobOptions.py" ) # frag to ROD mapping in 2005 MobiDAQ include( "TileTBRec/TileMobiMap_jobOptions.py" ) # --------------------------------------------------------- # LAr Raw Channels theApp.Dlls += [ "LArByteStream"] ByteStreamInputSvc = Service( "ByteStreamInputSvc" ) ByteStreamInputSvc.InputDirectory = [ InputDir ] ByteStreamInputSvc.FilePrefix = [ FilePreFix ] ByteStreamInputSvc.RunNumber = [ run_number ] # ByteStreamInputSvc.FullFileName += [ InputFileName ] ByteStreamEventStorageInputSvc = Service( "ByteStreamEventStorageInputSvc" ) # read LArDigit ByteStreamAddressProviderSvc = Service( "ByteStreamAddressProviderSvc" ) ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/"+LArDigitKey] ByteStreamAddressProviderSvc.TypeNames += ["LArFebHeaderContainer/LArFebHeader"] ToolSvc = Service( "ToolSvc" ) ToolSvc.LArRoI_Map.Print=False theApp.Dlls += [ "LArRawUtils","LArROD","LArCalibUtils", "LArTools","LArEventTest","LArCalibTools"] include ("LArROD/LArRawChannelBuilderDriver_jobOptions.py") # overwrite LArRawChannelBuilder.BuilderTools = [] LArRawChannelBuilder.BuilderTools += ["LArRawChannelBuilderToolOFC"] # LArRawChannelBuilder.BuilderTools += ["LArRawChannelBuilderToolCubic"] # LArRawChannelBuilder.BuilderTools += ["LArRawChannelBuilderToolParabola"] # LArRawChannelBuilder.BuilderTools += ["LArRawChannelBuilderToolAverage"] #the Shift Time Sample =1 for runs 7811-7814, and =4 for run 7810 LArRawChannelBuilder.DefaultShiftTimeSample=1 #LArRawChannelBuilder.PedestalTools = ["LArRawChannelBuilderPedestalDataBase"] #include("LArConditionsCommon_comm_jobOptions.py") #include("LArRawConditions/LArRawConditions_jobOptions.py") #ToolSvc.LArRawChannelBuilderPedestalDataBase.LArPedestalKey = "Pedestal" # LArRawChannelBuilder.PedestalTools =["LArRawChannelBuilderPedestalSampleZero"] # calo reconstruction doTile=True include ("CaloReco_Cosmics_jobOptions.py") include ("CaloReco_Cosmics_CBNT_jobOptions.py") #include ("CaloCosEx/CaloReco_Cosmics_POOL_jobOptions.py") # overwrites ToolSvc.TileCellBuilder.TileRawChannelContainer ="TileRawChannelFit" #---------------------------------------------------------- # THistService for native root in Athena theApp.Dlls += [ "GaudiSvc" ] THistSvc = Algorithm( "THistSvc" ) # Note that the THistSvc doesn't do a "recreate", so ... if os.path.exists(RootHistFileName): os.remove(RootHistFileName) THistSvc.Output = ["MonitorOutPut DATAFILE='"+RootHistFileName+"' OPT='New'"] #---------------------------------------------------------- theApp.Dlls += [ "AthenaMonitoring"] CheckEveryNoEvents=100 # include ("LArMonTools/LArMonTools_jobOptions.py") theApp.Dlls += [ "LArMonTools"] theApp.TopAlg += ["AthenaMon/LArMon1"] LArMon1 = Algorithm( "LArMon1" ) LArMon1.CheckEveryNoEvents=CheckEveryNoEvents # include ("LArMonTools/LArFEBMon_jobOptions.py" ) include ("LArMonTools/LArRawChannelMonTool_jobOptions.py" ) include ("LArMonTools/LArRawChannelNoiseMonTool_jobOptions.py" ) # CaloMonitoring theApp.Dlls += [ "CaloMonitoring"] theApp.TopAlg += ["AthenaMon/CaloMon"] CaloMon = Algorithm("CaloMon") include ("CaloMonitoring/LArCellVecMon_jobOpt.py") include ("CaloMonitoring/LArMuIDVecMon_jobOpt.py") include ("CaloMonitoring/LArMuIDShwrMon_jobOpt.py") include ("CaloMonitoring/LArMuIDTimeMon_jobOpt.py") #-------------------------------------- #Atlantis event Display doAtlantis=False include("JiveXML/JiveXML_jobOptionBase.py") include("JiveXML/DataTypes_Calos.py") ToolSvc = Service( "ToolSvc" ) #exec 'ToolSvc.EventData2XML.FileNamePrefix = "%(dir)s/cosmic_\"' % {'dir':"/tmp/Reco-7812"} exec 'ToolSvc.EventData2XML.FileNamePrefix = "%(dir)s/cosmic_\"' % {'dir':"/tmp/CaloReco-"+str(run_number)} ToolSvc.EventData2XML.OnlineMode = True #-------------------------------------------------------------------------- #-------------------------- # Optional variables in "CaloRetriever" #------------------------- ToolSvc.CaloRetriever.CellThreshold = 50 #ToolSvc.CaloRetriever.DoLArDigit = False #ToolSvc.CaloRetriever.DoTileDigit = False #ToolSvc.CaloRetriever.RetrieveTILE = False #--------------------------- # Chrono svc #--------------------------- theApp.Dlls += [ "GaudiAud" ] theAuditorSvc = AuditorSvc() theAuditorSvc.Auditors = [ "ChronoAuditor" ] #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) #-------------------------------------------------------------- # Output level & events MessageSvc.OutputLevel = INFO #EventSelector.SkipEvents = 2600 theApp.EvtMax = EvtNo AthenaEventLoopMgr = Service("AthenaEventLoopMgr") AthenaEventLoopMgr.FailureMode=2 # AthenaEventLoopMgr.OutputLevel = WARNING #IOVDbSvc.OutputLevel = DEBUG #IOVSvc = Service("IOVSvc") #IOVSvc.OutputLevel = DEBUG MessageSvc.defaultLimit=10000000; theApp.AuditAlgorithms=True #theApp.AuditServices=True #theApp.AuditTools=True # FIXME crash on finalisation MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M" ToolSvc.LArRawDataContByteStreamTool.SubDetectorId = 66