7#include "Pythia8/PhaseSpace.h"
23 const int polmode =
m_polmode(settingsPtr);
25 for (
int i = 1; i <
process.size(); ++i) {
28 if (v.id() != 23 && v.idAbs() != 24)
continue;
29 const Vec4 pv = v.p();
32 Particle& d1 =
process[v.daughter1()];
33 Particle& d2 =
process[v.daughter2()];
46 const double dtheta = std::acos(2*
rand01() - 1);
48 pd1.rot(dtheta, dphi);
49 pd2.rot(dtheta, dphi);
52 const double th =
theta(pv, pd1);
57 }
else if (polmode == 1) {
59 }
else if (polmode == 2) {
60 if (
rand01() < (1 +
sqr(std::cos(th)))/2)
break;
61 }
else if (polmode == 3) {
62 if (
rand01() <
sqr(1 + std::cos(th))/4)
break;
63 }
else if (polmode == 4) {
64 if (
rand01() <
sqr(1 - std::cos(th))/4)
break;
69 pd1.bst(pv); d1.p(pd1);
70 pd2.bst(pv); d2.p(pd2);
79 double rand01() {
return rndmPtr->flat(); }
Scalar theta() const
theta method
const std::string process
Author: James Monk (jmonk@cern.ch)
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::WZPolarization > WZPOL("WZPolarization")
Pythia8_UserHooks::UserSetting< int > m_polmode
bool canVetoResonanceDecays()
bool doVetoResonanceDecays(Event &process)