ATLAS Offline Software
Functions | Variables
PhysValMonitoringConfig Namespace Reference

Functions

def PhysValExampleCfg (flags, **kwargs)
 
def GoodRunsListSelectionToolCfg (flags, grls, **kwargs)
 
def GoodRunListSelectionAlgCfg (flags, **kwargs)
 
def PhysValMonitoringCfg (flags, name="PhysValMonManager", tools=None, **kwargs)
 

Variables

 logger = logging.getLogger("PhysValMonitoringConfig")
 

Function Documentation

◆ GoodRunListSelectionAlgCfg()

def PhysValMonitoringConfig.GoodRunListSelectionAlgCfg (   flags,
**  kwargs 
)

Definition at line 70 of file PhysValMonitoringConfig.py.

70 def GoodRunListSelectionAlgCfg(flags, **kwargs):
71  acc = ComponentAccumulator()
72  kwargs.setdefault('GoodRunsListSelectionTool', acc.popToolsAndMerge(
73  GoodRunsListSelectionToolCfg(flags, grls=flags.PhysVal.GRLs)))
74 
75  alg = CompFactory.GRLSelectorAlg(
76  'GRLSelectorAlg', Tool=kwargs['GoodRunsListSelectionTool'], grlKey="EventInfo.passGRL")
77  acc.addEventAlgo(alg)
78  return acc
79 
80 

◆ GoodRunsListSelectionToolCfg()

def PhysValMonitoringConfig.GoodRunsListSelectionToolCfg (   flags,
  grls,
**  kwargs 
)

Definition at line 40 of file PhysValMonitoringConfig.py.

40 def GoodRunsListSelectionToolCfg(flags, grls, **kwargs):
41  from GoodRunsLists.GoodRunsListsDictionary import getGoodRunsLists
42  all_grls = getGoodRunsLists() # this is a Dict[str, List[str]]
43  all_grl_flattened = [grl for grls in all_grls.values() for grl in grls]
44 
45  acc = ComponentAccumulator()
46 
47  if isinstance(grls, str):
48  raise TypeError("grls must be an iterable of GRLs, e.g. [%s]" % grls)
49 
50  resolved_grls = []
51  for grl in grls:
52  if grl.endswith(".xml"):
53  if grl not in all_grl_flattened:
54  logger.warning("GRL '%s' is not in the reccomended GRLs, using it as is.", grl)
55  resolved_grls.append(grl)
56  else:
57  if grl in all_grls:
58  resolved_grls.extend(all_grls[grl])
59  else:
60  raise ValueError(f"GRL name '{grl}' not found in the available GRLs. Available GRL names: %s" % all_grls.keys())
61 
62  tool = CompFactory.GoodRunsListSelectionTool(name="GoodRunsListSelectionTool",
63  GoodRunsListVec=resolved_grls,
64  PassThrough=False,
65  **kwargs)
66  acc.setPrivateTools(tool)
67  return acc
68 
69 

◆ PhysValExampleCfg()

def PhysValMonitoringConfig.PhysValExampleCfg (   flags,
**  kwargs 
)

Definition at line 19 of file PhysValMonitoringConfig.py.

19 def PhysValExampleCfg(flags, **kwargs):
20  acc = ComponentAccumulator()
21 
22  from AthenaCommon.Constants import WARNING
23  kwargs.setdefault("EnableLumi", False)
24  kwargs.setdefault("OutputLevel", WARNING)
25  kwargs.setdefault("DetailLevel", 10)
26  kwargs.setdefault("TauContainerName", "TauJets")
27  kwargs.setdefault("PhotonContainerName", "Photons")
28  kwargs.setdefault("ElectronContainerName", "Electrons")
29 
30  # Keep this disabled for now
31  kwargs.setdefault("DoExBtag", False)
32  kwargs.setdefault("DoExMET", False)
33  kwargs.setdefault("DoExJet", flags.PhysVal.doJet)
34  kwargs.setdefault("METContainerName", "")
35 
36  acc.setPrivateTools(CompFactory.PhysVal.PhysValExample(**kwargs))
37  return acc
38 
39 

◆ PhysValMonitoringCfg()

def PhysValMonitoringConfig.PhysValMonitoringCfg (   flags,
  name = "PhysValMonManager",
  tools = None,
**  kwargs 
)

Definition at line 81 of file PhysValMonitoringConfig.py.

