File indexing completed on 2025-01-18 10:06:34
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Pythia8_VinciaFSR_H
0010 #define Pythia8_VinciaFSR_H
0011
0012 #include "Pythia8/TimeShower.h"
0013 #include "Pythia8/VinciaAntennaFunctions.h"
0014 #include "Pythia8/VinciaCommon.h"
0015 #include "Pythia8/VinciaISR.h"
0016 #include "Pythia8/VinciaMergingHooks.h"
0017 #include "Pythia8/VinciaTrialGenerators.h"
0018 #include "Pythia8/VinciaQED.h"
0019 #include "Pythia8/VinciaEW.h"
0020 #include "Pythia8/VinciaWeights.h"
0021 #include "Pythia8/VinciaDiagnostics.h"
0022
0023 namespace Pythia8 {
0024
0025
0026 class VinciaISR;
0027
0028
0029
0030
0031
0032
0033 struct ResJunctionInfo {
0034
0035
0036 int iJunction;
0037
0038 int iEndCol;
0039
0040 int iEndColTag;
0041
0042
0043 int iEndQuark;
0044
0045
0046
0047
0048 vector<int> colours;
0049
0050 };
0051
0052
0053
0054
0055
0056
0057
0058 class Brancher {
0059
0060 public:
0061
0062
0063 Brancher(int iSysIn, Event& event, bool sectorShowerIn,
0064 vector<int> iIn) : sectorShower(sectorShowerIn) {
0065 reset(iSysIn, event, iIn);
0066 }
0067
0068
0069 Brancher(int iSysIn, Event& event, bool sectorShowerIn,
0070 int iIn0, int iIn1, int iIn2=0) : sectorShower(sectorShowerIn) {
0071 reset(iSysIn, event, iIn0, iIn1, iIn2);
0072 }
0073
0074
0075 virtual ~Brancher() {}
0076
0077
0078 void reset(int iSysIn, Event& event, vector<int> iIn);
0079
0080
0081 void reset(int iSysIn, Event& event, int i0In, int i1In, int i2In = 0) {
0082 vector<int> iIn {i0In, i1In}; if (i2In >= 1) iIn.push_back(i2In);
0083 reset(iSysIn,event,iIn);}
0084
0085
0086 int i0() const {return (iSav.size() >= 1) ? iSav[0] : -1;}
0087 int i1() const {return (iSav.size() >= 2) ? iSav[1] : -1;}
0088 int i2() const {return (iSav.size() >= 3) ? iSav[2] : -1;}
0089 int iVec(unsigned int i) const {return (iSav.size() > i) ? iSav[i] : -1;}
0090 vector<int> iVec() {return iSav;}
0091 int id0() const {return (idSav.size() >= 1) ? idSav[0] : -1;}
0092 int id1() const {return (idSav.size() >= 2) ? idSav[1] : -1;}
0093 int id2() const {return (idSav.size() >= 3) ? idSav[2] : -1;}
0094 vector<int> idVec() const {return idSav;}
0095 int colType0() const {return (colTypeSav.size() >= 1) ? colTypeSav[0] : -1;}
0096 int colType1() const {return (colTypeSav.size() >= 2) ? colTypeSav[1] : -1;}
0097 int colType2() const {return (colTypeSav.size() >= 3) ? colTypeSav[2] : -1;}
0098 vector<int> colTypeVec() const {return colTypeSav;}
0099 int col0() const {return (colSav.size() >= 1) ? colSav[0] : 0;}
0100 int col1() const {return (colSav.size() >= 2) ? colSav[1] : 0;}
0101 int col2() const {return (colSav.size() >= 3) ? colSav[2] : 0;}
0102 vector<int> colVec() const {return colSav;}
0103 int acol0() const {return (acolSav.size() >= 1) ? acolSav[0] : 0;}
0104 int acol1() const {return (acolSav.size() >= 2) ? acolSav[1] : 0;}
0105 int acol2() const {return (acolSav.size() >= 3) ? acolSav[2] : 0;}
0106 vector<int> acolVec() const {return acolSav;}
0107 int h0() const {return (hSav.size() >= 1) ? hSav[0] : -1;}
0108 int h1() const {return (hSav.size() >= 2) ? hSav[1] : -1;}
0109 int h2() const {return (hSav.size() >= 3) ? hSav[2] : -1;}
0110 vector<int> hVec() const {return hSav;}
0111 double m0() const {return (mSav.size() >= 1) ? mSav[0] : -1;}
0112 double m1() const {return (mSav.size() >= 2) ? mSav[1] : -1;}
0113 double m2() const {return (mSav.size() >= 3) ? mSav[2] : -1;}
0114 vector<double> mVec() const {return mSav;}
0115 vector<double> getmPostVec() {return mPostSav;}
0116 int colTag() {return colTagSav;}
0117
0118
0119
0120 virtual double getQ2Max(int) = 0;
0121
0122
0123 int system() const {return systemSav;}
0124 double mAnt() const {return mAntSav;}
0125 double m2Ant() const {return m2AntSav;}
0126 double sAnt() const {return sAntSav;}
0127 double kallenFac() const {return kallenFacSav;}
0128 double enhanceFac() const {return enhanceSav;}
0129 double q2Trial() const {return q2NewSav;}
0130 enum AntFunType antFunTypePhys() const {return antFunTypeSav;}
0131
0132
0133 virtual double genQ2(int evTypeIn, double q2MaxNow, Rndm* rndmPtr,
0134 Logger* loggerPtr, const EvolutionWindow* evWindowPtrIn, double colFac,
0135 vector<double> headroomIn, vector<double> enhanceFacIn,
0136 int verboseIn) = 0;
0137
0138
0139
0140 virtual bool genInvariants(vector<double>& invariants, Rndm*, int,
0141 Logger*) {
0142 invariants.clear(); return false;}
0143
0144
0145
0146 virtual double pAccept(const double, Logger* , int = 0) {
0147 return 0.;}
0148
0149
0150 virtual double getpTscale();
0151
0152
0153 virtual double getXj();
0154
0155
0156
0157 virtual int idNew() const {return 0;}
0158 virtual double mNew() const {return 0.0;}
0159
0160
0161 virtual bool getNewParticles(Event& event, vector<Vec4> momIn,
0162 vector<int> hIn, vector<Particle> &pNew,Rndm* rndmPtr,
0163 VinciaColour* colourPtr) = 0;
0164
0165
0166
0167 virtual void list(string header="none", bool withLegend=true) const;
0168
0169
0170 virtual void setidPost();
0171 virtual vector<double> setmPostVec();
0172 virtual void setStatPost();
0173 virtual void setMaps(int);
0174
0175
0176 virtual int iNew();
0177
0178
0179
0180 virtual int posR() const {return -1;}
0181
0182
0183
0184 virtual int posF() const {return -1;}
0185
0186
0187 virtual int getSector(){
0188 return iSectorWinner;
0189 };
0190
0191
0192 enum BranchType getBranchType() {return branchType;}
0193
0194 bool isSwapped() {return swapped;}
0195
0196 vector<double> getInvariants() {return invariantsSav;}
0197
0198
0199 void resetEnhanceFac(const double enhanceIn) {enhanceSav = enhanceIn;}
0200
0201
0202
0203 bool hasTrial() const {return hasTrialSav;}
0204
0205 void needsNewTrial() {
0206 hasTrialSav = false;
0207 if (trialGenPtr != nullptr) {
0208 trialGenPtr->needsNewTrial();
0209 }
0210 }
0211
0212 void eraseTrial() {
0213 hasTrialSav = false;
0214 q2NewSav = 0.;
0215 if (trialGenPtr != nullptr) {
0216 trialGenPtr->resetTrial();
0217 }
0218 }
0219
0220 shared_ptr<TrialGenerator> trialGenPtr = {};
0221
0222
0223 map<int, pair<int, int> > mothers2daughters;
0224 map<int, pair<int, int> > daughters2mothers;
0225
0226 protected:
0227
0228
0229 int systemSav{};
0230 vector<int> iSav, idSav, colTypeSav, hSav, colSav, acolSav;
0231 vector<int> idPostSav, statPostSav;
0232 vector<double> mSav, mPostSav;
0233 int colTagSav{}, evTypeSav{};
0234
0235
0236 const EvolutionWindow* evWindowSav{};
0237
0238
0239 double mAntSav{}, m2AntSav{}, kallenFacSav{}, sAntSav{};
0240
0241
0242 bool hasTrialSav{false};
0243 double headroomSav{1.}, enhanceSav{1.}, q2BegSav{}, q2NewSav{};
0244 vector<double> invariantsSav;
0245
0246
0247 enum BranchType branchType{BranchType::Void};
0248
0249
0250 enum AntFunType antFunTypeSav{NoFun};
0251
0252
0253 bool swapped{false};
0254
0255
0256 bool sectorShower{};
0257 int iSectorWinner{};
0258
0259 };
0260
0261
0262
0263
0264
0265 class BrancherEmitFF : public Brancher {
0266
0267 public:
0268
0269
0270 BrancherEmitFF(int iSysIn, Event& event, bool sectorShowerIn,
0271 vector<int> iIn, ZetaGeneratorSet* zetaGenSet) :
0272 Brancher(iSysIn, event, sectorShowerIn, iIn) {
0273
0274 initBrancher(zetaGenSet);
0275 }
0276
0277
0278 BrancherEmitFF(int iSysIn, Event& event, bool sectorShowerIn,
0279 int iIn0, int iIn1, ZetaGeneratorSet* zetaGenSet) :
0280 Brancher(iSysIn, event, sectorShowerIn, iIn0, iIn1) {
0281
0282 initBrancher(zetaGenSet);
0283 }
0284
0285
0286 void initBrancher(ZetaGeneratorSet* zetaGenSet);
0287
0288
0289 double genQ2(int evTypeIn, double q2MaxNow, Rndm* rndmPtr,
0290 Logger* loggerPtr, const EvolutionWindow* evWindowPtrIn, double colFac,
0291 vector<double> headroomIn, vector<double> enhanceFacIn,int verboseIn);
0292
0293
0294
0295
0296 virtual bool genInvariants(vector<double>& invariants, Rndm* rndmPtr,
0297 int verboseIn, Logger* loggerPtr);
0298
0299
0300
0301
0302 virtual double pAccept(const double antPhys, Logger* loggerPtr,
0303 int verboseIn);
0304
0305
0306 double getQ2Max(int evType);
0307
0308
0309 virtual void setMaps(int sizeOld);
0310
0311
0312 virtual int idNew() const {return 21;}
0313 virtual double mNew() const {return 0.0;}
0314
0315
0316 virtual bool getNewParticles(Event& event, vector<Vec4> momIn,
0317 vector<int> hIn, vector<Particle> &pNew, Rndm* rndmPtr,
0318 VinciaColour* colourPtr);
0319
0320 private:
0321
0322
0323 double colFacSav{};
0324
0325 };
0326
0327
0328
0329
0330
0331 class BrancherSplitFF : public Brancher {
0332
0333 public:
0334
0335
0336 BrancherSplitFF(int iSysIn, Event& event, bool sectorShowerIn,
0337 vector<int> iIn, ZetaGeneratorSet* zetaGenSet) :
0338 Brancher(iSysIn, event, sectorShowerIn, iIn) {
0339
0340 initBrancher(zetaGenSet);
0341 }
0342
0343
0344
0345
0346 BrancherSplitFF(int iSysIn, Event& event, bool sectorShowerIn, int iIn0,
0347 int iIn1, bool col2acol, ZetaGeneratorSet* zetaGenSet) :
0348 Brancher(iSysIn, event, sectorShowerIn, iIn0, iIn1) {
0349
0350 initBrancher(zetaGenSet, col2acol);
0351 }
0352
0353
0354 void initBrancher(ZetaGeneratorSet* zetaGenSet, bool col2acolIn=true);
0355
0356
0357
0358
0359 virtual bool isXG() const {return isXGsav;}
0360
0361
0362 virtual int idNew() const {return idFlavSav;}
0363 virtual double mNew() const {return mFlavSav;}
0364
0365
0366
0367 double genQ2(int evTypeIn, double q2MaxNow, Rndm* rndmPtr,
0368 Logger* loggerPtr, const EvolutionWindow* evWindowPtrIn, double colFac,
0369 vector<double> headroomIn, vector<double> enhanceFacIn,int verboseIn);
0370
0371
0372
0373 virtual bool genInvariants(vector<double>& invariants, Rndm* rnmdPtr,
0374 int verboseIn, Logger* loggerPtr);
0375
0376
0377
0378
0379 virtual double pAccept(const double antPhys, Logger* loggerPtr,
0380 int verboseIn);
0381
0382
0383 double getQ2Max(int evType);
0384 virtual vector<double> setmPostVec();
0385 virtual void setidPost();
0386 virtual void setStatPost();
0387 virtual void setMaps(int sizeOld);
0388
0389
0390 virtual bool getNewParticles(Event& event, vector<Vec4> momIn,
0391 vector<int> hIn, vector<Particle> &pNew, Rndm*, VinciaColour*);
0392
0393 private:
0394
0395
0396 int idFlavSav{};
0397 double mFlavSav{};
0398
0399
0400
0401
0402
0403 bool isXGsav{};
0404
0405 };
0406
0407
0408
0409
0410
0411 class BrancherRF : public Brancher {
0412
0413 public:
0414
0415
0416 BrancherRF(int iSysIn, Event& event, bool sectorShowerIn,
0417 vector<int> allIn) : Brancher(iSysIn, event, sectorShowerIn, allIn) {}
0418
0419
0420 virtual void initRF(Event& event, vector<int> allIn,
0421 unsigned int posResIn, unsigned int posFIn, double q2cut,
0422 ZetaGeneratorSet* zetaGenSet) = 0;
0423
0424
0425 void resetRF(int iSysIn, Event& event, vector<int> allIn,
0426 unsigned int posResIn, unsigned int posFIn, double q2cut,
0427 ZetaGeneratorSet* zetaGenSet) {
0428 reset(iSysIn, event, allIn);
0429 initRF(event, allIn, posResIn, posFIn, q2cut, zetaGenSet);
0430 }
0431
0432
0433 int iNew();
0434 void setMaps(int sizeOld);
0435
0436
0437 int posR() const {return int(posRes);}
0438 int posF() const {return int(posFinal);}
0439
0440
0441 double getQ2Max(int evType) {return evType == 1 ? q2MaxSav : 0.;}
0442
0443 protected:
0444
0445
0446 double getsAK(double mA, double mK, double mAK);
0447 double calcQ2Max(double mA, double mAK, double mK);
0448
0449
0450 bool vetoPhSpPoint(const vector<double>& invariants, int verboseIn);
0451
0452
0453
0454 unsigned int posRes{}, posFinal{};
0455
0456 double mRes{};
0457
0458 double mFinal{};
0459
0460
0461 double mRecoilers{};
0462 double sAK{};
0463
0464
0465 double q2MaxSav{};
0466 double colFacSav{};
0467
0468
0469 bool colFlowRtoF{};
0470 map<unsigned int,unsigned int> posNewtoOld{};
0471
0472 };
0473
0474
0475
0476
0477
0478
0479
0480
0481 class BrancherEmitRF : public BrancherRF {
0482
0483 public:
0484
0485
0486 BrancherEmitRF(int iSysIn, Event& event, bool sectorShowerIn,
0487 vector<int> allIn, unsigned int posResIn, unsigned int posFIn,
0488 double q2cut, ZetaGeneratorSet* zetaGenSet) :
0489 BrancherRF(iSysIn, event, sectorShowerIn, allIn) {
0490
0491 initBrancher(event, allIn, posResIn, posFIn, q2cut, zetaGenSet);
0492 }
0493
0494
0495 void initBrancher(Event& event, vector<int> allIn, unsigned int posResIn,
0496 unsigned int posFIn, double q2cut, ZetaGeneratorSet* zetaGenSet);
0497 void initRF(Event& event, vector<int> allIn, unsigned int posResIn,
0498 unsigned int posFIn, double q2cut, ZetaGeneratorSet* zetaGenSet) override {
0499 initBrancher(event, allIn, posResIn, posFIn, q2cut, zetaGenSet);}
0500
0501
0502 vector<double> setmPostVec() override;
0503 void setidPost() override;
0504 void setStatPost() override;
0505
0506
0507 bool getNewParticles(Event& event, vector<Vec4> momIn, vector<int> hIn,
0508 vector<Particle> &pNew, Rndm* rndmPtr, VinciaColour*) override;
0509
0510
0511 double genQ2(int evTypeIn, double q2MaxNow, Rndm* rndmPtr,
0512 Logger* loggerPtr, const EvolutionWindow* evWindowPtrIn, double colFac,
0513 vector<double> headroomIn, vector<double> enhanceFacIn,
0514 int verboseIn) override;
0515
0516
0517
0518 bool genInvariants(vector<double>& invariants,Rndm* rndmPtr,
0519 int verboseIn, Logger* loggerPtr) override;
0520
0521
0522
0523 double pAccept(const double, Logger* loggerPtr, int verboseIn) override;
0524
0525 };
0526
0527
0528
0529
0530
0531
0532
0533 class BrancherSplitRF : public BrancherRF {
0534
0535 public:
0536
0537
0538 BrancherSplitRF(int iSysIn, Event& event, bool sectorShowerIn,
0539 vector<int> allIn, unsigned int posResIn, unsigned int posFIn,
0540 double q2cut, ZetaGeneratorSet* zetaGenSet) :
0541 BrancherRF(iSysIn, event, sectorShowerIn, allIn) {
0542
0543 initBrancher(event, allIn, posResIn, posFIn, q2cut, zetaGenSet);
0544 }
0545
0546
0547 void initBrancher(Event& event, vector<int> allIn, unsigned int posResIn,
0548 unsigned int posFIn, double q2cut, ZetaGeneratorSet* zetaGenSet);
0549 void initRF(Event& event, vector<int> allIn, unsigned int posResIn,
0550 unsigned int posFIn, double q2cut, ZetaGeneratorSet* zetaGenSet) override {
0551 initBrancher(event, allIn, posResIn, posFIn, q2cut, zetaGenSet);}
0552
0553
0554 vector<double> setmPostVec() override;
0555 void setidPost() override;
0556 void setStatPost() override;
0557
0558
0559 bool getNewParticles(Event& event, vector<Vec4> momIn,
0560 vector<int> hIn, vector<Particle>& pNew, Rndm*, VinciaColour*) override;
0561
0562
0563 double genQ2(int evTypeIn, double q2MaxNow, Rndm* rndmPtr,
0564 Logger* loggerPtr, const EvolutionWindow* evWindowPtrIn, double colFac,
0565 vector<double> headroomIn, vector<double> enhanceFacIn,
0566 int verboseIn) override;
0567
0568 protected:
0569
0570
0571 int idFlavSav{};
0572 double mFlavSav{};
0573
0574 };
0575
0576
0577
0578
0579
0580
0581
0582 class VinciaFSR : public TimeShower {
0583
0584
0585 friend class VinciaISR;
0586 friend class VinciaHistory;
0587
0588 public:
0589
0590
0591 VinciaFSR() :
0592 zetaGenSetRF(ZetaGeneratorSet(TrialGenType::RF)),
0593 zetaGenSetFF(ZetaGeneratorSet(TrialGenType::FF)) {
0594 verbose = 0; headerIsPrinted = false; isInit = false;
0595 isPrepared = false; diagnosticsPtr = 0;}
0596
0597
0598 ~VinciaFSR() {;}
0599
0600
0601
0602
0603
0604
0605 void init(BeamParticle* beamAPtrIn = 0, BeamParticle* beamBPtrIn = 0)
0606 override;
0607
0608
0609 void onBeginEvent() override { isPrepared = false; }
0610
0611
0612
0613 bool limitPTmax(Event& event, double q2Fac, double q2Ren) override;
0614
0615
0616
0617 int shower( int iBeg, int iEnd, Event& event, double pTmax,
0618 int nBranchMax = 0) override;
0619
0620
0621 int showerQED(int iBeg, int iEnd, Event& event, double pTmax) override;
0622
0623
0624
0625 int showerQEDafterRemnants(Event& event) override;
0626
0627
0628
0629
0630 void prepareProcess( Event& process, Event& event,
0631 vector<int>& iPosBefShow) override;
0632
0633
0634
0635
0636
0637 void prepare( int iSys, Event& event, bool limitPTmaxIn) override;
0638
0639
0640
0641
0642
0643
0644 void update( int iSys, Event& event, bool hasWeakRad = false) override;
0645
0646
0647 double pTnext( Event& event, double pTbegAll, double pTendAll,
0648 bool isFirstTrial = false, bool doTrialIn = false) override;
0649
0650
0651 double pTnextResDec() override {
0652 double pTresDecMax = 0.;
0653 iHardResDecSav = -1 ;
0654 for (size_t i=0; i<pTresDecSav.size(); ++i) {
0655 if (pTresDecSav[i] > pTresDecMax) {
0656 pTresDecMax = pTresDecSav[i];
0657 iHardResDecSav = i;
0658 }
0659 }
0660 return pTresDecMax;
0661 }
0662
0663
0664 bool branch( Event& event, bool isInterleaved = false) override;
0665
0666
0667
0668
0669
0670
0671 bool resonanceShower(Event& process, Event& event, vector<int>& iPos,
0672 double qRestart) override;
0673
0674
0675 void list() const override;
0676
0677
0678
0679
0680
0681
0682 bool getHasWeaklyRadiated() override {return hasWeaklyRadiated;}
0683
0684
0685 int system() const override {return iSysWin;}
0686
0687
0688
0689 double enhancePTmax() override {return pTmaxFudge;}
0690
0691
0692
0693 double pTLastInShower() override {return pTLastAcceptedSav;}
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708
0709 void initVinciaPtrs(VinciaColour* colourPtrIn,
0710 shared_ptr<VinciaISR> isrPtrIn, MECs* mecsPtrIn,
0711 Resolution* resolutionPtrIn, VinciaCommon* vinComPtrIn,
0712 VinciaWeights* vinWeightsPtrIn);
0713
0714
0715 void setDiagnosticsPtr(shared_ptr<VinciaDiagnostics> diagnosticsPtrIn) {
0716 diagnosticsPtr = diagnosticsPtrIn;
0717 }
0718
0719
0720 void setEWShowerPtr(VinciaModulePtr ewShowerPtrIn) {
0721 ewShowerPtr = ewShowerPtrIn;
0722 }
0723
0724
0725 void setQEDShowerHardPtr(VinciaModulePtr qedShowerPtrIn) {
0726 qedShowerHardPtr = qedShowerPtrIn;
0727 }
0728
0729
0730 void setQEDShowerSoftPtr(VinciaModulePtr qedShowerPtrIn) {
0731 qedShowerSoftPtr = qedShowerPtrIn;
0732 }
0733
0734
0735 void initAntPtr(AntennaSetFSR* antSetIn) {antSetPtr = antSetIn;}
0736
0737
0738 AntennaFunction* getAntFunPtr(enum AntFunType antFunType) {
0739 return antSetPtr->getAntFunPtr(antFunType);}
0740
0741 vector<enum AntFunType> getAntFunTypes() {
0742 return antSetPtr->getAntFunTypes();}
0743
0744
0745 void header();
0746
0747
0748 void setIsTrialShower(bool isTrialShowerIn){
0749 isTrialShower=isTrialShowerIn;
0750 }
0751 void setIsTrialShowerRes(bool isTrialShowerResIn){
0752 isTrialShowerRes=isTrialShowerResIn;
0753 }
0754
0755
0756
0757 void saveBornState(int iSys, Event& born);
0758
0759 void saveBornForTrialShower(Event& born);
0760
0761
0762 bool check(int iSys, Event &event);
0763
0764
0765 void setVerbose(int verboseIn) {verbose = verboseIn;}
0766
0767 private:
0768
0769
0770 static const int NLOOPMAX;
0771
0772
0773 void initEvolutionWindows(void);
0774
0775 double getQ2Window(int iWindow, double q2cutoff);
0776
0777 double getLambda(int nFin, AlphaStrong* aSptr);
0778
0779 double getkMu2(bool isEmit);
0780
0781
0782 double getMu2(bool isEmit);
0783
0784 void clearContainers();
0785
0786 bool setupQCDantennae(int iSys, Event& event);
0787
0788 void setStartScale(int iSys, Event& event);
0789
0790
0791 virtual double calcPTresDec(Particle& res) {
0792 if (resDecScaleChoice == 0) return res.mWidth();
0793 double virt = pow2(res.m()) - pow2(res.m0());
0794 if (resDecScaleChoice == 1) return abs(virt) / res.m0();
0795 else if (resDecScaleChoice == 2) return sqrt(abs(virt));
0796 return 0.;
0797 }
0798
0799
0800 template <class T> bool q2NextQCD( vector<shared_ptr<T> > &brancherVec,
0801 const map<double, EvolutionWindow>& evWindows, const int evType,
0802 const double q2Begin, const double q2End, bool isEmit);
0803
0804
0805
0806 bool q2NextEmitQCD(const double q2Begin, double q2End);
0807 bool q2NextSplitQCD(const double q2Begin, double q2End);
0808 bool q2NextEmitResQCD(const double q2Begin, const double q2End);
0809 bool q2NextSplitResQCD(const double q2Begin, const double q2End);
0810 bool q2NextEmitQED(double q2Begin, const double q2End);
0811 bool q2NextSplitQED(double q2Begin, const double q2End);
0812
0813
0814 bool branchQCD(Event& event);
0815
0816 bool branchEW(Event& event);
0817
0818
0819 bool rejectEarly(AntennaFunction* &antFunPtr,bool doMEC);
0820
0821 double getAntFunPhys(AntennaFunction* &antFunPtr);
0822
0823 double pAcceptCalc(double antPhys);
0824
0825 bool genFullKinematics(int kineMap, Event event, vector<Vec4> &pPost);
0826
0827 bool acceptTrial(Event& event);
0828
0829 bool getNewParticles(Event& event, AntennaFunction* antFunPtr,
0830 vector<Particle> &newParts);
0831
0832
0833
0834
0835
0836
0837
0838 vector<int> genHelicities(AntennaFunction* antFunPtr);
0839
0840
0841 double getMEC(int iSys, const Event& event,
0842 const vector<Particle>& statePost, VinciaClustering& thisClus);
0843
0844
0845 bool updateEvent(Event& event,ResJunctionInfo & junctionInfoIn);
0846
0847 void updatePartonSystems();
0848
0849 void saveEmitterFF(int iSysIn, Event& event, int i0, int i1);
0850
0851 void saveEmitterRF(int iSys, Event& event, vector<int> allIn,
0852 unsigned int posResIn, unsigned int posFIn, bool colMode);
0853
0854 void saveSplitterRF(int iSysIn, Event& event, vector<int> allIn,
0855 unsigned int posResIn, unsigned int posFIn,bool colMode);
0856
0857 void saveSplitterFF(int iSysIn, Event& event, int i0, int i1, bool col2acol);
0858
0859 void updateEmittersFF(Event& event, int iOld, int iNew);
0860
0861 void updateEmitterFF(Event& event, int iOld1, int iOld2, int iNew1,
0862 int iNew2);
0863
0864 void updateSplittersFF(Event& event, int iOld, int iNew);
0865
0866 void updateSplitterFF(Event& event, int iOld1, int iOld2, int iNew1,
0867 int iNew2, bool col2acol);
0868
0869
0870 void removeSplitterFF(int iRemove);
0871
0872 bool updateEmittersRF(int iSysRes, Event& event, int iRes);
0873
0874 void updateEmittersRF(int iSysRes, Event& event, vector<int> resSysAll,
0875 unsigned int posRes, unsigned int posPartner, bool isCol);
0876
0877 bool updateAntennae(Event& event);
0878
0879 bool updateAfterEW(Event& event, int sizeOld);
0880
0881 void printLookup(unordered_map< pair<int, bool>, unsigned int>&
0882 lookupEmitter, string name);
0883
0884 void printLookup();
0885
0886 vector<double> getHeadroom(int iSys, bool isEmit, double q2Next);
0887
0888 vector<double> getEnhance(int iSys, bool isEmit, double q2Next);
0889
0890
0891 bool isInit{}, isPrepared{};
0892
0893
0894 double eCMBeamsSav{}, m2BeamsSav{};
0895
0896
0897 bool doFF{}, doRF{}, doII{}, doIF{}, doQED{}, doWeak{};
0898 int ewMode{}, ewModeMPI{};
0899
0900
0901 int mode2to4{};
0902
0903
0904 bool helicityShower{}, sectorShower{};
0905 int evTypeEmit{}, evTypeSplit{}, nGluonToQuark{};
0906 double q2CutoffEmit{}, q2CutoffSplit{};
0907 int nFlavZeroMass{};
0908 map<int,int> resSystems;
0909 int kMapResEmit{};
0910 int kMapResSplit{};
0911
0912
0913 int pTmaxMatch{}, pTdampMatch{};
0914 double pTmaxFudge{}, pT2maxFudge{}, pT2maxFudgeMPI{}, pTdampFudge{};
0915
0916
0917 bool useCMW{};
0918 int alphaSorder{};
0919 double alphaSvalue{}, alphaSmax{}, alphaSmuFreeze{}, alphaSmuMin{};
0920 double aSkMu2Emit{}, aSkMu2Split{};
0921
0922
0923 double mu2freeze{}, mu2min{};
0924
0925
0926 map<double, EvolutionWindow> evWindowsEmit;
0927 map<double, EvolutionWindow> evWindowsSplit;
0928
0929
0930 vector< shared_ptr<BrancherEmitRF> > emittersRF;
0931 vector< shared_ptr<BrancherEmitFF> > emittersFF;
0932 vector< shared_ptr<BrancherSplitRF> > splittersRF;
0933 vector< shared_ptr<BrancherSplitFF> > splittersFF;
0934
0935
0936
0937
0938 unordered_map< pair<int, bool>, unsigned int> lookupEmitterRF{};
0939 unordered_map< pair<int, bool>, unsigned int> lookupSplitterRF{};
0940
0941 unordered_map< pair<int, bool>, unsigned int> lookupEmitterFF{};
0942
0943 unordered_map< pair<int, bool>, unsigned int> lookupSplitterFF{};
0944
0945
0946 BrancherPtr winnerQCD{};
0947 VinciaModulePtr winnerEW{};
0948 double q2WinSav{}, pTLastAcceptedSav{};
0949
0950
0951 int iSysWin{};
0952 enum AntFunType antFunTypeWin{AntFunType::NoFun};
0953 bool hasWeaklyRadiated{false};
0954
0955
0956
0957 int iNewSav{};
0958
0959
0960 vector<Particle> pNew;
0961
0962 vector<double> pAccept;
0963
0964
0965 bool doCR{}, CRjunctions{};
0966
0967
0968 bool enhanceInHard{}, enhanceInResDec{}, enhanceInMPI{};
0969 double enhanceAll{}, enhanceBottom{}, enhanceCharm{}, enhanceCutoff{};
0970
0971
0972 bool hasUserHooks{}, canVetoEmission{}, canVetoISREmission{};
0973
0974
0975 map<int, bool> isHardSys{}, isResonanceSys{}, polarisedSys{}, doMECsSys{};
0976 map<int, bool> stateChangeSys{};
0977 bool stateChangeLast;
0978
0979
0980 map<int, double> q2Hat{};
0981 vector<bool> doPTlimit{}, doPTdamp{};
0982 map<int, double> pT2damp{};
0983
0984
0985 map<int, int> nBranch, nBranchFSR;
0986
0987
0988 map<int, double> mSystem;
0989
0990
0991 map<int, int> nG, nQ, nLep, nGam;
0992
0993
0994 map<int, bool> savedBorn;
0995 map<int, bool> resolveBorn;
0996 map<int, map<int, int>> nFlavsBorn;
0997
0998
0999
1000 unordered_map<pair<int, pair<bool,bool> >, vector<double> > headroomSav;
1001 unordered_map<pair<int, pair<bool,bool> >, vector<double> > enhanceSav;
1002
1003
1004 map<int, bool> hasResJunction;
1005 map<int, ResJunctionInfo> junctionInfo;
1006
1007
1008 bool doMerging, isTrialShower, isTrialShowerRes;
1009
1010
1011 int verbose{};
1012 bool headerIsPrinted{};
1013
1014
1015 shared_ptr<VinciaDiagnostics> diagnosticsPtr{};
1016
1017
1018 bool allowforceQuit{}, forceQuit{};
1019 int nBranchQuit{};
1020
1021
1022 ZetaGeneratorSet zetaGenSetRF;
1023 ZetaGeneratorSet zetaGenSetFF;
1024
1025
1026 AntennaSetFSR* antSetPtr{};
1027 MECs* mecsPtr{};
1028 VinciaColour* colourPtr{};
1029 Resolution* resolutionPtr{};
1030 shared_ptr<VinciaISR> isrPtr{};
1031 VinciaCommon* vinComPtr{};
1032 VinciaWeights* weightsPtr{};
1033
1034
1035 VinciaModulePtr ewShowerPtr{};
1036 VinciaModulePtr qedShowerHardPtr{};
1037 VinciaModulePtr qedShowerSoftPtr{};
1038
1039 VinciaModulePtr ewHandlerHard{};
1040
1041
1042 AlphaStrong* aSemitPtr{};
1043 AlphaStrong* aSsplitPtr{};
1044
1045
1046 bool doFSRinResonances{true}, doInterleaveResDec{true};
1047 int resDecScaleChoice{-1}, iHardResDecSav{}, nRecurseResDec{};
1048 vector<int> idResDecSav, iPosBefSav;
1049 vector<double> pTresDecSav;
1050
1051 };
1052
1053
1054
1055 }
1056
1057 #endif