ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Pythia8::WZPolarization Struct Reference

Convert all resonant W/Z boson decays to the angular distribution of a pure polarisation state. More...

Inheritance diagram for Pythia8::WZPolarization:
Collaboration diagram for Pythia8::WZPolarization:

Public Member Functions

 WZPolarization ()
 
bool canVetoResonanceDecays ()
 
bool doVetoResonanceDecays (Event &process)
 
double sqr (double x)
 
double rand01 ()
 

Public Attributes

Pythia8_UserHooks::UserSetting< int > m_polmode
 

Detailed Description

Convert all resonant W/Z boson decays to the angular distribution of a pure polarisation state.

Definition at line 16 of file WZPolarization.cxx.

Constructor & Destructor Documentation

◆ WZPolarization()

Pythia8::WZPolarization::WZPolarization ( )
inline

Definition at line 18 of file WZPolarization.cxx.

18 : m_polmode("WZPolarization:mode", 1) { }

Member Function Documentation

◆ canVetoResonanceDecays()

bool Pythia8::WZPolarization::canVetoResonanceDecays ( )
inline

Definition at line 20 of file WZPolarization.cxx.

20 { return true; }

◆ doVetoResonanceDecays()

bool Pythia8::WZPolarization::doVetoResonanceDecays ( Event process)
inline

Definition at line 22 of file WZPolarization.cxx.

22  {
23  const int polmode = m_polmode(settingsPtr);
24 
25  for (int i = 1; i < process.size(); ++i) {
26  // Select vector bosons
27  Particle& v = process[i];
28  if (v.id() != 23 && v.idAbs() != 24) continue;
29  const Vec4 pv = v.p();
30 
31  // Find W/Z daughter particles
32  Particle& d1 = process[v.daughter1()];
33  Particle& d2 = process[v.daughter2()];
34 
35  // Get daughter momenta in the boson rest frame
36  Vec4 pd1 = d1.p();
37  Vec4 pd2 = d2.p();
38  pd1.bstback(pv);
39  pd2.bstback(pv);
40 
41  // Randomly reorient and rejection-sample decay configuration
42  // (done inline here, rather than reboosting to the W/Z frame on each decay-hook iteration)
43  while (true) {
44 
45  // Random reorientation
46  const double dtheta = std::acos(2*rand01() - 1);
47  const double dphi = 2*M_PI*rand01();
48  pd1.rot(dtheta, dphi);
49  pd2.rot(dtheta, dphi);
50 
51  // Angle w.r.t. W/Z flight direction, in rest-frame
52  const double th = theta(pv, pd1);
53 
54  // Accept/reject the angle according to the polarisation being modelled
55  if (polmode == 0) { // Isotropic
56  break; // it's already been isotropically randomised
57  } else if (polmode == 1) { // Longitudinal
58  if (rand01() < sqr(std::sin(th))) break;
59  } else if (polmode == 2) { // Trans-sum
60  if (rand01() < (1 + sqr(std::cos(th)))/2) break;
61  } else if (polmode == 3) { // Trans+
62  if (rand01() < sqr(1 + std::cos(th))/4) break;
63  } else if (polmode == 4) { // Trans-
64  if (rand01() < sqr(1 - std::cos(th))/4) break;
65  }
66  }
67 
68  // Boost the vectors back to the lab frame
69  pd1.bst(pv); d1.p(pd1);
70  pd2.bst(pv); d2.p(pd2);
71 
72  }
73 
74  return false;
75  }

◆ rand01()

double Pythia8::WZPolarization::rand01 ( )
inline

Definition at line 79 of file WZPolarization.cxx.

79 { return rndmPtr->flat(); }

◆ sqr()

double Pythia8::WZPolarization::sqr ( double  x)
inline

Definition at line 77 of file WZPolarization.cxx.

77 { return x*x; }

Member Data Documentation

◆ m_polmode

Pythia8_UserHooks::UserSetting<int> Pythia8::WZPolarization::m_polmode

Definition at line 81 of file WZPolarization.cxx.


The documentation for this struct was generated from the following file:
Pythia8::WZPolarization::sqr
double sqr(double x)
Definition: WZPolarization.cxx:77
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
M_PI
#define M_PI
Definition: ActiveFraction.h:11
dq_defect_virtual_defect_validation.d1
d1
Definition: dq_defect_virtual_defect_validation.py:79
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
x
#define x
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
xAOD::Particle
Particle_v1 Particle
Define the latest version of the particle class.
Definition: Event/xAOD/xAODParticleEvent/xAODParticleEvent/Particle.h:17
python.TriggerHandler.th
th
Definition: TriggerHandler.py:296
lumiFormat.i
int i
Definition: lumiFormat.py:92
Pythia8::WZPolarization::rand01
double rand01()
Definition: WZPolarization.cxx:79
python.PyAthena.v
v
Definition: PyAthena.py:157
dq_defect_virtual_defect_validation.d2
d2
Definition: dq_defect_virtual_defect_validation.py:81
python.changerun.pv
pv
Definition: changerun.py:81
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Pythia8::WZPolarization::m_polmode
Pythia8_UserHooks::UserSetting< int > m_polmode
Definition: WZPolarization.cxx:81