PYTHIA  8.303
Public Member Functions | Public Attributes | List of all members
VinciaCommon Class Reference

#include <VinciaCommon.h>

Public Member Functions

 VinciaCommon ()
 Constructor.
 
virtual ~VinciaCommon ()
 Destructor.
 
bool initPtr (Info *infoPtrIn)
 Initialize pointers.
 
bool init ()
 Initialize data members. More...
 
double mHadMin (const int id1, const int id2)
 
bool showerChecks (Event &event, bool ISR)
 
bool checkCoM (int iSys, Event &event, PartonSystems *partonSystemsPtr)
 More lightweight function to check conservation of momentum. More...
 
void resetCounters ()
 Function to reset counters (print once every event for now).
 
int getNf (double q)
 Get number of active flavors at a given Q scale.
 
double getShowerStartingScale (int iSys, PartonSystems *partonSystemsPtr, const Event &event, double sbbSav)
 Get the shower starting scale. More...
 
bool map3to2FFmassive (vector< Vec4 > &pClu, vector< Vec4 > pIn, int kMapType, int a=0, int r=1, int b=2, double mI=0.0, double mK=0.0)
 3->2 clustering maps. More...
 
bool map3to2FFmassless (vector< Vec4 > &pClu, vector< Vec4 > pIn, int kMapType, int a=0, int r=1, int b=2)
 
bool map3to2IFmassive (vector< Vec4 > &pClu, vector< Vec4 > &pIn, double saj, double sjk, double sak)
 Implementations of IF clustering maps for massive partons.
 
bool map3to2IImassive (vector< Vec4 > &pClu, vector< Vec4 > &pIn, vector< Vec4 > &pRec, double saj, double sjb, double sab, bool doBoost)
 Implementations of II clustering maps for massive partons. More...
 
bool map2to3FF (vector< Vec4 > &pNew, const vector< Vec4 > &pOld, int kMapType, const vector< double > &invariants, double phi, vector< double > masses)
 
bool map2to3FFmassive (vector< Vec4 > &pNew, const vector< Vec4 > &pOld, int kMapType, const vector< double > &invariants, double phi, vector< double > masses)
 
bool map2to3FFmassless (vector< Vec4 > &pNew, const vector< Vec4 > &pOld, int kMapType, const vector< double > &invariants, double phi)
 
bool map2to3II (vector< Vec4 > &pNew, vector< Vec4 > &pRec, vector< Vec4 > &pOld, double sAB, double saj, double sjb, double sab, double phi, double m2j=0.0)
 2 -> 3 kinematics map for initial-initial antennae, for general mj. More...
 
bool map2to3IImassless (vector< Vec4 > &pNew, vector< Vec4 > &pRec, vector< Vec4 > &pOld, double sAB, double saj, double sjb, double sab, double phi)
 2 -> 3 kinematics map for initial-initial antennae, for mj= 0. More...
 
bool map2to3IFlocal (vector< Vec4 > &pNew, vector< Vec4 > &pOld, double sOldAK, double saj, double sjk, double sak, double phi, double m2oldK, double m2j, double m2k)
 
bool map2to3IFglobal (vector< Vec4 > &pNew, vector< Vec4 > &pRec, vector< Vec4 > &pOld, Vec4 &pB, double sAK, double saj, double sjk, double sak, double phi, double mK2, double mj2, double mk2)
 
bool map2to3RFmassive (vector< Vec4 > &pThree, vector< Vec4 > pTwo, vector< double > invariants, double phi, vector< double > masses)
 Resonance decay kinematic maps. More...
 
bool map2toNRFmassive (vector< Vec4 > &pAfter, vector< Vec4 > pBefore, unsigned int posR, unsigned int posF, vector< double > invariants, double phi, vector< double > masses)
 
bool map2to3RFmassive (vector< Vec4 > &pNew, vector< Vec4 > &pRec, vector< Vec4 > pOld, double saj, double sjk, double phi, double m2oldA, double m2j, double m2oldK)
 2->3 kinematics map for RF branchings. Original implementation by Brooks. More...
 
bool onShellCM (Vec4 &p1, Vec4 &p2, double m1, double m2, double tol=1e-6)
 Check if 2-particle system is on-shell and rescale if not. More...
 
bool mapToMassless (int iSys, Event &event, PartonSystems *partonSystemsPtr, bool makeNewCopies)
 Force initial-state and light-flavour partons to be massless. More...
 
bool mapToMassive (Vec4 &p1, Vec4 &p2, double m1, double m2)
 
int getVerbose ()
 Get/set verbose parameter.
 
void setVerbose (int verboseIn)
 

Public Attributes

AlphaStrong alphaStrong
 
AlphaStrong alphaStrongCMW
 
AlphaStrong alphaStrongDef
 
AlphaStrong alphaStrongDefCMW
 
AlphaStrong alphaS
 Couplings for use in merging.
 
AlphaEM alphaEM
 
double mu2freeze
 
double mu2min
 
double alphaSmax
 
double ms
 Quark masses.
 
double mc
 
double mb
 
double mt
 
int nFlavZeroMass
 
double epTolErr
 Checks.
 
double epTolWarn
 
double mTolErr
 
double mTolWarn
 

Detailed Description

Class which contains functions and variables shared by the VinciaShower and VinciaMatching classes.

Member Function Documentation

bool checkCoM ( int  iSys,
Event event,
PartonSystems partonSystemsPtr 
)

More lightweight function to check conservation of momentum.

Loop over members of current system.

Sum total FS momentum.

double getShowerStartingScale ( int  iSys,
PartonSystems partonSystemsPtr,
const Event event,
double  sbbSav 
)

Get the shower starting scale.

Depending on user choice shower starts at q2maxFudge * factorization scale of phase space maximum.

Ask Pythia about 2 -> 1 scale.

Ask Pythia about 2 -> 2 scale.

Ask Pythia about 2 -> 3 scale.

Unknown, leave as is, all emissions allowed now.

bool init ( )

Initialize data members.

The VinciaCommon class.

Initialize the class.

Check initPtr.

Verbosity level and checks.

Counters

Quark masses

Number of flavours to treat as massless in clustering and kinematics maps.

Default alphaS, with and without CMW.

Strong coupling for use in merging.

User alphaS, with and without CMW.

Freeze and minimum scales.

Find the overall minimum scale. Take into account the freezeout scale, Lambda pole, and alphaSmax.

EM coupling for use in merging. Dummy, as no EW clusterings.

Return.

bool map2to3FF ( vector< Vec4 > &  pNew,
const vector< Vec4 > &  pOld,
int  kMapType,
const vector< double > &  invariants,
double  phi,
vector< double >  masses 
)
inline

2->3 kinematics maps for FF branchings. Original implementations; massless by Skands, massive by Ritzmann.

bool map2to3FFmassive ( vector< Vec4 > &  pThree,
const vector< Vec4 > &  pTwo,
int  kMapType,
const vector< double > &  invariants,
double  phi,
vector< double >  masses 
)

2->3 branching kinematics: output arguments first, then input arguments. The output is p[i,j,k] whil the inputs are p[I,K], kMapType, inviariants[sIK,sij,sjk], phi, and masses[mi,mj,mk]. Note, sab defined as 2*pa.pb.

Hand off to massless map if all masses << sIK.

Antenna invariant mass and sIK = 2*pI.pK.

Masses and invariants

Check for totally closed phase space. Should normally have happened before generation of invariants but put last-resort check here since not caught by Gram determinant.

Check whether we are inside massive phase space.

Verbose output.

Set up kinematics in rest frame.

Make sure energies > masses (should normally be ensured by combination of open phase space and positive Gram determinant).

Protection: num. precision loss for small (ultracollinear) invariants.

Use positive square root for sine.

Set momenta in CMz frame (frame with 1 oriented along positive z axis and event in (x,z) plane).

Verbose output.

Choose global rotation around axis perpendicular to event plane.

kMapType = -2(-1): force A(B) to be purely longitudinal recoiler.

Else general antenna-like recoils.

The r and R parameters in arXiv:1108.6172.

Norm of the three-momentum and the energy of the first parent particle (could also be obtained by explicitly boosting incoming particles to CM).

Protect against rounding errors before taking acos.

Perform global rotations.

Verbose output.

Rotate and boost to lab frame.

Save momenta.

Return.

bool map2to3FFmassless ( vector< Vec4 > &  pThree,
const vector< Vec4 > &  pTwo,
int  kMapType,
const vector< double > &  invariants,
double  phi 
)

2->3 branching kinematics, massless with output arguments first, then input arguments. The output is p3, while the inputs are kMapType, invariants(sIK, s01, s12), and phi.

Antenna invariant mass.

Compute invariants (massless relation).

Can check alternative hadronization vetos here.

Set up kinematics in rest frame.

Protection: num. precision loss for small (ultracollinear) invariants.

Set momenta in CMz frame (with 1 oriented along positive z axis and event in (x,z) plane).

Verbose output.

Choose global rotation around axis perpendicular to event plane.

Force A to be longitudinal recoiler.

Force B to be longitudinal recoiler.

ARIADNE map.

