File indexing completed on 2026-08-06 09:24:24
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef HERWIG_DipoleSplittingKinematics_H
0010 #define HERWIG_DipoleSplittingKinematics_H
0011
0012
0013
0014
0015 #include "ThePEG/Handlers/HandlerBase.h"
0016 #include "ThePEG/Vectors/Lorentz5Vector.h"
0017
0018 #include "ThePEG/EventRecord/Particle.h"
0019 #include "ThePEG/Utilities/UtilityBase.h"
0020
0021 #include "Herwig/Shower/Dipole/Utility/DipoleMCCheck.h"
0022
0023 namespace Herwig {
0024
0025 using namespace ThePEG;
0026
0027 class DipoleIndex;
0028 class DipoleSplittingInfo;
0029 class DipoleSplittingKernel;
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 class DipoleSplittingKinematics: public HandlerBase {
0042
0043 public:
0044
0045
0046
0047
0048 DipoleSplittingKinematics();
0049
0050 public:
0051
0052
0053
0054
0055
0056
0057 virtual pair<double,double> kappaSupport(const DipoleSplittingInfo&) const {
0058 return {0.0,1.0};
0059 }
0060
0061
0062
0063
0064
0065 virtual pair<double,double> xiSupport(const DipoleSplittingInfo&) const {
0066 return {0.0,1.0};
0067 }
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077 virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
0078 const Lorentz5Momentum& pSpectator) const {
0079
0080 if(abs(pEmitter*pSpectator)<0.0000001*GeV2)return ZERO;
0081 assert(pEmitter*pSpectator >= ZERO);
0082 return sqrt(2.*pEmitter*pSpectator);
0083 }
0084
0085
0086
0087
0088
0089
0090 virtual Energy recoilMassKin(const Lorentz5Momentum&,
0091 const Lorentz5Momentum& pSpectator) const {
0092 return pSpectator.m();
0093 }
0094
0095
0096
0097
0098 virtual Energy ptMax(Energy dScale,
0099 double emX, double specX,
0100 const DipoleIndex& dIndex,
0101 const DipoleSplittingKernel& split) const =0;
0102
0103
0104
0105
0106 virtual Energy ptMax(Energy dScale,
0107 double emX, double specX,
0108 const DipoleSplittingInfo& dInfo,
0109 const DipoleSplittingKernel& split) const;
0110
0111
0112
0113
0114 virtual Energy ptMax(Energy dScale,
0115 double emX, double specX,
0116 const DipoleIndex& dIndex,
0117 const DipoleSplittingKernel& split,
0118 tPPtr emitter, tPPtr spectator) const;
0119
0120
0121
0122
0123 virtual Energy QMax(Energy dScale,
0124 double emX, double specX,
0125 const DipoleIndex& dIndex,
0126 const DipoleSplittingKernel& split) const =0;
0127
0128
0129
0130
0131 virtual Energy QMax(Energy dScale,
0132 double emX, double specX,
0133 const DipoleSplittingInfo& dInfo,
0134 const DipoleSplittingKernel& split) const;
0135
0136
0137
0138
0139 virtual Energy QMax(Energy dScale,
0140 double emX, double specX,
0141 const DipoleIndex& dIndex,
0142 const DipoleSplittingKernel& split,
0143 tPPtr emitter, tPPtr spectator) const;
0144
0145
0146
0147
0148 virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const = 0;
0149
0150
0151
0152
0153 virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const = 0;
0154
0155
0156
0157
0158 virtual Energy IRCutoff() const { return theIRCutoff; }
0159
0160
0161
0162
0163
0164 double xMin() const { return theXMin; }
0165
0166
0167
0168
0169 Energy generatePt(double r, Energy dScale,
0170 double emX, double specX,
0171 const DipoleIndex& dIndex,
0172 const DipoleSplittingKernel& split,
0173 double& weight) const;
0174
0175
0176
0177
0178
0179 virtual double ptToRandom(Energy pt, Energy dScale,
0180 double emX, double specX,
0181 const DipoleIndex& dIndex,
0182 const DipoleSplittingKernel& split) const;
0183
0184
0185
0186
0187 virtual pair<double,double> zBoundaries(Energy pt,
0188 const DipoleSplittingInfo& dInfo,
0189 const DipoleSplittingKernel& split) const = 0;
0190
0191
0192
0193
0194 enum ZSamplingOptions {
0195
0196 FlatZ = 0,
0197 OneOverZ,
0198 OneOverOneMinusZ,
0199 OneOverZOneMinusZ
0200
0201 };
0202
0203
0204
0205
0206 double generateZ(double r, Energy pt, int sampling,
0207 const DipoleSplittingInfo& dInfo,
0208 const DipoleSplittingKernel& split,
0209 double& weight) const;
0210
0211
0212
0213
0214
0215
0216 virtual bool generateSplitting(double kappa, double xi, double phi,
0217 DipoleSplittingInfo& info,
0218 const DipoleSplittingKernel&) = 0;
0219
0220
0221
0222
0223
0224
0225
0226 double jacobian() const { return theJacobian; }
0227
0228
0229
0230
0231
0232
0233 virtual bool haveOverestimate() const { return false; }
0234
0235
0236
0237
0238
0239 virtual double jacobianOverestimate() const { return -1.; }
0240
0241
0242
0243
0244 Energy lastPt() const { return theLastPt; }
0245
0246
0247
0248
0249 double lastZ() const { return theLastZ; }
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262 double lastPhi() const { return theLastPhi; }
0263
0264
0265
0266
0267
0268 double lastEmitterZ() const { return theLastEmitterZ; }
0269
0270
0271
0272
0273
0274 double lastSpectatorZ() const { return theLastSpectatorZ; }
0275
0276
0277
0278
0279
0280
0281 const vector<double>& lastSplittingParameters() const { return theLastSplittingParameters; }
0282
0283
0284
0285
0286
0287
0288 void prepareSplitting(DipoleSplittingInfo& dInfo);
0289
0290 public:
0291
0292
0293
0294
0295
0296
0297 virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
0298 const Lorentz5Momentum& pSpectator,
0299 const DipoleSplittingInfo& dInfo) = 0;
0300
0301
0302
0303
0304
0305
0306 const Lorentz5Momentum& lastEmitterMomentum() const { return theEmitterMomentum; }
0307
0308
0309
0310
0311 const Lorentz5Momentum& lastSpectatorMomentum() const { return theSpectatorMomentum; }
0312
0313
0314
0315
0316 const Lorentz5Momentum& lastEmissionMomentum() const { return theEmissionMomentum; }
0317
0318
0319
0320
0321
0322
0323 virtual bool doesTransform () const { return false; }
0324
0325
0326
0327
0328 virtual void setTransformation () {};
0329
0330
0331
0332
0333 int openZBoundaries() const { return theOpenZBoundaries; }
0334
0335
0336
0337
0338 virtual void transform (PPtr&) {};
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367 virtual bool isDecay() const { return false; }
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377 virtual void decayRecoil ( PList& ) {};
0378
0379
0380
0381
0382 virtual Lorentz5Momentum pVector(const Lorentz5Momentum& pEmitter,
0383 const Lorentz5Momentum&,
0384 const DipoleSplittingInfo&) const {
0385 return pEmitter;
0386 }
0387
0388
0389
0390
0391 virtual Lorentz5Momentum nVector(const Lorentz5Momentum&,
0392 const Lorentz5Momentum& pSpectator,
0393 const DipoleSplittingInfo&) const {
0394 return pSpectator;
0395 }
0396
0397
0398
0399 protected:
0400
0401
0402
0403
0404
0405 Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
0406 const Lorentz5Momentum& p2,
0407 Energy pt,
0408 double phi,
0409 bool spacelike = false) const;
0410
0411
0412
0413
0414
0415
0416
0417 void jacobian(double w) { theJacobian = w; }
0418
0419
0420
0421
0422 void lastPt(Energy p) { theLastPt = p; }
0423
0424
0425
0426
0427 void lastZ(double z) { theLastZ = z; }
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439 void lastPhi(double p) { theLastPhi = p; }
0440
0441
0442
0443
0444
0445 void lastEmitterZ(double z) { theLastEmitterZ = z; }
0446
0447
0448
0449
0450
0451 void lastSpectatorZ(double z) { theLastSpectatorZ = z; }
0452
0453
0454
0455
0456
0457
0458 vector<double>& splittingParameters() { return theLastSplittingParameters; }
0459
0460
0461
0462
0463 void emitterMomentum(const Lorentz5Momentum& p) { theEmitterMomentum = p; }
0464
0465
0466
0467
0468 void spectatorMomentum(const Lorentz5Momentum& p) { theSpectatorMomentum = p; }
0469
0470
0471
0472
0473 void emissionMomentum(const Lorentz5Momentum& p) { theEmissionMomentum = p; }
0474
0475
0476
0477
0478 void splitRecoilMomentum( const Lorentz5Momentum& mom ) { theSplitRecoilMomentum = mom; }
0479
0480
0481
0482
0483 const Lorentz5Momentum& splitRecoilMomentum() const { return theSplitRecoilMomentum; }
0484
0485 public:
0486
0487
0488
0489
0490
0491
0492
0493 static void Init();
0494
0495 public:
0496
0497
0498
0499
0500
0501
0502
0503 void persistentOutput(PersistentOStream & os) const;
0504
0505
0506
0507
0508
0509
0510 void persistentInput(PersistentIStream & is, int version);
0511
0512
0513
0514
0515
0516
0517 private:
0518
0519
0520
0521
0522
0523 Energy theIRCutoff;
0524
0525
0526
0527
0528
0529 double theXMin;
0530
0531
0532
0533
0534 double theJacobian;
0535
0536
0537
0538
0539 Energy theLastPt;
0540
0541
0542
0543
0544 double theLastZ;
0545
0546
0547
0548
0549
0550
0551
0552
0553
0554
0555
0556
0557
0558 double theLastPhi;
0559
0560
0561
0562
0563
0564 double theLastEmitterZ;
0565
0566
0567
0568
0569
0570 double theLastSpectatorZ;
0571
0572
0573
0574
0575
0576
0577 vector<double> theLastSplittingParameters;
0578
0579
0580
0581
0582 Lorentz5Momentum theEmitterMomentum;
0583
0584
0585
0586
0587 Lorentz5Momentum theEmissionMomentum;
0588
0589
0590
0591
0592 Lorentz5Momentum theSpectatorMomentum;
0593
0594
0595
0596
0597
0598 Lorentz5Momentum theSplitRecoilMomentum;
0599
0600
0601
0602 int theOpenZBoundaries;
0603
0604 protected:
0605
0606
0607
0608
0609 Ptr<DipoleMCCheck>::ptr theMCCheck;
0610
0611 private:
0612
0613
0614
0615
0616
0617 static AbstractClassDescription<DipoleSplittingKinematics> initDipoleSplittingKinematics;
0618
0619
0620
0621
0622
0623 DipoleSplittingKinematics & operator=(const DipoleSplittingKinematics &) = delete;
0624
0625 };
0626
0627 }
0628
0629 #include "ThePEG/Utilities/ClassTraits.h"
0630
0631 namespace ThePEG {
0632
0633
0634
0635
0636
0637 template <>
0638 struct BaseClassTrait<Herwig::DipoleSplittingKinematics,1> {
0639
0640 typedef HandlerBase NthBase;
0641 };
0642
0643
0644
0645 template <>
0646 struct ClassTraits<Herwig::DipoleSplittingKinematics>
0647 : public ClassTraitsBase<Herwig::DipoleSplittingKinematics> {
0648
0649 static string className() { return "Herwig::DipoleSplittingKinematics"; }
0650
0651
0652
0653
0654
0655
0656
0657 static string library() { return "HwDipoleShower.so"; }
0658 };
0659
0660
0661
0662 }
0663
0664 #endif