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

Public Member Functions

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

Public Attributes

 pt
 
 eta
 
 mass
 
 phi
 

Private Attributes

 _pt
 
 _eta
 
 _m
 
 _phi
 

Detailed Description

Definition at line 624 of file samplers.py.

Constructor & Destructor Documentation

◆ __init__()

def python.samplers.PtEtaMPhiSampler.__init__ (   self,
  pt,
  eta,
  mass = 0.0,
  phi = [0, TWOPI] 
)

Definition at line 627 of file samplers.py.

627  def __init__(self, pt, eta, mass=0.0, phi=[0, TWOPI]):
628  self.pt = pt
629  self.eta = eta
630  self.mass = mass
631  self.phi = phi
632 

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 

◆ eta() [1/2]

def python.samplers.PtEtaMPhiSampler.eta (   self)

Definition at line 642 of file samplers.py.

642  def eta(self):
643  "Pseudorapidity sampler"
644  return self._eta

◆ eta() [2/2]

def python.samplers.PtEtaMPhiSampler.eta (   self,
  x 
)

Definition at line 646 of file samplers.py.

646  def eta(self, x):
647  self._eta = mksampler(x)
648 

◆ mass() [1/2]

def python.samplers.PtEtaMPhiSampler.mass (   self)

Definition at line 650 of file samplers.py.

650  def mass(self):
651  "Mass sampler"
652  return self._m

◆ mass() [2/2]

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

Definition at line 654 of file samplers.py.

654  def mass(self, x):
655  self._m = mksampler(x)
656 

◆ phi() [1/2]

def python.samplers.PtEtaMPhiSampler.phi (   self)

Definition at line 658 of file samplers.py.

658  def phi(self):
659  "Azimuthal angle sampler"
660  return self._phi

◆ phi() [2/2]

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

Definition at line 662 of file samplers.py.

662  def phi(self, x):
663  self._phi = mksampler(x)
664 

◆ pt() [1/2]

def python.samplers.PtEtaMPhiSampler.pt (   self)

Definition at line 634 of file samplers.py.

634  def pt(self):
635  "Transverse momentum sampler"
636  return self._pt

◆ pt() [2/2]

def python.samplers.PtEtaMPhiSampler.pt (   self,
  x 
)

Definition at line 638 of file samplers.py.

638  def pt(self, x):
639  self._pt = mksampler(x)
640 

◆ shoot()

def python.samplers.PtEtaMPhiSampler.shoot (   self)
eta = - ln(tan(theta/2)) / 2
=> theta = 2 atan( exp(-eta) )

Reimplemented from python.samplers.Sampler.

Definition at line 665 of file samplers.py.

665  def shoot(self):
666  """
667  eta = - ln(tan(theta/2)) / 2
668  => theta = 2 atan( exp(-eta) )
669  """
670  eta = self.eta()
671  theta = 2 * math.atan(math.exp(-eta))
672  pt = self.pt()
673  p = pt / math.sin(theta)
674  phi = self.phi()
675  px = pt * math.cos(phi)
676  py = pt * math.sin(phi)
677  pz = p * math.cos(theta)
678  m = self.mass()
679  e = math.sqrt( p**2 + m**2 )
680  v4 = ROOT.TLorentzVector(px, py, pz, e)
681  return v4
682 
683 

Member Data Documentation

◆ _eta

python.samplers.PtEtaMPhiSampler._eta
private

Definition at line 647 of file samplers.py.

◆ _m

python.samplers.PtEtaMPhiSampler._m
private

Definition at line 655 of file samplers.py.

◆ _phi

python.samplers.PtEtaMPhiSampler._phi
private

Definition at line 663 of file samplers.py.

◆ _pt

python.samplers.PtEtaMPhiSampler._pt
private

Definition at line 639 of file samplers.py.

◆ eta

python.samplers.PtEtaMPhiSampler.eta

Definition at line 629 of file samplers.py.

◆ mass

python.samplers.PtEtaMPhiSampler.mass

Definition at line 630 of file samplers.py.

◆ phi

python.samplers.PtEtaMPhiSampler.phi

Definition at line 631 of file samplers.py.

◆ pt

python.samplers.PtEtaMPhiSampler.pt

Definition at line 628 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
test_pyathena.pt
pt
Definition: test_pyathena.py:11
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