213 EgammaMatchTool = CompFactory.TrigEgammaMatchingToolMT()
214 EgammaMatchTool.DeltaR=0.4
215 acc.addPublicTool(EgammaMatchTool)
216 cppyy.load_library(
'libElectronPhotonSelectorToolsDict')
220 LooseElectronSelector = CompFactory.AsgElectronIsEMSelector(
"T0HLTLooseElectronSelector")
221 MediumElectronSelector = CompFactory.AsgElectronIsEMSelector(
"T0HLTMediumElectronSelector")
222 TightElectronSelector = CompFactory.AsgElectronIsEMSelector(
"T0HLTTightElectronSelector")
223 LooseLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTLooseLHSelector")
224 MediumLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTMediumLHSelector")
225 TightLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTTightLHSelector")
226 VeryLooseLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTVeryLooseLHSelector")
229 LooseDNNElectronSelector = CompFactory.AsgElectronSelectorTool(
"T0HLTLooseElectronDNNSelector")
230 MediumDNNElectronSelector = CompFactory.AsgElectronSelectorTool(
"T0HLTMediumElectronDNNSelector")
231 TightDNNElectronSelector = CompFactory.AsgElectronSelectorTool(
"T0HLTTightElectronDNNSelector")
233 LoosePhotonSelector = CompFactory.AsgPhotonIsEMSelector(
"T0HLTLoosePhotonSelector" )
234 MediumPhotonSelector = CompFactory.AsgPhotonIsEMSelector(
"T0HLTMediumPhotonSelector" )
235 TightPhotonSelector = CompFactory.AsgPhotonIsEMSelector(
"T0HLTTightPhotonSelector" )
237 LoosePhotonSelector.ForceConvertedPhotonPID =
True
238 LoosePhotonSelector.isEMMask = SelectionDefPhoton.PhotonLoose
239 MediumPhotonSelector.ForceConvertedPhotonPID =
True
240 MediumPhotonSelector.isEMMask = SelectionDefPhoton.PhotonMedium
241 TightPhotonSelector.ForceConvertedPhotonPID =
True
242 TightPhotonSelector.isEMMask = SelectionDefPhoton.PhotonTight
245 acc.addPublicTool(LooseElectronSelector)
246 acc.addPublicTool(MediumElectronSelector)
247 acc.addPublicTool(TightElectronSelector)
248 acc.addPublicTool(LooseLHSelector)
249 acc.addPublicTool(MediumLHSelector)
250 acc.addPublicTool(TightLHSelector)
251 acc.addPublicTool(VeryLooseLHSelector)
252 acc.addPublicTool(LooseDNNElectronSelector)
253 acc.addPublicTool(MediumDNNElectronSelector)
254 acc.addPublicTool(TightDNNElectronSelector)
257 raise RuntimeError(
'2022 (Run 3) configuration not available yet' )
262 LooseElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMLooseSelectorCutDefs.conf"
263 MediumElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMMediumSelectorCutDefs.conf"
264 TightElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMTightSelectorCutDefs.conf"
266 LooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodLooseOfflineConfig2017_CutBL_Smooth.conf"
267 MediumLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodMediumOfflineConfig2017_Smooth.conf"
268 TightLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodTightOfflineConfig2017_Smooth.conf"
269 VeryLooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth.conf"
271 LooseDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20240628/ElectronDNNMulticlassLoose.conf"
272 MediumDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20240628/ElectronDNNMulticlassMedium.conf"
273 TightDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20240628/ElectronDNNMulticlassTight.conf"
275 TightPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMTightSelectorCutDefs.conf"
276 MediumPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMMediumSelectorCutDefs.conf"
277 LoosePhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMLooseSelectorCutDefs.conf"
281 LooseElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMLooseSelectorCutDefs.conf"
282 MediumElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMMediumSelectorCutDefs.conf"
283 TightElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMTightSelectorCutDefs.conf"
285 LooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodLooseOfflineConfig2016_CutBL_Smooth.conf"
286 MediumLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodMediumOfflineConfig2016_Smooth.conf"
287 TightLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodTightOfflineConfig2016_Smooth.conf"
288 VeryLooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodVeryLooseOfflineConfig2016_Smooth.conf"
290 LooseDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc16_20210430/ElectronDNNMulticlassLoose.conf"
291 MediumDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc16_20210430/ElectronDNNMulticlassMedium.conf"
292 TightDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc16_20210430/ElectronDNNMulticlassTight.conf"
294 TightPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMTightSelectorCutDefs.conf"
295 MediumPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMMediumSelectorCutDefs.conf"
296 LoosePhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMLooseSelectorCutDefs.conf"
300 raise RuntimeError(
'Wrong run flag configuration' )
307 self.
__logger.info(
"Creating the Zee monitor algorithm LH only...")
308 self.
zeeMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithm,
"TrigEgammaMonitorTagAndProbeAlgorithm_Zee_LH" )
310 self.
zeeMonAlg.MatchTool = EgammaMatchTool
316 self.
zeeMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
317 self.
zeeMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
318 self.
zeeMonAlg.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
322 self.
zeeMonAlg.OfflineTagSelector=
'lhtight'
323 self.
zeeMonAlg.OfflineProbeSelector=
'lhloose'
330 self.
zeeMonAlg.ApplyJetNearProbeSelection =
False
336 self.
__logger.info(
"Creating the Zee monitor algorithm DNN only...")
337 self.
zeeMonAlg_dnn = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithm,
"TrigEgammaMonitorTagAndProbeAlgorithm_Zee_DNN" )
345 self.
zeeMonAlg_dnn.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
346 self.
zeeMonAlg_dnn.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
347 self.
zeeMonAlg_dnn.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
373 self.
__logger.info(
"Creating the Jpsiee monitor algorithm...")
374 self.
jpsieeMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithm,
"TrigEgammaMonitorTagAndProbeAlgorithm_Jpsiee" )
383 self.
jpsieeMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
384 self.
jpsieeMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
385 self.
jpsieeMonAlg.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
401 self.
__logger.info(
"Creating the Electron monitor algorithm...")
402 self.
elMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorElectronAlgorithm,
"TrigEgammaMonitorElectronAlgorithm" )
403 self.
elMonAlg.MatchTool = EgammaMatchTool
404 self.
elMonAlg.Analysis =
"Electrons"
405 self.
elMonAlg.ElectronKey =
'Electrons'
409 self.
elMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
410 self.
elMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
411 self.
elMonAlg.ForcePidSelection=
True
412 self.
elMonAlg.ForceProbeIsolation=
False
428 self.
__logger.info(
"Creating the Photon monitor algorithm...")
429 self.
phMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorPhotonAlgorithm,
"TrigEgammaMonitorPhotonAlgorithm" )
431 self.
phMonAlg.MatchTool = EgammaMatchTool
433 self.
phMonAlg.PhotonIsolationKeys = [
"Photons.topoetcone20",
"Photons.topoetcone40"]
436 self.
phMonAlg.PhotonIsEMSelector =[TightPhotonSelector,MediumPhotonSelector,LoosePhotonSelector]
440 self.
phMonAlg.ForcePidSelection=
True
454 self.
__logger.info(
"Creating the combo monitor algorithm...")
455 self.
topoMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTopoAlgorithm,
"TrigEgammaMonitorTopoAlgorithm" )
462 self.
topoMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
463 self.
topoMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector]
1155 """ Method to define all binning required that is variable"""
1158 coarse_eta_bins = [-2.47,-1.52,-1.37,-0.60,0.00,0.60,1.37,1.52,2.47]
1160 coarse_et_bins = [4.,20.,30.,40.,50.,60.,150.]
1162 default_eta_bins = [-2.47,-2.37,-2.01,-1.81,-1.52,-1.37,-1.15,-0.80,-0.60,-0.10,0.00,
1163 0.10, 0.60, 0.80, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
1165 default_et_bins = [4.,7.,10.,15.,20.,25.,30.,35.,40.,45.,50.,60.,80.,150.]
1167 etabins = [-2.47,-2.37,-2.01,-1.81,-1.52,-1.37,-1.15,-0.8,-0.6,-0.1,
1168 0.0,0.1,0.6,0.8,1.15,1.37,1.52,1.81,2.01,2.37,2.47]
1171 etbins_Zee = [0.,2.,4.,6.,8.,10.,
1172 12.,14.,16.,18.,20.,22.,24.,26.,28.,
1173 30.,32.,34.,36.,38.,40.,42.,44.,46.,48.,50.,55.,60.,65.,80.,100.,120.,140., 170., 200.,250.]
1175 etbins_Jpsiee = [ 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5,
1176 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5,
1177 10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,
1178 15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,
1179 20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,