81 def PhysValMonitoringCfg(flags, name="PhysValMonManager", tools=None, **kwargs):
82  if tools is None:
83  tools = []
84 
85  acc = ComponentAccumulator()
86 
87  kwargs.setdefault("FileKey", "PhysVal")
88  kwargs.setdefault("Environment", "altprod")
89  kwargs.setdefault("ManualDataTypeSetup", True)
90  kwargs.setdefault("DataType", "monteCarlo")
91  kwargs.setdefault("ManualRunLBSetup", True)
92  kwargs.setdefault("Run", 1)
93  kwargs.setdefault("LumiBlock", 1)
94 
95  if flags.PhysVal.doExample:
96  tools.append(acc.popToolsAndMerge(PhysValExampleCfg(flags)))
97  if flags.PhysVal.doInDet:
98  from InDetPhysValMonitoring.InDetPhysValMonitoringConfig import InDetPhysValMonitoringToolCfg
99  tools.append(acc.popToolsAndMerge(InDetPhysValMonitoringToolCfg(flags)))
100  if flags.PhysVal.doInDetLargeD0:
101  from InDetPhysValMonitoring.InDetPhysValMonitoringConfig import InDetLargeD0PhysValMonitoringToolCfg
102  tools.append(acc.popToolsAndMerge(InDetLargeD0PhysValMonitoringToolCfg(flags)))
103  if flags.PhysVal.doBtag:
104  from JetTagDQA.JetTagDQAConfig import PhysValBTagCfg
105  tools.append(acc.popToolsAndMerge(PhysValBTagCfg(flags)))
106  if flags.PhysVal.doMET:
107  from MissingEtDQA.MissingEtDQAConfig import PhysValMETCfg
108  tools.append(acc.popToolsAndMerge(PhysValMETCfg(flags)))
109  if flags.PhysVal.doEgamma:
110  from EgammaPhysValMonitoring.EgammaPhysValMonitoringConfig import EgammaPhysValMonitoringToolCfg
111  tools.append(acc.popToolsAndMerge(EgammaPhysValMonitoringToolCfg(flags, useOQQuality=flags.PhysVal.applyAllDataCleaning)))
112  if flags.PhysVal.doTau:
113  from TauDQA.TauDQAConfig import PhysValTauCfg
114  tools.append(acc.popToolsAndMerge(PhysValTauCfg(flags)))
115  if flags.PhysVal.doJet:
116  from JetValidation.JetValidationConfig import PhysValJetCfg
117  tools.append(acc.popToolsAndMerge(PhysValJetCfg(flags)))
118  if flags.PhysVal.doTopoCluster:
119  from PFODQA.ClusterDQAConfig import PhysValClusterCfg
120  tools += acc.popToolsAndMerge(PhysValClusterCfg(flags))
121  if flags.PhysVal.doZee:
122  from ZeeValidation.ZeeValidationMonToolConfig import PhysValZeeCfg
123  tools.append(acc.popToolsAndMerge(PhysValZeeCfg(flags)))
124  if flags.PhysVal.doPFlow:
125  from PFODQA.PFPhysValConfig import PhysValPFOCfg
126  tools += acc.popToolsAndMerge(PhysValPFOCfg(flags))
127  if flags.PhysVal.doMuon:
128  from MuonPhysValMonitoring.MuonPhysValConfig import PhysValMuonCfg
129  tools.append(acc.popToolsAndMerge(PhysValMuonCfg(flags)))
130  if flags.PhysVal.doLRTMuon:
131  from MuonPhysValMonitoring.MuonPhysValConfig import PhysValLRTMuonCfg
132  tools.append(acc.popToolsAndMerge(PhysValLRTMuonCfg(flags)))
133  if flags.PhysVal.IDPVM.doActs:
134  from ActsConfig.ActsAnalysisConfig import PhysValActsCfg
135  tools.append(acc.popToolsAndMerge(PhysValActsCfg(flags)))
136  if flags.PhysVal.doLLPSecVtx:
137  from InDetSecVertexValidation.InDetSecVertexValidationConfig import PhysValSecVtxCfg
138  tools.append(acc.popToolsAndMerge(PhysValSecVtxCfg(flags)))
139 
140  kwargs.setdefault("AthenaMonTools", tools)
141 
142  # create the sequence, so that the main algorithm is not executed if the GRL or event cleaning fails
143  acc.addSequence(seqAND("PhysValSequence"))
144 
145  if flags.PhysVal.applyAllDataCleaning or flags.PhysVal.applyGRL:
146  if (flags.Input.isMC):
147  raise ValueError("applyGRL (or applyAllDataCleaning) is not supported for MC data, please disable it.")
148  acc.merge(GoodRunListSelectionAlgCfg(flags, **kwargs),
149  sequenceName="PhysValSequence")
150  if flags.PhysVal.applyAllDataCleaning or flags.PhysVal.applyEventStatusSelection:
151  if (flags.Input.isMC):
152  raise ValueError("applyEventStatusSelection (or applyAllDataCleaning) is not supported for MC data, please disable it.")
153  acc.addEventAlgo(CompFactory.CP.EventStatusSelectionAlg("EventStatusSelectionAlg", FilterKey="EventErrorState",
154  FilterDescription="selecting events without any error state set"), sequenceName="PhysValSequence")
155 
156  # add the main algorithm
157  acc.addEventAlgo(CompFactory.AthenaMonManager(
158  name, **kwargs), sequenceName="PhysValSequence")
159  acc.addService(CompFactory.THistSvc(
160  Output=[f"PhysVal DATAFILE='{flags.PhysVal.OutputFileName}' OPT='RECREATE'"]))
161 
162  return acc

