ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
MenuComponents.InViewRecoCA Class Reference
Inheritance diagram for MenuComponents.InViewRecoCA:
Collaboration diagram for MenuComponents.InViewRecoCA:

Public Member Functions

def __init__ (self, name, viewMaker=None, isProbe=False, **viewMakerArgs)
 
def mergeReco (self, ca)
 
def addRecoAlgo (self, algo)
 
def inputMaker (self)
 

Public Attributes

 name
 
 viewMakerAlg
 
 viewsSeq
 

Detailed Description

Class to handle in-view reco, sets up the View maker if not provided and exposes InputMaker so that more inputs to it can be added in the process of assembling the menu 

Definition at line 778 of file MenuComponents.py.

Constructor & Destructor Documentation

◆ __init__()

def MenuComponents.InViewRecoCA.__init__ (   self,
  name,
  viewMaker = None,
  isProbe = False,
**  viewMakerArgs 
)

Definition at line 780 of file MenuComponents.py.

780  def __init__(self, name, viewMaker=None, isProbe=False, **viewMakerArgs):
781  super( InViewRecoCA, self ).__init__()
782  self.name = name +"_probe" if isProbe else name
783  def updateHandle(baseTool, probeTool, handleName):
784  if hasattr(baseTool, handleName) and getattr(baseTool, handleName).Path!="StoreGateSvc+":
785  setattr(probeTool, handleName, getattr(probeTool, handleName).Path + "_probe")
786 
787  if len(viewMakerArgs) != 0:
788  assert viewMaker is None, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
789 
790  if viewMaker:
791  assert len(viewMakerArgs) == 0, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
792  if isProbe:
793  self.viewMakerAlg = viewMaker.__class__(viewMaker.getName()+'_probe', **viewMaker._properties)
794  self.viewMakerAlg.Views = viewMaker.Views+'_probe'
795  roiTool = self.viewMakerAlg.RoITool.__class.__(self.viewMakerAlg.RoITool.getName()+'_probe', **self.viewMakerAlg.RoITool._properties)
796  log.debug(f"InViewRecoCA: Setting InputCachedViews on {self.viewMaker.getName()} to read decisions from tag leg {viewMaker.getName()}: {viewMaker.InputMakerOutputDecisions}")
797  self.viewMakerAlg.InputCachedViews = viewMaker.InputMakerOutputDecisions
798  updateHandle(viewMakerArgs['RoITool'], roiTool, "RoisWriteHandleKey")
799  if hasattr(viewMakerArgs['RoITool'], "RoiCreator"):
800  updateHandle(viewMakerArgs['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
801  updateHandle(viewMakerArgs['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
802 
803  self.viewMakerAlg.RoITool = roiTool
804  else:
805  self.viewMakerAlg = viewMaker
806  else:
807  assert 'name' not in viewMakerArgs, "The name of view maker is predefined by the name of sequence"
808  assert 'Views' not in viewMakerArgs, "The Views is predefined by the name of sequence"
809  assert 'ViewsNodeName' not in viewMakerArgs, "The ViewsNodeName is predefined by the name of sequence"
810  if 'RoITool' in viewMakerArgs:
811  roiTool = viewMakerArgs['RoITool']
812  else:
813  roiTool = CompFactory.ViewCreatorInitialROITool()
814 
815 
816  args = {'name': f'IM_{self.name}',
817  'ViewFallThrough' : True,
818  'RoIsLink' : 'initialRoI',
819  'RoITool' : roiTool,
820  'InViewRoIs' : f'{name}RoIs',
821  'Views' : f'{name}Views'+'_probe' if isProbe else f'{name}Views',
822  'ViewNodeName' : f'{name}InViews'+'_probe' if isProbe else f'{name}InViews',
823  'RequireParentView' : False,
824  'mergeUsingFeature' : False }
825  args.update(**viewMakerArgs)
826  self.viewMakerAlg = CompFactory.EventViewCreatorAlgorithm(**args)
827  if isProbe:
828  updateHandle(args['RoITool'], roiTool, "RoisWriteHandleKey")
829  if hasattr(args['RoITool'], "RoiCreator"):
830  updateHandle(args['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
831  updateHandle(args['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
832  self.viewsSeq = parOR( self.viewMakerAlg.ViewNodeName )
833  self.addSequence( self.viewsSeq )
834 

Member Function Documentation

◆ addRecoAlgo()

def MenuComponents.InViewRecoCA.addRecoAlgo (   self,
  algo 
)
Place algorithm in the correct reconstruction sequence 

Definition at line 840 of file MenuComponents.py.

840  def addRecoAlgo( self, algo ):
841  """ Place algorithm in the correct reconstruction sequence """
842  return self.addEventAlgo( algo, sequenceName=self.viewsSeq.name )
843 
844 

◆ inputMaker()

def MenuComponents.InViewRecoCA.inputMaker (   self)

Definition at line 845 of file MenuComponents.py.

845  def inputMaker( self ):
846  return self.viewMakerAlg
847 
848 

◆ mergeReco()

def MenuComponents.InViewRecoCA.mergeReco (   self,
  ca 
)
Merge CA moving reconstruction algorithms into the right sequence 

Definition at line 835 of file MenuComponents.py.

835  def mergeReco( self, ca ):
836  """ Merge CA moving reconstruction algorithms into the right sequence """
837  return self.merge( ca, sequenceName=self.viewsSeq.name )
838 
839 

Member Data Documentation

◆ name

MenuComponents.InViewRecoCA.name

Definition at line 782 of file MenuComponents.py.

◆ viewMakerAlg

MenuComponents.InViewRecoCA.viewMakerAlg

Definition at line 793 of file MenuComponents.py.

◆ viewsSeq

MenuComponents.InViewRecoCA.viewsSeq

Definition at line 832 of file MenuComponents.py.


The documentation for this class was generated from the following file:
python.processes.powheg.ZZj_MiNNLO.ZZj_MiNNLO.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZj_MiNNLO.py:18
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:271