231 EgammaMatchTool = CompFactory.TrigEgammaMatchingToolMT()
232 EgammaMatchTool.DeltaR=0.4
233 acc.addPublicTool(EgammaMatchTool)
234 cppyy.load_library(
'libElectronPhotonSelectorToolsDict')
238 LooseElectronSelector = CompFactory.AsgElectronIsEMSelector(
"T0HLTLooseElectronSelector")
239 MediumElectronSelector = CompFactory.AsgElectronIsEMSelector(
"T0HLTMediumElectronSelector")
240 TightElectronSelector = CompFactory.AsgElectronIsEMSelector(
"T0HLTTightElectronSelector")
241 LooseLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTLooseLHSelector")
242 MediumLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTMediumLHSelector")
243 TightLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTTightLHSelector")
244 VeryLooseLHSelector = CompFactory.AsgElectronLikelihoodTool(
"T0HLTVeryLooseLHSelector")
247 LooseDNNElectronSelector = CompFactory.AsgElectronSelectorTool(
"T0HLTLooseElectronDNNSelector")
248 MediumDNNElectronSelector = CompFactory.AsgElectronSelectorTool(
"T0HLTMediumElectronDNNSelector")
249 TightDNNElectronSelector = CompFactory.AsgElectronSelectorTool(
"T0HLTTightElectronDNNSelector")
251 LoosePhotonSelector = CompFactory.AsgPhotonIsEMSelector(
"T0HLTLoosePhotonSelector" )
252 MediumPhotonSelector = CompFactory.AsgPhotonIsEMSelector(
"T0HLTMediumPhotonSelector" )
253 TightPhotonSelector = CompFactory.AsgPhotonIsEMSelector(
"T0HLTTightPhotonSelector" )
255 LoosePhotonSelector.ForceConvertedPhotonPID =
True
256 LoosePhotonSelector.isEMMask = SelectionDefPhoton.PhotonLoose
257 MediumPhotonSelector.ForceConvertedPhotonPID =
True
258 MediumPhotonSelector.isEMMask = SelectionDefPhoton.PhotonMedium
259 TightPhotonSelector.ForceConvertedPhotonPID =
True
260 TightPhotonSelector.isEMMask = SelectionDefPhoton.PhotonTight
263 acc.addPublicTool(LooseElectronSelector)
264 acc.addPublicTool(MediumElectronSelector)
265 acc.addPublicTool(TightElectronSelector)
266 acc.addPublicTool(LooseLHSelector)
267 acc.addPublicTool(MediumLHSelector)
268 acc.addPublicTool(TightLHSelector)
269 acc.addPublicTool(VeryLooseLHSelector)
270 acc.addPublicTool(LooseDNNElectronSelector)
271 acc.addPublicTool(MediumDNNElectronSelector)
272 acc.addPublicTool(TightDNNElectronSelector)
275 raise RuntimeError(
'2022 (Run 3) configuration not available yet' )
280 LooseElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMLooseSelectorCutDefs.conf"
281 MediumElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMMediumSelectorCutDefs.conf"
282 TightElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMTightSelectorCutDefs.conf"
284 LooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodLooseOfflineConfig2017_CutBL_Smooth.conf"
285 MediumLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodMediumOfflineConfig2017_Smooth.conf"
286 TightLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodTightOfflineConfig2017_Smooth.conf"
287 VeryLooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth.conf"
289 LooseDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20240628/ElectronDNNMulticlassLoose.conf"
290 MediumDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20240628/ElectronDNNMulticlassMedium.conf"
291 TightDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc20_20240628/ElectronDNNMulticlassTight.conf"
293 TightPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMTightSelectorCutDefs.conf"
294 MediumPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMMediumSelectorCutDefs.conf"
295 LoosePhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMLooseSelectorCutDefs.conf"
299 LooseElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMLooseSelectorCutDefs.conf"
300 MediumElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMMediumSelectorCutDefs.conf"
301 TightElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronIsEMTightSelectorCutDefs.conf"
303 LooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodLooseOfflineConfig2016_CutBL_Smooth.conf"
304 MediumLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodMediumOfflineConfig2016_Smooth.conf"
305 TightLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodTightOfflineConfig2016_Smooth.conf"
306 VeryLooseLHSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20160512/ElectronLikelihoodVeryLooseOfflineConfig2016_Smooth.conf"
308 LooseDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc16_20210430/ElectronDNNMulticlassLoose.conf"
309 MediumDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc16_20210430/ElectronDNNMulticlassMedium.conf"
310 TightDNNElectronSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc16_20210430/ElectronDNNMulticlassTight.conf"
312 TightPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMTightSelectorCutDefs.conf"
313 MediumPhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMMediumSelectorCutDefs.conf"
314 LoosePhotonSelector.ConfigFile =
"ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMLooseSelectorCutDefs.conf"
318 raise RuntimeError(
'Wrong run flag configuration' )
325 self.
__logger.info(
"Creating the Zee monitor algorithm LH only...")
326 self.
zeeMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithm,
"TrigEgammaMonitorTagAndProbeAlgorithm_Zee_LH" )
328 self.
zeeMonAlg.MatchTool = EgammaMatchTool
334 self.
zeeMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
335 self.
zeeMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
336 self.
zeeMonAlg.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
340 self.
zeeMonAlg.OfflineTagSelector=
'lhtight'
341 self.
zeeMonAlg.OfflineProbeSelector=
'lhloose'
348 self.
zeeMonAlg.ApplyJetNearProbeSelection =
False
354 self.
__logger.info(
"Creating the Zee monitor algorithm DNN only...")
355 self.
zeeMonAlg_dnn = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithm,
"TrigEgammaMonitorTagAndProbeAlgorithm_Zee_DNN" )
363 self.
zeeMonAlg_dnn.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
364 self.
zeeMonAlg_dnn.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
365 self.
zeeMonAlg_dnn.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
389 self.
__logger.info(
"Creating the Zeegamma monitor algorithm")
390 self.
zeegMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithmZeeg,
"TrigEgammaMonitorTagAndProbeZeeg" )
396 self.
zeegMonAlg.PhotonIsolationKeys = [
"Photons.topoetcone20",
"Photons.topoetcone40"]
401 self.
zeegMonAlg.PhotonIsEMSelector =[TightPhotonSelector,MediumPhotonSelector,LoosePhotonSelector]
402 self.
zeegMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
403 self.
zeegMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
404 self.
zeegMonAlg.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
417 self.
zeegMonAlg.ApplyJetNearProbeSelection =
False
429 self.
__logger.info(
"Creating the Jpsiee monitor algorithm...")
430 self.
jpsieeMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTagAndProbeAlgorithm,
"TrigEgammaMonitorTagAndProbeAlgorithm_Jpsiee" )
439 self.
jpsieeMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
440 self.
jpsieeMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
441 self.
jpsieeMonAlg.ElectronDNNSelectorTool =[TightDNNElectronSelector,MediumDNNElectronSelector,LooseDNNElectronSelector]
457 self.
__logger.info(
"Creating the Electron monitor algorithm...")
458 self.
elMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorElectronAlgorithm,
"TrigEgammaMonitorElectronAlgorithm" )
459 self.
elMonAlg.MatchTool = EgammaMatchTool
460 self.
elMonAlg.Analysis =
"Electrons"
461 self.
elMonAlg.ElectronKey =
'Electrons'
465 self.
elMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
466 self.
elMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector,VeryLooseLHSelector]
467 self.
elMonAlg.ForcePidSelection=
True
468 self.
elMonAlg.ForceProbeIsolation=
False
484 self.
__logger.info(
"Creating the Photon monitor algorithm...")
485 self.
phMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorPhotonAlgorithm,
"TrigEgammaMonitorPhotonAlgorithm" )
487 self.
phMonAlg.MatchTool = EgammaMatchTool
489 self.
phMonAlg.PhotonIsolationKeys = [
"Photons.topoetcone20",
"Photons.topoetcone40"]
492 self.
phMonAlg.PhotonIsEMSelector =[TightPhotonSelector,MediumPhotonSelector,LoosePhotonSelector]
496 self.
phMonAlg.ForcePidSelection=
True
510 self.
__logger.info(
"Creating the combo monitor algorithm...")
511 self.
topoMonAlg = self.
helper.addAlgorithm( CompFactory.TrigEgammaMonitorTopoAlgorithm,
"TrigEgammaMonitorTopoAlgorithm" )
518 self.
topoMonAlg.ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector]
519 self.
topoMonAlg.ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector]
1234 """ Method to define all binning required that is variable"""
1237 coarse_eta_bins = [-2.47,-1.52,-1.37,-0.60,0.00,0.60,1.37,1.52,2.47]
1239 coarse_et_bins = [4.,20.,30.,40.,50.,60.,150.]
1241 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,
1242 0.10, 0.60, 0.80, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
1244 default_et_bins = [4.,7.,10.,15.,20.,25.,30.,35.,40.,45.,50.,60.,80.,150.]
1246 etabins = [-2.47,-2.37,-2.01,-1.81,-1.52,-1.37,-1.15,-0.8,-0.6,-0.1,
1247 0.0,0.1,0.6,0.8,1.15,1.37,1.52,1.81,2.01,2.37,2.47]
1250 etbins_Zee = [0.,2.,4.,6.,8.,10.,
1251 12.,14.,16.,18.,20.,22.,24.,26.,28.,
1252 30.,32.,34.,36.,38.,40.,42.,44.,46.,48.,50.,55.,60.,65.,80.,100.,120.,140., 170., 200.,250.]
1254 etbins_Jpsiee = [ 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5,
1255 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5,
1256 10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,
1257 15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,
1258 20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,