8 #ifndef Pythia8_DireSplittingsQED_H 9 #define Pythia8_DireSplittingsQED_H 11 #define DIRE_SPLITTINGSQED_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 pT2minL, pT2minQ, pT2minA, pT2minForcePos;
44 bool doQEDshowerByQ, doQEDshowerByL, doForcePos;
50 double aem2Pi (
double pT2,
int = 0);
52 bool useFastFunctions() {
return true; }
56 virtual int nEmissions() {
return 1; }
57 virtual bool isPartial() {
return true; }
60 virtual double coupling (
double = 0.,
double = 0.,
double = 0.,
double = -1,
61 pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
62 return (aem0 / (2.*M_PI));
64 virtual double couplingScale2 (
double = 0.,
double = 0.,
double = 0.,
65 pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
84 coupSM, info, direInfo){}
86 bool canRadiate (
const Event&, pair<int,int>,
87 unordered_map<string,bool> = unordered_map<string,bool>(),
89 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
101 int radBefID(
int idRadAfter,
int idEmtAfter);
104 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
105 int colEmtAfter,
int acolEmtAfter);
107 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
109 (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
118 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
122 double pT2Old,
double m2dip,
int order = -1);
142 coupSM, info, direInfo){}
144 bool canRadiate (
const Event&, pair<int,int>,
145 unordered_map<string,bool> = unordered_map<string,bool>(),
147 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
155 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
157 (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
164 int radBefID(
int idRadAfter,
int idEmtAfter);
167 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
168 int colEmtAfter,
int acolEmtAfter);
176 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
180 double pT2Old,
double m2dip,
int order = -1);
200 coupSM, info, direInfo){}
202 bool canRadiate (
const Event&, pair<int,int>,
203 unordered_map<string,bool> = unordered_map<string,bool>(),
205 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
217 int radBefID(
int idRadAfter,
int idEmtAfter);
220 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
221 int colEmtAfter,
int acolEmtAfter);
223 vector<pair<int,int> > radAndEmtCols(
int,
int,
Event) {
233 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
237 double pT2Old,
double m2dip,
int order = -1);
257 coupSM, info, direInfo){}
259 bool canRadiate (
const Event&, pair<int,int>,
260 unordered_map<string,bool> = unordered_map<string,bool>(),
262 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
274 int radBefID(
int idRadAfter,
int idEmtAfter);
277 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
278 int colEmtAfter,
int acolEmtAfter);
280 vector<pair<int,int> > radAndEmtCols(
int,
int,
Event) {
290 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
294 double pT2Old,
double m2dip,
int order = -1);
318 softRS, settings, particleData, rndm, beamA, beamB, coupSM, info,
320 idRadAfterSave(idRadAfterIn), nchSaved(1) {}
321 bool canRadiate (
const Event& state, pair<int,int> ints,
322 unordered_map<string,bool> = unordered_map<string,bool>(),
324 return ( state[ints.first].isFinal()
325 && state[ints.first].id() == 22
326 && state[ints.second].isCharged());
328 bool canRadiate (
const Event& state,
int iRadBef,
int iRecBef,
330 return ( state[iRadBef].isFinal()
331 && state[iRadBef].
id() == 22
332 && state[iRecBef].isCharged());
336 bool canUseForBranching() {
return true; }
337 bool isPartial() {
return false; }
339 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
340 vector< pair<int,int> > ret;
341 if (state[iRad].
id() != 22)
return ret;
343 if (particleDataPtr->colType(idRadAfterSave) != 0) {
344 int sign = (idRadAfterSave > 0) ? 1 : -1;
345 int newCol = state.nextColTag();
347 ret[0].first = newCol;
350 ret[1].second = newCol;
353 ret[0].second = newCol;
354 ret[1].first = newCol;
363 {
return idRadAfterSave; }
365 {
return -idRadAfterSave; }
370 {
return pow2(particleDataPtr->charge(idRadAfterSave)); }
372 {
return 1./double(nchSaved); }
375 if ( idRadAfter == idRadAfterSave
376 && particleDataPtr->isQuark(idRadAfter)
377 && particleDataPtr->isQuark(idEmtAfter))
return 22;
381 pair<int,int>
radBefCols(
int,
int,
int,
int) {
return make_pair(0,0); }
385 if ( state[iRad].isFinal() || state[iRad].
id() != idRadAfterSave
386 || state[iEmt].
id() != -idRadAfterSave)
return vector<int>();
391 for (
int i=0; i < state.
size(); ++i) {
392 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
393 if ( state[i].isCharged() ) {
394 if (state[i].isFinal())
396 if (state[i].mother1() == 1 && state[i].mother2() == 0)
398 if (state[i].mother1() == 2 && state[i].mother2() == 0)
410 for (
int i=0; i < state.
size(); ++i) {
411 if ( state[i].isCharged() ) {
412 if (state[i].isFinal()) nch++;
413 if (state[i].mother1() == 1 && state[i].mother2() == 0) nch++;
414 if (state[i].mother1() == 2 && state[i].mother2() == 0) nch++;
423 double zSplit(
double zMinAbs,
double zMaxAbs,
double ) {
424 return (zMinAbs + rndmPtr->flat() * (zMaxAbs - zMinAbs));
429 double ,
double ,
int = -1) {
431 double wt = 2. *enhance * preFac * 0.5 * ( zMaxAbs - zMinAbs);
438 double wt = 2. *enhance * preFac * 0.5;
446 if (
false) cout << state[0].e() << orderNow << endl;
449 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
450 m2dip(splitInfo.kinematics()->m2Dip),
452 m2Rad(splitInfo.kinematics()->m2RadAft),
453 m2Rec(splitInfo.kinematics()->m2Rec),
454 m2Emt(splitInfo.kinematics()->m2EmtAft);
455 int splitType(splitInfo.type);
462 double kappa2 = pT2/m2dip;
464 * (pow(1.-z,2.) + pow(z,2.));
467 bool doMassive = (abs(splitType) == 2);
471 double vijk = 1., pipj = 0.;
474 if (splitType == 2) {
476 double yCS = kappa2 / (1.-z);
477 double nu2Rad = m2Rad/m2dip;
478 double nu2Emt = m2Emt/m2dip;
479 double nu2Rec = m2Rec/m2dip;
480 vijk =
pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
481 vijk = sqrt(vijk) / (1-yCS);
482 pipj = m2dip * yCS /2.;
485 }
else if (splitType ==-2) {
487 double xCS = 1 - kappa2/(1.-z);
489 pipj = m2dip/2. * (1-xCS)/xCS;
493 wt = preFac * 1. / vijk * (
pow2(1.-z) +
pow2(z)
494 + m2Emt / ( pipj + m2Emt) );
498 if (idRadAfterSave > 0) wt *= z;
502 unordered_map<string,double> wts;
503 wts.insert( make_pair(
"base", wt ));
506 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
507 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
508 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
509 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
514 for ( unordered_map<string,double>::iterator it = wts.begin();
515 it != wts.end(); ++it )
516 kernelVals.insert(make_pair( it->first, it->second ));
534 coupSM, info, direInfo){}
536 bool canRadiate (
const Event&, pair<int,int>,
537 unordered_map<string,bool> = unordered_map<string,bool>(),
539 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
551 int radBefID(
int idRadAfter,
int idEmtAfter);
554 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
555 int colEmtAfter,
int acolEmtAfter);
557 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
559 (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
568 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
572 double pT2Old,
double m2dip,
int order = -1);
590 coupSM, info, direInfo){}
592 bool canRadiate (
const Event&, pair<int,int>,
593 unordered_map<string,bool> = unordered_map<string,bool>(),
595 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
607 int radBefID(
int idRadAfter,
int idEmtAfter);
610 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
611 int colEmtAfter,
int acolEmtAfter);
613 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
615 (make_pair(0, 0))(make_pair(state[iRad].acol(),state[iRad].col()));
622 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
626 double pT2Old,
double m2dip,
int order = -1);
644 coupSM, info, direInfo){}
646 bool canRadiate (
const Event&, pair<int,int>,
647 unordered_map<string,bool> = unordered_map<string,bool>(),
649 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
661 int radBefID(
int idRadAfter,
int idEmtAfter);
664 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
665 int colEmtAfter,
int acolEmtAfter);
667 vector<pair<int,int> > radAndEmtCols(
int,
int colType,
Event state) {
668 int newCol = state.nextColTag();
670 (make_pair(newCol,0))(make_pair(newCol,0));
672 (make_pair(0,newCol))(make_pair(0,newCol));
679 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
683 double pT2Old,
double m2dip,
int order = -1);
701 coupSM, info, direInfo){}
703 bool canRadiate (
const Event&, pair<int,int>,
704 unordered_map<string,bool> = unordered_map<string,bool>(),
706 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
718 int radBefID(
int idRadAfter,
int idEmtAfter);
721 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
722 int colEmtAfter,
int acolEmtAfter);
724 vector<pair<int,int> > radAndEmtCols(
int,
int,
Event) {
734 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
738 double pT2Old,
double m2dip,
int order = -1);
756 coupSM, info, direInfo){}
758 bool canRadiate (
const Event&, pair<int,int>,
759 unordered_map<string,bool> = unordered_map<string,bool>(),
761 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
773 int radBefID(
int idRadAfter,
int idEmtAfter);
776 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
777 int colEmtAfter,
int acolEmtAfter);
779 vector<pair<int,int> > radAndEmtCols(
int,
int,
Event) {
787 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
791 double pT2Old,
double m2dip,
int order = -1);
809 coupSM, info, direInfo){}
811 bool canRadiate (
const Event&, pair<int,int>,
812 unordered_map<string,bool> = unordered_map<string,bool>(),
814 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
826 int radBefID(
int idRadAfter,
int idEmtAfter);
829 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
830 int colEmtAfter,
int acolEmtAfter);
832 vector<pair<int,int> > radAndEmtCols(
int,
int,
Event) {
840 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
844 double pT2Old,
double m2dip,
int order = -1);
864 coupSM, info, direInfo){}
866 bool canRadiate (
const Event&, pair<int,int>,
867 unordered_map<string,bool> = unordered_map<string,bool>(),
869 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
873 bool canUseForBranching() {
return true; }
874 bool isPartial() {
return false; }
883 int radBefID(
int idRadAfter,
int idEmtAfter);
886 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
887 int colEmtAfter,
int acolEmtAfter);
889 vector<pair<int,int> > radAndEmtCols(
int iRad,
int,
Event state) {
891 (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
900 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
904 double pT2Old,
double m2dip,
int order = -1);
924 coupSM, info, direInfo){}
926 bool canRadiate (
const Event&, pair<int,int>,
927 unordered_map<string,bool> = unordered_map<string,bool>(),
929 bool canRadiate (
const Event&,
int iRadBef,
int iRecBef,
933 bool canUseForBranching() {
return true; }
934 bool isPartial() {
return false; }
943 int radBefID(
int idRadAfter,
int idEmtAfter);
946 pair<int,int>
radBefCols(
int colRadAfter,
int acolRadAfter,
947 int colEmtAfter,
int acolEmtAfter);
949 vector<pair<int,int> > radAndEmtCols(
int,
int,
Event) {
959 double zSplit(
double zMinAbs,
double zMaxAbs,
double m2dip);
963 double pT2Old,
double m2dip,
int order = -1);
double aem2Pi(double pT2, int=0)
Definition: DireSplittingsQED.cc:65
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
Definition: DireSplittingsQED.h:636
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
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: BeamParticle.h:133
double zSplit(double zMinAbs, double zMaxAbs, double)
Pick z for new splitting.
Definition: DireSplittingsQED.h:423
Definition: DireSplittingsQED.h:801
Definition: DireSplittingsQCD.h:27
double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittingsQED.h:436
virtual double coupling(double=0., double=0., double=0., double=-1, pair< int, bool >=pair< int, bool >(), pair< int, bool >=pair< int, bool >())
Definition: DireSplittingsQED.h:60
virtual double gaugeFactor(int, int)
Return color factor for splitting.
Definition: DireSplittings.h:157
int motherID(int)
Return id of mother after splitting.
Definition: DireSplittingsQED.h:362
virtual double overestimateInt(double, double, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittings.h:189
Definition: DireBasics.h:374
Definition: DireSplittingsQED.h:76
Definition: StandardModel.h:106
double gaugeFactor(int=0, int=0)
{ return createvector<int>(1)(-1); }
Definition: DireSplittingsQED.h:369
vector< int > recPositions(const Event &state, int iRad, int iEmt)
All charged particles are potential recoilers.
Definition: DireSplittingsQED.h:384
Definition: DireSplittingsQED.h:856
int sisterID(int)
Return id of emission.
Definition: DireSplittingsQED.h:364
DireSplittingQED(string idIn, int softRS, Settings *settings, ParticleData *particleData, Rndm *rndm, BeamParticle *beamA, BeamParticle *beamB, CoupSM *coupSM, Info *info, DireInfo *direInfo)
Constructor and destructor.
Definition: DireSplittingsQED.h:31
virtual bool calc(const Event &=Event(), int=-1)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittings.h:203
pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittingsQED.h:381
int radBefID(int idRadAfter, int idEmtAfter)
Return id of recombined radiator (before splitting!)
Definition: DireSplittingsQED.h:374
Definition: DireSplittingsQED.h:306
virtual int kinMap()
Definition: DireSplittings.h:123
bool calc(const Event &state, int orderNow)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittingsQED.h:443
Definition: DireSplittingsQED.h:526
void init()
The SplittingQED class.
Definition: DireSplittingsQED.cc:23
double overestimateInt(double zMinAbs, double zMaxAbs, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittingsQED.h:428
Definition: DireSplittingsQED.h:693
Definition: StandardModel.h:135
int size() const
Event record size.
Definition: Event.h:504
Definition: DireSplittingsQED.h:192
Definition: DireSplittingsQED.h:134
virtual double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittings.h:193
Definition: DireSplittingsQED.h:916
Definition: DireSplittingsQED.h:748
Definition: DireSplittingsQED.h:26
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
vector< int > radAndEmt(int, int)
Definition: DireSplittingsQED.h:366
virtual bool aboveCutoff(double t, const Particle &radBef, const Particle &recBef, int iSys, PartonSystems *partonSystemsPtr)
Discard below the cut-off for the splitting.
Definition: DireSplittingsQED.cc:79
Definition: DireSplittingsQED.h:582
double symmetryFactor(int=0, int=0)
Return symmetry factor for splitting.
Definition: DireSplittingsQED.h:371
Definition: DireSplittingsQED.h:249
virtual int couplingType(int, int)
Definition: DireSplittingsQED.h:59
virtual int radBefID(int, int)
Return id of recombined radiator (before splitting!)
Definition: DireSplittings.h:150
double sumCharge2Tot
Class members.
Definition: DireSplittingsQED.h:42
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
int set_nCharged(const Event &state)
All charged particles are potential recoilers.
Definition: DireSplittingsQED.h:407
int kinMap()
Definition: DireSplittingsQED.h:335
virtual pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittings.h:153
Definition: DireBasics.h:82
virtual vector< int > radAndEmt(int idDaughter, int)
Definition: DireSplittingsQED.h:54
virtual int sisterID(int)
Return id of emission.
Definition: DireSplittings.h:129
Definition: Settings.h:195
virtual double zSplit(double, double, double)
Pick z for new splitting.
Definition: DireSplittings.h:186
virtual int motherID(int)
Return id of mother after splitting.
Definition: DireSplittings.h:126