◆ __init__()
def ParticleGun_FastCalo_ChargeFlip_Config.MyParticleSampler.__init__ |
( |
|
self, |
|
|
|
energy, |
|
|
|
eta, |
|
|
|
pid, |
|
|
|
shift_z = 0 |
|
) |
| |
Definition at line 11 of file ParticleGun_FastCalo_ChargeFlip_Config.py.
11 def __init__(self,energy,eta,pid,shift_z=0):
13 self.shift_z = shift_z
14 pdg_table = ROOT.TDatabasePDG.Instance()
15 mass = pdg_table.GetParticle(self.pid()).Mass()*1000.
16 self.mom1 = PG.EEtaMPhiSampler(energy=energy,eta=eta,mass=mass)
◆ shoot()
def ParticleGun_FastCalo_ChargeFlip_Config.MyParticleSampler.shoot |
( |
|
self | ) |
|
Definition at line 18 of file ParticleGun_FastCalo_ChargeFlip_Config.py.
21 shift_z = self.shift_z
23 mom = self.mom1.shoot()
24 pos_temp = mom.Vect().Unit()
27 if abs(pos_temp.Z())/3550.<pos_temp.Perp()/1148.:
28 pos_temp *= 1148./pos_temp.Perp()
30 pos_temp *= 3550./abs(pos_temp.Z())
33 pos_temp_2 = ROOT.TVector3()
34 pos_temp_2.SetXYZ(pos_temp.X(), pos_temp.Y(), pos_temp.Z()+shift_z)
35 pos_temp_2 *= 1. / pos_temp_2.Mag();
38 if abs(pos_temp_2.Z())/3550.<pos_temp_2.Perp()/1148.:
39 pos_temp_2 *= 1148./pos_temp_2.Perp()
41 pos_temp_2 *= 3550./abs(pos_temp_2.Z())
43 pos = ROOT.TLorentzVector(pos_temp_2.X(),pos_temp_2.Y(),pos_temp_2.Z(), pos_temp_2.Mag())
47 return [ PG.SampledParticle( pid , mom , pos ) ]
◆ mom1
ParticleGun_FastCalo_ChargeFlip_Config.MyParticleSampler.mom1 |
◆ pid
ParticleGun_FastCalo_ChargeFlip_Config.MyParticleSampler.pid |
◆ shift_z
ParticleGun_FastCalo_ChargeFlip_Config.MyParticleSampler.shift_z |
The documentation for this class was generated from the following file: