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

Public Member Functions

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

 pt
 
 theta
 
 mass
 
 phi
 

Private Attributes

 _pt
 
 _theta
 
 _m
 
 _phi
 

Detailed Description

Definition at line 749 of file samplers.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 752 of file samplers.py.

752  def __init__(self, pt, theta, mass=0.0, phi=[0, TWOPI]):
753  self.pt = pt
754  self.theta = theta
755  self.mass = mass
756  self.phi = phi
757 

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.PtThetaMPhiSampler.mass (   self)

Definition at line 775 of file samplers.py.

775  def mass(self):
776  "Mass sampler"
777  return self._m

◆ mass() [2/2]

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

Definition at line 779 of file samplers.py.

779  def mass(self, x):
780  self._m = mksampler(x)
781 

◆ phi() [1/2]

def python.samplers.PtThetaMPhiSampler.phi (   self)

Definition at line 783 of file samplers.py.

783  def phi(self):
784  "Azimuthal angle sampler"
785  return self._phi

◆ phi() [2/2]

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

Definition at line 787 of file samplers.py.

787  def phi(self, x):
788  self._phi = mksampler(x)
789 

◆ pt() [1/2]

def python.samplers.PtThetaMPhiSampler.pt (   self)

Definition at line 759 of file samplers.py.

759  def pt(self):
760  "Transverse momentum sampler"
761  return self._pt

◆ pt() [2/2]

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

Definition at line 763 of file samplers.py.

763  def pt(self, x):
764  self._pt = mksampler(x)
765 

◆ shoot()

def python.samplers.PtThetaMPhiSampler.shoot (   self)
p = pt / math.sin(theta)
pz = p cos(theta)
pt = p sin(theta)
E = sqrt(p^2 + m^2)

Reimplemented from python.samplers.Sampler.

Definition at line 790 of file samplers.py.

790  def shoot(self):
791  """
792  p = pt / math.sin(theta)
793  pz = p cos(theta)
794  pt = p sin(theta)
795  E = sqrt(p^2 + m^2)
796  """
797  theta = self.theta()
798  pt = self.pt()
799  p = pt / math.sin(theta)
800  phi = self.phi()
801  px = pt * math.cos(phi)
802  py = pt * math.sin(phi)
803  pz = p * math.cos(theta)
804  m = self.mass()
805  e = math.sqrt( p**2 + m**2 )
806  v4 = ROOT.TLorentzVector(px, py, pz, e)
807  return v4
808 
809 
810 # TODO: add the missing ways to specify/sample 4-momenta
811 
812 

◆ theta() [1/2]

def python.samplers.PtThetaMPhiSampler.theta (   self)

Definition at line 767 of file samplers.py.

767  def theta(self):
768  "Polar angle sampler"
769  return self._theta

◆ theta() [2/2]

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

Definition at line 771 of file samplers.py.

771  def theta(self, x):
772  self._theta = mksampler(x)
773 

Member Data Documentation

◆ _m

python.samplers.PtThetaMPhiSampler._m
private

Definition at line 780 of file samplers.py.

◆ _phi

python.samplers.PtThetaMPhiSampler._phi
private

Definition at line 788 of file samplers.py.

◆ _pt

python.samplers.PtThetaMPhiSampler._pt
private

Definition at line 764 of file samplers.py.

◆ _theta

python.samplers.PtThetaMPhiSampler._theta
private

Definition at line 772 of file samplers.py.

◆ mass

python.samplers.PtThetaMPhiSampler.mass

Definition at line 755 of file samplers.py.

◆ phi

python.samplers.PtThetaMPhiSampler.phi

Definition at line 756 of file samplers.py.

◆ pt

python.samplers.PtThetaMPhiSampler.pt

Definition at line 753 of file samplers.py.

◆ theta

python.samplers.PtThetaMPhiSampler.theta

Definition at line 754 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
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
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