8 #ifndef Pythia8_DireSplittingsU1new_H 9 #define Pythia8_DireSplittingsU1new_H 11 #define DIRE_SPLITTINGSU1NEW_VERSION "2.002" 13 #include "Pythia8/Basics.h" 14 #include "Pythia8/BeamParticle.h" 15 #include "Pythia8/ParticleData.h" 16 #include "Pythia8/PythiaStdlib.h" 17 #include "Pythia8/Settings.h" 18 #include "Pythia8/StandardModel.h" 20 #include "Pythia8/DireSplittingsQCD.h" 35 softRS,settings,particleData,rndm,beamA,beamB,coupSM,info, direInfo)
43 bool doU1NEWshowerByQ, doU1NEWshowerByL;
49 double aem2Pi (
double pT2,
int = 0);
51 bool useFastFunctions() {
return true; }
55 virtual int nEmissions() {
return 1; }
56 virtual bool isPartial() {
return true; }
58 virtual bool canUseForBranching() {
return true; }
61 virtual double coupling (
double = 0.,
double = 0.,
double = 0.,
double = -1.,
62 pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
63 return (ax0 / (2.*M_PI));
65 virtual double couplingScale2 (
double = 0.,
double = 0.,
double = 0.,
66 pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
83 beamB, coupSM, info, direInfo){}
85 bool canRadiate (
const Event&, pair<int,int>,
86 unordered_map<string,bool> = unordered_map<string,bool>(),
88 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
100 int radBefID(
int idRadAfter,
int idEmtAfter);
103 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
104 int colEmtAfter,
int acolEmtAfter);
112 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
116 double pT2Old,
double m2dip,
int order = -1);
136 beamB, coupSM, info, direInfo){}
138 bool canRadiate (
const Event&, pair<int,int>,
139 unordered_map<string,bool> = unordered_map<string,bool>(),
141 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
153 int radBefID(
int idRadAfter,
int idEmtAfter);
156 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
157 int colEmtAfter,
int acolEmtAfter);
165 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
169 double pT2Old,
double m2dip,
int order = -1);
189 beamB, coupSM, info, direInfo){}
191 bool canRadiate (
const Event&, pair<int,int>,
192 unordered_map<string,bool> = unordered_map<string,bool>(),
194 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
199 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
200 vector< pair<int,int> > ret
202 if (particleDataPtr->colType(state[iRad].id()) != 0) {
203 ret[0].first = state[iRad].col();
204 ret[0].second = state[iRad].acol();
218 int radBefID(
int idRadAfter,
int idEmtAfter);
221 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
222 int colEmtAfter,
int acolEmtAfter);
230 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
234 double pT2Old,
double m2dip,
int order = -1);
254 beamB, coupSM, info, direInfo){}
256 bool canRadiate (
const Event&, pair<int,int>,
257 unordered_map<string,bool> = unordered_map<string,bool>(),
259 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
264 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
265 vector< pair<int,int> > ret
267 if (particleDataPtr->colType(state[iRad].id()) != 0) {
268 ret[0].first = state[iRad].col();
269 ret[0].second = state[iRad].acol();
283 int radBefID(
int idRadAfter,
int idEmtAfter);
286 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
287 int colEmtAfter,
int acolEmtAfter);
295 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
299 double pT2Old,
double m2dip,
int order = -1);
323 softRS, settings, particleData, rndm, beamA, beamB, coupSM, info,
325 idRadAfterSave(idRadAfterIn), nchSaved(1) {}
326 bool canRadiate (
const Event& state, pair<int,int> ints,
327 unordered_map<string,bool> = unordered_map<string,bool>(),
329 return ( state[ints.first].isFinal()
330 && state[ints.first].id() == 900032
331 && (state[ints.second].isLepton()
332 || state[ints.second].idAbs() == 900012));
334 bool canRadiate (
const Event& state,
int iRadBef,
int iRecBef,
336 return ( state[iRadBef].isFinal()
337 && state[iRadBef].
id() == 900032
338 && (state[iRecBef].isLepton()
339 || state[iRecBef].idAbs() == 900012));
343 bool isPartial() {
return false; }
345 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
346 vector< pair<int,int> > ret;
347 if (state[iRad].
id() != 900032)
return ret;
349 if (particleDataPtr->colType(idRadAfterSave) != 0) {
350 int sign = (idRadAfterSave > 0) ? 1 : -1;
351 int newCol = state.nextColTag();
353 ret[0].first = newCol;
356 ret[1].second = newCol;
359 ret[0].second = newCol;
360 ret[1].first = newCol;
370 {
return idRadAfterSave; }
372 {
return -idRadAfterSave; }
379 {
return 1./double(nchSaved); }
382 if ( idRadAfter == idRadAfterSave
383 && particleDataPtr->isQuark(idRadAfter)
384 && particleDataPtr->isQuark(idEmtAfter))
return 900032;
388 pair<int,int>
radBefCols(
int,
int,
int,
int) {
return make_pair(0,0); }
392 if ( state[iRad].isFinal() || state[iRad].
id() != idRadAfterSave
393 || state[iEmt].
id() != -idRadAfterSave)
return vector<int>();
398 for (
int i=0; i < state.
size(); ++i) {
399 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
400 if ( state[i].isLepton() || state[i].idAbs() == 900012) {
401 if (state[i].isFinal())
403 if (state[i].mother1() == 1 && state[i].mother2() == 0)
405 if (state[i].mother1() == 2 && state[i].mother2() == 0)
417 for (
int i=0; i < state.
size(); ++i) {
418 if ( state[i].isLepton() || state[i].idAbs() == 900012 ) {
419 if (state[i].isFinal()) nch++;
420 if (state[i].mother1() == 1 && state[i].mother2() == 0) nch++;
421 if (state[i].mother1() == 2 && state[i].mother2() == 0) nch++;
430 double zSplit(
double zMinAbs,
double zMaxAbs,
double ) {
431 return (zMinAbs + rndmPtr->flat() * (zMaxAbs - zMinAbs));
436 double ,
double ,
int = -1) {
438 double wt = 2. *enhance * preFac * 0.5 * ( zMaxAbs - zMinAbs);
445 double wt = 2. *enhance * preFac * 0.5;
453 if (
false) cout << state[0].e() << orderNow << endl;
456 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
457 m2dip(splitInfo.kinematics()->m2Dip),
458 m2Rad(splitInfo.kinematics()->m2RadAft),
459 m2Rec(splitInfo.kinematics()->m2Rec),
460 m2Emt(splitInfo.kinematics()->m2EmtAft);
461 int splitType(splitInfo.type);
468 double kappa2 = pT2/m2dip;
470 * (pow(1.-z,2.) + pow(z,2.));
473 bool doMassive = (abs(splitType) == 2);
477 double vijk = 1., pipj = 0.;
480 if (splitType == 2) {
482 double yCS = kappa2 / (1.-z);
483 double nu2Rad = m2Rad/m2dip;
484 double nu2Emt = m2Emt/m2dip;
485 double nu2Rec = m2Rec/m2dip;
486 vijk =
pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
487 vijk = sqrt(vijk) / (1-yCS);
488 pipj = m2dip * yCS /2.;
491 }
else if (splitType ==-2) {
493 double xCS = 1 - kappa2/(1.-z);
495 pipj = m2dip/2. * (1-xCS)/xCS;
499 wt = preFac * 1. / vijk * (
pow2(1.-z) +
pow2(z)
500 + m2Emt / ( pipj + m2Emt) );
504 if (idRadAfterSave > 0) wt *= z;
508 unordered_map<string,double> wts;
509 wts.insert( make_pair(
"base", wt ));
512 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
513 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
514 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
515 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
520 for ( unordered_map<string,double>::iterator it = wts.begin();
521 it != wts.end(); ++it )
522 kernelVals.insert(make_pair( it->first, it->second ));
540 rndm, beamA, beamB, coupSM, info, direInfo) {}
554 beamB, coupSM, info, direInfo){}
556 bool canRadiate (
const Event&, pair<int,int>,
557 unordered_map<string,bool> = unordered_map<string,bool>(),
559 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
571 int radBefID(
int idRadAfter,
int idEmtAfter);
574 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
575 int colEmtAfter,
int acolEmtAfter);
583 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
587 double pT2Old,
double m2dip,
int order = -1);
605 beamB, coupSM, info, direInfo){}
607 bool canRadiate (
const Event&, pair<int,int>,
608 unordered_map<string,bool> = unordered_map<string,bool>(),
610 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
622 int radBefID(
int idRadAfter,
int idEmtAfter);
625 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
626 int colEmtAfter,
int acolEmtAfter);
632 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
636 double pT2Old,
double m2dip,
int order = -1);
654 beamB, coupSM, info, direInfo){}
656 bool canRadiate (
const Event&, pair<int,int>,
657 unordered_map<string,bool> = unordered_map<string,bool>(),
659 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
671 int radBefID(
int idRadAfter,
int idEmtAfter);
674 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
675 int colEmtAfter,
int acolEmtAfter);
681 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
685 double pT2Old,
double m2dip,
int order = -1);
703 beamB, coupSM, info, direInfo){}
705 bool canRadiate (
const Event&, pair<int,int>,
706 unordered_map<string,bool> = unordered_map<string,bool>(),
708 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
720 int radBefID(
int idRadAfter,
int idEmtAfter);
723 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
724 int colEmtAfter,
int acolEmtAfter);
732 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
736 double pT2Old,
double m2dip,
int order = -1);
754 beamB, coupSM, info, direInfo){}
756 bool canRadiate (
const Event&, pair<int,int>,
757 unordered_map<string,bool> = unordered_map<string,bool>(),
759 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
771 int radBefID(
int idRadAfter,
int idEmtAfter);
774 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
775 int colEmtAfter,
int acolEmtAfter);
781 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
785 double pT2Old,
double m2dip,
int order = -1);
803 beamB, coupSM, info, direInfo){}
805 bool canRadiate (
const Event&, pair<int,int>,
806 unordered_map<string,bool> = unordered_map<string,bool>(),
808 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
820 int radBefID(
int idRadAfter,
int idEmtAfter);
823 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
824 int colEmtAfter,
int acolEmtAfter);
830 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
834 double pT2Old,
double m2dip,
int order = -1);
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
Definition: DireSplittingsU1new.h:746
virtual vector< int > recPositions(const Event &, int, int)
Definition: DireSplittings.h:146
virtual double symmetryFactor(int, int)
Return symmetry factor for splitting.
Definition: DireSplittings.h:160
Definition: DireSplittingsU1new.h:795
Definition: DireSplittingsU1new.h:546
double zSplit(double zMinAbs, double zMaxAbs, double)
Pick z for new splitting.
Definition: DireSplittingsU1new.h:430
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: BeamParticle.h:133
virtual double coupling(double=0., double=0., double=0., double=-1., pair< int, bool >=pair< int, bool >(), pair< int, bool >=pair< int, bool >())
Definition: DireSplittingsU1new.h:61
Definition: DireSplittingsU1new.h:695
Definition: DireSplittingsQCD.h:27
int set_nCharged(const Event &state)
All charged particles are potential recoilers.
Definition: DireSplittingsU1new.h:414
virtual double gaugeFactor(int, int)
Return color factor for splitting.
Definition: DireSplittings.h:157
double symmetryFactor(int=0, int=0)
Return symmetry factor for splitting.
Definition: DireSplittingsU1new.h:378
virtual double overestimateInt(double, double, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittings.h:189
DireSplittingU1new(string idIn, int softRS, Settings *settings, ParticleData *particleData, Rndm *rndm, BeamParticle *beamA, BeamParticle *beamB, CoupSM *coupSM, Info *info, DireInfo *direInfo)
Constructor and destructor.
Definition: DireSplittingsU1new.h:31
double aem2Pi(double pT2, int=0)
Definition: DireSplittingsU1new.cc:58
Definition: DireSplittingsU1new.h:246
Definition: DireBasics.h:374
Definition: DireSplittingsU1new.h:597
Definition: StandardModel.h:106
int motherID(int)
Return id of mother after splitting.
Definition: DireSplittingsU1new.h:369
double sumCharge2Tot
VARIABLES.
Definition: DireSplittingsU1new.h:42
Definition: DireSplittingsU1new.h:181
Definition: DireSplittingsU1new.h:26
vector< int > recPositions(const Event &state, int iRad, int iEmt)
All charged particles are potential recoilers.
Definition: DireSplittingsU1new.h:391
virtual bool calc(const Event &=Event(), int=-1)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittings.h:203
Definition: DireSplittingsU1new.h:128
Definition: DireSplittingsU1new.h:531
double gaugeFactor(int=0, int=0)
{ return createvector<int>(1)(-1); }
Definition: DireSplittingsU1new.h:376
virtual int kinMap()
Definition: DireSplittings.h:123
vector< int > radAndEmt(int, int)
Definition: DireSplittingsU1new.h:373
void init()
The SplittingU1new class.
Definition: DireSplittingsU1new.cc:21
double overestimateInt(double zMinAbs, double zMaxAbs, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittingsU1new.h:435
Definition: StandardModel.h:135
int size() const
Event record size.
Definition: Event.h:504
virtual int couplingType(int, int)
Definition: DireSplittingsU1new.h:60
virtual double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittings.h:193
int radBefID(int idRadAfter, int idEmtAfter)
Return id of recombined radiator (before splitting!)
Definition: DireSplittingsU1new.h:381
virtual vector< int > radAndEmt(int idDaughter, int)
Definition: DireSplittingsU1new.h:53
Definition: DireSplittingsU1new.h:646
The PartonSystems class describes the whole set of subcollisions.
Definition: PartonSystems.h:42
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
Definition: DireSplittingsU1new.h:75
bool calc(const Event &state, int orderNow)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittingsU1new.h:450
double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittingsU1new.h:443
virtual int radBefID(int, int)
Return id of recombined radiator (before splitting!)
Definition: DireSplittings.h:150
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
virtual pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittings.h:153
int kinMap()
Definition: DireSplittingsU1new.h:342
Definition: DireBasics.h:82
virtual int sisterID(int)
Return id of emission.
Definition: DireSplittings.h:129
Definition: DireSplittingsU1new.h:311
Definition: Settings.h:195
virtual double zSplit(double, double, double)
Pick z for new splitting.
Definition: DireSplittings.h:186
pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittingsU1new.h:388
int sisterID(int)
Return id of emission.
Definition: DireSplittingsU1new.h:371
virtual int motherID(int)
Return id of mother after splitting.
Definition: DireSplittings.h:126