File indexing completed on 2025-09-13 09:05:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef Pythia8_MergingHooks_H
0014 #define Pythia8_MergingHooks_H
0015
0016 #include "Pythia8/Basics.h"
0017 #include "Pythia8/BeamParticle.h"
0018 #include "Pythia8/Event.h"
0019 #include "Pythia8/Info.h"
0020 #include "Pythia8/ParticleData.h"
0021 #include "Pythia8/PartonSystems.h"
0022 #include "Pythia8/PhysicsBase.h"
0023 #include "Pythia8/PythiaStdlib.h"
0024 #include "Pythia8/Settings.h"
0025
0026
0027 namespace Pythia8 {
0028
0029 class PartonLevel;
0030
0031
0032
0033
0034
0035
0036
0037
0038 class HardProcess {
0039
0040 public:
0041
0042
0043 int hardIncoming1;
0044
0045 int hardIncoming2;
0046
0047 vector<int> hardOutgoing1;
0048 vector<int> hardOutgoing2;
0049
0050 vector<int> hardIntermediate;
0051
0052
0053 Event state;
0054
0055 vector<int> PosOutgoing1;
0056 vector<int> PosOutgoing2;
0057
0058 vector<int> PosIntermediate;
0059
0060
0061 double tms;
0062
0063
0064 HardProcess() : hardIncoming1(), hardIncoming2(), tms(){}
0065
0066 virtual ~HardProcess(){}
0067
0068
0069 HardProcess( const HardProcess& hardProcessIn )
0070 : state(hardProcessIn.state),
0071 tms(hardProcessIn.tms) {
0072 hardIncoming1 = hardProcessIn.hardIncoming1;
0073 hardIncoming2 = hardProcessIn.hardIncoming2;
0074 for(int i =0; i < int(hardProcessIn.hardOutgoing1.size());++i)
0075 hardOutgoing1.push_back( hardProcessIn.hardOutgoing1[i]);
0076 for(int i =0; i < int(hardProcessIn.hardOutgoing2.size());++i)
0077 hardOutgoing2.push_back( hardProcessIn.hardOutgoing2[i]);
0078 for(int i =0; i < int(hardProcessIn.hardIntermediate.size());++i)
0079 hardIntermediate.push_back( hardProcessIn.hardIntermediate[i]);
0080 for(int i =0; i < int(hardProcessIn.PosOutgoing1.size());++i)
0081 PosOutgoing1.push_back( hardProcessIn.PosOutgoing1[i]);
0082 for(int i =0; i < int(hardProcessIn.PosOutgoing2.size());++i)
0083 PosOutgoing2.push_back( hardProcessIn.PosOutgoing2[i]);
0084 for(int i =0; i < int(hardProcessIn.PosIntermediate.size());++i)
0085 PosIntermediate.push_back( hardProcessIn.PosIntermediate[i]);
0086 }
0087
0088
0089 HardProcess( string LHEfile, ParticleData* particleData) : hardIncoming1(),
0090 hardIncoming2(), tms() {
0091 state = Event();
0092 state.init("(hard process)", particleData);
0093 translateLHEFString(LHEfile);
0094 }
0095
0096
0097 virtual void initOnProcess( string process, ParticleData* particleData);
0098
0099
0100 void initOnLHEF( string LHEfile, ParticleData* particleData);
0101
0102
0103 void translateLHEFString( string LHEpath);
0104
0105
0106 virtual void translateProcessString( string process);
0107
0108
0109 void clear();
0110
0111
0112
0113 virtual bool allowCandidates(int iPos, vector<int> Pos1, vector<int> Pos2,
0114 const Event& event);
0115
0116 virtual void storeCandidates( const Event& event, string process);
0117
0118
0119 virtual bool matchesAnyOutgoing(int iPos, const Event& event);
0120
0121
0122
0123 virtual bool findOtherCandidates(int iPos, const Event& event,
0124 bool doReplace);
0125
0126 virtual bool exchangeCandidates( vector<int> candidates1,
0127 vector<int> candidates2,
0128 unordered_map<int,int> further1, unordered_map<int,int> further2);
0129
0130
0131
0132 int nQuarksOut();
0133
0134
0135 int nLeptonOut();
0136
0137
0138 int nBosonsOut();
0139
0140
0141
0142 int nQuarksIn();
0143
0144
0145 int nLeptonIn();
0146
0147
0148 int hasResInCurrent();
0149
0150
0151 int nResInCurrent();
0152
0153 bool hasResInProc();
0154
0155 void list() const;
0156
0157
0158 void listCandidates() const;
0159
0160 };
0161
0162
0163
0164
0165
0166 class MergingHooks : public PhysicsBase {
0167
0168 public:
0169
0170
0171 MergingHooks() : useShowerPluginSave(), showers(),
0172 doUserMergingSave(false),
0173 doMGMergingSave(false),
0174 doKTMergingSave(false),
0175 doPTLundMergingSave(false),
0176 doCutBasedMergingSave(false),
0177 doDynamicMergingSave(false), includeMassiveSave(),
0178 enforceStrongOrderingSave(),
0179 orderInRapiditySave(), pickByFullPSave(), pickByPoPT2Save(),
0180 includeRedundantSave(), pickBySumPTSave(), allowColourShufflingSave(),
0181 resetHardQRenSave(), resetHardQFacSave(), unorderedScalePrescipSave(),
0182 unorderedASscalePrescipSave(), unorderedPDFscalePrescipSave(),
0183 incompleteScalePrescipSave(), ktTypeSave(), nReclusterSave(),
0184 nQuarksMergeSave(), nRequestedSave(), scaleSeparationFactorSave(),
0185 nonJoinedNormSave(), fsrInRecNormSave(), herwigAcollFSRSave(),
0186 herwigAcollISRSave(), pT0ISRSave(), pTcutSave(),
0187 doNL3TreeSave(false),
0188 doNL3LoopSave(false),
0189 doNL3SubtSave(false),
0190 doUNLOPSTreeSave(false),
0191 doUNLOPSLoopSave(false),
0192 doUNLOPSSubtSave(false),
0193 doUNLOPSSubtNLOSave(false),
0194 doUMEPSTreeSave(false),
0195 doUMEPSSubtSave(false),
0196 doEstimateXSection(false),
0197 doRuntimeAMCATNLOInterfaceSave(false),
0198 applyVeto(),
0199 doRemoveDecayProducts(false), muMISave(), kFactor0jSave(), kFactor1jSave(),
0200 kFactor2jSave(), tmsValueSave(), tmsValueNow(),
0201 DparameterSave(), SparameterSave(),
0202 nJetMaxSave(), nJetMaxNLOSave(),
0203 doOrderHistoriesSave(true),
0204 doCutOnRecStateSave(false),
0205 doWeakClusteringSave(false),
0206 doSQCDClusteringSave(false), muFSave(), muRSave(), muFinMESave(),
0207 muRinMESave(),
0208 doIgnoreEmissionsSave(true),
0209 doIgnoreStepSave(true), pTsave(), weightCKKWL1Save(), weightCKKWL2Save(),
0210 nMinMPISave(), weightCKKWLSave(), weightFIRSTSave(),
0211 doVariations(false), nWgts(0), nJetMaxLocal(), nJetMaxNLOLocal(),
0212 hasJetMaxLocal(false),
0213 includeWGTinXSECSave(false), nHardNowSave(), nJetNowSave(),
0214 tmsHardNowSave(), tmsNowSave() {
0215 inputEvent = Event(); resonances.resize(0);
0216 useOwnHardProcess = false; hardProcess = 0; stopScaleSave= 0.0;
0217 nVetoedInMainShower = 0;}
0218
0219
0220 friend class History;
0221
0222 friend class Pythia;
0223
0224 friend class PartonLevel;
0225
0226 friend class SpaceShower;
0227
0228 friend class TimeShower;
0229
0230 friend class Merging;
0231
0232
0233 virtual ~MergingHooks();
0234
0235 virtual double tmsDefinition( const Event& event){ return event[0].e();}
0236
0237
0238 virtual double dampenIfFailCuts( const Event& inEvent ) {
0239
0240 if(false) cout << inEvent[0].e();
0241 return 1.;
0242 }
0243
0244
0245
0246 virtual bool canCutOnRecState() { return doCutOnRecStateSave; }
0247
0248
0249
0250
0251 virtual bool doCutOnRecState( const Event& event ) {
0252
0253 if(false) cout << event[0].e();
0254
0255 int nPartons = 0;
0256 for( int i=0; i < int(event.size()); ++i)
0257 if( event[i].isFinal()
0258 && (event[i].isGluon() || event[i].isQuark()) )
0259 nPartons++;
0260
0261 if( hasEffectiveG2EW() && nPartons < 2){
0262 if(event[3].id() != 21 && event[4].id() != 21)
0263 return true;
0264 }
0265 return false;
0266 }
0267
0268 virtual bool canVetoTrialEmission() { return false;}
0269
0270 virtual bool doVetoTrialEmission( const Event&, const Event& ) {
0271 return false; }
0272
0273
0274 virtual double hardProcessME( const Event& inEvent ) {
0275
0276 if ( false ) cout << inEvent[0].e();
0277 return 1.; }
0278
0279
0280
0281 virtual void init();
0282
0283
0284 double tms() {
0285 if(doCutBasedMergingSave) return 0.;
0286
0287 else return tmsValueNow;
0288 }
0289 double tmsCut() {
0290 if (doCutBasedMergingSave) return 0.;
0291 if (doDynamicMergingSave) {
0292
0293 const double QbarCut = tmsValueSave;
0294 const double Q2 = infoPtr->Q2DIS();
0295
0296 return QbarCut/sqrt(1. + pow2(QbarCut/SparameterSave)/Q2);
0297 }
0298 return tmsValueSave;
0299 }
0300 void tms( double tmsIn ) { tmsValueNow = tmsIn; }
0301
0302
0303
0304 double dRijMS() {
0305 return ((tmsListSave.size() == 3) ? tmsListSave[0] : 0.);
0306 }
0307
0308
0309 double pTiMS() {
0310 return ((tmsListSave.size() == 3) ? tmsListSave[1] : 0.);
0311 }
0312
0313
0314 double QijMS() {
0315 return ((tmsListSave.size() == 3) ? tmsListSave[2] : 0.);
0316 }
0317
0318 int nMaxJets() { return (hasJetMaxLocal) ? nJetMaxLocal : nJetMaxSave;}
0319
0320
0321 int nMaxJetsNLO()
0322 { return (hasJetMaxLocal) ? nJetMaxNLOLocal : nJetMaxNLOSave;}
0323
0324 string getProcessString() { return processNow;}
0325
0326 int nHardOutPartons(){ return hardProcess->nQuarksOut();}
0327
0328 int nHardOutLeptons(){ return hardProcess->nLeptonOut();}
0329
0330
0331 int nHardOutBosons(){ return hardProcess->nBosonsOut();}
0332
0333
0334 int nHardInPartons(){ return hardProcess->nQuarksIn();}
0335
0336 int nHardInLeptons(){ return hardProcess->nLeptonIn();}
0337
0338
0339 int nResInCurrent(){ return hardProcess->nResInCurrent();}
0340
0341 bool doUserMerging(){ return doUserMergingSave;}
0342
0343 bool doMGMerging() { return doMGMergingSave;}
0344
0345 bool doKTMerging() { return doKTMergingSave;}
0346
0347 bool doPTLundMerging() { return doPTLundMergingSave;}
0348
0349 bool doCutBasedMerging() { return doCutBasedMergingSave;}
0350
0351 bool doDynamicMerging() { return doDynamicMergingSave;}
0352 bool doCKKWLMerging() { return (doUserMergingSave || doMGMergingSave
0353 || doKTMergingSave || doPTLundMergingSave || doCutBasedMergingSave
0354 || doDynamicMergingSave); }
0355
0356
0357 bool doUMEPSTree() { return doUMEPSTreeSave;}
0358 bool doUMEPSSubt() { return doUMEPSSubtSave;}
0359 bool doUMEPSMerging() { return (doUMEPSTreeSave || doUMEPSSubtSave);}
0360
0361
0362 bool doNL3Tree() { return doNL3TreeSave;}
0363 bool doNL3Loop() { return doNL3LoopSave;}
0364 bool doNL3Subt() { return doNL3SubtSave;}
0365 bool doNL3Merging() { return (doNL3TreeSave || doNL3LoopSave
0366 || doNL3SubtSave); }
0367
0368
0369 bool doUNLOPSTree() { return doUNLOPSTreeSave;}
0370 bool doUNLOPSLoop() { return doUNLOPSLoopSave;}
0371 bool doUNLOPSSubt() { return doUNLOPSSubtSave;}
0372 bool doUNLOPSSubtNLO() { return doUNLOPSSubtNLOSave;}
0373 bool doUNLOPSMerging() { return (doUNLOPSTreeSave || doUNLOPSLoopSave
0374 || doUNLOPSSubtSave || doUNLOPSSubtNLOSave); }
0375
0376
0377 bool doRuntimeAMCATNLOInterface() { return doRuntimeAMCATNLOInterfaceSave;}
0378
0379
0380 int nRecluster() { return nReclusterSave;}
0381
0382
0383 int nRequested() { return nRequestedSave;}
0384
0385
0386
0387
0388
0389
0390
0391 bool isFirstEmission(const Event& event);
0392
0393
0394 bool hasEffectiveG2EW() {
0395 if ( getProcessString().compare("pp>h") == 0 ) return true;
0396 return false; }
0397
0398
0399 bool allowEffectiveVertex( vector<int> in, vector<int> out) {
0400 if ( getProcessString().compare("ta+ta->jj") == 0
0401 || getProcessString().compare("ta-ta+>jj") == 0 ) {
0402 int nInFermions(0), nOutFermions(0);
0403 for (int i=0; i < int(in.size()); ++i)
0404 if (abs(in[i])<20) nInFermions++;
0405 for (int i=0; i < int(out.size()); ++i)
0406 if (abs(out[i])<20) nOutFermions++;
0407 return (nInFermions%2==0 && nOutFermions%2==0);
0408 }
0409 return false;
0410 }
0411
0412
0413 Event bareEvent( const Event& inputEventIn, bool storeInputEvent );
0414
0415 bool reattachResonanceDecays( Event& process );
0416
0417
0418 bool isInHard( int iPos, const Event& event);
0419
0420
0421 virtual int getNumberOfClusteringSteps(const Event& event,
0422 bool resetNjetMax = false);
0423
0424
0425
0426
0427
0428
0429
0430
0431 void orderHistories( bool doOrderHistoriesIn) {
0432 doOrderHistoriesSave = doOrderHistoriesIn; }
0433
0434
0435 void allowCutOnRecState( bool doCutOnRecStateIn) {
0436 doCutOnRecStateSave = doCutOnRecStateIn; }
0437
0438
0439 void doWeakClustering( bool doWeakClusteringIn ) {
0440 doWeakClusteringSave = doWeakClusteringIn; }
0441
0442
0443
0444
0445
0446
0447
0448 bool checkAgainstCut( const Particle& particle);
0449
0450
0451 virtual double tmsNow( const Event& event );
0452
0453 double rhoms( const Event& event, bool withColour);
0454
0455 double kTms(const Event & event);
0456
0457
0458 double cutbasedms( const Event& event );
0459
0460
0461
0462
0463
0464
0465 void doIgnoreEmissions( bool doIgnoreIn ) {
0466 doIgnoreEmissionsSave = doIgnoreIn;}
0467
0468 virtual bool canVetoEmission() { return !doIgnoreEmissionsSave; }
0469
0470 virtual bool doVetoEmission( const Event& );
0471
0472
0473
0474
0475
0476 bool useShowerPluginSave;
0477 virtual bool useShowerPlugin() { return useShowerPluginSave; }
0478 virtual bool usesVincia() {return false;}
0479
0480
0481
0482
0483
0484
0485 bool includeWGTinXSEC() { return includeWGTinXSECSave;}
0486
0487
0488
0489
0490
0491 int nHardNow() { return nHardNowSave; }
0492 double tmsHardNow() { return tmsHardNowSave; }
0493 int nJetsNow() { return nJetNowSave; }
0494 double tmsNow() { return tmsNowSave;}
0495
0496 void setHardProcessPtr(HardProcess* hardProcIn) { hardProcess = hardProcIn; }
0497
0498
0499
0500
0501
0502 int nMuRVar() { return muRVarFactors.size(); }
0503 void printIndividualWeights();
0504
0505
0506
0507
0508
0509
0510 bool useOwnHardProcess;
0511 HardProcess* hardProcess;
0512
0513 PartonLevel* showers;
0514 void setShowerPointer(PartonLevel* psIn ) {showers = psIn;}
0515
0516
0517 AlphaStrong AlphaS_FSRSave;
0518 AlphaStrong AlphaS_ISRSave;
0519 AlphaEM AlphaEM_FSRSave;
0520 AlphaEM AlphaEM_ISRSave;
0521
0522
0523 string lheInputFile;
0524
0525
0526 bool doUserMergingSave, doMGMergingSave, doKTMergingSave,
0527 doPTLundMergingSave, doCutBasedMergingSave, doDynamicMergingSave,
0528 includeMassiveSave, enforceStrongOrderingSave, orderInRapiditySave,
0529 pickByFullPSave, pickByPoPT2Save, includeRedundantSave,
0530 pickBySumPTSave, allowColourShufflingSave, resetHardQRenSave,
0531 resetHardQFacSave;
0532 int unorderedScalePrescipSave, unorderedASscalePrescipSave,
0533 unorderedPDFscalePrescipSave, incompleteScalePrescipSave,
0534 ktTypeSave, nReclusterSave, nQuarksMergeSave, nRequestedSave;
0535
0536 double scaleSeparationFactorSave, nonJoinedNormSave,
0537 fsrInRecNormSave, herwigAcollFSRSave, herwigAcollISRSave,
0538 pT0ISRSave, pTcutSave, pTminISRSave, pTminFSRSave;
0539 bool doNL3TreeSave, doNL3LoopSave, doNL3SubtSave;
0540 bool doUNLOPSTreeSave, doUNLOPSLoopSave, doUNLOPSSubtSave,
0541 doUNLOPSSubtNLOSave;
0542 bool doUMEPSTreeSave, doUMEPSSubtSave;
0543
0544
0545 bool doEstimateXSection;
0546
0547
0548 bool doRuntimeAMCATNLOInterfaceSave;
0549
0550
0551
0552
0553 bool applyVeto;
0554
0555
0556 Event inputEvent;
0557 vector< pair<int,int> > resonances;
0558 bool doRemoveDecayProducts;
0559
0560
0561 double muMISave;
0562
0563
0564 double kFactor0jSave;
0565 double kFactor1jSave;
0566 double kFactor2jSave;
0567
0568
0569 double tmsValueSave, tmsValueNow, DparameterSave, SparameterSave;
0570 int nJetMaxSave;
0571 int nJetMaxNLOSave;
0572
0573 string processSave, processNow;
0574
0575
0576
0577
0578
0579 vector<double> tmsListSave;
0580
0581
0582
0583 bool doOrderHistoriesSave;
0584
0585
0586
0587
0588 bool doCutOnRecStateSave;
0589
0590
0591 bool doWeakClusteringSave, doSQCDClusteringSave;
0592
0593
0594 double muFSave;
0595 double muRSave;
0596
0597
0598 double muFinMESave;
0599 double muRinMESave;
0600
0601
0602 bool doIgnoreEmissionsSave;
0603
0604 bool doIgnoreStepSave;
0605
0606 double pTsave;
0607 vector<double> weightCKKWL1Save, weightCKKWL2Save;
0608 int nMinMPISave;
0609
0610 vector<double> weightCKKWLSave, weightFIRSTSave;
0611
0612
0613 struct IndividualWeights {
0614 vector<double> wtSave;
0615 vector<double> pdfWeightSave;
0616 vector<double> mpiWeightSave;
0617 vector<double> asWeightSave;
0618 vector<double> aemWeightSave;
0619 vector<double> bornAsVarFac;
0620 };
0621
0622 IndividualWeights individualWeights;
0623
0624
0625 bool doVariations;
0626
0627 vector<double> muRVarFactors;
0628
0629 int nWgts;
0630
0631
0632 int nJetMaxLocal;
0633 int nJetMaxNLOLocal;
0634 bool hasJetMaxLocal;
0635
0636
0637
0638 bool includeWGTinXSECSave;
0639 int nHardNowSave, nJetNowSave;
0640 double tmsHardNowSave, tmsNowSave;
0641
0642
0643
0644
0645
0646
0647
0648 void storeHardProcessCandidates(const Event& event){
0649 hardProcess->storeCandidates(event,getProcessString());
0650 }
0651
0652
0653
0654
0655
0656
0657
0658 void setLHEInputFile( string lheFile) {
0659 lheInputFile = lheFile.substr(0,lheFile.size()-6); }
0660
0661
0662
0663
0664
0665
0666 AlphaStrong* AlphaS_FSR() { return &AlphaS_FSRSave;}
0667 AlphaStrong* AlphaS_ISR() { return &AlphaS_ISRSave;}
0668 AlphaEM* AlphaEM_FSR() { return &AlphaEM_FSRSave;}
0669 AlphaEM* AlphaEM_ISR() { return &AlphaEM_ISRSave;}
0670
0671
0672
0673 bool includeMassive() { return includeMassiveSave;}
0674
0675 bool enforceStrongOrdering() { return enforceStrongOrderingSave;}
0676
0677 bool orderInRapidity() { return orderInRapiditySave;}
0678
0679 bool pickByFull() { return pickByFullPSave;}
0680
0681 bool pickByPoPT2() { return pickByPoPT2Save;}
0682
0683 bool includeRedundant(){ return includeRedundantSave;}
0684
0685 bool pickBySumPT(){ return pickBySumPTSave;}
0686
0687
0688
0689
0690 int unorderedScalePrescip() { return unorderedScalePrescipSave;}
0691
0692
0693
0694 int unorderedASscalePrescip() { return unorderedASscalePrescipSave;}
0695
0696
0697
0698
0699 int unorderedPDFscalePrescip() { return unorderedPDFscalePrescipSave;}
0700
0701
0702
0703
0704 int incompleteScalePrescip() { return incompleteScalePrescipSave;}
0705
0706
0707 bool allowColourShuffling() { return allowColourShufflingSave;}
0708
0709
0710 bool resetHardQRen() { return resetHardQRenSave; }
0711
0712 bool resetHardQFac() { return resetHardQFacSave; }
0713
0714
0715
0716 double scaleSeparationFactor() { return scaleSeparationFactorSave;}
0717
0718
0719 double nonJoinedNorm() { return nonJoinedNormSave;}
0720
0721
0722 double fsrInRecNorm() { return fsrInRecNormSave;}
0723
0724
0725 double herwigAcollFSR() { return herwigAcollFSRSave;}
0726
0727
0728 double herwigAcollISR() { return herwigAcollISRSave;}
0729
0730 double pT0ISR() { return pT0ISRSave;}
0731
0732 double pTcut() { return pTcutSave;}
0733
0734
0735 void muMI( double mu) { muMISave = mu; }
0736 double muMI() { return muMISave;}
0737
0738
0739 double kFactor(int njet = 0) {
0740 return (njet == 0) ? kFactor0jSave
0741 :(njet == 1) ? kFactor1jSave
0742 : kFactor2jSave;
0743 }
0744
0745 double k1Factor( int njet = 0) {
0746 return (kFactor(njet) - 1)/infoPtr->alphaS();
0747 }
0748
0749
0750
0751 bool orderHistories() { return doOrderHistoriesSave;}
0752
0753
0754
0755
0756 bool allowCutOnRecState() { return doCutOnRecStateSave;}
0757
0758
0759 bool doWeakClustering() { return doWeakClusteringSave;}
0760
0761 bool doSQCDClustering() { return doSQCDClusteringSave;}
0762
0763
0764 double muF() { return (muFSave > 0.) ? muFSave : infoPtr->QFac();}
0765 double muR() { return (muRSave > 0.) ? muRSave : infoPtr->QRen();}
0766
0767 double muFinME() {
0768
0769 string mus = infoPtr->getEventAttribute("muf2",true);
0770 double mu = (mus.empty()) ? 0. : atof((char*)mus.c_str());
0771 mu = sqrt(mu);
0772
0773 if (infoPtr->scales) mu = infoPtr->getScalesAttribute("muf");
0774 return (mu > 0.) ? mu : (muFinMESave > 0.) ? muFinMESave
0775 : infoPtr->QFac();
0776 }
0777 double muRinME() {
0778
0779 string mus = infoPtr->getEventAttribute("mur2",true);
0780 double mu = (mus.empty()) ? 0. : atof((char*)mus.c_str());
0781 mu = sqrt(mu);
0782
0783 if (infoPtr->scales) mu = infoPtr->getScalesAttribute("mur");
0784 return (mu > 0.) ? mu : (muRinMESave > 0.) ? muRinMESave
0785 : infoPtr->QRen();
0786 }
0787
0788
0789
0790
0791
0792
0793
0794 void doIgnoreStep(bool doIgnoreIn) {doIgnoreStepSave = doIgnoreIn;}
0795
0796 virtual bool canVetoStep() {return !doIgnoreStepSave;}
0797
0798
0799 void storeWeights(vector<double> weight) {
0800 weightCKKWL1Save = weightCKKWL2Save = weight;}
0801
0802
0803 virtual bool doVetoStep(const Event& process, const Event& event,
0804 bool doResonance = false);
0805
0806
0807 virtual bool setShowerStartingScales( bool isTrial, bool doMergeFirstEmm,
0808 double& pTscaleIn, const Event& event,
0809 double& pTmaxFSRIn, bool& limitPTmaxFSRin,
0810 double& pTmaxISRIn, bool& limitPTmaxISRin,
0811 double& pTmaxMPIIn, bool& limitPTmaxMPIin );
0812
0813
0814
0815 double stopScaleSave;
0816 void setShowerStoppingScale(double scale = 0.) {stopScaleSave = scale;}
0817 double getShowerStoppingScale() {return stopScaleSave;}
0818
0819 void nMinMPI(int nMinMPIIn) {nMinMPISave = nMinMPIIn; }
0820 int nMinMPI() {return nMinMPISave;}
0821
0822
0823
0824
0825
0826
0827 double kTdurham(const Particle& RadAfterBranch,
0828 const Particle& EmtAfterBranch, int Type, double D );
0829
0830 double rhoPythia(const Event& event, int rad, int emt, int rec,
0831 int ShowerType);
0832
0833
0834
0835 int findColour(int col, int iExclude1, int iExclude2,
0836 const Event& event, int type, bool isHardIn);
0837
0838 double deltaRij(Vec4 jet1, Vec4 jet2);
0839
0840
0841
0842
0843
0844
0845 double getWeightNLO(int i=0) { return (weightCKKWLSave[i]
0846 - weightFIRSTSave[i]);}
0847
0848 vector<double> getWeightCKKWL() { return weightCKKWLSave; }
0849
0850 vector<double> getWeightFIRST() { return weightFIRSTSave; }
0851
0852 void setWeightCKKWL( vector<double> weightIn){
0853 weightCKKWLSave = weightIn;
0854 infoPtr->weightContainerPtr
0855 ->weightsMerging.setValueVector(weightIn); }
0856
0857 void setWeightFIRST( vector<double> weightIn){
0858 weightFIRSTSave = weightIn;
0859 infoPtr->weightContainerPtr->weightsMerging
0860 .setValueFirstVector(weightIn); }
0861
0862
0863
0864 vector<double> getSudakovWeight() {
0865 vector<double> ret = individualWeights.wtSave;
0866 for (int i = 0; i < nWgts; ++i) {
0867 ret[i] *= individualWeights.pdfWeightSave[i] *
0868 individualWeights.mpiWeightSave[i];
0869 }
0870 return ret;
0871 }
0872
0873 vector<double> getCouplingWeight() {
0874 vector<double> ret = individualWeights.asWeightSave;
0875 for (int i = 0; i < nWgts; ++i) {
0876 ret[i] *= individualWeights.aemWeightSave[i];
0877 }
0878 return ret;
0879 }
0880
0881
0882
0883
0884
0885
0886
0887
0888
0889
0890 void setEventVetoInfo(int nJetNowIn, double tmsNowIn) {
0891 nJetNowSave = nJetNowIn; tmsNowSave = tmsNowIn; }
0892
0893
0894 void setHardProcessInfo(int nHardNowIn, double tmsHardNowIn) {
0895 nHardNowSave = nHardNowIn; tmsHardNowSave = tmsHardNowIn; }
0896
0897
0898 int nVetoedInMainShower;
0899 void addVetoInMainShower() {++nVetoedInMainShower;}
0900 int getNumberVetoedInMainShower() {return nVetoedInMainShower;}
0901
0902 };
0903
0904
0905
0906 }
0907
0908 #endif