psi PYTHIA-like. "Recoiler" remains along z-axis.

Kosower's map. Similar to ARIADNE.

Perform global rotations.

Verbose output.

Rotate and boost to lab frame.

Save momenta.

Check momentum conservation.

Return.

bool map2to3IFglobal ( vector< Vec4 > &  pNew,
vector< Vec4 > &  pRec,
vector< Vec4 > &  pOld,
Vec4 pB,
double  sAK,
double  saj,
double  sjk,
double  sak,
double  phi,
double  mK2,
double  mj2,
double  mk2 
)

2->3 kinematics map for global recoils, for general mj,mk. Assumes partons from proton explicitly massless.

Set up some variables for boosting pT.

Rotate and boost.

Check if pT was properly boosted, allow 0.1% difference.

Solution vector, start from massless values.

Root finding with Newton-Raphson in 5D.

Construct function.

Construct Jacobian.

Invert Jacobian and append identity.

Find column max.

Swap maximum row with current row.

Reduce current column.

Solve equation Ax = b for upper triangular matrix A.

Remove remaining identity.

Find next iteration.

Check if done.

Break if iterations/precision reached or randomly vary the variables.

Construct post-branching momenta.

Set up the boost.

Perform boost.

Force the initial state to be on the beam axis.

Perform boost on the rest of the system and return.

bool map2to3IFlocal ( vector< Vec4 > &  pNew,
vector< Vec4 > &  pOld,
double  sAK,
double  saj,
double  sjk,
double  sak,
double  phi,
double  mK2,
double  mj2,
double  mk2 
)

2->3 kinematics maps for IF branchings. General massive case implemented by Verheyen.

2->3 kinematics map for local recoils, for general mj,mk. Assumes partons from proton explicitly massless

Check invariants.

Check if we're inside massive phase space.

Set up some variables for boosting pT.

Rotate and boost.

Check if pT was properly boosted, allow 0.1% difference.

Construct new momenta p_a, p_j, and p_k.

Check the invariants, allow 0.1% difference (due to boost).

bool map2to3II ( vector< Vec4 > &  pNew,
vector< Vec4 > &  pRec,
vector< Vec4 > &  pOld,
double  sAB,
double  saj,
double  sjb,
double  sab,
double  phi,
double  m2j = 0.0 
)

2 -> 3 kinematics map for initial-initial antennae, for general mj.

2->3 kinematics maps for II branchings. Original implementations: massless by Fischer, massive by Verheyen.

Hand off to massless map if mj2 = 0.

Do massive mapping.

Force incoming momenta on shell (massless) with mass squared = sAB.

Initialise new momenta.

Check if we're inside massive phase space.

Incoming momenta.

Emission.

Check the invariants, allow 0.0001% difference.

Change the final state recoiler. The recoiler is currently sum of initial guys => E,0,0,pz. Boost in center-of-mass frame AB E,0,0,0.

Now boost from E,0,0,0 to E',px',py',pz'.

bool map2to3IImassless ( vector< Vec4 > &  pNew,
vector< Vec4 > &  pRec,
vector< Vec4 > &  pOld,
double  sAB,
double  saj,
double  sjb,
double  sab,
double  phi 
)

2 -> 3 kinematics map for initial-initial antennae, for mj= 0.

Force incoming momenta on shell (massless) with mass squared = sAB.

Initialise new momenta.

Incoming momenta.

Emission.

Debugging info.

Check the invariants, allow 0.0001% difference.

Change the final state recoiler. The recoiler is currently sum of initial guys => E,0,0,pz. Boost in center-of-mass frame AB E,0,0,0.

Now boost from E,0,0,0 to E',px',py',pz' and return.

bool map2to3RFmassive ( vector< Vec4 > &  pThree,
vector< Vec4 pTwo,
vector< double >  invariants,
double  phi,
vector< double >  masses 
)

Resonance decay kinematic maps.

Implementations of RF clustering maps for massive partons.

Get momenta and boost to lab frame.

Momentum of recoiler(s), final state parton, and (modified) resonance.

Boost to CoM frame of (modified) resonance.

Get the polar and phi angle in CoM frame of K.

Construct recoiled momenta in (modified) resonance CoM frame. Recover masses and unscaled invariants.

Get energies.

Get cosTheta.

Construct three momenta, assuming k was along z.

Give some transverse recoil to k.

Rotate by arbitrary phi.

Rotate to recover original orientation of frame.

Boost to lab frame.

Return.

bool map2to3RFmassive ( vector< Vec4 > &  pNew,
vector< Vec4 > &  pRec,
vector< Vec4 pOld,
double  saj,
double  sjk,
double  phi,
double  m2oldA = 0.0,
double  m2j = 0.0,
double  m2oldK = 0.0 
)

2->3 kinematics map for RF branchings. Original implementation by Brooks.

pA + pK -> pa + pj + pk

Get momenta and boost to lab frame.

Check if inside phase space boundaries.

Boost to CoM frame.

Get energies, cos(theta), and sin(theta).

Construct three momenta.

Boost to lab frame.

In case of a single recoiler, it just takes the remaining momentum.

Perform Lorentz boost for multiple recoilers, fails for a single massless recoiler

bool map2toNRFmassive ( vector< Vec4 > &  pAfter,
vector< Vec4 pBefore,
unsigned int  posR,
unsigned int  posF,
vector< double >  invariants,
double  phi,
vector< double >  masses 
)

Implementations of resonance kineatic maps for massive partons. Inputs are as follows: pBefore = momenta of resonance and all downstream recoilers before emission. posF = position in pBefore of the momentum of the F end of the antenna. invariants = yaj and yjk scaled invariants. phi = azimuthal angle of gluon emission. mui = masses of a, j, k. The output is as follows: pAfter = momenta of resonance, emission and all downstream recoilers after emission. [0] = pa - will be unchanged [1] = pj [2] = pk [i>3] = recoilers

Momentum of "R", "F" end of antenna, and sum of downstream recoilers.

Recoil AK system.

Add pa, pj, and k. Check mass.

If only a single recoiler, it just takes the remaining momentum.

Boost the downstream recoilers appropriately

Check mass.

Done.

bool map3to2FFmassive ( vector< Vec4 > &  pClu,
vector< Vec4 pIn,
int  kMapType,
int  a = 0,
int  r = 1,
int  b = 2,
double  mI = 0.0,
double  mK = 0.0 
)

3->2 clustering maps.

Implementations of FF clustering maps for massive partons. See VinciaCommon::map3to2FFmassless for details but with the additional input of masses mI and mK for the first and second parent particles.

If both parent masses are negligible and all the momenta are measure off-shellness normalised to average energy of the partons to be clustered, avoids small denominator for collinear massless p_a, p_r, p_b.

Intialize and sanity check.

Verbose output.

ARIADNE map not defined for massive partons; use Kosower map instead.

Longitudinal map; use Kosower map with r = 1.

Forced-longitudinal maps.

Compute invariants.

Check whether the arguments need to be reversed for mapType == 4.

Rewrite the determination in terms of dimensionless variables. Note normalisation choice here is mAnt, rather than sAnt.

Fallback: map with massless r -> 1.

Compute reclustered momenta.

Check if on-shell.

Erase the clustered parton and return.

bool map3to2FFmassless ( vector< Vec4 > &  pClu,
vector< Vec4 pIn,
int  kMapType,
int  a = 0,
int  r = 1,
int  b = 2 
)

FF clustering map(s) for massless partons. Inputs are as follows: kMapType = map number ( 1 : ARIADNE, 2 : PS, 3 : Kosower) pIn = Vec4 list (arbitrary length, but greater than 3) a,r,b = indices of 3 particles in pIn to be clustered Outputs are as follows: pClu = pIn but with the a and b momenta replaced by the clustered aHat and bHat and with r erased. For example: pIn(...,a,...,r-1,r,r+1,...,b,...) -> pOut(...,aHat,...,r-1,r+1,...,bHat,...) with {a,r,b} -> {aHat,bHat} using kinematics map kMapType.

Intialize and sanity check.

Verbose output.

Compute total invariant mass squared.

ARIADNE and PS maps (recoded from old F77 maps for v.1.2.01) (maps -1 and -2 are special: force A or B to take all recoil).

Make copies of PA, PB, and compute sum of LAB momenta and CM energy.

Rotate so a goes into upper half of (x,z) plane.

Rotate so a goes onto z axis.

Rotate so (r,b) go into (x,z) plane.

Compute psi(a,ahat) from A, B energies and theta(AB).

ARIADNE angle (smoothly varying antenna recoil).

PS angle (direction a fixed if sar > srb, and vice versa). Use org momenta, since new ones may not all have been rotated.

Force A to be the emitter. B recoils longitudinally.

Force B to be the emitter. A recoils longitudinally.

Now we know everything: CM -> LAB : -PSI, PHIB, THETA, PHIA, BOOST

Set up initial massless AHAT, BHAT with AHAT along z axis.

1) Take into account antenna recoil, and rotate back in phiB.

2) Rotate back in theta and phiA.

3) Boost back to LAB.

kMapType = 3, 4 (and catchall for undefined kMapType values). Implementation of the massless Kosower antenna map(s).