Variable Documentation

◆ logger

PhysValMonitoringConfig.logger = logging.getLogger("PhysValMonitoringConfig")

Definition at line 16 of file PhysValMonitoringConfig.py.

python.GoodRunsListsDictionary.getGoodRunsLists
def getGoodRunsLists()
Definition: GoodRunsListsDictionary.py:3
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
PhysValMonitoringConfig.GoodRunListSelectionAlgCfg
def GoodRunListSelectionAlgCfg(flags, **kwargs)
Definition: PhysValMonitoringConfig.py:70
MissingEtDQAConfig.PhysValMETCfg
def PhysValMETCfg(flags, **kwargs)
Definition: MissingEtDQAConfig.py:14
PhysValMonitoringConfig.GoodRunsListSelectionToolCfg
def GoodRunsListSelectionToolCfg(flags, grls, **kwargs)
Definition: PhysValMonitoringConfig.py:40
ZeeValidationMonToolConfig.PhysValZeeCfg
def PhysValZeeCfg(flags, **kwargs)
Definition: ZeeValidationMonToolConfig.py:14
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
PhysValMonitoringConfig.PhysValMonitoringCfg
def PhysValMonitoringCfg(flags, name="PhysValMonManager", tools=None, **kwargs)
Definition: PhysValMonitoringConfig.py:81
JetTagDQAConfig.PhysValBTagCfg
def PhysValBTagCfg(flags, **kwargs)
Definition: JetTagDQAConfig.py:15
TauDQAConfig.PhysValTauCfg
def PhysValTauCfg(flags, **kwargs)
Definition: TauDQAConfig.py:15
InDetPhysValMonitoringConfig.InDetPhysValMonitoringToolCfg
def InDetPhysValMonitoringToolCfg(flags, **kwargs)
Definition: InDetPhysValMonitoringConfig.py:106
Constants
some useful constants -------------------------------------------------—
python.JetValidationConfig.PhysValJetCfg
def PhysValJetCfg(flags, **kwargs)
Definition: JetValidationConfig.py:9
ClusterDQAConfig.PhysValClusterCfg
def PhysValClusterCfg(flags)
Definition: ClusterDQAConfig.py:28
EgammaPhysValMonitoringConfig.EgammaPhysValMonitoringToolCfg
def EgammaPhysValMonitoringToolCfg(flags, **kwargs)
Definition: EgammaPhysValMonitoringConfig.py:14
PhysValMonitoringConfig.PhysValExampleCfg
def PhysValExampleCfg(flags, **kwargs)
Definition: PhysValMonitoringConfig.py:19
InDetPhysValMonitoringConfig.InDetLargeD0PhysValMonitoringToolCfg
def InDetLargeD0PhysValMonitoringToolCfg(flags, **kwargs)
Definition: InDetPhysValMonitoringConfig.py:357
MuonPhysValConfig.PhysValLRTMuonCfg
def PhysValLRTMuonCfg(flags, name="lrtmuphysval", **kwargs)
Definition: MuonPhysValConfig.py:77
MuonPhysValConfig.PhysValMuonCfg
def PhysValMuonCfg(flags, name="muphysval", **kwargs)
Definition: MuonPhysValConfig.py:14
ActsAnalysisConfig.PhysValActsCfg
ComponentAccumulator PhysValActsCfg(flags, str name='PhysValActs', **kwargs)
Definition: ActsAnalysisConfig.py:593
PFPhysValConfig.PhysValPFOCfg
def PhysValPFOCfg(flags)
Definition: PFPhysValConfig.py:27
InDetSecVertexValidationConfig.PhysValSecVtxCfg
ComponentAccumulator PhysValSecVtxCfg(flags, str name='PhysValSecVtx', **kwargs)
Definition: InDetSecVertexValidationConfig.py:6