def LArOnOffIdMappingSC(): condSequence = AthSequencer("AthCondSeq") folder="/LAR/IdentifierOfl/OnOffIdMap_SC" if hasattr(condSequence,"LArOnOffMappingAlg") and condSequence.LArOnOffMappingAlg.ReadKey==folder: return #Already there.... #for the moment SC mapping is only in MC database #and with one tag #conddb.addFolder(dbname,folder,className="AthenaAttributeList",forceMC=True) conddb.addFolder("","<db>COOLOFL_LAR/OFLP200</db>"+folder,className="AthenaAttributeList",forceMC=True) conddb.addOverride(folder,"LARIdentifierOflOnOffIdMap_SC-000") condSequence+=LArOnOffMappingAlg("LArOnOffMappingAlgSC",ReadKey=folder, WriteKey="LArOnOffIdMapSC", isSuperCell=True) return
def LArCalibIdMappingSC(): condSequence = AthSequencer("AthCondSeq") #temporarily disabled, until conditions will arrive to COOL #folder="/LAR/Identifier/CalibIdMap" #if hasattr(condSequence,"LArCalibLineMappingAlg") and condSequence.LArCalibLineMappingAlg.ReadKey==folder: # return #Already there.... #if conddb.isMC: # dbname="LAR_OFL" #else: # dbname="LAR" #conddb.addFolder(dbname,folder,className="AthenaAttributeList") # SC only in OFL database folder="/LAR/IdentifierOfl/CalibIdMap_SC" conddb.addFolder("","<db>sqlite://;schema=/afs/cern.ch/user/p/pavol/w0/public/LAr_Reco_SC_22/run/SCCalibMap.db;dbname=OFLP200</db>"+folder,className="AthenaAttributeList",forceMC=True) conddb.addOverride(folder,"LARIdentifierOflCalibIdMap_SC-000") condSequence+=LArCalibLineMappingAlg("LArCalibLineMappingAlgSC",ReadKey=folder, WriteKey="LArCalibIdMapSC",isSuperCell=True,MaxCL=16) return
import AthenaPython.ConfigLib as apcl cfg = apcl.AutoCfg(name = 'InDetRecExampleAutoConfig', input_files=athenaCommonFlags.FilesInput()) cfg.configure_job() if doReadBS: from AthenaCommon.GlobalFlags import globalflags if len(globalflags.ConditionsTag())!=0: from IOVDbSvc.CondDB import conddb conddb.setGlobalTag(globalflags.ConditionsTag()) # request TrackingGeo tag AtlasLayerMat_v18_ATLAS-GEO-16 # but there are only AtlasLayerMat_v16_ATLAS-GEO-16 # or AtlasLayerMat_v18_ATLAS-R1-2010-01 # @TODO switch to more recent data file ? conddb.addOverride('/GLOBAL/TrackingGeo/LayerMaterialV2','AtlasLayerMat_v19s0_ATLAS-R1-2010-01') #conddb.addOverride('/GLOBAL/TrackingGeo/LayerMaterialV2','AtlasLayerMat_v16_ATLAS-GEO-16') import MagFieldServices.SetupField theApp.EvtMax = 50 #-------------------------------------------------------------- # Control #-------------------------------------------------------------- # --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) OutputLevel = INFO # --- produce an atlantis data file doJiveXML = False # --- run the Virtual Point 1 event visualisation doVP1 = False # --- controls what is written out. ESD includes AOD, so it's normally enough
#conddb.addFolderWithTag("MDT_OFL","/MDT/RT","MDTRT_Sim-04",force=True,forceMC=True) conddb.blockFolder("/MDT/RTBLOB") conddb.addFolderWithTag("MDT_OFL", "/MDT/RTBLOB", "MDTRT_Sim-04-BLOB", force=True, forceMC=True) #from Guillaume conddb.blockFolder("/LAR/LArCellPositionShift") conddb.addFolderWithTag("LAR_OFL", "/LAR/LArCellPositionShift", "LArCellPositionShift-ideal", force=True, forceMC=True) conddb.addOverride("/LAR/ElecCalibOfl/Shape/RTM/4samples1phase", "LARElecCalibOflShapeRTM4samples1phase-RUN2-UPD4-00") conddb.addOverride("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples1phase", "LARElecCalibOflOFCPhysWaveRTM4samples1phase-RUN2-UPD4-00") svcMgr.PoolSvc.ReadCatalog += [ "xmlcatalog_file:" + "/cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml" ] conddb.blockFolder("/PIXEL/ReadoutSpeed") conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed", force=True) conddb.blockFolder("/TRT/Cond/DigVers") conddb.addFolderWithTag("TRT_OFL",
log = logging.getLogger('runHLT_standalone.py') # ---------------------------------------------------------------- # Number of events to be processed - for athena # ---------------------------------------------------------------- theApp.EvtMax = EvtMax if hasattr(svcMgr, "EventSelector"): svcMgr.EventSelector.SkipEvents = SkipEvents #------------------------------------------------------------- # Apply modifiers #------------------------------------------------------------- for mod in modifierList: mod.postSetup() #------------------------------------------------------------- # Conditions overrides #------------------------------------------------------------- if len(condOverride) > 0: from IOVDbSvc.CondDB import conddb for folder, tag in condOverride.iteritems(): log.warn('Overriding folder %s with tag %s' % (folder, tag)) conddb.addOverride(folder, tag) if not TriggerFlags.Online.doValidation( ): # Suppress this printout in ATN tests from AthenaCommon.JobProperties import jobproperties jobproperties.print_JobProperties('tree&value') print AlgSequence print ServiceMgr
#conddb.addOverride('/TRT/Align', 'TRTAlign_EoverP_189598_189845v0') #conddb.addOverride('/TRT/Calib/DX','TRTCalibDX_EoverP_189598_189845v0') #conddb.addOverride('/Indet/Align', 'InDetAlign_EoverP_190608_191239v0') #conddb.addOverride('/TRT/Align', 'TRTAlign_EoverP_190608_191239v0') #conddb.addOverride('/TRT/Calib/DX','TRTCalibDX_EoverP_189598_189845v0') #conddb.addOverride('/Indet/Align', 'InDetAlign_Nominal_RDeltaPhi_01') #conddb.addOverride('/TRT/Align', 'TRTAlign_Nominal_RDeltaPhi_01') #conddb.addOverride('/TRT/Calib/DX','TRTCalibDX_nominal') #conddb.addOverride('/Indet/Align', 'InDetAlign_Nominal_ZDeltaPhi_01') #conddb.addOverride('/TRT/Align', 'TRTAlign_Nominal_ZDeltaPhi_01') #conddb.addOverride('/TRT/Calib/DX','TRTCalibDX_nominal') conddb.addOverride('/Indet/TrkErrorScaling', 'IndetTrkErrorScaling_nominal') if not conddb.folderRequested('PIXEL/PixReco'): conddb.addFolder('PIXEL_OFL', '/PIXEL/PixReco') #if readPool : # conddb.blockFolder("/Indet/Align") # conddb.blockFolder("/TRT/Align") # from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import CondProxyProvider # from AthenaCommon.AppMgr import ServiceMgr # ServiceMgr += CondProxyProvider() # ServiceMgr.ProxyProviderSvc.ProviderNames += [ "CondProxyProvider" ] # # set this to the file containing AlignableTransform objects # ServiceMgr.CondProxyProvider.InputCollections += inputCollections # ServiceMgr.CondProxyProvider.OutputLevel=DEBUG # print ServiceMgr.CondProxyProvider
ServiceMgr += getConfigurable(jobproperties.Digitization.rndmSvc.get_Value())() jobproperties.Digitization.rndmSeedList.addtoService() jobproperties.Digitization.rndmSeedList.printSeeds() #================================================================ print "overlay_trf: final outStream = ", outStream #================================================================ # Logging #-------------------------------------------------------------- #ServiceMgr.MessageSvc.OutputLevel = INFO ServiceMgr.MessageSvc.OutputLevel = INFO ServiceMgr.MessageSvc.Format = "% F%45W%S%7W%R%T %0W%M" conddb.addFolder("LAR", "/LAR/ElecCalib/fSampl/Symmetry") conddb.addOverride("/LAR/ElecCalib/fSampl/Symmetry", runArgs.fSampltag + runArgs.samplingFractionDbTag) #if DetFlags.overlay.Signal_on(): # InputDBConnection = "COOLOFL_LAR/COMP200" # conddb.addFolder("","/LAR/ElecCalibOfl/AutoCorrs/AutoCorr"+"<dbConnection>"+InputDBConnection+"</dbConnection>") # conddb.addOverride("/LAR/ElecCalibOfl/AutoCorrs/AutoCorr","") ServiceMgr.TileInfoLoader.filenameDeltaPhysicsSuffix = "of2_Delta_Phys_7Samples" # Post-include if hasattr(runArgs, "postInclude"): for fragment in runArgs.postInclude: include(fragment) if hasattr(runArgs, "postExec") and runArgs.postExec != 'NONE': exec(runArgs.postExec)
if SuperCells: conddb.addFolder( "", "<dbConnection>" + InputDB + "</dbConnection>/LAR/ElecCalibOflSC/AutoCorrs/AutoCorr<key>LArAutoCorrRef</key>" ) conddb.addOverride("/LAR/ElecCalibOflSC/AutoCorrs/AutoCorr", "LARElecCalibOflSCAutoCorrsAutoCorr-UPD3-00") #load fsampl, MinBias Average and PulseShape 32 samples from OFLP200 from IOVDbSvc.CondDB import conddb if not SuperCells: conddb.addFolder("LAR_OFL", "/LAR/ElecCalibMC/Shape", forceMC=True) conddb.addFolder("LAR_OFL", "/LAR/ElecCalibMC/MinBias", forceMC=True) conddb.addFolder("LAR_OFL", "/LAR/ElecCalibMC/fSampl", forceMC=True) #conddb.addOverride("/LAR/ElecCalibMC/fSampl","LARElecCalibMCfSampl-G496-19213-FTFP_BERT_BIRK") conddb.addOverride("/LAR/ElecCalibMC/fSampl", "LARElecCalibMCfSampl-G4101-20371-FTFP_BERT_BIRK_v2") conddb.addOverride("/LAR/ElecCalibMC/Shape", "LARElecCalibMCShape-Apr2010") #conddb.addOverride("/LAR/ElecCalibMC/MinBias","LARElecCalibMCMinBias-mc15-s2081") conddb.addOverride( "/LAR/ElecCalibMC/MinBias", "LARElecCalibMCMinBias-mc16-ofc25mc15mu20-25ns-A3MinBias_1") if SuperCells: # Will for now use a local db for SC coefficients InputDBLocalCalib = "sqlite://;schema=localCalibConstants.db;dbname=CONDBR2" printfunc("LAr conf flags FEB gain threshold") printfunc(larCondFlags.useLArFEBGainThresholds()) conddb.addFolder( "", "<dbConnection>" + InputDB + "</dbConnection>/LAR/ElecCalibOflSC/Pedestals/Pedestal")
if globalflags.InputFormat() == 'pool': import AthenaPoolCnvSvc.ReadAthenaPool ServiceMgr.EventSelector.InputCollections = collection include("PixelConditionsServices/PixelByteStreamErrorsSvc_jobOptions.py" ) ## why ? elif globalflags.InputFormat() == 'bytestream': include("ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py") include("InDetRecExample/InDetReadBS_jobOptions.py") ServiceMgr.ByteStreamInputSvc.FullFileName = collection #------------------------------------------ # Offline Condition #------------------------------------------ from IOVDbSvc.CondDB import conddb conddb.addOverride("/PIXEL/NoiseMapLong", "PixNoiseMapLong-RUN2-DATA-UPD4-03") conddb.addOverride("/PIXEL/NoiseMapShort", "PixNoiseMapShort-RUN2-DATA-UPD4-03") conddb.addOverride("/PIXEL/PixMapLong", "PixMapLong-RUN2-DATA-UPD1-02") conddb.addOverride("/PIXEL/PixMapShort", "PixMapShort-RUN2-DATA-UPD1-02") if globalflags.InputFormat() == 'bytestream': if len(globalflags.ConditionsTag()) != 0: conddb.setGlobalTag(globalflags.ConditionsTag()) #conddb.setGlobalTag('CONDBR2-BLKPA-2014-03') # [SGS] shy different from globalflags.conditionsTag ???? include("PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py") if not 'doValidate' in dir(): doValidate = False
readPool = True inputCollections = loadInDetRec_Options["inputPoolFiles"] else: readPool = False from IOVDbSvc.CondDB import conddb #conddb.addOverride('/Indet/Align', 'InDetAlign_EoverPv2.3_2011_E') #conddb.addOverride('/TRT/Align', 'TRTAlign_EoverPv2_2011_E') #conddb.addOverride('/TRT/Calib/DX','TRTCalibDX_EoverPv3.1_2011_E') from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('PIXEL/PixReco'): conddb.addFolder('PIXEL_OFL', '/PIXEL/PixReco') if len(loadInDetRec_Options["beamSpotTag"]) > 0: conddb.addOverride('/Indet/Beampos', loadInDetRec_Options["beamSpotTag"]) if readPool: conddb.blockFolder("/Indet/Align") conddb.blockFolder("/TRT/Align") #conddb.blockFolder("/TRT/Calib/DX") from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import CondProxyProvider from AthenaCommon.AppMgr import ServiceMgr ServiceMgr += CondProxyProvider() ServiceMgr.ProxyProviderSvc.ProviderNames += ["CondProxyProvider"] # set this to the file containing AlignableTransform objects ServiceMgr.CondProxyProvider.InputCollections += inputCollections ServiceMgr.CondProxyProvider.OutputLevel = DEBUG print ServiceMgr.CondProxyProvider # this preload causes callbacks for read in objects to be activated, # allowing GeoModel to pick up the transforms
ForcedUse=False, doCalStreamInit=True) #svcMgr.MuonMDT_CablingSvc.doCalStreamInit=True print 'skeleton: setting doCalStreamInit true' include("MuonRecExample/MuonRDO_to_PRD_jobOptions.py") # to alter DB options #overwriting the tag if dbT0Tag != 'DEFAULT': if dbT0Sql != 'DEFAULT': conddb.blockFolder("/MDT/T0BLOB") conddb.addFolder(dbT0Sql, "/MDT/T0BLOB <tag>" + dbT0Tag + "</tag>", True) else: conddb.addOverride("/MDT/T0BLOB", dbT0Tag) if dbRTTag != 'DEFAULT': if dbRTSql != 'DEFAULT': conddb.blockFolder("/MDT/RTBLOB") conddb.addFolder(dbRTSql, "/MDT/RTBLOB <tag>" + dbRTTag + "</tag>", True) else: conddb.addOverride("/MDT/RTBLOB", dbRTTag) include("MuonCalibStreamCnvSvc/MuonCalibStream_jobOptions.py") theApp.EvtMax = EvtMax ##### SET VIA COMMAND LINE IN THE TRF EventSelectorMuonCalibStream.SkipEvents = SkipEvents ##### SET VIA COMMAND LINE IN THE TRF svcMgr.MuonCalibStreamDataProviderSvc.RunNumber = RunNumber ##### SET VIA COMMAND LINE IN THE TRF svcMgr.MuonCalibStreamFileInputSvc.InputFiles = InputFiles ##### SET VIA COMMAND LINE IN THE TRF svcMgr.MuonCalibStreamDataProviderSvc.LumiBlockNumberFromCool = lumiBlockNumberFromCool
if (writeNewFolder): print "Setting up for new folder" cscCondDB.SetupForNewFolder() #Adding Folders if ('ped' in parsToWrite): cscCondDB.addPedFolders() if ('rms' in parsToWrite): cscCondDB.addRmsFolder() if ('f001' in parsToWrite): cscCondDB.addF001Folder() if ('pslope' in parsToWrite): cscCondDB.addPSlopeFolder() if ('status' in parsToWrite): cscCondDB.addStatusFolder() if ('t0base' in parsToWrite): cscCondDB.addT0BaseFolder() if ('t0phase' in parsToWrite): cscCondDB.addT0PhaseFolder() if (overrideCscTag != ""): conddb.addOverride("/CSC", overrideCscTag) #You can override tags for readign like this: #conddb.addOverride("/CSC/STAT","CscStat-comm-002-00") #ServiceMgr.MessageSvc.OutputLevel = DEBUG ServiceMgr.MessageSvc.debugLimit = 0 #ServiceMgr.CscCoolStrSvc.OutputLevel = VERBOSE
else: outputDPDname = "BeamspotDPD.pool.root" if hasattr(runArgs, "maxEvents"): athenaCommonFlags.EvtMax.set_Value_and_Lock(runArgs.maxEvents) EvtMax = runArgs.maxEvents if hasattr(runArgs, "conditionsTag"): if len(runArgs.conditionsTag) > 0: globalflags.ConditionsTag.set_Value_and_Lock(runArgs.conditionsTag) ConditionsTag = runArgs.conditionsTag if hasattr(runArgs, "indetTrkErrScTag"): if len(runArgs.indetTrkErrScTag) > 0: from IOVDbSvc.CondDB import conddb conddb.addOverride("/Indet/TrkErrorScaling", runArgs.indetTrkErrScTag) from RecExConfig.InputFilePeeker import inputFileSummary print inputFileSummary #if 'metadata' in inputFileSummary: # if '/EXT/DCS/MAGNETS/SENSORDATA' in inputFileSummary['metadata']: # for i in inputFileSummary['metadata']['/EXT/DCS/MAGNETS/SENSORDATA']: # print i['value'] if 'beam_energy' in inputFileSummary: print "JW Beam", inputFileSummary['beam_energy'] else: print "JW Beam: None" if 'beam_type' in inputFileSummary: print "JW Type: ", inputFileSummary['beam_type'] else:
""" Post include for BeamSpot to override various flags """ #from IOVDbSvc.CondDB import conddb #conddb.addOverride("/Indet/Align", "InDetAlign_Collision_Robust_2009_04" ) if BeamSpotFlags.setIndetAlignTag(): if BeamSpotFlags.setIndetAlignTag() != "NONE": print "Set IndetAlignTag to:", BeamSpotFlags.setIndetAlignTag() from IOVDbSvc.CondDB import conddb conddb.addOverride("/Indet/Align", BeamSpotFlags.setIndetAlignTag()) if BeamSpotFlags.setTRTAlignTag(): if BeamSpotFlags.setTRTAlignTag() != "NONE": print "Set TRTAlignTag to:", BeamSpotFlags.setTRTAlignTag() from IOVDbSvc.CondDB import conddb conddb.addOverride("/TRT/Align", BeamSpotFlags.setTRTAlignTag()) if BeamSpotFlags.setTrkErrorScalingTag(): if BeamSpotFlags.setTrkErrorScalingTag() != "NONE": print "Set TrkErrorScalingTag to:", BeamSpotFlags.setTrkErrorScalingTag( ) from IOVDbSvc.CondDB import conddb conddb.addOverride("/Indet/TrkErrorScaling", BeamSpotFlags.setTrkErrorScalingTag()) if BeamSpotFlags.setBeamposTag(): if BeamSpotFlags.setBeamposTag() != "NONE": print "Set BeamposTag to:", BeamSpotFlags.setBeamposTag() from IOVDbSvc.CondDB import conddb conddb.addOverride("/Indet/Beampos", BeamSpotFlags.setBeamposTag())
conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/MDT/ENDCAP/SIDEC', '/MUONALIGN/MDT/ENDCAP/SIDEC', className='CondAttrListCollection') conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/TGC/SIDEA', '/MUONALIGN/TGC/SIDEA', className='CondAttrListCollection') conddb.addFolderSplitOnline('MUONALIGN', '/MUONALIGN/Onl/TGC/SIDEC', '/MUONALIGN/TGC/SIDEC', className='CondAttrListCollection') #conddb.addOverride('/MUONALIGN/TGC/SIDEA','MuonAlignTGCEndCapAAlign-TEST-01',className='CondAttrListCollection') #conddb.addOverride('/MUONALIGN/TGC/SIDEC','MuonAlignTGCEndCapCAlign-TEST-01',className='CondAttrListCollection') conddb.addOverride('/MUONALIGN/TGC/SIDEA', 'MuonAlignTGCEndCapAAlign-REPRO-2010-03', className='CondAttrListCollection') conddb.addOverride('/MUONALIGN/TGC/SIDEC', 'MuonAlignTGCEndCapCAlign-REPRO-2010-03', className='CondAttrListCollection') from AthenaCommon.AlgSequence import AthSequencer condSequence = AthSequencer("AthCondSeq") from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg condSequence += MuonAlignmentCondAlg('MuonAlignmentCondAlg') MuonAlignmentCondAlg.ParlineFolders = [ "/MUONALIGN/MDT/BARREL", "/MUONALIGN/MDT/ENDCAP/SIDEA", "/MUONALIGN/MDT/ENDCAP/SIDEC", "/MUONALIGN/TGC/SIDEA", "/MUONALIGN/TGC/SIDEC" ] MuonAlignmentCondAlg.DumpALines = True
from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import CondProxyProvider from AthenaCommon.AppMgr import ServiceMgr ServiceMgr += CondProxyProvider() ServiceMgr.ProxyProviderSvc.ProviderNames += ["CondProxyProvider"] printfunc('Loading initial alignment File') ServiceMgr.CondProxyProvider.InputCollections = [ loadInDetRec_Options["siPoolFile"] ] ServiceMgr.CondProxyProvider.OutputLevel = INFO printfunc(ServiceMgr.CondProxyProvider) IOVSvc = Service("IOVSvc") IOVSvc.preLoadData = True else: if loadInDetRec_Options["siAlignmentTag"]: conddb.addOverride('/Indet/Align', loadInDetRec_Options["siAlignmentTag"]) if loadInDetRec_Options["trtAlignmentTag"]: conddb.addOverride('/TRT/Align', loadInDetRec_Options["trtAlignmentTag"]) if loadInDetRec_Options["trtAlignmentTagL3"]: conddb.addOverride('/TRT/Calib/DX', loadInDetRec_Options["trtAlignmentTagL3"]) if loadInDetRec_Options["errorScalingTag"]: if ".db" in loadInDetRec_Options["errorScalingTag"]: conddb.blockFolder("/Indet/TrkErrorScaling") conddb.addFolder( "", "<dbConnection>sqlite://;schema=" + loadInDetRec_Options["errorScalingTag"] + ";dbname=OFLP200</dbConnection> /Indet/TrkErrorScaling" +
from IOVDbSvc.CondDB import conddb from AthenaCommon.DetFlags import DetFlags from RecExConfig.RecAlgsFlags import recAlgs ######################################## #use MC MDT RT functions #conddb.blockFolder("/MDT/RT") #conddb.addFolderWithTag("MDT_OFL","/MDT/RT","MDTRT_Sim-04",force=True,forceMC=True) #conddb.blockFolder("/MDT/RTBLOB") #conddb.addFolderWithTag("MDT_OFL","/MDT/RTBLOB","MDTRT_Sim-04-BLOB",force=True,forceMC=True) #from Guillaume conddb.addOverride("/LAR/ElecCalibOfl/Shape/RTM/5samples1phase", "LARElecCalibOflShapeRTM5samples1phase-UPD1-04") conddb.blockFolder("/PIXEL/ReadoutSpeed") conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed", force=True) conddb.blockFolder("/TRT/Cond/DigVers") conddb.addFolderWithTag("TRT_OFL", "/TRT/Cond/DigVers", "TRTCondDigVers-Collisions-01", force=True, forceMC=True) ################################################### printfunc("RT OVERRIDE, for CONDBR2-BLKPA-2015-12") #See https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=CONDBR2-BLKPA-2015-15#INDET
DetFlags.ID_setOff( ) #speeds up and prevents problems in commissioning database DetFlags.Calo_setOff() include("RecExCond/AllDet_detDescr.py") #Set up IOVDbService #Pick a database tag. Should correspond with DetDescrVersion. See AtlasGeomDBTags page on twiki conddb.setGlobalTag('COMCOND-ES1C-003-00') Service("IOVDbSvc").forceRunNumber = runNumber Service("IOVDbSvc").forceLumiblockNumber = 1 from MuonCondSvc.CscCondDB import cscCondDB #Read from local file. Must use before "addPedFolders" cscCondDB.addPSlopeFolder() if ('pslopeTag' in dir()): print "Will override pusler slope to " + pslopeTag conddb.addOverride('/CSC/PSLOPE', pslopeTag) #-------------------------------------------------------------- # Set output level threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) #-------------------------------------------------------------- #import AthenaPoolCnvSvc.ReadAthenaPool #ServiceMgr.MessageSvc.OutputLevel = VERBOSE #ServiceMgr.MessageSvc.verboseLimit = 20000 #ServiceMgr.MessageSvc.debugLimit = 0 #IOVDbSvc = Service( "IOVDbSvc" ) #IOVDbSvc.OutputLevel = 2 #ServiceMgr.EventSelector.RunNumber = 0 #ServiceMgr.EventSelector.FirstEvent = 0
## == == # The following options are the defaults for configuring InnerDetector reconstruction. # They may be changed by uncommenting the lines and specifying the appropriate input. # ======================================== # ID Reconstruction Options # ========================== detectorDescription = "ATLAS-IBL3D25-04-00-01" realData = False #globalTag = "OFLCOND-MC12-IBL-20-30-25" globalTag = "OFLCOND-SDR-BS14T-IBL-CORR-06-02" from IOVDbSvc.CondDB import conddb conddb.addOverride('/GLOBAL/TrackingGeo/LayerMaterial', 'AtlasLayerMat_v15_ATLAS-IBL3D25-04-00-01') #doTrkNtuple = False #doMonitoring = True #siPoolFile = "" siAlignmentTag = "InDetAlign_R2_Nominal" #errorScalingTag = "" #TRTCalibTextFile = "" numberOfEvents = 10 import glob inputFiles = glob.glob( '/afs/cern.ch/work/m/mrudolph/public/singleMuon_minus_DBM_digits.pool.root' ) printfunc(inputFiles) # Run collision reconstruction
# the other misses. # # It is recommended to run GeometryCheck while developing the geometry # as it will find most of the overlaps and to run the recursive_test # before using the geometry in production as an extra check. # #----------------------------------------------------------------------------------------------------------------------- doFastCheck = True from AthenaCommon.GlobalFlags import globalflags globalflags.ConditionsTag = "OFLCOND-SDR-BS14T-ATLAS-00" from IOVDbSvc.CondDB import conddb conddb.addOverride('/GLOBAL/BField/Map','BFieldMap-GEO-06-00-00') from AthenaCommon.DetFlags import DetFlags DetFlags.ID_setOn() DetFlags.TRT_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.simulate.Truth_setOn() from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.PoolHitsOutput="singleMuon_test_slhc_Hits.pool.root" athenaCommonFlags.EvtMax=1 from G4AtlasApps.SimFlags import simFlags simFlags.load_atlas_flags() simFlags.SimLayout='ATLAS-SLHC-01-00-00_VALIDATION'
#job.PixelDigitization.SimulateBow = 0 #job.PixelDigitization.DistoFilename = "PixelSurveyDistorsions.txt" #job.PixelDigitization.DistoTag = "Datafile" print job.PixelDigitization else: logger.warning("PixelDigitization configurable not found in AlgSequence() - assuming oldstyle setup is used.") # # Suppress usage of pixel distortions when validating simulation # (otherwise clusters are corrected for module bow while G4 is not) # from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('/Indet/PixelDist'): conddb.addFolder('PIXEL_OFL','/Indet/PixelDist',className="DetCondCFloat") conddb.addOverride("/Indet/PixelDist","InDetPixelDist-nominal",className="DetCondCFloat") # ################################################################### # Change the following lines if need to change PixReco COOL tag # ################################################################### # # # Using a tag already available in COOL # #if not conddb.folderRequested('PIXEL/PixReco'): # conddb.addFolder('PIXEL_OFL','/PIXEL/PixReco') #conddb.addOverride("/PIXEL/PixReco","PixelOfflineReco-7TeV-04") # #
jobproperties.PerfMonFlags.doMallocMonitoring = True jobproperties.PerfMonFlags.doPostProcessing = True #-------------------------------------------------------------- # AthenaCommon configuration #-------------------------------------------------------------- from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.SkipEvents = 0 athenaCommonFlags.EvtMax = -1 athenaCommonFlags.PoolHitsInput = ["Hits.pool.root"] athenaCommonFlags.PoolRDOOutput = "DigitizationOutput.pool.root" # the magnetic field from MagFieldServices import SetupField from IOVDbSvc.CondDB import conddb conddb.addOverride('/GLOBAL/BField/Map', 'BFieldMap-FullAsym-09-solTil') from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags TrkDetFlags.MaterialSource = 'Input' #-------------------------------------------------------------- # Digitiziation and Pileup configuration #-------------------------------------------------------------- from Digitization.DigitizationFlags import digitizationFlags digitizationFlags.IOVDbGlobalTag = 'OFLCOND-SIM-00-00-00' #-------------------------------------------------------------- # Global flags. Like eg the DD version: #-------------------------------------------------------------- from AthenaCommon.GlobalFlags import globalflags #globalflags.DetDescrVersion='ATLAS-GEO-20-00-01'
#job.PixelDigitization.DistoTag = "Datafile" print job.PixelDigitization else: logger.warning( "PixelDigitization configurable not found in AlgSequence() - assuming oldstyle setup is used." ) # # Suppress usage of pixel distortions when validating simulation # (otherwise clusters are corrected for module bow while G4 is not) # from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('/Indet/PixelDist'): conddb.addFolder('PIXEL_OFL', '/Indet/PixelDist') conddb.addOverride("/Indet/PixelDist", "InDetPixelDist-nominal") # ################################################################### # Change the following lines if need to change PixReco COOL tag # ################################################################### # # # Using a tag already available in COOL # #if not conddb.folderRequested('PIXEL/PixReco'): # conddb.addFolder('PIXEL_OFL','/PIXEL/PixReco') #conddb.addOverride("/PIXEL/PixReco","PixelOfflineReco-7TeV-04") # # # Using an sqlite file #
from LumiBlockComps.LuminosityToolDefault import LuminosityToolOnline, LuminosityToolDefault theLumiTool = LuminosityToolOnline() from IOVDbSvc.CondDB import conddb conddb.addFolder('TRIGGER', '/TRIGGER/LUMI/LBLB') theLumiTool.LBLBFolderName = "/TRIGGER/LUMI/LBLB" from AthenaCommon.AppMgr import ToolSvc ToolSvc += theLumiTool include("InDetRecExample/InDetRec_all.py") from TRT_Monitoring.TRT_MonitoringConf import TRT_Monitoring_Tool #TRT_Monitoring_Tool.m_useConditionsHTStatus = True #TRT_Monitoring_Tool.m_useArgonStraws = True TRT_Monitoring_Tool.doArgonXenonSeperation = True TRT_Monitoring_Tool.useHoleFinder = True #care from IOVDbSvc.CondDB import conddb conddb.addOverride("/TRT/Cond/StatusHT", "TrtStrawStatusHT-ArTest-00-00") theApp.EvtMax = 10 if not doReadBS: ServiceMgr.PoolSvc.AttemptCatalogPatch = True ServiceMgr.EventSelector.InputCollections = [ "/afs/cern.ch/atlas/maxidisk/d158/CSC.005200.T1_McAtNlo_Jimmy.RDO.pool.root" ] if doReadBS: # ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/e/eyazici/rawdata/data12_8TeV.00205010.physics_ZeroBiasOverlay.merge.RAW/data12_8TeV.00205010.physics_ZeroBiasOverlay.merge.RAW._lb0137._SFO-ALL._0001.1"] #AB ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/e/eyazici/rawdata/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW._lb0423._SFO-ALL._0001.1"] #ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/work/e/ecelebi/public/data11_7TeV.00179710.physics_ZeroBias.merge.RAW" ] ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/e/eyazici/public/data12_8TeV.00201113.physics_ZeroBiasOverlay.merge.RAW._lb0423._SFO-ALL._0001.1" ] # ServiceMgr.ByteStreamInputSvc.FullFileName = [ "/tmp/rjungst/testinput"]
if ReadAlignmentConstants: conddb.blockFolder("/Indet/Align") conddb.blockFolder("/TRT/Align") from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import CondProxyProvider from AthenaCommon.AppMgr import ServiceMgr ServiceMgr += CondProxyProvider() ServiceMgr.ProxyProviderSvc.ProviderNames += ["CondProxyProvider"] print 'Loading initial alignment File', inputfilename ServiceMgr.CondProxyProvider.InputCollections = [inputfilename] ServiceMgr.PoolSvc.AttemptCatalogPatch = True ServiceMgr.CondProxyProvider.OutputLevel = INFO print ServiceMgr.CondProxyProvider ServiceMgr.IOVSvc.preLoadData = True else: conddb.addOverride("/Indet/Align", "InDet_Cosmic_2008_05_03") conddb.addOverride("/TRT/Align", "TRT_Cosmic_2008_10_03") from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from AthenaCommon.AppMgr import ToolSvc #------------------------------------------------ # Alignment tools #------------------------------------------------ from InDetAlignGenTools.InDetAlignGenToolsConf import InDetAlignDBTool ToolSvc += InDetAlignDBTool() from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_AlignDbSvc ServiceMgr += TRT_AlignDbSvc()
if len(loadInDetRec_Options["detectorDescription"]) != 0: #from AthenaCommon.GlobalFlags import globalflags globalflags.DetDescrVersion.set_Value_and_Lock( loadInDetRec_Options["detectorDescription"]) if len(globalflags.ConditionsTag()) != 0: from IOVDbSvc.CondDB import conddb conddb.setGlobalTag(globalflags.ConditionsTag()) printfunc("INFO:: JobProperties Printing ") globalflags.print_JobProperties() if loadInDetRec_Options["preIBLgeometry"] == False: from IOVDbSvc.CondDB import conddb #conddb.addOverride('/GLOBAL/TrackingGeo/LayerMaterial','AtlasLayerMat_v15_ATLAS-IBL3D25-04-00-01') conddb.addOverride('/GLOBAL/TrackingGeo/LayerMaterialV2', 'AtlasLayerMat_v18_ATLAS-R2-2015-01') if doReadBS: #ByteStreamInputSvc this is needed for 2014 cosmic ray data from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageInputSvc ByteStreamInputSvc = ByteStreamEventStorageInputSvc( "ByteStreamInputSvc", FullFileName=["RawEvent.re"]) ServiceMgr += ByteStreamInputSvc printfunc(ByteStreamInputSvc) from AthenaCommon.GlobalFlags import globalflags if len(globalflags.ConditionsTag()) != 0: from IOVDbSvc.CondDB import conddb conddb.setGlobalTag(globalflags.ConditionsTag()) if loadInDetRec_Options["Cosmics"]:
# switch off ID, calo, or muons DetFlags.ID_setOn() #DetFlags.Calo_setOn() DetFlags.Calo_setOff() DetFlags.Muon_setOn() #DetFlags.Tile_setOff() #DetFlags.makeRIO.Calo_setOff() #DetFlags.detdescr.Calo_setOn() from IOVDbSvc.CondDB import conddb #inputCollections = ["/afs/cern.ch/user/s/sthenkel/work/Performance/Alignment/WORK_ATHENA/20.1.X-VAL_WeakMode/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/Iter1_AlignmentConstants.root"] inputCollections = ["./Iter1_AlignmentConstants.root"] readPool = True conddb.addOverride('/Indet/Align', 'InDetAlign-RUN2-25NS') conddb.addOverride('/TRT/Align', 'TRTAlign-RUN2-25NS') if readPool: conddb.blockFolder("/Indet/Align") conddb.blockFolder("/TRT/Align") from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import CondProxyProvider from AthenaCommon.AppMgr import ServiceMgr ServiceMgr += CondProxyProvider() ServiceMgr.ProxyProviderSvc.ProviderNames += ["CondProxyProvider"] # set this to the file containing AlignableTransform objects ServiceMgr.CondProxyProvider.InputCollections += inputCollections ServiceMgr.CondProxyProvider.OutputLevel = DEBUG print ServiceMgr.CondProxyProvider # this preload causes callbacks for read in objects to be activated, # allowing GeoModel to pick up the transforms
jobproperties.Beam.beamType = 'collisions' # 'cosmics' # 'singlebeam' # if globalflags.DataSource != 'geant4': DoTruth = False else: globalflags.ConditionsTag = 'OFLCOND-DR-BS900-ANom-03' globalflags.print_JobProperties() ## Configure conditions if len(globalflags.ConditionsTag()) != 0: from IOVDbSvc.CondDB import conddb conddb.setGlobalTag(globalflags.ConditionsTag()) ## Configure Pixel conditions from IOVDbSvc.CondDB import conddb conddb.addOverride('/PIXEL/PixMapOverlay', 'PixMapOverlay-Coll09-75-00') ## Beam properties import AthenaCommon.SystemOfUnits as Units jobproperties.Beam.numberOfCollisions = 2.0 # default in RecExCommon for 900 GeV jobproperties.Beam.energy = 450. * Units.GeV jobproperties.Beam.beamType = 'collisions' ## Solenoid state from AthenaCommon.BFieldFlags import jobproperties jobproperties.BField.solenoidOn = True ## Load Tracking Tools include("TrackD3PDMaker/RecoOptions.py") ## Configure Trigger reading
###ToolSvc.InDetDetailedTrackSelectorTool.nHitSct = 4 ###ToolSvc.InDetDetailedTrackSelectorTool.nHitSi = 0 #ToolSvc.InDetDetailedTrackSelectorTool.nHitTrt = 10 #ToolSvc.InDetDetailedTrackSelectorTool.nHitTrt = 0 ###ToolSvc.InDetDetailedTrackSelectorTool.pTMin = 0.* Units.MeV #ToolSvc.InDetDetailedTrackSelectorTool.useTrackQualityInfo = False #ToolSvc.InDetDetailedTrackSelectorTool.IPd0Max = 5 #ToolSvc.InDetDetailedTrackSelectorTool.sigIPd0Max = 5.0 #ToolSvc.InDetDetailedTrackSelectorTool.d0significanceMax = -1 #ToolSvc.InDetDetailedTrackSelectorTool.sigIPz0Max = 10.0 from IOVDbSvc.CondDB import conddb if hasattr(runArgs, "indetAlignTag"): if len(runArgs.indetAlignTag) > 0: conddb.addOverride("/Indet/Align", runArgs.indetAlignTag) #InDet_Collision_2009_02 if hasattr(runArgs, "trtAlignTag"): if len(runArgs.trtAlignTag) > 0: conddb.addOverride("/TRT/Align", runArgs.trtAlignTag) #TRT_Collision_2009_01 if hasattr(runArgs, "indetTrkErrScTag"): if len(runArgs.indetTrkErrScTag) > 0: conddb.addOverride("/Indet/TrkErrorScaling", runArgs.indetTrkErrScTag) if hasattr(runArgs, "beamposTag"): if len(runArgs.beamposTag) > 0: conddb.addOverride("Indet/Beampos", runArgs.beamposTag) # globalflags.print_JobProperties() #include the fragment that makes the dpd files include("InDetBeamSpotFinder/DPD_BeamSpotFragment.py")
UseOldCabling=True, ForcedUse=False, doCalStreamInit=True) include("MuonRecExample/MuonRDO_to_PRD_jobOptions.py") # Options to select tag for T0/RT or to read from SQLite files. # If reading from SQLite, you must specify the tag used in the SQLite file if runArgs.dbT0Tag != 'DEFAULT': if runArgs.dbT0Sql != 'DEFAULT': conddb.blockFolder("/MDT/T0BLOB") conddb.addFolder(runArgs.dbT0Sql, "/MDT/T0BLOB <tag>" + runArgs.dbT0Tag + "</tag>", True) else: conddb.addOverride("/MDT/T0BLOB", runArgs.dbT0Tag) if runArgs.dbRTTag != 'DEFAULT': if runArgs.dbRTSql != 'DEFAULT': conddb.blockFolder("/MDT/RTBLOB") conddb.addFolder(runArgs.dbRTSql, "/MDT/RTBLOB <tag>" + runArgs.dbRTTag + "</tag>", True) else: conddb.addOverride("/MDT/RTBLOB", runArgs.dbRTTag) # This code disables the ordinary Athena event loop and installs the calibstream event loop include("MuonCalibStreamCnvSvc/MuonCalibStream_jobOptions.py") theApp.EvtMax = runArgs.Events EventSelectorMuonCalibStream.SkipEvents = runArgs.Skip svcMgr.MuonCalibStreamDataProviderSvc.RunNumber = runArgs.runNumber