def getElectronSelector(self, name="", outputLinkCollection=""): if name != "": self.name = name if outputLinkCollection != "": self.outputLinkCollection = outputLinkCollection electronIsEM = egammaPID.isEM if self.requireTight: electronIsEM = egammaPID.ElectronTight return D2PDElectronSelector( self.name, inputCollection='ElectronAODCollection', outputLinkCollection=self.outputLinkCollection, minNumberPassed=self.minNumberPassed, ptMin=self.ptMin * Units.GeV, clusterEtaMax=self.clusterEtaMax, electronIsEM=electronIsEM)
from ROOT import egammaPID from ROOT import egammaParameters from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D2PDMaker.D2PDMakerConf import D2PDElectronSelector from D2PDMaker.D2PDMakerConf import D2PDParticleCombiner from AthenaCommon.AlgSequence import AlgSequence preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) preseq += D2PDElectronSelector( "SMWZ_LowPtElectronFilter", inputCollection = 'ElectronAODCollection', outputCollection = 'LowPtElectrons', clusterEtaMin = -2.5, clusterEtaMax = 2.5, electronID = egammaPID.ElectronIDMediumPP, etMin = 5.0*Units.GeV ) preseq += D2PDElectronSelector( "SMWZ_MediumPtElectronFilter", inputCollection = 'ElectronAODCollection', outputCollection = 'MediumPtElectrons', clusterEtaMin = -2.5, clusterEtaMax = 2.5, electronID = egammaPID.ElectronIDLoosePP, etMin = 10.0*Units.GeV ) from RecExConfig.RecAlgsFlags import recAlgs if recAlgs.doEgammaBremReco():
rec.readESD = False athenaCommonFlags.PoolAODInput = InputFiles # Import the needed algorithms and tools from AnalysisUtils.AnalysisUtilsConf import ElectronIDSelector from D2PDMaker.D2PDMakerConf import D2PDElectronSelector ToolSvc += ElectronIDSelector("RobustLooseElectronFilterSelector", isEM="RobustLoose") theJob += D2PDElectronSelector( "RobustLooseElectronFilter", OutputLevel=INFO, inputCollection='ElectronAODCollection', outputCollection='RobustLooseElectronCollection', minNumberPassed=1, electronVetoAuthorList=[], iSelectorToolList=[ToolSvc.RobustLooseElectronFilterSelector], clusterEtMin=0., clusterEtaMax=1000) theJob += H4lDPDMaker.H4lElectronFilter("H4l_2ElectronFilter",nElec=2,\ eTCuts=[10*Units.GeV,10*Units.GeV],\ # electron quality checked before qualityCuts=[eQual,eQual],\ mass=10*Units.GeV,
include.block( 'QcdD3PDMaker/ElectronSelector.py' ) from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D2PDMaker.D2PDMakerConf import D2PDElectronSelector from D2PDMaker.D2PDMakerConf import D2PDParticleCombiner from AthenaCommon.AlgSequence import AlgSequence preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) preseq += D2PDElectronSelector( "SMQCD_GoodElectronFilter", inputCollection = 'ElectronAODCollection', outputCollection = 'GoodElectrons', ptMin = 10.0*Units.GeV )
topSequence += D2PDPhotonSelector( "PhotonTightSelectorInHighMassDiJetStream", OutputLevel=INFO, inputCollection='PhotonAODCollection', outputLinkCollection='PhotonTightLinkCollectionInHighMassDiJetStream', minNumberPassed=1, photonIsEM=egammaPID.PhotonTight) # Load the actual filter from D2PDMaker.D2PDMakerConf import D2PDElectronSelector # Create an instance of this filter and add it to the AlgSequence # Also, configure the filter to your needs. This are just some examples topSequence += D2PDElectronSelector( "ElectronMediumSelectorInHighMassDiJetStream", OutputLevel=INFO, inputCollection='ElectronAODCollection', outputLinkCollection='ElectronMediumLinkCollectionInHighMassDiJetStream', minNumberPassed=1, electronIsEM=egammaPID.ElectronMedium, electronAuthor=egammaParameters.AuthorElectron) algsToBookkeep.append("ElectronMediumSelectorInHighMassDiJetStream") # Load the actual filter from D2PDMaker.D2PDMakerConf import D2PDMuonSelector # Create an instance of this filter and add it to the AlgSequence # Also, configure the filter to your needs. This are just some examples topSequence += D2PDMuonSelector( "StacoMuonTightSelectorInHighMassDiJetStream", OutputLevel=INFO, inputCollection='StacoMuonCollection', outputLinkCollection='StacoMuonTightLinkCollectionInHighMassDiJetStream', minNumberPassed=1,
inputCollection='StacoMuonCollection', outputLinkCollection='MyH4lLooseMuonLinkCollection', minNumberPassed=2, etMin=5.0 * Units.GeV, etaMin=-2.5, etaMax=2.5, etaVetoRanges="[-1.52, -1.37], [1.37, 1.52]") # - the electron selector from D2PDMaker.D2PDMakerConf import D2PDElectronSelector topSequence += D2PDElectronSelector( "ElectronSelectorInExampleH4lStream", OutputLevel=INFO, inputCollection='ElectronAODCollection', outputLinkCollection='MyH4lLooseElectronLinkCollection', minNumberPassed=2, etMin=15.0 * Units.GeV, etaMin=-2.5, etaMax=2.5, etaVetoRanges="[-1.52, -1.37], [1.37, 1.52]", electronIsEM=egammaPID.ElectronLoose, electronAuthor=egammaParameters.AuthorElectron) #==================================================================== # Define the particle combinations #==================================================================== # - the Z->mumu Boson (on-shell) from D2PDMaker.D2PDMakerConf import D2PDParticleCombiner topSequence += D2PDParticleCombiner( "D2PDParticleCombinerInExampleH4lStream_ZmumuBoson", OutputLevel=INFO,
# Electron filters import PyUtils.RootUtils as ru ROOT = ru.import_root() import cppyy cppyy.loadDictionary('egammaEnumsDict') from ROOT import egammaPID from ROOT import egammaParameters from D2PDMaker.D2PDMakerConf import D2PDElectronSelector ElectronSelectorSUSY_forEMu = D2PDElectronSelector( "ElectronSelectorSUSY_forEMu", inputCollection = 'ElectronAODCollection', outputLinkCollection = 'SelectedElectronLinks_forEMu', electronIsEM = egammaPID.ElectronMedium, #electronAuthor = egammaParameters.AuthorElectron, #requested by Jovan clusterEMCaloLayerEtaMin = -2.5, clusterEMCaloLayerEtaMax = 2.5, clusterEMCaloLayer = 2, minNumberPassed = 1, etMin = 6.0*Units.GeV ) #ElectronSelectorSUSY is a sub-set of ElectronSelectorSUSY_forEMu, with tighter Et cut ElectronSelectorSUSY = D2PDElectronSelector( "ElectronSelectorSUSY", inputCollection = 'SelectedElectronLinks_forEMu', outputLinkCollection = 'SelectedElectronLinks', etMin = 12.0*Units.GeV, minNumberPassed =1 ) #DiElectronSelectorSUSY is a sub-set of ElectronSelectorSUSY_forEMu, requinring two muons
from ROOT import egammaParameters from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D2PDMaker.D2PDMakerConf import D2PDElectronSelector from D2PDMaker.D2PDMakerConf import D2PDParticleCombiner from AthenaCommon.AlgSequence import AlgSequence preseq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()) preseq += D2PDElectronSelector( "SMTRILEP_TriLepElectronFilter", inputCollection='ElectronAODCollection', outputCollection='TrilepElectrons', etMin=4.0 * Units.GeV, clusterEtaMin=-5, clusterEtaMax=5, #electronID = egammaPID.ElectronIDLoosePP, minNumberPassed=1) #from RecExConfig.RecAlgsFlags import recAlgs #if recAlgs.doEgammaBremReco(): # gsfElectronContainer = 'HighPtGSFElectrons' # preseq += D2PDElectronSelector( "SMTRILEP_HighPtGSFElectronFilter", # inputCollection = 'GSFElectronAODCollection', # outputCollection = 'HighPtGSFElectrons', # etMin = 20.0*Units.GeV, # clusterEtaMin = -2.5, # clusterEtaMax = 2.5, # electronID = egammaPID.ElectronIDLoosePP,
THistService = 'THistSvc/ElLoose18StreamTHistSvc', inputVertexCollection = 'VxPrimaryCandidate', minNumberVxTracks = 3 ) algsToBookkeep.append( "StreamElLoose18ControlPlots_AllEvents" ) from D2PDMaker.D2PDMakerConf import D2PDElectronSelector # Create an instance of this filter and add it to the AlgSequence # Also, configure the filter to your needs. This are just some examples topSequence += D2PDElectronSelector( "ElectronLooseSelectorInElLoose18Stream", OutputLevel = INFO, inputCollection = 'ElectronAODCollection', outputLinkCollection = 'CentralLooseElectronLinkCollectionInElLoose18Stream', minNumberPassed = 1, electronIsEM = egammaPID.ElectronLoose, electronAuthor = egammaParameters.AuthorElectron, clusterEtMin = 18.0*Units.GeV ) algsToBookkeep.append( "ElectronLooseSelectorInElLoose18Stream" ) #==================================================================== # Define the test DPD output stream #==================================================================== ElLoose18Stream = MSMgr.NewPoolStream( streamName, fileName )
#==================================================================== # Define the individual central electron selections #==================================================================== # Load the actual filter from D2PDMaker.D2PDMakerConf import D2PDElectronSelector # Create an instance of this filter and add it to the AlgSequence # Also, configure the filter to your needs. This are just some examples topSequence += D2PDElectronSelector( "ElectronLooseSelectorInWenuStream", OutputLevel = INFO, inputCollection = 'ElectronAODCollection', outputLinkCollection = 'WenuStreamCentralLooseElectronLinkCollection', minNumberPassed = 1, electronIsEM = egammaPID.ElectronLoose, electronAuthor = egammaParameters.AuthorElectron, clusterEtMin = 20.0*Units.GeV ) algsToBookkeep.append( "ElectronLooseSelectorInWenuStream" ) #-------------------------------------------------------------------- # If the input is Monte Carlo, also apply truth matching. # This will be done for ALL electrons in the ElectronAODCollection # and not only for the ones surviving the selection cuts! #-------------------------------------------------------------------- if inputIsSimulation : # Schedule the associations with the electron selector, i.e., performed for all electrons in the ElectronAODCollection topSequence.ElectronLooseSelectorInWenuStream.associationToolList = [ ToolSvc.ElectronMCTruthClassifierAssociationToolInWenuStream, ToolSvc.ElectronDeltaRTruthAssociationToolInWenuStream,
include.block("PhysicsD3PDMaker/ElectronSelector.py") from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D2PDMaker.D2PDMakerConf import D2PDElectronSelector from D2PDMaker.D2PDMakerConf import D2PDParticleCombiner ## Import the module that allows to use named units, e.g. GeV import AthenaCommon.SystemOfUnits as Units ## Get pre sequence from AthenaCommon.AlgSequence import AlgSequence preseq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()) ## Define event selector from D2PDMaker.D2PDMakerConf import D2PDElectronSelector preseq += D2PDElectronSelector( "WPrimeElectronSelector", OutputLevel=INFO, inputCollection='ElectronAODCollection', minNumberPassed=1, ptMin=20.0 * Units.GeV, )
leptonFilter = HSG5__LeptonFilter( "HSG5WH_SingleLeptonFilter", ElectronFilterNameAndType="D2PDElectronSelector/HSG5WH_ElectronSelector", MuonFilterNameAndTypeVec=[ "D2PDMuonSelector/HSG5WH_MuidMuonSelector", "D2PDMuonSelector/HSG5WH_StacoMuonSelector", "D2PDMuonSelector/HSG5WH_ThirdChainMuonSelector" ]) # create electron and muon selectors from D2PDMaker.D2PDMakerConf import D2PDElectronSelector leptonFilter += D2PDElectronSelector( "HSG5WH_ElectronSelector", inputCollection='ElectronAODCollection', outputLinkCollection='HSG5WH_LooseElectronLinkCollection', minNumberPassed=1, etMin=15.0 * Units.GeV, clusterEtaMin=-2.5, clusterEtaMax=2.5 #clusterEtaVetoRanges = "[-1.52, -1.37], [1.37, 1.52]" ) from HSG5DPDUtils.HSG5Selectors import MuonSelector muSelector = MuonSelector(minNumberPassed=1, ptMin=18.0, absEtaMax=2.5, requireIsLoose=True) leptonFilter += muSelector.getMuonSelector( 'HSG5WH_MuidMuonSelector', 'MuidMuonCollection', 'HSG5WH_LooseMuidMuonLinkCollection') leptonFilter += muSelector.getMuonSelector(
from ROOT import egammaPID from ROOT import egammaParameters from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from D2PDMaker.D2PDMakerConf import D2PDElectronSelector from D2PDMaker.D2PDMakerConf import D2PDParticleCombiner from AthenaCommon.AlgSequence import AlgSequence preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) preseq += D2PDElectronSelector( "SMWZ_HighPtElectronFilter", inputCollection = 'ElectronAODCollection', outputCollection = 'HighPtElectrons', etMin = 20.0*Units.GeV, clusterEtaMin = -2.5, clusterEtaMax = 2.5, electronID = egammaPID.ElectronIDLoosePP, minNumberPassed = 1 ) from RecExConfig.RecAlgsFlags import recAlgs if recAlgs.doEgammaBremReco(): gsfElectronContainer = 'HighPtGSFElectrons' preseq += D2PDElectronSelector( "SMWZ_HighPtGSFElectronFilter", inputCollection = 'GSFElectronAODCollection', outputCollection = 'HighPtGSFElectrons', etMin = 20.0*Units.GeV, clusterEtaMin = -2.5, clusterEtaMax = 2.5, electronID = egammaPID.ElectronIDLoosePP,
leptonFilter = HSG5__LeptonFilter( "HSG5WHU_SingleLeptonFilter", ElectronFilterNameAndType="D2PDElectronSelector/HSG5WHU_ElectronSelector", MuonFilterNameAndTypeVec=[ "D2PDMuonSelector/HSG5WHU_MuidMuonSelector", "D2PDMuonSelector/HSG5WHU_StacoMuonSelector", "D2PDMuonSelector/HSG5WHU_ThirdChainMuonSelector" ]) # create electron and muon selectors from D2PDMaker.D2PDMakerConf import D2PDElectronSelector leptonFilter += D2PDElectronSelector( "HSG5WHU_ElectronSelector", inputCollection='ElectronAODCollection', outputLinkCollection='HSG5WHU_LooseElectronLinkCollection', minNumberPassed=1, ptMin=20.0 * Units.GeV, clusterEtaMin=-2.5, clusterEtaMax=2.5, electronIsEM=egammaPID.ElectronTight) from HSG5DPDUtils.HSG5Selectors import MuonSelector muSelector = MuonSelector(minNumberPassed=1, ptMin=18.0, absEtaMax=2.5, acceptIsCombined=True, acceptIsSegmentTagged=True, doRelPtCone20=True, relPtCone20Max=0.15) leptonFilter += muSelector.getMuonSelector(
StopOverride=False) from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter leptonFilter=HSG5__LeptonFilter("HSG5ZHLLunb_DileptonFilter", ElectronFilterNameAndType="D2PDElectronSelector/HSG5ZHLLunb_ElectronSelector", MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5ZHLLunb_MuidMuonSelector", "D2PDMuonSelector/HSG5ZHLLunb_StacoMuonSelector"]) # create electron and muon selectors from D2PDMaker.D2PDMakerConf import D2PDElectronSelector leptonFilter += D2PDElectronSelector( "HSG5ZHLLunb_ElectronSelector", inputCollection = 'ElectronAODCollection', outputLinkCollection = 'HSG5ZHLLunb_LooseElectronLinkCollection', minNumberPassed = 2, clusterEtMin = 15.0*Units.GeV, clusterEtaMin = -2.6, clusterEtaMax = 2.6, electronIsEM = egammaPID.ElectronLoose ) from HSG5DPDUtils.HSG5Selectors import MuonSelector muSelector = MuonSelector( minNumberPassed = 2, ptMin = 15.0, absEtaMax = 2.6, requireIsTight = True) leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_MuidMuonSelector', 'MuidMuonCollection', 'HSG5ZHLLunb_LooseMuidMuonLinkCollection') leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_StacoMuonSelector', 'StacoMuonCollection', 'HSG5ZHLLunb_LooseStacoMuonLinkCollection')