Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/Pythia8/MultipartonInteractions.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class MultipartonInteractions {
SIGMAMBLIMIT;

// Initialization data, read from Settings.
bool allowRescatter, allowDoubleRes, canVetoMPI, doPartonVertex;
bool allowRescatter, allowDoubleRes, canVetoMPI, doPartonVertex, alphaSfixRun;
int pTmaxMatch, alphaSorder, alphaEMorder, alphaSnfmax, bProfile,
processLevel, bSelScale, rescatterMode, nQuarkIn, nSample,
enhanceScreening, pT0paramMode;
Expand Down
2 changes: 1 addition & 1 deletion include/Pythia8/SimpleSpaceShower.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class SimpleSpaceShower : public SpaceShower {
bool doQCDshower, doQEDshowerByQ, doQEDshowerByL, useSamePTasMPI,
doWeakShower, doMEcorrections, doMEafterFirst, doPhiPolAsym,
doPhiPolAsymHard, doPhiIntAsym, doRapidityOrder, useFixedFacScale,
doSecondHard, canVetoEmission, hasUserHooks, alphaSuseCMW,
doSecondHard, canVetoEmission, hasUserHooks, alphaSuseCMW, alphaSfixRun,
singleWeakEmission, vetoWeakJets, weakExternal, doRapidityOrderMPI,
doMPI, doDipoleRecoil, doPartonVertex;
int pTmaxMatch, pTdampMatch, alphaSorder, alphaSnfmax, alphaEMorder,
Expand Down
2 changes: 1 addition & 1 deletion include/Pythia8/SimpleTimeShower.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class SimpleTimeShower : public TimeShower {
allowBeamRecoil, dampenBeamRecoil, recoilToColoured, useFixedFacScale,
allowRescatter, canVetoEmission, doHVshower, brokenHVsym,
globalRecoil, useLocalRecoilNow, doSecondHard, hasUserHooks,
singleWeakEmission, alphaSuseCMW, vetoWeakJets, allowMPIdipole,
singleWeakEmission, alphaSuseCMW, alphaSfixRun, vetoWeakJets, allowMPIdipole,
weakExternal, recoilDeadCone, doDipoleRecoil, doPartonVertex;
int pTmaxMatch, pTdampMatch, alphaSorder, alphaSnfmax, nGluonToQuark,
weightGluonToQuark, alphaEMorder, nGammaToQuark, nGammaToLepton,
Expand Down
6 changes: 4 additions & 2 deletions include/Pythia8/StandardModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ class AlphaStrong {
AlphaStrong() : isInit(false), order(0), nfmax(),
Lambda3Save(0.), Lambda4Save(0.), Lambda5Save(0.), Lambda6Save(0.),
Lambda3Save2(0.), Lambda4Save2(0.), Lambda5Save2(0.), Lambda6Save2(0.),
scale2Min(0.), mc(0.), mb(0.), mt(0.), mc2(0.), mb2(0.), mt2(0.), useCMW(),
scale2Min(0.), mc(0.), mb(0.), mt(0.), mc2(0.), mb2(0.), mt2(0.), useCMW(), fixRunning(),
lastCallToFull(false), valueRef(0.), valueNow(0.), scale2Now(0.) {}

// Destructor.
virtual ~AlphaStrong() {}

// Initialization for given value at M_Z and given order.
virtual void init(double valueIn = 0.12, int orderIn = 1, int nfmaxIn = 6,
bool useCMWIn = false);
bool useCMWIn = false, bool fixRunningIn = false);

// Set flavour threshold values: m_c, m_b, m_t.
virtual void setThresholds(double mcIn, double mbIn, double mtIn) {
Expand Down Expand Up @@ -81,6 +81,8 @@ class AlphaStrong {

// CMW rescaling factors.
bool useCMW;
// Fix alphaS running (backported from 8.309)
bool fixRunning;
static const double FACCMW3, FACCMW4, FACCMW5, FACCMW6;

// Safety margins to avoid getting too close to LambdaQCD.
Expand Down
6 changes: 6 additions & 0 deletions share/Pythia8/xmldoc/CouplingsAndScales.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ not go to second order there is no strong reason to use this option,
but there is also nothing wrong with it.</option>
</modepick>

<flag name="SigmaProcess:alphaSfixRun" default="off">
<option value="off">Do not apply the fix for 2-loop running. </option>
<option value="on">Apply the fix for 2-loop running, backported from 8.309.
</option>
</flag>

<p/>
QED interactions are regulated by the <ei>alpha_electromagnetic</ei>
value at the <ei>Q^2</ei> renormalization scale of an interaction.
Expand Down
6 changes: 6 additions & 0 deletions share/Pythia8/xmldoc/MultipartonInteractions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ not go to second order there is no strong reason to use this option,
but there is also nothing wrong with it.</option>
</modepick>

<flag name="MultipartonInteractions:alphaSfixRun" default="off">
<option value="off">Do not apply the fix for 2-loop running. </option>
<option value="on">Apply the fix for 2-loop running, backported from 8.309.
</option>
</flag>

<p/>
QED interactions are regulated by the <ei>alpha_electromagnetic</ei>
value at the <ei>pT^2</ei> scale of an interaction.
Expand Down
6 changes: 6 additions & 0 deletions share/Pythia8/xmldoc/SpacelikeShowers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ not go to second order there is no strong reason to use this option,
but there is also nothing wrong with it.</option>
</modepick>

<flag name="SpaceShower:alphaSfixRun" default="off">
<option value="off">Do not apply the fix for 2-loop running. </option>
<option value="on">Apply the fix for 2-loop running, backported from 8.309.
</option>
</flag>

<p/>
The CMW rescaling of <ei>Lambda_QCD</ei> (see the section on
<aloc href="StandardModelParameters">StandardModelParameters</aloc>)
Expand Down
6 changes: 6 additions & 0 deletions share/Pythia8/xmldoc/TimelikeShowers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ not go to second order there is no strong reason to use this option,
but there is also nothing wrong with it.</option>
</modepick>

<flag name="TimeShower:alphaSfixRun" default="off">
<option value="off">Do not apply the fix for 2-loop running. </option>
<option value="on">Apply the fix for 2-loop running, backported from 8.309.
</option>
</flag>

<p/>
The CMW rescaling of <ei>Lambda_QCD</ei> (see the section on
<aloc href="StandardModelParameters">StandardModelParameters</aloc>)
Expand Down
6 changes: 4 additions & 2 deletions src/MergingHooks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2049,15 +2049,17 @@ void MergingHooks::init(){
// Initialise AlphaS objects for reweighting
double alphaSvalueFSR = settingsPtr->parm("TimeShower:alphaSvalue");
int alphaSorderFSR = settingsPtr->mode("TimeShower:alphaSorder");
bool alphaSfixRunFSR= settingsPtr->flag("TimeShower:alphaSfixRun");
int alphaSnfmax = settingsPtr->mode("StandardModel:alphaSnfmax");
int alphaSuseCMWFSR= settingsPtr->flag("TimeShower:alphaSuseCMW");
AlphaS_FSRSave.init(alphaSvalueFSR, alphaSorderFSR, alphaSnfmax,
alphaSuseCMWFSR);
alphaSuseCMWFSR, alphaSfixRunFSR);
double alphaSvalueISR = settingsPtr->parm("SpaceShower:alphaSvalue");
int alphaSorderISR = settingsPtr->mode("SpaceShower:alphaSorder");
bool alphaSfixRunISR= settingsPtr->flag("SpaceShower:alphaSfixRun");
int alphaSuseCMWISR= settingsPtr->flag("SpaceShower:alphaSuseCMW");
AlphaS_ISRSave.init(alphaSvalueISR, alphaSorderISR, alphaSnfmax,
alphaSuseCMWISR);
alphaSuseCMWISR, alphaSfixRunISR);

// Initialise AlphaEM objects for reweighting
int alphaEMFSRorder = settingsPtr->mode("TimeShower:alphaEMorder");
Expand Down
3 changes: 2 additions & 1 deletion src/MultipartonInteractions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ bool MultipartonInteractions::init( bool doMPIinit, int iDiffSysIn,
// Parameters of alphaStrong generation.
alphaSvalue = settings.parm("MultipartonInteractions:alphaSvalue");
alphaSorder = settings.mode("MultipartonInteractions:alphaSorder");
alphaSfixRun = settings.flag("MultipartonInteractions:alphaSfixRun");
alphaSnfmax = settings.mode("StandardModel:alphaSnfmax");

// Parameters of alphaEM generation.
Expand Down Expand Up @@ -502,7 +503,7 @@ bool MultipartonInteractions::init( bool doMPIinit, int iDiffSysIn,
enhanceBavg = 1.;

// Initialize alpha_strong generation.
alphaS.init( alphaSvalue, alphaSorder, alphaSnfmax, false);
alphaS.init( alphaSvalue, alphaSorder, alphaSnfmax, false, alphaSfixRun);
double Lambda3 = alphaS.Lambda3();

// Initialize alphaEM generation.
Expand Down
4 changes: 4 additions & 0 deletions src/Settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,7 @@ void Settings::resetTuneEE() {
// FSR: strong coupling, IR cutoff.
resetParm("TimeShower:alphaSvalue");
resetMode("TimeShower:alphaSorder");
resetFlag("TimeShower:alphaSfixRun");
resetFlag("TimeShower:alphaSuseCMW");
resetParm("TimeShower:pTmin");
resetParm("TimeShower:pTminChgQ");
Expand Down Expand Up @@ -1872,6 +1873,7 @@ void Settings::resetTunePP() {
// ISR: strong coupling, IR cutoff, coherence and spin correlations.
resetParm("SpaceShower:alphaSvalue");
resetMode("SpaceShower:alphaSorder");
resetParm("SpaceShower:alphaSfixRun");
resetParm("SpaceShower:alphaSuseCMW");
resetFlag("SpaceShower:samePTasMPI");
resetParm("SpaceShower:pT0Ref");
Expand All @@ -1886,6 +1888,8 @@ void Settings::resetTunePP() {

// MPI: strong coupling, IR regularization, energy scaling.
resetParm("MultipartonInteractions:alphaSvalue");
resetMode("MultipartonInteractions:alphaSorder");
resetParm("MultipartonInteractions:alphaSfixRun");
resetParm("MultipartonInteractions:pT0Ref");
resetParm("MultipartonInteractions:ecmRef");
resetParm("MultipartonInteractions:ecmPow");
Expand Down
3 changes: 2 additions & 1 deletion src/SimpleSpaceShower.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,13 @@ void SimpleSpaceShower::init( BeamParticle* beamAPtrIn,
// Parameters of alphaStrong generation.
alphaSvalue = settingsPtr->parm("SpaceShower:alphaSvalue");
alphaSorder = settingsPtr->mode("SpaceShower:alphaSorder");
alphaSfixRun = settingsPtr->flag("SpaceShower:alphaSfixRun");
alphaSnfmax = settingsPtr->mode("StandardModel:alphaSnfmax");
alphaSuseCMW = settingsPtr->flag("SpaceShower:alphaSuseCMW");
alphaS2pi = 0.5 * alphaSvalue / M_PI;

// Initialize alpha_strong generation.
alphaS.init( alphaSvalue, alphaSorder, alphaSnfmax, alphaSuseCMW);
alphaS.init( alphaSvalue, alphaSorder, alphaSnfmax, alphaSuseCMW, alphaSfixRun);

// Lambda for 5, 4 and 3 flavours.
Lambda5flav = alphaS.Lambda5();
Expand Down
19 changes: 12 additions & 7 deletions src/SimpleTimeShower.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SimpleTimeShower.cc is a part of the PYTHIA event generator.
// Copyright (C) 2018 Torbjorn Sjostrand.
// Copyright (C) 2019 Torbjorn Sjostrand.
// PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
// Please respect the MCnet Guidelines, see GUIDELINES for details.

Expand Down Expand Up @@ -124,12 +124,13 @@ void SimpleTimeShower::init( BeamParticle* beamAPtrIn,
// Parameters of alphaStrong generation.
alphaSvalue = settingsPtr->parm("TimeShower:alphaSvalue");
alphaSorder = settingsPtr->mode("TimeShower:alphaSorder");
alphaSfixRun = settingsPtr->flag("TimeShower:alphaSfixRun");
alphaSnfmax = settingsPtr->mode("StandardModel:alphaSnfmax");
alphaSuseCMW = settingsPtr->flag("TimeShower:alphaSuseCMW");
alphaS2pi = 0.5 * alphaSvalue / M_PI;

// Initialize alphaStrong generation.
alphaS.init( alphaSvalue, alphaSorder, alphaSnfmax, alphaSuseCMW);
alphaS.init( alphaSvalue, alphaSorder, alphaSnfmax, alphaSuseCMW, alphaSfixRun);

// Lambda for 5, 4 and 3 flavours.
Lambda3flav = alphaS.Lambda3();
Expand Down Expand Up @@ -3077,12 +3078,16 @@ bool SimpleTimeShower::branch( Event& event, bool isInterleaved) {
int iSysSelRec = dipSel->systemRec;

// Sometimes need to patch up colType in junction systems.
int idRec = recBef.id();
int colTypeTmp = dipSel->colType;
if (idRec > 0 && idRec < 9 && colTypeTmp > 0) colTypeTmp = -colTypeTmp;
if (idRec > -9 && idRec < 0 && colTypeTmp < 0) colTypeTmp = -colTypeTmp;
if (idRad > 0 && idRad < 9 && colTypeTmp < 0) colTypeTmp = -colTypeTmp;
if (idRad > -9 && idRad < 0 && colTypeTmp > 0) colTypeTmp = -colTypeTmp;
int colTypeRec = particleDataPtr->colType( recBef.id() );
// Negate colour type if recoiler is initial-state quark.
if (!recBef.isFinal()) colTypeRec = -colTypeRec;
int colTypeRad = particleDataPtr->colType( idRad );
// Perform junction tests for all colour (anti)triplets.
if (colTypeRec == 1 && colTypeTmp > 0) colTypeTmp = -colTypeTmp;
if (colTypeRec == -1 && colTypeTmp < 0) colTypeTmp = -colTypeTmp;
if (colTypeRad == 1 && colTypeTmp < 0) colTypeTmp = -colTypeTmp;
if (colTypeRad == -1 && colTypeTmp > 0) colTypeTmp = -colTypeTmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that we changed this part several time, e.g., 4311abd, do we need to change it back

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the multiplicity bug fix, @agrohsje reminded me that it needs to be included.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@menglu21 we first fixed, then re-introduced the bug for testing releases. the buggy version stayed in the code but the fixed version was picked up in cmsdist. now that we are changing the code we need to fix again.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks


// Default OK for photon, photon_HV or gluon_HV emission.
if (dipSel->flavour == 22 || dipSel->flavour == idHV) {
Expand Down
Loading