ATLAS Offline Software
AlgorithmTest.py
Go to the documentation of this file.
1 
9 
10 
11 from AthenaCommon.AlgSequence import AlgSequence
12 topSequence = AlgSequence()
13 
14 # add my Algorithm
15 from PyAnalysisExamples.PyAnalysisExamplesConf import AthPyEx__MySelectionAlg
16 topSequence += AthPyEx__MySelectionAlg("MySelectionAlg")
17 
18 # set parameters
19 myNewKey = "MyNewCollection"
20 MySelectionAlg = topSequence.MySelectionAlg
21 MySelectionAlg.ThrPT = 30*GeV
22 MySelectionAlg.NewKey = myNewKey
23 
24 # init application mgr
25 theApp.initialize()
26 
27 # run 1 event
28 theApp.nextEvent()
29 
30 # get transient Electrons which are recorded into SG by MySelectonAlg
31 econ = PyParticleTools.getElectrons(myNewKey)
32 for ie in range(len(econ)):
33  print ("pt %f" % econ[ie].pt())
34 
35 # load dict for MyDetObj
36 pylcgdict.load_library("libPyAnalysisExamplesDict")
37 
38 # retrieve an object from DetectorStore
39 obj = PyKernel.retrieveDet(g.AthPyEx.MyDetObj,'myDetObj')
40 print (obj.name())
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
property_tree
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195