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