A simple N-independent-particle sampler.
Definition at line 853 of file samplers.py.
◆ __init__()
def python.samplers.ParticleSampler.__init__ |
( |
|
self, |
|
|
|
pid = 999 , |
|
|
|
mom = NullMomSampler() , |
|
|
|
n = 1 , |
|
|
|
pos = PosSampler(0, 0, 0) |
|
) |
| |
Definition at line 858 of file samplers.py.
859 mom=NullMomSampler(),
866 self.massdict = MASSES
867 self.mass_override =
True
◆ __call__()
def python.samplers.Sampler.__call__ |
( |
|
self | ) |
|
|
inherited |
This is the call method that will actually be used (so that normal
functions can also be passed in as samplers).
Definition at line 17 of file samplers.py.
18 """This is the call method that will actually be used (so that normal
19 functions can also be passed in as samplers)."""
◆ n() [1/2]
def python.samplers.ParticleSampler.n |
( |
|
self | ) |
|
Definition at line 878 of file samplers.py.
879 "Particle number sampler"
◆ n() [2/2]
def python.samplers.ParticleSampler.n |
( |
|
self, |
|
|
|
x |
|
) |
| |
◆ pid() [1/2]
def python.samplers.ParticleSampler.pid |
( |
|
self | ) |
|
Definition at line 870 of file samplers.py.
871 "Particle ID code sampler"
◆ pid() [2/2]
def python.samplers.ParticleSampler.pid |
( |
|
self, |
|
|
|
x |
|
) |
| |
◆ shoot()
def python.samplers.ParticleSampler.shoot |
( |
|
self | ) |
|
Reimplemented from python.samplers.Sampler.
Definition at line 885 of file samplers.py.
886 "Return a vector of sampled particles"
887 numparticles = self.n()
889 for i
in range(numparticles):
894 if self.mass_override
and abs(pid)
in self.massdict:
895 m = self.massdict[abs(pid)]
◆ _n
python.samplers.ParticleSampler._n |
|
private |
◆ _pid
python.samplers.ParticleSampler._pid |
|
private |
◆ mass_override
python.samplers.ParticleSampler.mass_override |
◆ massdict
python.samplers.ParticleSampler.massdict |
◆ mom
python.samplers.ParticleSampler.mom |
python.samplers.ParticleSampler.n |
◆ pid
python.samplers.ParticleSampler.pid |
◆ pos
python.samplers.ParticleSampler.pos |
The documentation for this class was generated from the following file: