9 #ifndef Pythia_VinciaISR_H
10 #define Pythia_VinciaISR_H
12 #include "Pythia8/SpaceShower.h"
13 #include "Pythia8/VinciaAntennaFunctions.h"
14 #include "Pythia8/VinciaCommon.h"
15 #include "Pythia8/VinciaQED.h"
16 #include "Pythia8/VinciaWeights.h"
37 void initPtr(
Info* infoPtrIn);
40 virtual string name() {
return "TrialGeneratorISR";}
43 virtual void init(
double mcIn,
double mbIn);
49 virtual double aTrial(
double saj,
double sjb,
double sAB);
52 virtual double getQ2(
double saj,
double sjb,
double sAB) {
53 return (saj*sjb/(saj + sjb + sAB));}
54 virtual double getQ2max(
double sAB,
double,
double) {
55 return (0.25*pow2(shhSav - sAB)/shhSav);}
58 virtual double genQ2run(
double q2old,
double sAB,
double zMin,
double zMax,
59 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
60 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0);
63 virtual double genQ2(
double q2old,
double sAB,
double zMin,
double zMax,
64 double colFac,
double alphaSvalue,
double PDFratio,
double eA,
double eB,
65 double headroomFac = 1.0,
double enhanceFac = 1.0);
69 virtual double genQ2thres(
double q2old,
double sAB,
double zMin,
70 double zMax,
double colFac,
double alphaSvalue,
double PDFratio,
int idA,
71 int idB,
double eA,
double eB,
bool useMpdf,
double headroomFac = 1.0,
72 double enhanceFac = 1.0);
75 virtual double genZ(
double zMin,
double zMax);
78 virtual double getIz(
double zMin,
double zMax);
81 virtual double getZmin(
double Qt2,
double sAB,
double eA,
double eBeamUsed);
82 virtual double getZmax(
double Qt2,
double sAB,
double eA,
double eBeamUsed);
85 virtual double getS1j(
double Qt2,
double zeta,
double sAB);
86 virtual double getSj2(
double Qt2,
double zeta,
double sAB);
90 int iSys,
int idA,
int idB,
double eA,
double eB,
91 double Qt2A,
double Qt2B);
94 virtual double getTrialPDFratio() {
return trialPDFratioSav;}
100 int trialFlav() {
return trialFlavSav;}
124 double trialPDFratioSav;
147 virtual string name()
override {
return "TrialIISoft";}
160 virtual string name()
override {
return "TrialIIGCollA";}
164 virtual double aTrial(
double saj,
double sjb,
double sAB)
override;
167 virtual double getQ2(
double saj,
double sjb,
double sAB)
override {
168 return (saj*sjb/(saj + sjb + sAB));}
169 virtual double getQ2max(
double sAB,
double,
double)
override {
170 return (0.25*pow2(shhSav - sAB)/shhSav);}
173 virtual double genQ2run(
double q2old,
double sAB,
double zMin,
double zMax,
174 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
175 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
179 virtual double genQ2(
double q2old,
double sAB,
double zMin,
double zMax,
180 double colFac,
double alphaSvalue,
double PDFratio,
181 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
185 virtual double genZ(
double zMin,
double zMax)
override;
188 virtual double getIz(
double zMin,
double zMax)
override;
191 virtual double getZmin(
double Qt2,
double sAB,
double eA,
double eBeamUsed)
193 virtual double getZmax(
double Qt2,
double sAB,
double eA,
double eBeamUsed)
197 virtual double getS1j(
double Qt2,
double zeta,
double sAB)
override;
198 virtual double getSj2(
double Qt2,
double zeta,
double sAB)
override;
211 virtual string name()
override {
return "TrialIIGCollB";}
214 virtual double aTrial(
double saj,
double sjb,
double sAB)
override {
215 return TrialIIGCollA::aTrial(sjb, saj, sAB);}
218 virtual double getS1j(
double Qt2,
double zeta,
double sAB)
override {
219 return TrialIIGCollA::getSj2(Qt2, zeta, sAB);}
220 virtual double getSj2(
double Qt2,
double zeta,
double sAB)
override {
221 return TrialIIGCollA::getS1j(Qt2, zeta, sAB);}
225 int iSys,
int idA,
int idB,
double eA,
double eB,
226 double Qt2A,
double Qt2B)
override {
return TrialIIGCollA::trialPDFratio(
227 beamBPtr, beamAPtr, iSys, idB, idA, eB, eA, Qt2B, Qt2A);}
240 virtual string name()
override {
return "TrialIISplitA";}
244 virtual double aTrial(
double saj,
double sjb,
double sAB)
override;
247 virtual double getQ2(
double saj,
double sjb,
double sAB)
override {
248 return ((useMevolSav) ? saj : saj*sjb/(saj + sjb + sAB));}
249 virtual double getQ2max(
double sAB,
double,
double)
override {
250 return ((useMevolSav) ? shhSav-sAB : 0.25*pow2(shhSav-sAB)/shhSav);}
254 virtual double genQ2run(
double q2old,
double sAB,
double zMin,
double zMax,
255 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
256 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
260 virtual double genQ2(
double q2old,
double sAB,
double zMin,
double zMax,
261 double colFac,
double alphaSvalue,
double PDFratio,
262 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
267 virtual double genQ2thres(
double q2old,
double sAB,
268 double zMin,
double zMax,
double colFac,
double alphaSvalue,
269 double PDFratio,
int idA,
int idB,
double eA,
double eB,
bool useMpdf,
270 double headroomFac = 1.0,
double enhanceFac = 1.0)
override;
274 virtual double genZ(
double zMin,
double zMax)
override;
278 virtual double getIz(
double zMin,
double zMax)
override;
281 virtual double getZmin(
double Qt2,
double sAB,
double eA,
double eBeamUsed)
283 virtual double getZmax(
double Qt2,
double sAB,
double eA,
double eBeamUsed)
287 virtual double getS1j(
double Qt2,
double zeta,
double sAB)
override;
288 virtual double getSj2(
double Qt2,
double zeta,
double sAB)
override;
292 int iSys,
int idA,
int idB,
double eA,
double eB,
293 double Qt2A,
double Qt2B)
override;
306 virtual string name()
override {
return "TrialIISplitB";}
309 virtual double aTrial(
double saj,
double sjb,
double sAB)
override {
310 return TrialIISplitA::aTrial(sjb, saj, sAB);}
313 virtual double getQ2(
double saj,
double sjb,
double sAB)
override {
314 return TrialIISplitA::getQ2(sjb, saj, sAB);}
317 virtual double genQ2run(
double q2old,
double sAB,
double zMin,
double zMax,
318 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
319 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
320 override {
return TrialIISplitA::genQ2run(q2old, sAB, zMin, zMax, colFac,
321 PDFratio, b0, kR, Lambda, eB, eA, headroomFac, enhanceFac);}
324 virtual double genQ2(
double q2old,
double sAB,
double zMin,
double zMax,
325 double colFac,
double alphaSvalue,
double PDFratio,
326 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
327 override {
return TrialIISplitA::genQ2(q2old, sAB, zMin, zMax, colFac,
328 alphaSvalue, PDFratio, eB, eA, headroomFac, enhanceFac);}
332 virtual double genQ2thres(
double q2old,
double sAB,
333 double zMin,
double zMax,
double colFac,
double alphaSvalue,
334 double PDFratio,
int idA,
int idB,
double eA,
double eB,
bool useMpdf,
335 double headroomFac = 1.0,
double enhanceFac = 1.0)
override {
336 return TrialIISplitA::genQ2thres(q2old, sAB, zMin, zMax, colFac,
337 alphaSvalue, PDFratio, idB, idA, eB, eA, useMpdf, headroomFac,
341 virtual double getS1j(
double Qt2,
double zeta,
double sAB)
override {
342 return TrialIISplitA::getSj2(Qt2, zeta, sAB);}
343 virtual double getSj2(
double Qt2,
double zeta,
double sAB)
override {
344 return TrialIISplitA::getS1j(Qt2, zeta, sAB);}
348 int iSys,
int idA,
int idB,
double eA,
double eB,
double Qt2A,
double Qt2B)
349 override {
return TrialIISplitA::trialPDFratio(beamBPtr, beamAPtr, iSys,
350 idB, idA, eB, eA, Qt2B, Qt2A);}
363 virtual string name()
override {
return "TrialIIConvA";}
367 virtual double aTrial(
double saj,
double sjb,
double sAB)
override;
370 virtual double getQ2(
double saj,
double sjb,
double sAB)
override {
371 return ((useMevolSav) ? saj : (saj*sjb/(saj + sjb + sAB)));}
372 virtual double getQ2max(
double sAB,
double,
double)
override {
373 return ((useMevolSav) ? (shhSav - sAB) : 0.25*pow2(shhSav - sAB)/shhSav);}
376 virtual double genQ2run(
double q2old,
double sAB,
double zMin,
double zMax,
377 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
378 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
383 virtual double genQ2(
double q2old,
double sAB,
double zMin,
double zMax,
384 double colFac,
double alphaSvalue,
double PDFratio,
385 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
389 virtual double genZ(
double zMin,
double zMax)
override;
392 virtual double getIz(
double zMin,
double zMax)
override;
395 virtual double getZmin(
double Qt2,
double sAB,
double eA,
double eBeamUsed)
397 virtual double getZmax(
double Qt2,
double sAB,
double eA,
double eBeamUsed)
401 virtual double getS1j(
double Qt2,
double zeta,
double sAB)
override;
402 virtual double getSj2(
double Qt2,
double zeta,
double sAB)
override;
406 int iSys,
int idA,
int idB,
double eA,
double eB,
407 double Qt2A,
double Qt2B)
override;
420 virtual string name()
override {
return "TrialIIConvB";}
423 virtual double aTrial(
double saj,
double sjb,
double sAB)
override {
424 return TrialIIConvA::aTrial(sjb, saj, sAB);}
427 virtual double getQ2(
double saj,
double sjb,
double sAB)
override {
428 return TrialIIConvA::getQ2(sjb, saj, sAB);}
431 virtual double genQ2run(
double q2old,
double sAB,
double zMin,
double zMax,
432 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
433 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
434 override {
return TrialIIConvA::genQ2run(q2old, sAB, zMin, zMax, colFac,
435 PDFratio, b0, kR, Lambda, eB, eA, headroomFac, enhanceFac);}
438 virtual double genQ2(
double q2old,
double sAB,
double zMin,
double zMax,
439 double colFac,
double alphaSvalue,
double PDFratio,
440 double eA,
double eB,
double headroomFac = 1.0,
double enhanceFac = 1.0)
441 override {
return TrialIIConvA::genQ2(q2old, sAB, zMin, zMax, colFac,
442 alphaSvalue, PDFratio, eB, eA, headroomFac, enhanceFac);}
445 virtual double getS1j(
double Qt2,
double zeta,
double sAB)
override {
446 return TrialIIConvA::getSj2(Qt2, zeta, sAB);}
447 virtual double getSj2(
double Qt2,
double zeta,
double sAB)
override {
448 return TrialIIConvA::getS1j(Qt2, zeta, sAB);}
452 int iSys,
int idA,
int idB,
double eA,
double eB,
453 double Qt2A,
double Qt2B)
override {
return TrialIIConvA::trialPDFratio(
454 beamBPtr, beamAPtr, iSys, idB, idA, eB, eA, Qt2B, Qt2A);}
467 virtual string name()
override {
return "TrialIFSoft";}
471 virtual double aTrial(
double saj,
double sjk,
double sAK)
override;
474 virtual double getQ2(
double saj,
double sjk,
double sAK)
override {
475 return (saj*sjk/(sAK+sjk));}
476 virtual double getQ2max(
double sAK,
double eA,
double eBeamUsed)
override {
477 double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed-eA));
478 return (sAK*(eAmax-eA)/eA);}
481 virtual double genQ2run(
double q2old,
double sAK,
double zMin,
double zMax,
482 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
483 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
487 virtual double genQ2(
double q2old,
double sAK,
double zMin,
double zMax,
488 double colFac,
double alphaSvalue,
double PDFratio,
489 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
493 virtual double genZ(
double zMin,
double zMax)
override;
496 virtual double getIz(
double zMin,
double zMax)
override;
499 virtual double getZmin(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
501 virtual double getZmax(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
505 virtual double getS1j(
double Qt2,
double zeta,
double sAK)
override;
506 virtual double getSj2(
double Qt2,
double zeta,
double sAK)
override;
510 int iSys,
int idA,
int idK,
double eA,
double eK,
511 double Qt2A,
double Qt2B)
override;
525 virtual string name()
override {
return "TrialVFSoft";}
529 virtual double aTrial(
double saj,
double sjk,
double sAK)
override;
532 virtual double genZ(
double zMin,
double zMax)
override;
535 virtual double getIz(
double zMin,
double zMax)
override;
548 virtual string name()
override {
return "TrialIFGCollA";}
553 virtual double aTrial(
double saj,
double sjk,
double sAK)
override;
556 virtual double getQ2(
double saj,
double sjk,
double sAK)
override {
557 return (saj*sjk/(sAK+sjk));}
558 virtual double getQ2max(
double sAK,
double eA,
double eBeamUsed)
override {
559 double eAmax = ( (sqrt(shhSav)/2.0) - (eBeamUsed-eA) );
560 return (sAK*(eAmax-eA)/eA);}
563 virtual double genQ2run(
double q2old,
double sAK,
double zMin,
double zMax,
564 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
565 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
569 virtual double genQ2(
double q2old,
double sAK,
double zMin,
double zMax,
570 double colFac,
double alphaSvalue,
double PDFratio,
571 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
575 virtual double genZ(
double zMin,
double zMax)
override;
578 virtual double getIz(
double zMin,
double zMax)
override;
581 virtual double getZmin(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
583 virtual double getZmax(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
587 virtual double getS1j(
double Qt2,
double zeta,
double sAK)
override;
588 virtual double getSj2(
double Qt2,
double zeta,
double sAK)
override;
592 int iSys,
int idA,
int idK,
double eA,
double eK,
593 double Qt2A,
double Qt2B)
override;
607 virtual string name()
override {
return "TrialIFSplitA";}
611 virtual double aTrial(
double saj,
double sjk,
double sAK)
override;
614 virtual double getQ2(
double saj,
double sjk,
double sAK)
override {
615 return ((useMevolSav) ? saj : saj*sjk/(sAK + sjk));}
616 virtual double getQ2max(
double sAK,
double eA,
double eBeamUsed)
override {
617 double xA = eA/(sqrt(shhSav)/2.0);
618 double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed - eA));
619 return ((useMevolSav) ? sAK/xA : sAK*(eAmax - eA)/eA);}
622 virtual double genQ2run(
double q2old,
double sAK,
double zMin,
double zMax,
623 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
624 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
628 virtual double genQ2(
double q2old,
double sAK,
double zMin,
double zMax,
629 double colFac,
double alphaSvalue,
double PDFratio,
630 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
635 virtual double genQ2thres(
double q2old,
double sAK,
636 double zMin,
double zMax,
double colFac,
double alphaSvalue,
637 double PDFratio,
int idA,
int idK,
double eA,
double eK,
bool useMpdf,
638 double headroomFac = 1.0,
double enhanceFac = 1.0)
override;
641 virtual double genZ(
double zMin,
double zMax)
override;
644 virtual double getIz(
double zMin,
double zMax)
override;
647 virtual double getZmin(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
649 virtual double getZmax(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
653 virtual double getS1j(
double Qt2,
double zeta,
double sAK)
override;
654 virtual double getSj2(
double Qt2,
double zeta,
double sAK)
override;
658 int iSys,
int idA,
int idK,
double eA,
double eK,
659 double Qt2A,
double Qt2B)
override;
672 virtual string name()
override {
return "TrialIFSplitK";}
676 virtual double aTrial(
double saj,
double sjk,
double sAK)
override;
679 virtual double getQ2(
double saj,
double sjk,
double sAK)
override {
680 return ((useMevolSav) ? sjk : saj*sjk/(sAK + sjk));}
681 virtual double getQ2max(
double sAK,
double eA,
double eBeamUsed)
override {
682 double xA = eA/(sqrt(shhSav)/2.0);
683 double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed - eA));
684 return ((useMevolSav) ? sAK*(1.0 - xA)/xA : sAK*(eAmax - eA)/eA);}
687 virtual double genQ2run(
double q2old,
double sAK,
double zMin,
double zMax,
688 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
689 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
693 virtual double genQ2(
double q2old,
double sAK,
double zMin,
double zMax,
694 double colFac,
double alphaSvalue,
double PDFratio,
695 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
699 virtual double genZ(
double zMin,
double zMax)
override;
702 virtual double getIz(
double zMin,
double zMax)
override;
705 virtual double getZmin(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
707 virtual double getZmax(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
711 virtual double getS1j(
double Qt2,
double zeta,
double sAK)
override;
712 virtual double getSj2(
double Qt2,
double zeta,
double sAK)
override;
716 int iSys,
int idA,
int idK,
double eA,
double eK,
717 double Qt2A,
double Qt2B)
override;
730 virtual string name()
override {
return "TrialIFConvA";}
736 virtual double aTrial(
double saj,
double sjk,
double sAK)
override;
739 virtual double getQ2(
double saj,
double sjk,
double sAK)
override {
740 return ((useMevolSav) ? saj : saj*sjk/(sAK + sjk));}
741 virtual double getQ2max(
double sAK,
double eA,
double eBeamUsed)
override {
742 double xA = eA/(sqrt(shhSav)/2.0);
743 double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed - eA));
744 return ((useMevolSav) ? sAK/xA : sAK*(eAmax-eA)/eA);}
747 virtual double genQ2run(
double q2old,
double sAK,
double zMin,
double zMax,
748 double colFac,
double PDFratio,
double b0,
double kR,
double Lambda,
749 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
753 virtual double genQ2(
double q2old,
double sAK,
double zMin,
double zMax,
754 double colFac,
double alphaSvalue,
double PDFratio,
755 double eA,
double eK,
double headroomFac = 1.0,
double enhanceFac = 1.0)
759 virtual double genZ(
double zMin,
double zMax)
override;
762 virtual double getIz(
double zMin,
double zMax)
override;
765 virtual double getZmin(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
767 virtual double getZmax(
double Qt2,
double sAK,
double eA,
double eBeamUsed)
771 virtual double getS1j(
double Qt2,
double zeta,
double sAK)
override;
772 virtual double getSj2(
double Qt2,
double zeta,
double sAK)
override;
776 int iSys,
int idA,
int idK,
double eA,
double eK,
777 double Qt2A,
double Qt2B)
override;
810 int iOld2In,
int colIn,
bool isVal1In,
bool isVal2In) {
811 reset(iSysIn, event, iOld1In, iOld2In, colIn, isVal1In, isVal2In);}
814 void reset(
int iSysIn,
Event& event,
int i1In,
int i2In,
int colIn,
815 bool isVal1In,
bool isVal2In);
818 double mAnt()
const {
return mAntSav;}
819 double m2Ant()
const {
return m2AntSav;}
820 double sAnt()
const {
return sAntSav;}
822 double s12()
const {
return 2*new1.p()*new2.p();}
823 double s23()
const {
return 2*new2.p()*new3.p();}
824 double s13()
const {
return 2*new1.p()*new3.p();}
827 bool isII()
const {
return isIIsav;}
829 bool is1A()
const {
return is1Asav;}
831 bool isVal1()
const {
return isVal1sav;}
832 bool isVal2()
const {
return isVal2sav;}
833 int colType1()
const {
return colType1sav;}
834 int colType2()
const {
return colType2sav;}
835 int col()
const {
return colSav;}
836 int geti1() {
return i1sav;}
837 int geti2() {
return i2sav;}
838 int getSystem() {
return system;}
841 void clearTrialGenerators();
844 void addTrialGenerator(
int iAntPhysIn,
bool swapIn,
848 void addRescue(
int iTrial) {nShouldRescue[iTrial]++;}
849 int getNshouldRescue(
int iTrial) {
return nShouldRescue[iTrial];}
851 for (
int i=0; i<(int)nShouldRescue.size(); i++) nShouldRescue[i] = 0;}
854 int nTrialGenerators()
const {
return trialGenPtrsSav.size();}
857 void saveTrial(
int iTrial,
double qOld,
double qTrial,
double zMin=0.,
858 double zMax=0.,
double colFac=0.,
double alphaEff=0.,
double pdfRatio=0.,
859 int trialFlav=0,
double extraMpdf=0.,
double headroom = 1.0,
860 double enhanceFac = 1.0);
863 void addPDF(
int iTrial,
double pdfRatio) {physPDFratioSav[iTrial] = pdfRatio;}
866 bool genTrialInvariants(
double& s1j,
double& sj2,
867 double eBeamUsed,
int iTrial = -1);
870 int getTrialIndex()
const;
873 bool hasTrial(
int iTrial)
const {
874 if (iTrial <
int(hasSavedTrial.size()))
return hasSavedTrial[iTrial];
878 bool getIsSwapped(
int iTrial = -1)
const {
879 if (iTrial <= -1) iTrial = getTrialIndex();
880 return isSwappedSav[iTrial];}
883 int getPhysIndex(
int iTrial = -1)
const {
884 if (iTrial <= -1) iTrial = getTrialIndex();
885 return iAntPhysSav[iTrial];}
888 double getTrialScale(
int iTrial)
const {
889 if (iTrial <
int(scaleSav.size()))
return scaleSav[iTrial];
893 double getTrialScale()
const;
896 double getColFac(
int iTrial = -1) {
897 if (iTrial <= -1) iTrial = getTrialIndex();
898 return colFacSav[iTrial];}
901 double getHeadroomFac(
int iTrial = -1) {
902 if (iTrial <= -1) iTrial = getTrialIndex();
903 return headroomSav[iTrial];}
906 double getEnhanceFac(
int iTrial = -1) {
907 if (iTrial <= -1) iTrial = getTrialIndex();
908 return enhanceFacSav[iTrial];}
911 double getAlphaTrial(
int iTrial = -1) {
912 if (iTrial <= -1) iTrial = getTrialIndex();
913 return alphaSav[iTrial];}
916 double getPDFratioTrial(
int iTrial = -1) {
917 if (iTrial <= -1) iTrial = getTrialIndex();
918 return trialPDFratioSav[iTrial];}
921 int getTrialFlav(
int iTrial = -1) {
922 if (iTrial <= -1) iTrial = getTrialIndex();
923 return trialFlavSav[iTrial];}
926 double getPDFratioPhys(
int iTrial = -1) {
927 if (iTrial <= -1) iTrial = getTrialIndex();
928 return physPDFratioSav[iTrial];}
931 double getExtraMassPDFfactor(
int iTrial = -1) {
932 if (iTrial <= -1) iTrial = getTrialIndex();
933 return extraMassPDFfactorSav[iTrial];}
937 void renewTrial(
int iTrial = -1) {
938 if (iTrial >= 0) hasSavedTrial[iTrial] =
false;
939 else for (iTrial = 0; iTrial < int(hasSavedTrial.size()); ++iTrial)
940 hasSavedTrial[iTrial] =
false;}
943 void list(
bool header =
false,
bool footer =
false)
const;
946 int i1sav{}, i2sav{}, id1sav{}, id2sav{}, colType1sav{}, colType2sav{},
948 double e1sav{}, e2sav{};
949 bool isVal1sav{}, isVal2sav{}, isIIsav{}, is1Asav{};
954 int system{0}, nVeto{}, nHull{}, nHadr{};
956 bool forceSplittingSav{};
959 vector<TrialGeneratorISR*> trialGenPtrsSav{};
960 vector<double> zMinSav{}, zMaxSav{}, colFacSav{}, alphaSav{};
961 vector<double> physPDFratioSav{}, trialPDFratioSav{};
962 vector<double> extraMassPDFfactorSav{};
963 vector<double> scaleSav{}, scaleOldSav{}, headroomSav{}, enhanceFacSav{};
964 vector<bool> hasSavedTrial{}, isSwappedSav{};
965 vector<int> iAntPhysSav{}, nShouldRescue{}, trialFlavSav{};
973 double m2AntSav{}, mAntSav{}, sAntSav{};
1002 bool limitPTmax(
Event& event,
double Q2Fac = 0.,
double Q2Ren = 0.)
override;
1005 void prepare(
int iSys,
Event& event,
bool limitPTmaxIn =
false)
override;
1008 void update(
int iSys,
Event& event,
bool hasWeakRad =
false)
override;
1011 double pTnext(
Event& event,
double pTbegAll,
double pTendAll,
1012 int nRadIn = -1,
bool doTrialIn =
false)
override;
1016 bool branch(
Event& event)
override;
1019 void list()
const override;
1023 bool initUncertainties()
override {
return false;}
1029 bool doRestart()
const override {
return false;}
1033 bool wasGamma2qqbar()
override {
return false;}
1036 bool getHasWeaklyRadiated()
override {
return false;}
1039 int system()
const override {
return iSysWin;}
1043 double enhancePTmax()
const override {
return pTmaxFudge;}
1046 void initVinciaPtrs(
Colour* colourPtrIn, shared_ptr<VinciaFSR> fsrPtrIn,
1051 void clearContainers();
1054 void initAntPtr(
AntennaSetISR* antSetIn) {antSetPtr = antSetIn;}
1057 bool prepared(
int iSys) {
1058 if (hasPrepared.find(iSys) != hasPrepared.end())
return hasPrepared[iSys];
1065 void printInfo(
bool pluginCall =
false);
1068 int getRegion(
double q) {
1069 for (
int i=1; i<(int)regMinScalesSav.size(); i++)
1070 if (q < regMinScalesSav[i])
return i-1;
1071 return (
int)regMinScalesSav.size() - 1;}
1074 double getQmin(
int iRegion) {
1075 iRegion = max(0,iRegion);
1076 iRegion = min(iRegion,(
int)regMinScalesSav.size()-1);
1077 return regMinScalesSav[iRegion];}
1080 int getNf(
int iRegion) {
1081 if (iRegion <= 1)
return 3;
1082 else if (iRegion <= 2)
return 4;
1083 else if (iRegion <= 4)
return 5;
1087 double getLambda(
int nFin) {
1088 if (nFin <= 3)
return alphaSptr->Lambda3();
1089 else if (nFin <= 4)
return alphaSptr->Lambda4();
1090 else if (nFin <= 5)
return alphaSptr->Lambda5();
1091 else return alphaSptr->Lambda6();}
1099 bool checkHeavyQuarkPhaseSpace(vector<Particle> parts,
int iSyst);
1102 bool heavyQuarkLeft(
double qTrial);
1105 bool isSysHard(
int iSys) {
1106 if (!isInit)
return false;
1107 if ((
int)isHardSys.size() <= iSys)
return false;
1108 return isHardSys[iSys];}
1111 vector<double> getMasses() {
return vector<double> {mt, mtb, mb, mc, ms};}
1114 int getNsys() {
return nBranchISR.size();}
1116 int getNbranch(
int iSys = -1) {
1118 if (iSys < 0)
for (
int i = 0; i < (int)nBranchISR.size(); ++i)
1119 n += nBranchISR[iSys];
1120 else if (iSys < (
int)nBranchISR.size()) n = nBranchISR[iSys];
1126 double getQbranch(
int iSys,
int iBranch) {
1127 if (iSys < 4 && iSys >= 0 && iBranch <= 10 && iBranch >= 1)
1128 return qBranch[iSys][iBranch];
1130 double getPTphys(
int iSys,
int iBranch) {
1131 if (iSys < 4 && iSys >= 0 && iBranch <= 10 && iBranch >= 1)
1132 return pTphys[iSys][iBranch];
1136 void setVerbose(
int verboseIn) {verbose = verboseIn;}
1139 bool checkAntennae(
const Event& event);
1147 void setStartScale(
int iSys,
Event& event);
1150 double getHeadroomFac(
int iSys,
int iAntPhys,
double qMinNow);
1154 vector<Vec4>& pRec) {
1155 return ( trialPtr->isII()
1156 ? generateKinematicsII(event, trialPtr, pRec)
1157 : generateKinematicsIF(event, trialPtr, pRec) ); }
1161 vector<Vec4>& pRec);
1165 vector<Vec4>& pRec);
1178 bool hasUserHooks, canVetoEmission;
1182 double eBeamA, eBeamB, eCMBeamsSav, m2BeamsSav;
1189 map<int, bool> hasPrepared;
1192 bool helicityShower, sectorShower, convGluonToQuarkI, convQuarkToGluonI;
1193 bool kineMapIFretry;
1194 int nGluonToQuarkI, nGluonToQuarkF;
1195 double cutoffScaleII, cutoffScaleIF;
1200 double pTmaxFudge, pT2maxFudge, pT2maxFudgeMPI;
1205 double alphaSvalue, alphaSmax, alphaSmuFreeze, alphaSmuMin;
1206 double aSkMu2EmitI, aSkMu2SplitI, aSkMu2SplitF, aSkMu2Conv;
1207 double mt, mtb, ms, mb, mc;
1209 double mu2freeze, mu2min;
1227 bool enhanceInHard, enhanceInResDec, enhanceInMPI;
1228 double enhanceAll, enhanceBottom, enhanceCharm, enhanceCutoff;
1236 shared_ptr<VinciaFSR> fsrPtr;
1241 vector<double> Paccept;
1244 vector<double> regMinScalesMtSav;
1245 vector<double> regMinScalesSav;
1246 vector<double> regMinScalesNow;
1249 vector<BranchElementalISR > branchElementals;
1257 map<int, bool> isHardSys, isResonanceSys, polarisedSys, doMECsSys;
1260 map<int, vector< Particle > > partsSav;
1261 map<int, vector< int > > indexSav;
1264 map<int, double> Q2hat;
1267 map<int, int> nBranch, nBranchISR;
1270 map<int, Particle> initialA;
1271 map<int, Particle> initialB;
1272 double eBeamAUsed, eBeamBUsed;
1275 map<int, int> nG, nQQ;
1279 vector<long> nTrials, nTrialsAccepted, nFailedVeto, nFailedHull, nFailedKine;
1280 vector<long> nFailedMass, nFailedCutoff, nClosePSforHQ, nSectorReject;
1281 vector<double> rFailedVetoPDF;
1291 double qBranch[4][11], pTphys[4][11];
1294 long nAccepted, nSelected;
1295 int nVetoUserHooks, nFailHadLevel, nCallPythiaNext;
1303 #endif // end Pythia8_VinciaISR_H