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