ATLAS Offline Software
EgammaAnalysisAlgorithmsTest.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from AnaAlgorithm.AlgSequence import AlgSequence
4 from AnaAlgorithm.DualUseConfig import createService
5 from AsgAnalysisAlgorithms.AsgAnalysisAlgorithmsTest import pileupConfigFiles
6 
7 def makeSequence (dataType, likelihood=True) :
8  algSeq = AlgSequence()
9 
10  # Set up the systematics loader/handler service:
11  sysService = createService( 'CP::SystematicsSvc', 'SystematicsSvc', sequence = algSeq )
12  sysService.sigmaRecommended = 1
13  createService( 'CP::SelectionNameSvc', 'SelectionNameSvc', sequence = algSeq )
14 
15  prwfiles, lumicalcfiles = pileupConfigFiles(dataType)
16 
17  # Include, and then set up the pileup analysis sequence:
18  from AsgAnalysisAlgorithms.PileupAnalysisSequence import \
19  makePileupAnalysisSequence
20  pileupSequence = makePileupAnalysisSequence(
21  dataType,
22  userPileupConfigs=prwfiles,
23  userLumicalcFiles=lumicalcfiles,
24  )
25  pileupSequence.configure( inputName = {}, outputName = {} )
26  algSeq += pileupSequence
27 
28  # Include, and then set up the electron analysis sequence:
29  from EgammaAnalysisAlgorithms.ElectronAnalysisSequence import \
30  makeElectronAnalysisSequence
31  if likelihood:
32  workingpoint = 'LooseLHElectron.Loose_VarRad'
33  else:
34  workingpoint = 'LooseDNNElectron.Loose_VarRad'
35  electronSequence = makeElectronAnalysisSequence( dataType, workingpoint, postfix = 'loose',
36  recomputeLikelihood=True, enableCutflow=True, enableKinematicHistograms=True )
37  electronSequence.configure( inputName = 'Electrons',
38  outputName = 'AnalysisElectrons_%SYS%' )
39  algSeq += electronSequence
40 
41  # Include, and then set up the photon analysis sequence:
42  from EgammaAnalysisAlgorithms.PhotonAnalysisSequence import \
43  makePhotonAnalysisSequence
44  photonSequence = makePhotonAnalysisSequence( dataType, 'Tight.FixedCutTight', postfix = 'tight',
45  recomputeIsEM=False, enableCutflow=True, enableKinematicHistograms=True )
46  photonSequence.configure( inputName = 'Photons',
47  outputName = 'AnalysisPhotons_%SYS%' )
48  algSeq += photonSequence
49 
50  return algSeq
python.PhotonAnalysisSequence.makePhotonAnalysisSequence
def makePhotonAnalysisSequence(dataType, workingPoint, deepCopyOutput=False, shallowViewOutput=True, postfix='', crackVeto=False, enableCleaning=True, cleaningAllowLate=False, recomputeIsEM=False, ptSelectionOutput=False, enableCutflow=False, enableKinematicHistograms=False, defineSystObjectLinks=False, forceFullSimConfig=False)
Definition: PhotonAnalysisSequence.py:16
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
python.DualUseConfig.createService
def createService(typeName, serviceName, sequence=None)
Definition: DualUseConfig.py:127
python.EgammaAnalysisAlgorithmsTest.makeSequence
def makeSequence(dataType, likelihood=True)
Definition: EgammaAnalysisAlgorithmsTest.py:7
python.AsgAnalysisAlgorithmsTest.pileupConfigFiles
def pileupConfigFiles(dataType)
Definition: AsgAnalysisAlgorithmsTest.py:238
python.PileupAnalysisSequence.makePileupAnalysisSequence
def makePileupAnalysisSequence(dataType, campaign=None, files=None, useDefaultConfig=False, userLumicalcFiles=None, userPileupConfigs=None)
Definition: PileupAnalysisSequence.py:12
python.ElectronAnalysisSequence.makeElectronAnalysisSequence
def makeElectronAnalysisSequence(dataType, workingPoint, deepCopyOutput=False, shallowViewOutput=True, postfix='', recomputeLikelihood=False, chargeIDSelection=False, isolationCorrection=False, crackVeto=False, ptSelectionOutput=False, trackSelection=True, enableCutflow=False, enableKinematicHistograms=False, defineSystObjectLinks=False, forceFullSimConfig=False)
Definition: ElectronAnalysisSequence.py:13