ATLAS Offline Software
Loading...
Searching...
No Matches
EvgenAnalysisAlg.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaPython import PyAthena
4
5
7 """\
8 Base class for implementing event generator interfaces in Python.
9 Author: Andy Buckley
10 """
11
12 def __init__(self, name="EvgenAnalysisAlg"):
13 super(EvgenAnalysisAlg, self).__init__(name=name)
14 self.McEventKey = "GEN_EVENT"
15
16 def events(self):
17 "Get the current MC event collection"
18 return self.evtStore[self.McEventKey]
19
20 def event(self):
21 "Get the first event in the collection"
22 return self.events()[0]
23
24 # TODO: add histo helpers cf. C++ GenAnalysisAlg
__init__(self, name="EvgenAnalysisAlg")