ATLAS Offline Software
Loading...
Searching...
No Matches
python.samplers.PtRapMPhiSampler Class Reference
Inheritance diagram for python.samplers.PtRapMPhiSampler:
Collaboration diagram for python.samplers.PtRapMPhiSampler:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

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

Public Attributes

 pt = pt
 rap = rap
 mass = mass
 phi = phi

Protected Attributes

 _pt = mksampler(x)
 _rap = mksampler(x)
 _m = mksampler(x)
 _phi = mksampler(x)

Detailed Description

Definition at line 684 of file samplers.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

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__()

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]

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]

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]

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
Scalar phi() const
phi method

◆ phi() [2/2]

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]

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]

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]

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]

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()

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 = mksampler(x)
protected

Definition at line 715 of file samplers.py.

◆ _phi

python.samplers.PtRapMPhiSampler._phi = mksampler(x)
protected

Definition at line 723 of file samplers.py.

◆ _pt

python.samplers.PtRapMPhiSampler._pt = mksampler(x)
protected

Definition at line 699 of file samplers.py.

◆ _rap

python.samplers.PtRapMPhiSampler._rap = mksampler(x)
protected

Definition at line 707 of file samplers.py.

◆ mass

python.samplers.PtRapMPhiSampler.mass = mass

Definition at line 690 of file samplers.py.

◆ phi

python.samplers.PtRapMPhiSampler.phi = phi

Definition at line 691 of file samplers.py.

◆ pt

python.samplers.PtRapMPhiSampler.pt = pt

Definition at line 688 of file samplers.py.

◆ rap

python.samplers.PtRapMPhiSampler.rap = rap

Definition at line 689 of file samplers.py.


The documentation for this class was generated from the following file: