File indexing completed on 2026-08-06 09:24:24
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef HERWIG_DipoleSplittingKernel_H
0010 #define HERWIG_DipoleSplittingKernel_H
0011
0012
0013
0014
0015 #include "ThePEG/Handlers/HandlerBase.h"
0016 #include "ThePEG/StandardModel/AlphaSBase.h"
0017 #include "ThePEG/PDF/PDF.h"
0018
0019 #include "Herwig/Shower/Dipole/Utility/PDFRatio.h"
0020 #include "Herwig/Shower/Dipole/Base/DipoleSplittingInfo.h"
0021 #include "Herwig/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h"
0022
0023 #include "ThePEG/EventRecord/RhoDMatrix.h"
0024 #include "Herwig/Decay/DecayMatrixElement.h"
0025 #include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
0026
0027 namespace Herwig {
0028
0029 using namespace ThePEG;
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 class DipoleSplittingKernel: public HandlerBase {
0042
0043 public:
0044
0045
0046
0047
0048 DipoleSplittingKernel();
0049
0050 public:
0051
0052
0053
0054
0055 Ptr<AlphaSBase>::tptr alphaS() const { return theAlphaS; }
0056
0057
0058
0059
0060 void alphaS(Ptr<AlphaSBase>::tptr ap) { theAlphaS = ap; }
0061
0062
0063
0064
0065 Ptr<DipoleSplittingKinematics>::tptr splittingKinematics() const {
0066 return theSplittingKinematics;
0067 }
0068
0069
0070
0071
0072 Ptr<DipoleMCCheck>::ptr mcCheck() const { return theMCCheck; }
0073
0074
0075
0076
0077 void splittingKinematics(Ptr<DipoleSplittingKinematics>::tptr sp) {
0078 theSplittingKinematics = sp;
0079 }
0080
0081
0082
0083
0084 Ptr<PDFRatio>::tptr pdfRatio() const { return thePDFRatio; }
0085
0086
0087
0088
0089 void pdfRatio(Ptr<PDFRatio>::tptr sp) { thePDFRatio = sp; }
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099 virtual int nDimAdditional() const { return 0; }
0100
0101
0102
0103
0104 void renormalizationScaleFreeze(Energy s) { theRenormalizationScaleFreeze = s; }
0105
0106
0107
0108
0109 void factorizationScaleFreeze(Energy s) { theFactorizationScaleFreeze = s; }
0110
0111
0112
0113
0114 Energy renormalizationScaleFreeze() const { return theRenormalizationScaleFreeze; }
0115
0116
0117
0118
0119 Energy factorizationScaleFreeze() const { return theFactorizationScaleFreeze; }
0120
0121 public:
0122
0123
0124
0125
0126
0127 virtual bool canHandle(const DipoleIndex&) const = 0;
0128
0129
0130
0131
0132
0133
0134 virtual bool canHandleEquivalent(const DipoleIndex& a,
0135 const DipoleSplittingKernel& sk,
0136 const DipoleIndex& b) const = 0;
0137
0138
0139
0140
0141
0142 virtual tcPDPtr emitter(const DipoleIndex&) const = 0;
0143
0144
0145
0146
0147
0148 virtual tcPDPtr emission(const DipoleIndex&) const = 0;
0149
0150
0151
0152
0153
0154 virtual tcPDPtr spectator(const DipoleIndex&) const = 0;
0155
0156
0157
0158
0159
0160 PDPtr flavour() const { return theFlavour; }
0161
0162
0163
0164
0165
0166 bool strictLargeN() const { return theStrictLargeN; }
0167
0168 public:
0169
0170
0171
0172
0173
0174 virtual void startPresampling(const DipoleIndex&) {
0175 presampling = true;
0176 }
0177
0178
0179
0180
0181
0182 virtual void stopPresampling(const DipoleIndex&) {
0183 presampling = false;
0184 }
0185
0186
0187
0188
0189
0190 unsigned long presamplingPoints() const { return thePresamplingPoints; }
0191
0192
0193
0194
0195
0196 unsigned long maxtry() const { return theMaxtry; }
0197
0198
0199
0200
0201
0202 unsigned long freezeGrid() const { return theFreezeGrid; }
0203
0204
0205
0206
0207
0208 void freezeGrid(unsigned long n) { theFreezeGrid = n; }
0209
0210
0211
0212
0213 void detuning(double d) { theDetuning = d; }
0214
0215
0216
0217
0218 double detuning() const { return theDetuning; }
0219
0220
0221
0222
0223
0224 virtual double evaluate(const DipoleSplittingInfo&) const = 0;
0225
0226
0227
0228
0229
0230 virtual vector< pair<int, Complex> > generatePhi( const DipoleSplittingInfo& dInfo, const RhoDMatrix& rho) const = 0;
0231
0232
0233
0234
0235 virtual DecayMEPtr matrixElement(const DipoleSplittingInfo& dInfo) const = 0;
0236
0237
0238
0239
0240 void clearAlphaPDFCache() const {
0241 theAlphaSCache.clear();
0242 thePDFCache.clear();
0243 }
0244
0245
0246
0247
0248
0249 virtual void accept(const DipoleSplittingInfo&, double, double, map<string,double>&) const;
0250
0251
0252
0253
0254
0255 virtual void veto(const DipoleSplittingInfo&, double, double, map<string,double>&) const;
0256
0257
0258
0259
0260
0261
0262
0263
0264 virtual bool haveOverestimate(const DipoleSplittingInfo&) const { return false; }
0265
0266
0267
0268
0269
0270 virtual double overestimate(const DipoleSplittingInfo&) const { return -1.; }
0271
0272
0273
0274
0275
0276
0277
0278 virtual double invertOverestimateIntegral(const DipoleSplittingInfo&, double) const {
0279 return -1.;
0280 }
0281
0282
0283
0284
0285 bool useThisKernel() const {
0286 return theUseThisKernel;
0287 }
0288
0289 public:
0290
0291
0292
0293
0294 double factorizationScaleFactor() const { return theFactorizationScaleFactor; }
0295
0296
0297
0298
0299 void factorizationScaleFactor(double f) { theFactorizationScaleFactor = f; }
0300
0301
0302
0303
0304 double renormalizationScaleFactor() const { return theRenormalizationScaleFactor; }
0305
0306
0307
0308
0309 void renormalizationScaleFactor(double f) { theRenormalizationScaleFactor = f; }
0310
0311
0312
0313
0314 unsigned int cmwScheme() const {return theCMWScheme;}
0315
0316 protected:
0317
0318
0319
0320
0321 double alphaPDF(const DipoleSplittingInfo&,
0322 Energy optScale = ZERO,
0323 double rScaleFactor = 1.0,
0324 double fScaleFactor = 1.0) const;
0325
0326
0327
0328
0329
0330 bool virtualitySplittingScale() const { return theVirtualitySplittingScale; }
0331
0332 public:
0333
0334
0335
0336
0337
0338
0339
0340 void persistentOutput(PersistentOStream & os) const;
0341
0342
0343
0344
0345
0346
0347 void persistentInput(PersistentIStream & is, int version);
0348
0349
0350
0351
0352
0353
0354
0355
0356 static void Init();
0357
0358
0359
0360
0361
0362 private:
0363
0364
0365
0366
0367 Ptr<AlphaSBase>::ptr theAlphaS;
0368
0369
0370
0371
0372
0373 Energy theScreeningScale;
0374
0375
0376
0377
0378 Ptr<DipoleSplittingKinematics>::ptr theSplittingKinematics;
0379
0380
0381
0382
0383
0384 Ptr<PDFRatio>::ptr thePDFRatio;
0385
0386
0387
0388
0389
0390 unsigned long thePresamplingPoints;
0391
0392
0393
0394
0395
0396 unsigned long theMaxtry;
0397
0398
0399
0400
0401
0402 static double theMaxPDFRatio;
0403
0404
0405
0406
0407
0408 unsigned long theFreezeGrid;
0409
0410
0411
0412
0413 double theDetuning;
0414
0415
0416
0417
0418
0419 PDPtr theFlavour;
0420
0421
0422
0423
0424 Ptr<DipoleMCCheck>::ptr theMCCheck;
0425
0426
0427
0428
0429
0430 bool theStrictLargeN;
0431
0432
0433
0434
0435 double theFactorizationScaleFactor;
0436
0437
0438
0439
0440 double theRenormalizationScaleFactor;
0441
0442
0443
0444
0445 Energy theRenormalizationScaleFreeze;
0446
0447
0448
0449
0450 Energy theFactorizationScaleFreeze;
0451
0452
0453
0454
0455
0456 bool theVirtualitySplittingScale;
0457
0458
0459
0460
0461
0462 unsigned int theCMWScheme=0;
0463
0464
0465
0466
0467 mutable map<double,double> theAlphaSCache;
0468
0469
0470
0471
0472 mutable map<double,double> thePDFCache;
0473
0474
0475
0476
0477 bool presampling;
0478
0479
0480
0481
0482 bool theUseThisKernel = true;
0483
0484
0485 private:
0486
0487
0488
0489
0490
0491 static AbstractClassDescription<DipoleSplittingKernel> initDipoleSplittingKernel;
0492
0493
0494
0495
0496
0497 DipoleSplittingKernel & operator=(const DipoleSplittingKernel &) = delete;
0498
0499 };
0500
0501 }
0502
0503 #include "ThePEG/Utilities/ClassTraits.h"
0504
0505 namespace ThePEG {
0506
0507
0508
0509
0510
0511 template <>
0512 struct BaseClassTrait<Herwig::DipoleSplittingKernel,1> {
0513
0514 typedef HandlerBase NthBase;
0515 };
0516
0517
0518
0519 template <>
0520 struct ClassTraits<Herwig::DipoleSplittingKernel>
0521 : public ClassTraitsBase<Herwig::DipoleSplittingKernel> {
0522
0523 static string className() { return "Herwig::DipoleSplittingKernel"; }
0524
0525
0526
0527
0528
0529
0530
0531 static string library() { return "HwDipoleShower.so"; }
0532 };
0533
0534
0535
0536 }
0537
0538 #endif