SND@LHC Software
Loading...
Searching...
No Matches
pi0Reco Namespace Reference

Functions

 findPi0 (sTree, secVertex)
 

Variables

 pdg = ROOT.TDatabasePDG.Instance()
 
 mPi0 = pdg.GetParticle(111).Mass()
 
 L = ROOT.TLorentzVector()
 
 V = ROOT.TVector3()
 
 top = ROOT.gGeoManager.GetTopVolume()
 
 z_ecal = top.GetNode('Ecal_1').GetMatrix().GetTranslation()[2]
 

Function Documentation

◆ findPi0()

pi0Reco.findPi0 (   sTree,
  secVertex 
)

Definition at line 13 of file pi0Reco.py.

13def findPi0(sTree,secVertex):
14 recoGammas = {}
15 pi0List = []
16 listOfGammas = None
17 for aClu in sTree.EcalReconstructed:
18# short cut to exclude ecal clusters of charged tracks
19# would need another routine to extrapolate tracks to ecal and exclude matched showers
20 mc = aClu.MCTrack()
21 if mc<0: continue
22 gamma = sTree.MCTrack[mc]
23 if gamma.GetPdgCode()!=22: continue
24 if gamma.GetMotherId()<0: continue
25 P = aClu.RecoE()
26 direction = ROOT.TVector3(aClu.X()-secVertex.X(),aClu.Y()-secVertex.Y(),z_ecal-secVertex.Z())
27 norm = direction.Mag()
28 recoGammas[gamma] = ROOT.TLorentzVector(direction.X()/norm*P,direction.Y()/norm*P,direction.Z()/norm*P,P)
29 sTree.MCTrack[mc].GetStartVertex(V)
30 if len(recoGammas)==0: return []
31 listOfGammas=list(recoGammas.values())
32 for g1 in range(len(listOfGammas)-1):
33 for g2 in range(g1+1,len(listOfGammas)):
34 pi0 = listOfGammas[g1] + listOfGammas[g2]
35 pi0List.append(pi0)
36 return pi0List

Variable Documentation

◆ L

pi0Reco.L = ROOT.TLorentzVector()

Definition at line 7 of file pi0Reco.py.

◆ mPi0

pi0Reco.mPi0 = pdg.GetParticle(111).Mass()

Definition at line 6 of file pi0Reco.py.

◆ pdg

pi0Reco.pdg = ROOT.TDatabasePDG.Instance()

Definition at line 5 of file pi0Reco.py.

◆ top

pi0Reco.top = ROOT.gGeoManager.GetTopVolume()

Definition at line 9 of file pi0Reco.py.

◆ V

pi0Reco.V = ROOT.TVector3()

Definition at line 8 of file pi0Reco.py.

◆ z_ecal

pi0Reco.z_ecal = top.GetNode('Ecal_1').GetMatrix().GetTranslation()[2]

Definition at line 10 of file pi0Reco.py.