Compute invariants.

Check whether the arguments need to be reversed for kMapType == 4.

Call the function with reverse arguments, then return.

Compute coefficients. kMapType = 3: GGG choice kMapType >= 4: r=1

Compute reclustered momenta.

A dimensionless quantitiy to compare with TINY.

Erase the clustered momentum and return.

bool map3to2IImassive ( vector< Vec4 > &  pClu,
vector< Vec4 > &  pIn,
vector< Vec4 > &  pRec,
double  saj,
double  sjb,
double  sab,
bool  doBoost 
)

Implementations of II clustering maps for massive partons.

Scale factors and momenta.

Perform boost - if doBoost, we boost back to the lab frame.

Otherwise stay in the current frame. Adjust clustered momenta.

bool mapToMassive ( Vec4 p1,
Vec4 p2,
double  m1,
double  m2 
)
inline

Map a massless antenna to equivalent massive one. Boolean returns true if a modification was made.

bool mapToMassless ( int  iSys,
Event event,
PartonSystems partonSystemsPtr,
bool  makeNewCopies 
)

Force initial-state and light-flavour partons to be massless.

Map partons partonSystems[iSys] to equivalent massless ones. Return true if succeeded. Note, a method using only Particles or Vec4 as input could in principle be split off from this, if needed, but has not been required so far.

Start by making new copies, if requested to do so.

Copy incoming partons, interpret the copying operation as the two incoming partons recoiling off each other. Assign status code -42, incoming copy of recoiler (as mother).

Note, a decaying resonance is not copied to preserve structure of production and decay. Copy outgoing partons (use status code 52).

End loop to make new copies.

End if new copies requested.

Initial-state partons, always assumed massless in VINCIA.

Below we assume iA is the one with pz > 0; swap if opposite case.

Transverse components assumed zero: check.

Verbose output.

Define explicitly massless momenta (same as in Pythia::PartonLevel).

End make initial-state partons massless.

Final-state partons.

Return if nothing needs to be done.

Create copy of original momenta (in case of failure).

Boost to CM if original system not at rest.

Define vector for computing CM energy of modified system.

Identify particles to be made massless (by ID code) and rescale their momenta along direction of motion.

Sanity check.

Restore masses in case any were already changed.

Failed.

Check new 4-vector.

End check new 4-vector.

End if massless flavour with mass > 0.

Add to new CM momentum.

End loop over FS particles.

New system generally has smaller invariant mass and some motion. Determine if additional scalings or boosts are needed.

Update event record (masses already updated above).

Check momentum conservation.

If the new system has a different CM energy, rescale all energies and momenta to restore the same CM energy as before.

Then boost to CM frame (preserves CM energy).

Boost to new CM frame

If required, also boost back to frame of input system

Update event record (masses already updated above).

End do boosts.

Verbose output: final configuration.

End make final-state momenta massless.

Check momentum conservation.

We made it.

double mHadMin ( const int  id1in,
const int  id2in 
)

Function to check for the hadronization cutoff for a colour connected parton pair.

Function to find the lowest meson mass for a parton pair treating gluons as down quarks. Used to determine hadronisation boundaries consistent with assumption of string length > 1 meson.

Special for ssbar, use eta rather than eta'.

bool onShellCM ( Vec4 p1,
Vec4 p2,
double  m1,
double  m2,
double  tol = 1e-6 
)

Check if 2-particle system is on-shell and rescale if not.

Define massive on-shell momenta.

If this got them closer to mass shell, replace momenta.

bool showerChecks ( Event event,
bool  ISR 
)

Function to check the event after each branching. Added by NF to see if certain Pythia warnings/error are caused by the shower.

Function to check the event after each branching, mostly copied from Pythia8.

Only for verbose >= 4.

Count incoming partons (beam daughters) with negative momentum and charge.

Loop over particles in the event.

Look for any unrecognized particle codes.

Check that colour assignments are the expected ones.

Look for particles with mismatched or not-a-number energy/momentum/mass.

Look for particles with not-a-number vertex/lifetime.

Add final-state four-momentum and charge.

End of particle loop.

Check energy-momentum/charge conservation.

Check that mother and daughter information match for each particle.

Loop through the event and check that there are beam particles.

Check that mother and daughter lists not empty where not expected to.

Check that the particle appears in the daughters list of each mother.

Check that the particle appears in the mothers list of each daughter.

End loop through the event.

Warn if any errors were found.

Print some more info.

Made it to here: no major problems.

Member Data Documentation

AlphaStrong alphaStrong

Public data members: strong coupling in MSbar and CMW schemes, user and default choices,


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