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

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

Public Attributes

 pt = pt
 theta = theta
 mass = mass
 phi = phi

Protected Attributes

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

Detailed Description

Definition at line 749 of file samplers.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

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

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.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]

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]

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

◆ phi() [2/2]

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]

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]

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

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]

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

◆ theta() [2/2]

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

Definition at line 780 of file samplers.py.

◆ _phi

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

Definition at line 788 of file samplers.py.

◆ _pt

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

Definition at line 764 of file samplers.py.

◆ _theta

python.samplers.PtThetaMPhiSampler._theta = mksampler(x)
protected

Definition at line 772 of file samplers.py.

◆ mass

python.samplers.PtThetaMPhiSampler.mass = mass

Definition at line 755 of file samplers.py.

◆ phi

python.samplers.PtThetaMPhiSampler.phi = phi

Definition at line 756 of file samplers.py.

◆ pt

python.samplers.PtThetaMPhiSampler.pt = pt

Definition at line 753 of file samplers.py.

◆ theta

python.samplers.PtThetaMPhiSampler.theta = theta

Definition at line 754 of file samplers.py.


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