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

Public Member Functions

def __init__ (self, pt, rap, mass=0.0, phi=[0, TWOPI])
 
def pt (self)
 
def pt (self, x)
 
def rap (self)
 
def rap (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
 
 rap
 
 mass
 
 phi
 

Private Attributes

 _pt
 
 _rap
 
 _m
 
 _phi
 

Detailed Description

Definition at line 684 of file samplers.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 687 of file samplers.py.

687  def __init__(self, pt, rap, mass=0.0, phi=[0, TWOPI]):
688  self.pt = pt
689  self.rap = rap
690  self.mass = mass
691  self.phi = phi
692 

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 

◆ mass() [1/2]

def python.samplers.PtRapMPhiSampler.mass (   self)

Definition at line 710 of file samplers.py.

710  def mass(self):
711  "Mass sampler"
712  return self._m

◆ mass() [2/2]

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

Definition at line 714 of file samplers.py.

714  def mass(self, x):
715  self._m = mksampler(x)
716 

◆ phi() [1/2]

def python.samplers.PtRapMPhiSampler.phi (   self)

Definition at line 718 of file samplers.py.

718  def phi(self):
719  "Azimuthal angle sampler"
720  return self._phi

◆ phi() [2/2]

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

Definition at line 722 of file samplers.py.

722  def phi(self, x):
723  self._phi = mksampler(x)
724 

◆ pt() [1/2]

def python.samplers.PtRapMPhiSampler.pt (   self)

Definition at line 694 of file samplers.py.

694  def pt(self):
695  "Transverse momentum sampler"
696  return self._pt

◆ pt() [2/2]

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

Definition at line 698 of file samplers.py.

698  def pt(self, x):
699  self._pt = mksampler(x)
700 

◆ rap() [1/2]

def python.samplers.PtRapMPhiSampler.rap (   self)

Definition at line 702 of file samplers.py.

702  def rap(self):
703  "Rapidity sampler"
704  return self._rap

◆ rap() [2/2]

def python.samplers.PtRapMPhiSampler.rap (   self,
  x 
)

Definition at line 706 of file samplers.py.

706  def rap(self, x):
707  self._rap = mksampler(x)
708 

◆ shoot()

def python.samplers.PtRapMPhiSampler.shoot (   self)
y = 0.5 * ln((E+pz)/(E-pz))
-> (E^2 - pz^2) exp(2y) = (E+pz)^2
 & (E^2 - pz^2) exp(-2y) = (E-pz)^2
-> E = sqrt(pt^2 + m^2) cosh(y)
-> pz = sqrt(pt^2 + m^2) sinh(y)
-> sqrt(pt^2 + m^2) = E / cosh(y)

Reimplemented from python.samplers.Sampler.

Definition at line 725 of file samplers.py.

725  def shoot(self):
726  """
727  y = 0.5 * ln((E+pz)/(E-pz))
728  -> (E^2 - pz^2) exp(2y) = (E+pz)^2
729  & (E^2 - pz^2) exp(-2y) = (E-pz)^2
730  -> E = sqrt(pt^2 + m^2) cosh(y)
731  -> pz = sqrt(pt^2 + m^2) sinh(y)
732  -> sqrt(pt^2 + m^2) = E / cosh(y)
733  """
734  pt = self.pt()
735  assert pt >= 0
736  m = self.mass()
737  assert m >= 0
738  sqrt_pt2_m2 = math.sqrt( pt**2 + m**2 )
739  y = self.rap()
740  e = sqrt_pt2_m2 * math.cosh(y)
741  pz = sqrt_pt2_m2 * math.sinh(y)
742  phi = self.phi()
743  px = pt * math.cos(phi)
744  py = pt * math.sin(phi)
745  v4 = ROOT.TLorentzVector(px, py, pz, e)
746  return v4
747 
748 

Member Data Documentation

◆ _m

python.samplers.PtRapMPhiSampler._m
private

Definition at line 715 of file samplers.py.

◆ _phi

python.samplers.PtRapMPhiSampler._phi
private

Definition at line 723 of file samplers.py.

◆ _pt

python.samplers.PtRapMPhiSampler._pt
private

Definition at line 699 of file samplers.py.

◆ _rap

python.samplers.PtRapMPhiSampler._rap
private

Definition at line 707 of file samplers.py.

◆ mass

python.samplers.PtRapMPhiSampler.mass

Definition at line 690 of file samplers.py.

◆ phi

python.samplers.PtRapMPhiSampler.phi

Definition at line 691 of file samplers.py.

◆ pt

python.samplers.PtRapMPhiSampler.pt

Definition at line 688 of file samplers.py.

◆ rap

python.samplers.PtRapMPhiSampler.rap

Definition at line 689 of file samplers.py.


The documentation for this class was generated from the following file:
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
test_pyathena.pt
pt
Definition: test_pyathena.py:11
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
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