3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
7 outputFileName = 'Nightly-monitoring.hist',
13 from ROOT
import LikeEnum
14 from ElectronPhotonSelectorTools.EgammaPIDdefs
import egammaPID
16 eidWP = {
'Loose' : LikeEnum.Loose,
'Medium' : LikeEnum.Medium,
'Tight' : LikeEnum.Tight }
17 gidWP = {
'Loose' : egammaPID.PhotonIDLoose,
'Tight' : egammaPID.PhotonIDTight }
18 gisoWP = [
'FixedCutTight',
'FixedCutLoose',
'TightCaloOnly' ]
22 if particleType ==
'electron' or particleType ==
'dataZ':
23 kwarg[
'ElectronsKey'] =
'Electrons'
24 kwarg[
'GSFTrackParticlesKey'] =
'GSFTrackParticles'
26 if particleType ==
'electron':
27 from ElectronPhotonSelectorTools.AsgElectronLikelihoodToolsConfig
import (
28 AsgElectronLikelihoodToolCfg)
29 for k,w
in eidWP.items():
31 kwarg[k+
'_Ele'] = t.popPrivateTools()
34 kwarg[
'FwdElectronsKey'] =
'ForwardElectrons'
35 from ElectronPhotonSelectorTools.AsgForwardElectronLikelihoodToolConfig
import (
36 AsgForwardElectronLikelihoodToolCfg)
37 for k
in eidWP.keys():
40 configFile = f
'dev/ElectronPhotonSelectorTools/offline/mc16_20190729/FwdLH{k}Conf.conf'
42 ConfigFile = configFile)
43 kwarg[k+
'_FwdEle'] = t.popPrivateTools()
46 if particleType ==
'gamma':
47 from ElectronPhotonSelectorTools.AsgPhotonIsEMSelectorsConfig
import (
48 AsgPhotonIsEMSelectorCfg)
49 for k,w
in gidWP.items():
51 kwarg[k+
'_Photon'] = t.popPrivateTools()
54 from IsolationSelection.IsolationSelectionConfig
import IsolationSelectionToolCfg
58 kwarg[name] = t.popPrivateTools()
60 kwarg[
'PhotonsKey'] =
'Photons'
63 if particleType !=
'dataZ':
64 from MCTruthClassifier.MCTruthClassifierConfig
import MCTruthClassifierCfg
66 kwarg[
'egammaTruthParticlesKey'] =
'egammaTruthParticles'
67 kwarg[
'truthParticlesKey'] =
'TruthParticles'
71 from AthenaConfiguration.Enums
import LHCPeriod
72 if flags.GeoModel.Run > LHCPeriod.Run3:
73 kwarg[
'hasTRT'] =
False
76 egMon = CompFactory.EgammaMonitoring(
77 name =
'egammaMonitoringAlg',
78 sampleType = particleType,
79 MCTruthClassifier = MCClassifier,
81 acc.addEventAlgo(egMon)
84 svc = CompFactory.THistSvc(name=
"THistSvc")
85 svc.Output = [f
"MONITORING DATAFILE='{outputFileName}.root' OPT='RECREATE'"]