18 """do the CP algorithm configuration for PHYSLITE"""
20 from AthenaCommon.Logging
import logging
21 logPLCPAlgCfg = logging.getLogger(
'PLCPAlgCfg')
22 logPLCPAlgCfg.info(
'****************** STARTING PHYSLITE CPAlgorithmsCfg *****************')
24 forceEGammaFullSimConfig =
False
25 if not flags.Sim.ISF.Simulator.isFullSim():
26 logPLCPAlgCfg.warning(
"Forcing full simulation configuration for EGamma algorithms. This is not recommended for fast simulation but no recommendations available yet.")
27 forceEGammaFullSimConfig =
True
29 from AnalysisAlgorithmsConfig.ConfigFactory
import ConfigFactory
30 from AnalysisAlgorithmsConfig.ConfigSequence
import ConfigSequence
31 configSeq = ConfigSequence ()
34 factory = ConfigFactory()
37 subConfig = factory.makeConfig (
'CommonServices')
38 subConfig.setOptionValue (
'.runSystematics',
False)
39 configSeq += subConfig
44 configSeq += factory.makeConfig (
'PileupReweighting')
47 configSeq += factory.makeConfig (
'EventCleaning')
48 configSeq.setOptionValue (
'.noFilter',
True)
53 logPLCPAlgCfg.info(
'Do Muons')
55 subConfig = factory.makeConfig (
'Muons', containerName=
'AnalysisMuons')
56 configSeq += subConfig
57 subConfig = factory.makeConfig (
'Muons.WorkingPoint', containerName=
'AnalysisMuons',
58 selectionName=
'loose')
59 subConfig.setOptionValue (
'.trackSelection',
False)
60 subConfig.setOptionValue (
'.quality',
'Loose')
61 subConfig.setOptionValue (
'.isolation',
'NonIso')
62 configSeq += subConfig
63 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisMuons')
64 subConfig.setOptionValue (
'.selectionName',
'loose')
65 subConfig.setOptionValue (
'.deepCopy',
True)
66 subConfig.setOptionValue (
'.sortPt',
True)
67 subConfig.setOptionValue (
'.noUniformSelection',
True)
68 configSeq += subConfig
72 logPLCPAlgCfg.info(
'Do Electrons')
74 subConfig = factory.makeConfig (
'Electrons', containerName=
'AnalysisElectrons')
75 subConfig.setOptionValue (
'.forceFullSimConfig', forceEGammaFullSimConfig)
76 subConfig.setOptionValue (
'.isolationCorrection',
True)
77 subConfig.setOptionValue (
'.minPt', 0.)
78 configSeq += subConfig
79 subConfig = factory.makeConfig (
'Electrons.WorkingPoint', containerName=
'AnalysisElectrons',
80 selectionName=
'loose')
81 subConfig.setOptionValue (
'.trackSelection',
False)
82 subConfig.setOptionValue (
'.identificationWP',
'LooseLHElectron')
83 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
84 subConfig.setOptionValue (
'.doFSRSelection',
True)
85 subConfig.setOptionValue (
'.noEffSF',
True)
86 configSeq += subConfig
87 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisElectrons')
88 subConfig.setOptionValue (
'.selectionName',
'loose')
89 subConfig.setOptionValue (
'.deepCopy',
True)
90 subConfig.setOptionValue (
'.sortPt',
True)
91 subConfig.setOptionValue (
'.noUniformSelection',
True)
92 configSeq += subConfig
95 subConfig = factory.makeConfig (
'Electrons', containerName=
'AnalysisSiHitElectrons')
96 subConfig.setOptionValue (
'.forceFullSimConfig', forceEGammaFullSimConfig)
97 subConfig.setOptionValue (
'.isolationCorrection',
True)
98 subConfig.setOptionValue (
'.minPt', 0.)
99 subConfig.setOptionValue (
'.postfix',
'SiHit')
100 configSeq += subConfig
101 subConfig = factory.makeConfig (
'Electrons.WorkingPoint', containerName=
'AnalysisSiHitElectrons', selectionName=
'SiHits')
102 subConfig.setOptionValue (
'.trackSelection',
False)
103 subConfig.setOptionValue (
'.identificationWP',
'SiHitElectron')
104 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
105 subConfig.setOptionValue (
'.doFSRSelection',
True)
106 subConfig.setOptionValue (
'.noEffSF',
True)
107 subConfig.setOptionValue (
'.postfix',
'SiHit')
108 configSeq += subConfig
109 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisSiHitElectrons')
110 subConfig.setOptionValue (
'.selectionName',
'SiHits')
111 subConfig.setOptionValue (
'.deepCopy',
True)
112 subConfig.setOptionValue (
'.sortPt',
True)
113 subConfig.setOptionValue (
'.noUniformSelection',
True)
114 configSeq += subConfig
118 logPLCPAlgCfg.info(
'Do Photons')
120 subConfig = factory.makeConfig (
'Photons', containerName=
'AnalysisPhotons')
121 subConfig.setOptionValue (
'.forceFullSimConfig', forceEGammaFullSimConfig)
122 subConfig.setOptionValue (
'.recomputeIsEM',
False)
123 subConfig.setOptionValue (
'.minPt', 0.)
124 configSeq += subConfig
125 subConfig = factory.makeConfig (
'Photons.WorkingPoint', containerName=
'AnalysisPhotons',
126 selectionName=
'loose')
127 subConfig.setOptionValue (
'.qualityWP',
'Loose')
128 subConfig.setOptionValue (
'.isolationWP',
'NonIso')
129 subConfig.setOptionValue (
'.doFSRSelection',
True)
130 subConfig.setOptionValue (
'.recomputeIsEM',
False)
131 subConfig.setOptionValue (
'.noEffSF',
True)
132 configSeq += subConfig
133 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisPhotons')
134 subConfig.setOptionValue (
'.selectionName',
'loose')
135 subConfig.setOptionValue (
'.deepCopy',
True)
136 subConfig.setOptionValue (
'.sortPt',
True)
137 subConfig.setOptionValue (
'.noUniformSelection',
True)
138 configSeq += subConfig
144 subConfig = factory.makeConfig (
'TauJets', containerName=
'AnalysisTauJets')
145 configSeq += subConfig
146 subConfig = factory.makeConfig (
'TauJets.WorkingPoint', containerName=
'AnalysisTauJets',
147 selectionName=
'baseline')
148 subConfig.setOptionValue (
'.quality',
'Baseline')
149 configSeq += subConfig
150 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisTauJets')
151 subConfig.setOptionValue (
'.selectionName',
'baseline')
152 subConfig.setOptionValue (
'.deepCopy',
True)
153 subConfig.setOptionValue (
'.sortPt',
True)
154 subConfig.setOptionValue (
'.noUniformSelection',
True)
155 configSeq += subConfig
158 jetContainer =
'AntiKt4EMPFlowJets'
159 subConfig = factory.makeConfig (
'Jets', containerName=
'AnalysisJets',
160 jetCollection=jetContainer)
161 subConfig.setOptionValue (
'.runFJvtUpdate',
False)
162 subConfig.setOptionValue (
'.runFJvtSelection',
False)
163 subConfig.setOptionValue (
'.runJvtSelection',
False)
164 configSeq += subConfig
165 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisJets')
166 subConfig.setOptionValue (
'.deepCopy',
True)
167 subConfig.setOptionValue (
'.sortPt',
True)
168 subConfig.setOptionValue (
'.noUniformSelection',
True)
169 configSeq += subConfig
171 largeRjetContainer=
'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets'
172 subConfig = factory.makeConfig (
'Jets', containerName=
'AnalysisLargeRJets',
173 jetCollection=largeRjetContainer)
174 subConfig.setOptionValue (
'.runGhostMuonAssociation',
False)
175 configSeq += subConfig
176 subConfig = factory.makeConfig (
'Thinning', containerName=
'AnalysisLargeRJets')
177 subConfig.setOptionValue (
'.deepCopy',
True)
178 subConfig.setOptionValue (
'.sortPt',
True)
179 subConfig.setOptionValue (
'.noUniformSelection',
True)
180 configSeq += subConfig
182 from AnalysisAlgorithmsConfig.ConfigAccumulator
import ConfigAccumulator
183 configAccumulator = ConfigAccumulator (dataType=
None, algSeq=
None,
184 autoconfigFromFlags=flags, noSysSuffix=
True, noSystematics=
True)
185 configSeq.fullConfigure (configAccumulator)
186 return configAccumulator.CA