ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
python.samplers.EThetaMPhiSampler Class Reference
Inheritance diagram for python.samplers.EThetaMPhiSampler:
Collaboration diagram for python.samplers.EThetaMPhiSampler:

Public Member Functions

def __init__ (self, energy, theta, mass=0.0, phi=[0, TWOPI])
 
def energy (self)
 
def energy (self, x)
 
def theta (self)
 
def theta (self, x)
 
def mass (self)
 
def mass (self, x)
 
def phi (self)
 
def phi (self, x)
 
def shoot (self)
 
def __call__ (self)
 

Public Attributes

 energy
 
 theta
 
 mass
 
 phi
 

Private Attributes

 _e
 
 _theta
 
 _m
 
 _phi
 

Detailed Description

Definition at line 562 of file samplers.py.

Constructor & Destructor Documentation

◆ __init__()

def python.samplers.EThetaMPhiSampler.__init__ (   self,
  energy,
  theta,
  mass = 0.0,
  phi = [0, TWOPI] 
)

Definition at line 567 of file samplers.py.

567  def __init__(self, energy, theta, mass=0.0, phi=[0, TWOPI]):
568  self.energy = energy
569  self.theta = theta
570  self.mass = mass
571  self.phi = phi
572 

Member Function Documentation

◆ __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.

17  def __call__(self):
18  """This is the call method that will actually be used (so that normal
19  functions can also be passed in as samplers)."""
20  return self.shoot()
21 

◆ energy() [1/2]

def python.samplers.EThetaMPhiSampler.energy (   self)

Definition at line 574 of file samplers.py.

574  def energy(self):
575  "Energy sampler"
576  return self._e

◆ energy() [2/2]

def python.samplers.EThetaMPhiSampler.energy (   self,
  x 
)

Definition at line 578 of file samplers.py.

578  def energy(self, x):
579  self._e = mksampler(x)
580 

◆ mass() [1/2]

def python.samplers.EThetaMPhiSampler.mass (   self)

Definition at line 590 of file samplers.py.

590  def mass(self):
591  "Mass sampler"
592  return self._m

◆ mass() [2/2]

def python.samplers.EThetaMPhiSampler.mass (   self,
  x 
)

Definition at line 594 of file samplers.py.

594  def mass(self, x):
595  self._m = mksampler(x)
596 

◆ phi() [1/2]

def python.samplers.EThetaMPhiSampler.phi (   self)

Definition at line 598 of file samplers.py.

598  def phi(self):
599  "Azimuthal angle sampler"
600  return self._phi

◆ phi() [2/2]

def python.samplers.EThetaMPhiSampler.phi (   self,
  x 
)

Definition at line 602 of file samplers.py.

602  def phi(self, x):
603  self._phi = mksampler(x)
604 

◆ shoot()

def python.samplers.EThetaMPhiSampler.shoot (   self)
p = sqrt(e^2 - m^2)
pz = p cos(theta)
pt = p sin(theta)

Reimplemented from python.samplers.Sampler.

Definition at line 605 of file samplers.py.

605  def shoot(self):
606  """
607  p = sqrt(e^2 - m^2)
608  pz = p cos(theta)
609  pt = p sin(theta)
610  """
611  e = self.energy()
612  m = self.mass()
613  p = math.sqrt( e**2 - m**2 )
614  theta = self.theta()
615  pz = p * math.cos(theta)
616  pt = p * math.sin(theta)
617  phi = self.phi()
618  px = pt * math.cos(phi)
619  py = pt * math.sin(phi)
620  v4 = ROOT.TLorentzVector(px, py, pz, e)
621  return v4
622 
623 

◆ theta() [1/2]

def python.samplers.EThetaMPhiSampler.theta (   self)

Definition at line 582 of file samplers.py.

582  def theta(self):
583  "Polar angle sampler"
584  return self._theta

◆ theta() [2/2]

def python.samplers.EThetaMPhiSampler.theta (   self,
  x 
)

Definition at line 586 of file samplers.py.

586  def theta(self, x):
587  self._theta = mksampler(x)
588 

Member Data Documentation

◆ _e

python.samplers.EThetaMPhiSampler._e
private

Definition at line 579 of file samplers.py.

◆ _m

python.samplers.EThetaMPhiSampler._m
private

Definition at line 595 of file samplers.py.

◆ _phi

python.samplers.EThetaMPhiSampler._phi
private

Definition at line 603 of file samplers.py.

◆ _theta

python.samplers.EThetaMPhiSampler._theta
private

Definition at line 587 of file samplers.py.

◆ energy

python.samplers.EThetaMPhiSampler.energy

Definition at line 568 of file samplers.py.

◆ mass

python.samplers.EThetaMPhiSampler.mass

Definition at line 570 of file samplers.py.

◆ phi

python.samplers.EThetaMPhiSampler.phi

Definition at line 571 of file samplers.py.

◆ theta

python.samplers.EThetaMPhiSampler.theta

Definition at line 569 of file samplers.py.


The documentation for this class was generated from the following file:
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
python.samplers.mksampler
def mksampler(x)
Convenience function for sampler-making from Python literals.
Definition: samplers.py:245
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18