Skip to content
Snippets Groups Projects
Commit 2b68e583 authored by Thomas Strebler's avatar Thomas Strebler Committed by Melissa Yexley
Browse files

Clean up legacy DataQualityTools configs

parent 04b193fd
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( DataQualityTools )
......@@ -15,5 +15,3 @@ atlas_add_component( DataQualityTools
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
#**************************************************************
# jopOptions file for Combined Monitoring in Athena
#**************************************************************
#Make m_trigDecTool available:
TrigDecisionTool= monTrigDecTool if DQMonFlags.useTrigger() else "",
# Global monitoring checks to make sure all triggers are firing. The following triggers
# are monitored. Triggers are listed here:
# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/ExpressStream#Physics_pp_v2_menu_collisions
listOfTriggers = ['EF_g20_loose', 'EF_tauNoCut', 'EF_mu15', 'EF_2mu4_Upsimumu',
'EF_2mu10_loose', 'EF_tauNoCut_L1TAU50', 'EF_2e12_medium', 'EF_mu4_L1J10_matched',
'EF_tau16_IDTrkNoCut', 'EF_2mu4_Jpsimumu_IDTrkNoCut', 'EF_e20_medium_IDTrkNoCut',
'EF_L1J10_firstempty_NoAlg', 'EF_L1J30_firstempty_NoAlg', 'EF_rd0_filled_NoAlg',
'EF_rd0_empty_NoAlg', 'EF_tauNoCut_cosmic', 'EF_j240_a4tc_EFFS', 'EF_fj30_a4tc_EFFS',
'EF_tau50_IDTrkNoCut', 'EF_xe20_noMu', 'EF_mbMbts_1_eff', 'EF_2e5_tight', 'EF_2mu10',
'EF_b10_IDTrkNoCut', 'EF_mu15_mu10_EFFS', 'EF_j30_a4tc_EFFS', 'EF_mu20_IDTrkNoCut',
'EF_InDetMon_FS', 'EF_2mu13_Zmumu_IDTrkNoCut', 'EF_mu20_muCombTag_NoEF']
# Import AlgSequence
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
isOnline=False
isOffline=True
if athenaCommonFlags.isOnline==True:
isOnline=True
isOffline=False
from RecExConfig.RecFlags import rec
if rec.doHeavyIon():
JetCollectionKey='AntiKt4HIJets'
else:
JetCollectionKey='AntiKt4EMTopoJets'
# add isolation variables for IsolationSelection
if DQMonFlags.monManEnvironment() == 'tier0ESD' or DQMonFlags.monManEnvironment() == 'tier0':
if not hasattr(topSequence,"IsolationBuilderNonprompt_All_MaxWeight1000"):
from IsolationAlgs.IsoUpdatedTrackCones import GetUpdatedIsoTrackCones
from TrackVertexAssociationTool.getTTVAToolForReco import getTTVAToolForReco
WP='Nonprompt_All_MaxWeight'
topSequence += GetUpdatedIsoTrackCones(TTVATool=getTTVAToolForReco(WP,WorkingPoint=WP))
from AthenaCommon.JobProperties import jobproperties
if not 'InDetKeys' in dir():
from InDetRecExample.InDetKeys import InDetKeys
IDTrkContNames = [ InDetKeys.Tracks() ]
isCosmics=False
isBeam=True
if jobproperties.Beam.beamType()=='cosmics':
isCosmics=True
isBeam=False
if DQMonFlags.doDataFlowMon():
from DataQualityTools.DQTDataFlowMonAlg import DQTDataFlowMonAlgConfigOld
topSequence += DQTDataFlowMonAlgConfigOld(DQMonFlags)
if DQMonFlags.doGlobalMon():
if DQMonFlags.monManEnvironment != 'tier0ESD':
# Import Det Synch tool
if DQMonFlags.monManEnvironment in ('tier0Raw', 'tier0') and globalflags.DataSource.get_Value() != 'geant4':
from DataQualityTools.DQTDetSynchMonAlg import DQTDetSynchMonAlgConfigOld
topSequence += DQTDetSynchMonAlgConfigOld(DQMonFlags)
# Background Monitoring
if DQMonFlags.useTrigger():
from DataQualityTools.DQTBackgroundMon import DQTBackgroundMonAlgConfig
topSequence += DQTBackgroundMonAlgConfig(DQMonFlags,isOld=True)
# Default values
MinSCTHits=5
MinPtCut=4000
#For now, to increase statistics in cosmics data taking
if athenaCommonFlags.isOnline==True:
MinSCTHits=0
MinPtCut=500
if not rec.doMuon:
try:
svcMgr.ByteStreamAddressProviderSvc.TypeNames.remove("RpcPadContainer/RPCPAD")
except:
printfunc ('RPCPAD cannot be removed')
if isBeam==True and (DQMonFlags.monManEnvironment != 'tier0Raw') and rec.doInDet() and DQMonFlags.useTrigger():
topSequence += AthenaMonManager( "GlobalMonPhysicsManager" )
ManagedAthenaGlobalPhysMon = topSequence.GlobalMonPhysicsManager
ManagedAthenaGlobalPhysMon.FileKey = DQMonFlags.monManFileKey()
ManagedAthenaGlobalPhysMon.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup()
ManagedAthenaGlobalPhysMon.DataType = DQMonFlags.monManDataType()
ManagedAthenaGlobalPhysMon.Environment = DQMonFlags.monManEnvironment()
from DataQualityTools.DQTGlobalWZFinderAlg import DQTGlobalWZFinderAlgConfig
topSequence += DQTGlobalWZFinderAlgConfig(DQMonFlags)
from DataQualityTools.DQTLumiMonAlg import DQTLumiMonAlgConfig
topSequence += DQTLumiMonAlgConfig(DQMonFlags, isOld=True)
# by JAA based on TileMinTopoClusterMaker
#removed by JAA
###from CaloUtils.CaloUtilsConf import H1ClusterCellWeightTool, EMFracClusterClassificationTool, OutOfClusterCorrectionTool, DeadMaterialCorrectionTool2
from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterLocalCalib
from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMomentsMaker, CaloClusterMaker, CaloCell2ClusterMapper, CaloClusterLockVars, CaloClusterPrinter
from CaloRec.CaloTopoClusterFlags import jobproperties
from AthenaCommon.SystemOfUnits import deg, GeV, MeV
from AthenaCommon.AlgSequence import AlgSequence
from AthenaCommon.GlobalFlags import globalflags
#from AthenaCommon.AlgSequence import AlgSequence
#topSequence = AlgSequence()
doTopoClusterLocalCalib=False
from CaloRec.CaloTopoClusterFlags import jobproperties
jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib.set_Value(False)
# correction tools not using tools
HadTopoMoments = CaloClusterMomentsMaker ("HadTopoMoments")
HadTopoMoments.MaxAxisAngle = 30*deg
HadTopoMoments.OutputLevel = INFO
HadTopoMoments.MomentsNames = ["FIRST_PHI"
,"FIRST_ETA"
,"SECOND_R"
,"SECOND_LAMBDA"
,"DELTA_PHI"
,"DELTA_THETA"
,"DELTA_ALPHA"
,"CENTER_X"
,"CENTER_Y"
,"CENTER_Z"
,"CENTER_LAMBDA"
,"LATERAL"
,"LONGITUDINAL"
,"FIRST_ENG_DENS"
,"ENG_FRAC_EM"
,"ENG_FRAC_MAX"
,"ENG_FRAC_CORE"
,"FIRST_ENG_DENS"
,"SECOND_ENG_DENS"
,"ISOLATION"]
HadTopoMoments.AODMomentsNames = ["LATERAL"
,"LONGITUDINAL"
,"SECOND_R"
,"SECOND_LAMBDA"
,"CENTER_LAMBDA"
,"FIRST_ENG_DENS"
,"ENG_FRAC_MAX"
,"ISOLATION"]
if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies() or jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables():
LockVariables = CaloClusterLockVars("LockVariables")
LockVariables.LockedSamplingVariables = []
if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies():
LockVariables.LockedSamplingVariables += [
"Energy", "Max_Energy"]
if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables():
LockVariables.LockedSamplingVariables += [
"Eta", "Phi", "Delta_Eta",
"Delta_Phi", "Max_Eta", "Max_Phi"
]
if jobproperties.CaloTopoClusterFlags.printTopoClusters():
PrintCaloCluster = CaloClusterPrinter("PrintCaloCluster")
PrintCaloCluster.PrintFirstOnly = True
PrintCaloCluster.PrintFrequency = 1
PrintCaloCluster.EnergyUnit = 1.0*GeV
# maker tools
HadTopoMaker = CaloTopoClusterMaker("HadTopoMaker")
HadTopoMaker.CellsNames = ["AllCalo"]
HadTopoMaker.CalorimeterNames=["TILE","LARHEC"]
# cells from the following samplings will be able to form
# seeds. By default no sampling is excluded
HadTopoMaker.SeedSamplingNames = ["TileBar0", "TileBar1", "TileBar2",
"TileExt0", "TileExt1", "TileExt2",
"HEC0","HEC1","HEC2","HEC3",
"TileGap1", "TileGap2", "TileGap3"]
HadTopoMaker.NoiseSigma= 1.68 / 1023 / 64 * 800 * 1.414214 * GeV
HadTopoMaker.NeighborOption = "super3D"
HadTopoMaker.RestrictHECIWandFCalNeighbors = False
HadTopoMaker.SeedThresholdOnEorAbsEinSigma = 4.0
HadTopoMaker.CellThresholdOnEorAbsEinSigma = 0.0
HadTopoMaker.NeighborThresholdOnEorAbsEinSigma = 2.0
# note E or AbsE
#
# the following cut must be set to TRUE in order to make double
# sided cuts on the seed and the cluster level ( neighbor and cell
# cuts are always double sided)
#
HadTopoMaker.SeedCutsInAbsE = True
HadTopoMaker.ClusterEtorAbsEtCut = 0.0*MeV
# the following Et thresholds are ignored in case UsePileUpNoise
# is TRUE
#
#
#CellThresholdOnAbsEt = 0.0*MeV
#NeighborThresholdOnAbsEt = 100.0*MeV
#SeedThresholdOnEtorAbsEt = 200.0*MeV
# note Et or AbsEt
HadTopoSplitter = CaloTopoClusterSplitter("HadTopoSplitter")
# cells from the following samplings will be able to form local
# maxima. The excluded samplings are PreSamplerB, EMB1,
# PreSamplerE, EME1, all Tile samplings, all HEC samplings and the
# two rear FCal samplings.
#
#TopoSplitter.SamplingNames = ["EMB2", "EMB3",
# "EME2", "EME3",
# "FCAL0"]
# cells from the following samplings will also be able to form
# local maxima but only if they are not overlapping in eta and phi
# with local maxima in previous samplings from the primary list.
#
HadTopoSplitter.SamplingNames = [ "TileBar0", "TileBar1", "TileBar2" ,
"TileExt0", "TileExt1", "TileExt2",
"HEC0","HEC1","HEC2","HEC3",
"TileGap1", "TileGap2", "TileGap3"]
HadTopoSplitter.SecondarySamplingNames = ["TileBar0","TileBar1","TileBar2",
"HEC0","HEC1","HEC2","HEC3",
"TileExt0","TileExt1","TileExt2"]
HadTopoSplitter.ShareBorderCells = True
HadTopoSplitter.RestrictHECIWandFCalNeighbors = False
#
# the following options are not set, since these are the default
# values
#
# NeighborOption = "super3D",
# NumberOfCellsCut = 4,
# EnergyCut = 500*MeV,
# cluster maker
HadTopoCluster = CaloClusterMaker ("HadTopoCluster")
HadTopoCluster.ClustersOutputName="HadTopoCluster"
HadTopoCluster.ClusterMakerTools = [
HadTopoMaker.getFullName(),
HadTopoSplitter.getFullName()]
HadTopoCluster.ClusterCorrectionTools = [
HadTopoMoments.getFullName()]
HadTopoCluster += HadTopoMaker
HadTopoCluster += HadTopoSplitter
HadTopoCluster += HadTopoMoments
if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies() or jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables():
HadTopoCluster.ClusterCorrectionTools += [
LockVariables.getFullName()]
HadTopoCluster += LockVariables
if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib():
HadTopoCluster.ClusterCorrectionTools += [
LocalCalib.getFullName(),
OOCCalib.getFullName(),
OOCPi0Calib.getFullName(),
DMCalib.getFullName()]
HadTopoCluster += LocalCalib
HadTopoCluster += OOCCalib
HadTopoCluster += OOCPi0Calib
HadTopoCluster += DMCalib
if jobproperties.CaloTopoClusterFlags.printTopoClusters():
HadTopoCluster.ClusterCorrectionTools += [
PrintCaloCluster.getFullName()]
HadTopoCluster += PrintCaloCluster
# cell 2 cluster mapper
HadCell2TopoClusterMapper = CaloCell2ClusterMapper("HadCell2TopoClusterMapper")
HadCell2TopoClusterMapper.ClustersName = "HadTopoCluster"
HadCell2TopoClusterMapper.MapOutputName = "HadCell2TopoCluster"
topSequence += HadTopoCluster
topSequence += HadCell2TopoClusterMapper
print HadTopoCluster
#svcMgr.MessageSvc.OutputLevel = DEBUG
from JetRec.JetRecConf import JetMomentCalculator
MomentCalculator = JetMomentCalculator( "MomentCalculator" )
MomentCalculator.CalculatorToolNames = []
MomentCalculator.OutputLevel = VERBOSE
from JetRecTools.JetRecToolsConf import JetClusterEMFractionTool
from JetSimTools.JetSimToolsConf import JetTruthEMFractionTool
MomentCalculator.JetCollectionName = "Cone7TopoJets"
MomentCalculator.JetMomentMapName = "Cone7H1TopoMap"
if(True):
clem = JetClusterEMFractionTool("ClusterEMFraction")
MomentCalculator.CalculatorToolNames += [ clem.getFullName() ]
if(False):
MomentCalculator.CalculatorToolNames += [
"JetTrackEMFractionTool/TrackEMFraction" ]
MomentCalculator.TrackEMFraction.TrackFilterTool = "JetTrackEtaFilter/TEFilter"
MomentCalculator.TrackEMFraction.TrackAssociationTool = "JetTrackToCaloAssoc/TAssoc"
MomentCalculator.TrackEMFraction.TrackContainerKey = "TrackParticleCandidate"
MomentCalculator.TrackEMFraction.TAssoc.TrackExtrapolatorToolName="ExtrapolTrackToCaloTool/caloObjBuilderTrackToCaloTool"
MomentCalculator.TrackEMFraction.ComputeTrackMoments=True
include( "TrackToCalo/ExtrapolToCaloTool_joboptions.py" )
myExtrapolator = ConfiguredExtrapolator()
if(True):
trem = JetTruthEMFractionTool("TruthEMFraction")
MomentCalculator.CalculatorToolNames += [ trem.getFullName() ]
print MomentCalculator
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
topSequence += MomentCalculator
import math
# -- 1-dim binning
radBins = [ 0.0, 2.0, 0.025 ] # radial bins
eBins = [ 0.0*GeV, 1500.0*GeV, 10.0*GeV ] # energy bins
etaBins = [ -5.0, 5.0, 0.1 ] # eta bins
phiBins = [ -math.pi, math.pi, 0.1 ] # phi bins
massBins = [ 0.0*GeV, 100.0*GeV, 1.0* GeV ] # mass bins
# -- 2-dim binning
radBinsHD = [ 0.0, 2.0, 0.1 ]
eBinsHD = [ 0.0*GeV, 1500.0*GeV, 20.0*GeV ]
etaBinsHD = [ -5.0, 5.0, 0.1 ]
phiBinsHD = [ -math.pi, math.pi, 0.1 ]
massBinsHD = [ 0.0*GeV, 100.0*GeV, 2.0*GeV ]
from JetRec.JetGetters import *
from JetMonitoring.JetMonitoringConf import JetDisplayTool
from JetMonitoring.JetMonitoringConf import JetEtFlowMonTool
from JetMonitoring.JetMonitoringConf import JetMomentMonitorTool
from JetMonitoring.JetMonitoringConf import JetMonitorTool
from JetMonitoring.JetMonitoringConf import JetManagedMonTool
from JetMonitoring.JetMonitoringConf import JetMonTool
# momon.MomentBinning = [
# "TRACK_E 0.0 600 60"
# "CALOAREA 0.0 1.2 120"
# "EM_FRACTION_MCTRUTH 0.0 1.2 120"
# ]
# momon2.MomentBinning = [
# "TRACK_E 0.0 600 60"
# "CALOAREA 0.0 1.2 120"
# "EM_FRACTION_MCTRUTH 0.0 1.2 120"
# ]
shmon = JetEtFlowMonTool("JetShapeMonitor")
shmon.HistogramPath = "/JetMonitor/Cone7TopoJets"
shmon.RadBinning1D =radBins
kimon = JetMonitorTool("JetKineMonitor")
kimon.HistogramPath = "/JetMonitor/Cone7TopoJets"
kimon.EnergyUnitOfMeasure = GeV
kimon.EnergyBinning1D = eBins
kimon.EtBinning1D = eBins
kimon.EtaBinning1D = etaBins
kimon.PhiBinning1D = phiBins
kimon.RadBinning1D = radBins
kimon.MassBinning1D = massBins
kimon.EnergyBinning2D = eBinsHD
kimon.EtBinning2D = eBinsHD
kimon.EtaBinning2D = etaBinsHD
kimon.PhiBinning2D = phiBinsHD
kimon.RadBinning2D = radBinsHD
kimon.MassBinning2D = massBinsHD
displ = JetManagedMonTool( "JetManagedMonTool" )
displ.ToolNames = [ shmon.getFullName(), kimon.getFullName()]
displ.JetCollection = "Cone7TopoJets"
#displ.OutputLevel = VERBOSE
displ += shmon
displ += kimon
#displ += momon
ToolSvc += displ
print displ
# get the prime minister aeh...
pm = AthenaMonManager( "PrimaryManager" )
pm.AthenaMonTools += [ displ.getFullName() ]
print pm
#shmon.OutputLevel = VERBOSE
#kimon.OutputLevel = VERBOSE
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