3 """module to access particle objects interactively
5 Examples are in `PyAnalysisExamples/ParticleTest.py`_
7 .. _PyAnalysisExamples/ParticleTest.py: http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/PhysicsAnalysis/PyAnalysis/PyAnalysisExamples/share/ParticleTest.py?rev=HEAD&content-type=text/vnd.viewcvs-markup
10 :contact: Tadashi.Maeno@cern.ch
13 __docformat__ =
"restructuredtext en"
15 from PyKernel
import PyKernel
as PyK
18 """Retrieve ElectronContainer object from SG
20 :param aKey: key of the object
24 athena> econ = PyParticleTools.getElectrons('ElectronCollection')
25 athena> for e in econ:
26 ... print e.pt() # don't forget to put an additional whitespace before 'print'
27 ... # just hit the return key
30 return PyK.retrieve(PyK.GNS.ElectronContainer,aKey)
33 """Retrieve MuonContainer object from SG
35 :param aKey: key of the object
40 return PyK.retrieve(PyK.GNS.Analysis.MuonContainer,aKey)
43 """Retrieve NeutrinoContainer object from SG
45 :param aKey: key of the object
50 return PyK.retrieve(PyK.GNS.NeutrinoContainer,aKey)
53 """Retrieve ParticleBaseContainer object from SG
55 :param aKey: key of the object
60 return PyK.retrieve(PyK.GNS.ParticleBaseContainer,aKey)
63 """Retrieve ParticleJetContainer object from SG
64 OBSOLETE due to ParticleJet/Jet merger
65 :param aKey: key of the object
70 return PyK.retrieve(PyK.GNS.ParticleJetContainer,aKey)
73 """Retrieve JetContainer object from SG
75 :param aKey: key of the object
80 return PyK.retrieve(PyK.GNS.JetCollection,aKey)
83 """Retrieve PhotonContainer object from SG
85 :param aKey: key of the object
90 return PyK.retrieve(PyK.GNS.PhotonContainer,aKey)
93 """Retrieve TauJetContainer object from SG
95 :param aKey: key of the object
100 return PyK.retrieve(PyK.GNS.Analysis.TauJetContainer,aKey)
103 """Retrieve TruthParticleContainer object from SG
105 :param aKey: key of the object
110 return PyK.retrieve(PyK.GNS.TruthParticleContainer,aKey)
113 """Retrieve IParticleContainer object from SG
115 :param aKey: key of the object
120 return PyK.retrieve(PyK.GNS.IParticleContainer,aKey)
123 """Retrieve BJetContainer object from SG
125 :param aKey: key of the object
130 return PyK.retrieve(PyK.GNS.BJetContainer,aKey)
133 """Retrieve MissingET object from SG
135 :param aKey: key of the object
139 athena> met = PyParticleTools.getMissingET('MET_Final')
140 athena> print met.sumet()
143 return PyK.retrieve(PyK.GNS.MissingET,aKey)
146 """Retrieve MissingETSig object from SG
148 :param aKey: key of the object
152 athena> met = PyParticleTools.getMissingETSig('METSig')
153 athena> print met.met()
156 return PyK.retrieve(PyK.GNS.MissingETSig,aKey)
159 """Retrieve MissingEtCalo object from SG
161 :param aKey: key of the object
165 athena> met = PyParticleTools.getMissingEtCalo('MET_Base')
166 athena> print met.calibType()
169 return PyK.retrieve(PyK.GNS.MissingEtCalo,aKey)
172 """Retrieve MissingEtTruth object from SG
174 :param aKey: key of the object
178 athena> met = PyParticleTools.getMissingEtTruth('MET_Truth')
179 athena> print met.sumet()
182 return PyK.retrieve(PyK.GNS.MissingEtTruth,aKey)
185 """Retrieve MissingETSigObjContainer object from SG
187 :param aKey: key of the object
191 return PyK.retrieve(PyK.GNS.MissingETSigObjContainer,aKey)
194 """Retrieve CaloClusterContainer object from SG
196 :param aKey: key of the object
203 return PyK.retrieve(PyK.GNS.CaloClusterContainer,aKey)
206 """Retrieve VxContainer object from SG
208 :param aKey: key of the object
215 return PyK.retrieve(PyK.GNS.VxContainer,aKey)
219 """Retrieve TrackParticleTruthCollection object from SG
221 :param aKey: key of the object
228 return PyK.retrieve(PyK.GNS.TrackParticleTruthCollection,aKey)
232 """Retrieve TrackParticleContainer object from SG
234 :param aKey: key of the object
241 return PyK.retrieve(PyK.GNS.Rec.TrackParticleContainer,aKey)
245 """Retrieve TrackRecordCollection object from SG
247 :param aKey: key of the object
257 return PyK.retrieve(
"TrackRecordCollection",aKey)
261 """Retrieve DetStatusMap object from SG
263 :param aKey: key of the object
270 return PyK.retrieve(PyK.GNS.DetStatusMap,aKey)
274 """Retrieve Rec::MuonSpShowerContainer object from SG
276 :param aKey: key of the object
283 return PyK.retrieve(PyK.GNS.Rec.MuonSpShowerContainer,key)
287 from RootUtils
import PyROOTFixes
288 PyROOTFixes.fix_method (
"Analysis::TauJet",
"clusterLink")
289 PyROOTFixes.fix_method (
"Analysis::TauJet",
"cellClusterLink")
290 PyROOTFixes.fix_method (
"Analysis::TauJet",
"jetLink")