18 def shoot(self):
19 pid = self.pid()
20
21 shift_z = self.shift_z
22
23 mom = self.mom1.shoot()
24 pos_temp = mom.Vect().Unit()
25
26
27 if abs(pos_temp.Z())/3550.<pos_temp.Perp()/1148.:
28 pos_temp *= 1148./pos_temp.Perp()
29 else:
30 pos_temp *= 3550./abs(pos_temp.Z())
31
32
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();
36
37
38 if abs(pos_temp_2.Z())/3550.<pos_temp_2.Perp()/1148.:
39 pos_temp_2 *= 1148./pos_temp_2.Perp()
40 else:
41 pos_temp_2 *= 3550./abs(pos_temp_2.Z())
42
43 pos = ROOT.TLorentzVector(pos_temp_2.X(),pos_temp_2.Y(),pos_temp_2.Z(), pos_temp_2.Mag())
44
45
46
47 return [ PG.SampledParticle( pid , mom , pos ) ]
48