File indexing completed on 2026-08-06 09:24:26
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef HERWIG_PowhegShowerHandler_H
0010 #define HERWIG_PowhegShowerHandler_H
0011
0012
0013
0014
0015 #include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
0016 #include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
0017 #include "Herwig/MatrixElement/HwMEBase.h"
0018 #include "Herwig/Shower/QTilde/Base/HardBranching.h"
0019
0020 #include "Herwig/Shower/QTilde/Matching/CKKWTree.h"
0021 #include "Herwig/Shower/QTilde/Matching/ProtoTree.h"
0022 #include "Herwig/Shower/QTilde/Matching/ProtoBranching.h"
0023 #include "Herwig/Shower/QTilde/Matching/PotentialTree.h"
0024
0025 #include "ThePEG/MatrixElement/DiagramBase.fh"
0026 #include "ThePEG/MatrixElement/MEBase.h"
0027 #include "ThePEG/PDF/PartonExtractor.h"
0028 #include "Herwig/Shower/QTilde/Base/HardTree.h"
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 namespace Herwig {
0043
0044 using namespace ThePEG;
0045
0046 class PowhegShowerHandler: public QTildeShowerHandler {
0047
0048 public:
0049
0050
0051
0052
0053 PowhegShowerHandler() : subtractionIntegral_(false),
0054 enforceColourConsistency_(false),
0055 forcePartners_(false),
0056 decayRadiation_(0)
0057 {}
0058
0059 public:
0060
0061 Ptr<MatchboxFactory>::tptr Factory() const{return MatchboxFactory::currentFactory();}
0062
0063
0064
0065
0066
0067 virtual bool canHandleMatchboxTrunc() const { return true; }
0068
0069 protected:
0070
0071
0072
0073
0074 virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
0075
0076 protected:
0077
0078
0079
0080
0081 MEPtr matrixElement() const {return matrixElement_;}
0082
0083
0084
0085
0086 PotentialTree doClustering(tSubProPtr sub,ShowerTreePtr showerTree) const;
0087
0088
0089
0090
0091 PotentialTree & hardTree() {return hardTree_;}
0092 const PotentialTree & hardTree() const {return hardTree_;}
0093
0094
0095
0096
0097 void hardTree(PotentialTree in) const {hardTree_ = in;}
0098
0099
0100
0101
0102 bool fuzzyEqual(Lorentz5Momentum a, Lorentz5Momentum b) const;
0103
0104
0105
0106
0107 set<ProtoBranchingPtr> & protoBranchings() const {return protoBranchings_;}
0108
0109
0110
0111
0112 set< ProtoTreePtr > & protoTrees() const {return protoTrees_;}
0113
0114
0115
0116
0117
0118 void fillProtoTrees( ProtoTreePtr , long id ) const;
0119
0120
0121
0122
0123
0124
0125
0126 tProtoBranchingPtr getCluster( tProtoBranchingPtr, tProtoBranchingPtr ) const;
0127
0128
0129
0130
0131
0132
0133 bool repeatProtoTree( ProtoTreePtr currentProtoTree ) const;
0134
0135
0136
0137
0138 BranchingElement allowedFinalStateBranching( tProtoBranchingPtr &,
0139 tProtoBranchingPtr &) const;
0140
0141
0142
0143
0144 BranchingElement allowedInitialStateBranching( tProtoBranchingPtr & ,
0145 tProtoBranchingPtr &) const;
0146
0147
0148
0149
0150 bool checkDiagram(PotentialTree &,tcDiagPtr) const;
0151
0152 bool subtractionIntegral() const {return subtractionIntegral_;}
0153
0154 void setSubtractionIntegral(bool subInt) const { subtractionIntegral_=subInt;}
0155
0156
0157 private:
0158
0159
0160
0161
0162 mutable MEPtr matrixElement_;
0163
0164
0165
0166
0167 mutable PotentialTree hardTree_;
0168
0169
0170
0171
0172 mutable set<ProtoBranchingPtr> protoBranchings_;
0173
0174
0175
0176
0177 mutable set< ProtoTreePtr > protoTrees_;
0178
0179
0180
0181
0182 mutable vector< pair< PotentialTree, double > > hardTrees_;
0183
0184
0185
0186
0187
0188
0189
0190
0191 mutable map<pair<long,long>,BranchingElement > allowedFinal_;
0192
0193
0194
0195
0196 mutable multimap<long, BranchingElement > allowedInitial_;
0197
0198
0199 public:
0200
0201
0202
0203
0204
0205
0206
0207 void persistentOutput(PersistentOStream & os) const;
0208
0209
0210
0211
0212
0213
0214 void persistentInput(PersistentIStream & is, int version);
0215
0216
0217
0218
0219
0220
0221
0222
0223 static void Init();
0224
0225 protected:
0226
0227
0228
0229
0230
0231
0232
0233 virtual IBPtr clone() const;
0234
0235
0236
0237
0238
0239 virtual IBPtr fullclone() const;
0240
0241
0242 protected:
0243
0244
0245
0246
0247
0248
0249
0250
0251 virtual void doinit();
0252
0253
0254 private:
0255
0256
0257
0258
0259
0260 PowhegShowerHandler & operator=(const PowhegShowerHandler &) = delete;
0261
0262 private:
0263
0264
0265
0266
0267 mutable int emitter_;
0268
0269
0270
0271
0272 mutable int spectator_;
0273
0274
0275
0276
0277 mutable bool subtractionIntegral_;
0278
0279
0280
0281
0282 bool enforceColourConsistency_;
0283
0284
0285
0286
0287 bool forcePartners_;
0288
0289
0290
0291
0292 unsigned int decayRadiation_;
0293
0294 };
0295
0296 }
0297
0298 #endif