ATLAS Offline Software
Loading...
Searching...
No Matches
example_evgenanalysis.py
Go to the documentation of this file.
1# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3include("EvgenProdTools/StdAnalysisSetup.py")
4
5class MyAna(EvgenAnalysisAlg):
6
7 def __init__(self, name="MyAna"):
8 super(MyAna, self).__init__(name=name)
9
10 def execute(self):
11 evtcoll = self.evtStore[self.McEventKey]
12 evt = evtcoll[0]
13 #evt.weights().push_back(3.142)
14 print evt.particles_size(), ":", [w for w in evt.weights()]
15 return StatusCode.Success
16
17
18svcMgr.EventSelector.InputCollections = ["mc.evnt.pool.root"]
19topSeq += MyAna()