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

Public Member Functions

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

 energy
 
 rap
 
 mass
 
 phi
 

Private Attributes

 _e
 
 _rap
 
 _m
 
 _phi
 

Detailed Description

Definition at line 497 of file samplers.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 502 of file samplers.py.

502  def __init__(self, energy, rap, mass=0.0, phi=[0, TWOPI]):
503  self.energy = energy
504  self.rap = rap
505  self.mass = mass
506  self.phi = phi
507 

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.ERapMPhiSampler.energy (   self)

Definition at line 509 of file samplers.py.

509  def energy(self):
510  "Energy sampler"
511  return self._e

◆ energy() [2/2]

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

Definition at line 513 of file samplers.py.

513  def energy(self, x):
514  self._e = mksampler(x)
515 

◆ mass() [1/2]

def python.samplers.ERapMPhiSampler.mass (   self)

Definition at line 525 of file samplers.py.

525  def mass(self):
526  "Mass sampler"
527  return self._m

◆ mass() [2/2]

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

Definition at line 529 of file samplers.py.

529  def mass(self, x):
530  self._m = mksampler(x)
531 

◆ phi() [1/2]

def python.samplers.ERapMPhiSampler.phi (   self)

Definition at line 533 of file samplers.py.

533  def phi(self):
534  "Azimuthal angle sampler"
535  return self._phi

◆ phi() [2/2]

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

Definition at line 537 of file samplers.py.

537  def phi(self, x):
538  self._phi = mksampler(x)
539 

◆ rap() [1/2]

def python.samplers.ERapMPhiSampler.rap (   self)

Definition at line 517 of file samplers.py.

517  def rap(self):
518  "Rapidity sampler"
519  return self._rap

◆ rap() [2/2]

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

Definition at line 521 of file samplers.py.

521  def rap(self, x):
522  self._rap = mksampler(x)
523 

◆ shoot()

def python.samplers.ERapMPhiSampler.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 540 of file samplers.py.

540  def shoot(self):
541  """
542  y = 0.5 * ln((E+pz)/(E-pz))
543  -> (E^2 - pz^2) exp(2y) = (E+pz)^2
544  & (E^2 - pz^2) exp(-2y) = (E-pz)^2
545  -> E = sqrt(pt^2 + m^2) cosh(y)
546  -> pz = sqrt(pt^2 + m^2) sinh(y)
547  -> sqrt(pt^2 + m^2) = E / cosh(y)
548  """
549  e = self.energy()
550  y = self.rap()
551  sqrt_pt2_m2 = e / math.cosh(y)
552  pz = sqrt_pt2_m2 * math.sinh(y)
553  m = self.mass()
554  pt = math.sqrt( sqrt_pt2_m2**2 - m**2 )
555  phi = self.phi()
556  px = pt * math.cos(phi)
557  py = pt * math.sin(phi)
558  v4 = ROOT.TLorentzVector(px, py, pz, e)
559  return v4
560 
561 

Member Data Documentation

◆ _e

python.samplers.ERapMPhiSampler._e
private

Definition at line 514 of file samplers.py.

◆ _m

python.samplers.ERapMPhiSampler._m
private

Definition at line 530 of file samplers.py.

◆ _phi

python.samplers.ERapMPhiSampler._phi
private

Definition at line 538 of file samplers.py.

◆ _rap

python.samplers.ERapMPhiSampler._rap
private

Definition at line 522 of file samplers.py.

◆ energy

python.samplers.ERapMPhiSampler.energy

Definition at line 503 of file samplers.py.

◆ mass

python.samplers.ERapMPhiSampler.mass

Definition at line 505 of file samplers.py.

◆ phi

python.samplers.ERapMPhiSampler.phi

Definition at line 506 of file samplers.py.

◆ rap

python.samplers.ERapMPhiSampler.rap

Definition at line 504 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
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
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