herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
QTildeShowerHandler.h
1// -*- C++ -*-
2#ifndef Herwig_QTildeShowerHandler_H
3#define Herwig_QTildeShowerHandler_H
4//
5// This is the declaration of the QTildeShowerHandler class.
6//
7
8#include "QTildeShowerHandler.fh"
9#include "Herwig/Shower/ShowerHandler.h"
10#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingGenerator.h"
11#include "Herwig/Shower/QTilde/Base/ShowerTree.h"
12#include "Herwig/Shower/QTilde/Base/ShowerProgenitor.fh"
13#include "Herwig/Shower/QTilde/Base/HardTree.h"
14#include "Herwig/Shower/QTilde/Base/Branching.h"
15#include "Herwig/Shower/QTilde/Base/ShowerVeto.h"
16#include "Herwig/Shower/QTilde/Base/FullShowerVeto.h"
17#include "Herwig/Shower/QTilde/Kinematics/KinematicsReconstructor.fh"
18#include "Herwig/Shower/QTilde/Base/PartnerFinder.fh"
19#include "Herwig/Shower/QTilde/SplittingFunctions/SudakovFormFactor.fh"
20#include "Herwig/MatrixElement/HwMEBase.h"
21#include "Herwig/Decay/HwDecayerBase.h"
22#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
23#include "Herwig/Shower/RealEmissionProcess.h"
24#include "Herwig/Utilities/Statistic.h"
25
26namespace Herwig {
27
28using namespace ThePEG;
29
37
38public:
39
43 typedef Ptr<XComb>::pointer XCPtr;
44
45public:
46
51
52public:
53
62
66 virtual Energy hardScale() const {
67 return muPt;
68 }
69
74 virtual bool showerHardProcessVeto() const { return false; }
75
79 virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
80
88 virtual void showerHardProcess(ShowerTreePtr,XCPtr);
89
93 virtual void showerDecay(ShowerTreePtr);
95
100
104 tSplittingGeneratorPtr splittingGenerator() const { return _splittingGenerator; }
105
109 int hardEmission() const {return _hardEmission;}
111
115 virtual void connectTrees(ShowerTreePtr showerTree, HardTreePtr hardTree, bool hard );
116
124 unsigned int softCorrelations() const {
125 return _softOpt;
126 }
127
131 virtual bool correlations() const {
132 return spinCorrelations()!=0||_softOpt!=0;
133 }
135
136public:
144 tKinematicsReconstructorPtr kinematicsReconstructor() const { return _reconstructor; }
145
149 tPartnerFinderPtr partnerFinder() const { return _partnerfinder; }
150
152
153protected:
154
158 void doShowering(bool hard,XCPtr);
159
163 virtual RealEmissionProcessPtr hardMatrixElementCorrection(bool);
164
168 virtual void hardestEmission(bool hard);
169
173 void setupMECorrection(RealEmissionProcessPtr real);
174
181 virtual vector<ShowerProgenitorPtr> setupShower(bool hard);
182
187 bool clear);
188
202 virtual bool timeLikeShower(tShowerParticlePtr particle, ShowerInteraction,
203 Branching fb, bool first);
204
213 virtual bool spaceLikeShower(tShowerParticlePtr particle,PPtr beam,
215
225 virtual bool
226 spaceLikeDecayShower(tShowerParticlePtr particle,
227 const ShowerParticle::EvolutionScales & maxScales,
228 Energy minimumMass,ShowerInteraction,
229 Branching fb);
230
234 virtual bool truncatedTimeLikeShower(tShowerParticlePtr particle,
235 HardBranchingPtr branch,
237 Branching fb, bool first);
238
242 virtual bool truncatedSpaceLikeShower(tShowerParticlePtr particle,PPtr beam,
243 HardBranchingPtr branch,
244 ShowerInteraction type);
245
249 virtual bool truncatedSpaceLikeDecayShower(tShowerParticlePtr particle,
250 const ShowerParticle::EvolutionScales & maxScales,
251 Energy minimumMass, HardBranchingPtr branch,
254
262 bool MECOn() const {
263 return _hardEmission == 1;
264 }
265
269 bool hardMEC() const {
270 return _hardEmission == 1 && (_meCorrMode == 1 || _meCorrMode == 2);
271 }
272
276 bool softMEC() const {
277 return _hardEmission == 1 && (_meCorrMode == 1 || _meCorrMode > 2);
278 }
280
284 bool isTruncatedShowerON() const {return _trunc_Mode;}
285
293 bool ipTon() const {
294 return _iptrms != ZERO || ( _beta == 1.0 && _gamma != ZERO && _iptmax !=ZERO );
295 }
297
303 void addVeto (ShowerVetoPtr v) { _vetoes.push_back(v); }
304
308 void removeVeto (ShowerVetoPtr v) {
309 vector<ShowerVetoPtr>::iterator vit = find(_vetoes.begin(),_vetoes.end(),v);
310 if (vit != _vetoes.end())
311 _vetoes.erase(vit);
312 }
313
315
326
336
341
346
352
360 tHardTreePtr hardTree() {return _hardtree;}
361
365 void hardTree(tHardTreePtr in) {_hardtree = in;}
367
375 Ptr<BeamParticleData>::const_pointer beamParticle() const { return _beam; }
376
380 void setBeamParticle(Ptr<BeamParticleData>::const_pointer in) { _beam=in; }
382
390 tShowerTreePtr currentTree() { return _currenttree; }
391
395 void currentTree(tShowerTreePtr tree) { _currenttree=tree; }
396
398
402 unsigned int maximumTries() const { return _maxtry; }
403
411 ShowerProgenitorPtr progenitor() { return _progenitor; }
412
416 void progenitor(ShowerProgenitorPtr in) { _progenitor=in; }
418
422 virtual void generateIntrinsicpT(vector<ShowerProgenitorPtr>);
423
427 map<tShowerProgenitorPtr,pair<Energy,double> > & intrinsicpT() { return _intrinsic; }
428
432 void setupMaximumScales(const vector<ShowerProgenitorPtr> &,XCPtr);
433
437 void setupHardScales(const vector<ShowerProgenitorPtr> &,XCPtr);
438
442 void convertHardTree(bool hard,ShowerInteraction type);
443
444protected:
445
450
455
456protected:
457
462
466 void updateHistory(tShowerParticlePtr particle);
467
472
476 virtual bool
478 Energy minimumMass,ShowerInteraction);
479
483 Branching selectTimeLikeBranching(tShowerParticlePtr particle,
485 HardBranchingPtr branch);
486
490 Branching selectSpaceLikeDecayBranching(tShowerParticlePtr particle,
491 const ShowerParticle::EvolutionScales & maxScales,
492 Energy minmass,ShowerInteraction type,
493 HardBranchingPtr branch);
497 ShowerParticleVector createTimeLikeChildren(tShowerParticlePtr particle,
498 IdList ids);
499
503 virtual bool timeLikeVetoed(const Branching &,ShowerParticlePtr);
504
508 virtual bool spaceLikeVetoed(const Branching &,ShowerParticlePtr);
509
513 virtual bool spaceLikeDecayVetoed(const Branching &,ShowerParticlePtr);
514
518 bool hardOnly() const {return _limitEmissions==3;}
519
524
528 void addFSRUsingDecayPOWHEG(HardTreePtr ISRTree);
529
530public:
531
539
545 void persistentInput(PersistentIStream & is, int version);
547
554 static void Init();
555
556protected:
557
561 virtual tPPair cascade(tSubProPtr sub, XCPtr xcomb);
562
566 void decay(ShowerTreePtr tree, ShowerDecayMap & decay);
567
568protected:
569
576 virtual IBPtr clone() const;
577
582 virtual IBPtr fullclone() const;
584
585protected:
586
592 virtual void doinit();
593
598 virtual void doinitrun();
600
601private:
602
608
609private:
610
611
616
620 ShowerTreePtr hard_;
621
626
630 vector<ShowerTreePtr> done_;
632
633private :
634
638 SplittingGeneratorPtr _splittingGenerator;
639
643 unsigned int _maxtry;
644
648 unsigned int _meCorrMode;
649
653 unsigned int _evolutionScheme;
654
663
667 Energy _iptrms;
668
672 double _beta;
673
677 Energy _gamma;
678
682 Energy _iptmax;
683
687 unsigned int _limitEmissions;
688
692 ShowerProgenitorPtr _progenitor;
693
697 HwMEBasePtr _hardme;
698
702 HwDecayerBasePtr _decayme;
703
707 ShowerTreePtr _currenttree;
708
712 HardTreePtr _hardtree;
713
723
729
733 Ptr<BeamParticleData>::const_pointer _beam;
734
738 map<tShowerProgenitorPtr,pair<Energy,double> > _intrinsic;
739
743 vector<ShowerVetoPtr> _vetoes;
744
748 vector<FullShowerVetoPtr> _fullShowerVetoes;
749
753 unsigned int _nReWeight;
754
759
763 unsigned int _nis;
764
768 unsigned int _nfs;
769
774
779
784
788 unsigned int _softOpt;
789
794
799 static bool _hardEmissionWarn;
800
805 static bool _missingTruncWarn;
806
810 Energy muPt;
811
812private:
820 KinematicsReconstructorPtr _reconstructor;
821
825 PartnerFinderPtr _partnerfinder;
826
828
829};
830
831}
832
833#endif /* HERWIG_QTildeShowerHandler_H */
The QTildeShowerHandler class.
void currentTree(tShowerTreePtr tree)
Set the tree.
ShowerProgenitorPtr _progenitor
The progenitor of the current shower.
virtual bool timeLikeShower(tShowerParticlePtr particle, ShowerInteraction, Branching fb, bool first)
Methods to perform the evolution of an individual particle, including recursive calling on the produc...
virtual void doinitrun()
Initialize this object.
Ptr< XComb >::pointer XCPtr
Pointer to an XComb object.
unsigned int _maxtry
Maximum number of tries to generate the shower of a particular tree.
double _finalenhance
Enhancement factor for final-state radiation.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual bool startTimeLikeShower(ShowerInteraction)
Start the shower of a timelike particle.
unsigned int _nfs
Number of FS emissions.
static void Init()
The standard Init function used to initialize the interfaces.
unsigned int _limitEmissions
Limit the number of emissions for testing.
void progenitor(ShowerProgenitorPtr in)
Set the progenitor.
virtual bool spaceLikeShower(tShowerParticlePtr particle, PPtr beam, ShowerInteraction)
It does the backward evolution of the space-like input particle (and recursively for all its time-lik...
void setBeamParticle(Ptr< BeamParticleData >::const_pointer in)
Set the beam particle data.
virtual bool truncatedSpaceLikeShower(tShowerParticlePtr particle, PPtr beam, HardBranchingPtr branch, ShowerInteraction type)
Truncated shower from a space-like particle.
void addVeto(ShowerVetoPtr v)
Insert a veto.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
bool ipTon() const
Switch for intrinsic pT.
unsigned int _evolutionScheme
Control of the reconstruction option.
virtual bool spaceLikeDecayShower(tShowerParticlePtr particle, const ShowerParticle::EvolutionScales &maxScales, Energy minimumMass, ShowerInteraction, Branching fb)
If does the forward evolution of the input on-shell particle involved in a decay (and recursively for...
ShowerDecayMap decay_
The ShowerTree for the decays.
vector< FullShowerVetoPtr > _fullShowerVetoes
Full Shower Vetoes.
PartnerFinderPtr _partnerfinder
Pointer to the PartnerFinder object.
Energy _gamma
Parameter for inverse quadratic: 2*Beta*Gamma/(sqr(Gamma)+sqr(intrinsicpT))
virtual tPPair cascade(tSubProPtr sub, XCPtr xcomb)
The main method which manages the showering of a subprocess.
bool hardMEC() const
Any hard ME correction?
virtual Energy hardScale() const
Return the relevant hard scale to be used in the profile scales.
void doShowering(bool hard, XCPtr)
Perform the shower.
ShowerParticleVector createTimeLikeChildren(tShowerParticlePtr particle, IdList ids)
Create the timelike child of a branching.
unsigned int _softOpt
Option for the kernal for soft correlations.
vector< ShowerTreePtr > done_
The ShowerTrees for which the initial shower.
virtual void showerDecay(ShowerTreePtr)
Perform the shower of a decay.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
QTildeShowerHandler & operator=(const QTildeShowerHandler &)=delete
The assignment operator is private and must never be called.
virtual bool spaceLikeDecayVetoed(const Branching &, ShowerParticlePtr)
Vetos for the spacelike shower.
void finalStateRadiationEnhancementFactor(double in)
Set the enhancement factor for final-state radiation.
tShowerTreePtr currentTree()
Set/Get the current tree being evolver for inheriting classes.
Ptr< BeamParticleData >::const_pointer beamParticle() const
Access/set the beam particle for the current initial-state shower.
ShowerProgenitorPtr progenitor()
Set/Get the ShowerProgenitor for the current shower.
virtual bool startSpaceLikeDecayShower(const ShowerParticle::EvolutionScales &maxScales, Energy minimumMass, ShowerInteraction)
Start the shower of a spacelike particle.
static bool _hardEmissionWarn
True if no warnings about incorrect hard emission mode setting have been issued yet.
virtual bool startSpaceLikeShower(PPtr, ShowerInteraction)
Start the shower of a spacelike particle.
virtual void generateIntrinsicpT(vector< ShowerProgenitorPtr >)
Calculate the intrinsic .
double _initialenhance
Radiation enhancement factors for use with the veto algorithm if needed by the soft matrix element co...
unsigned int softCorrelations() const
Access to switches for spin correlations.
double _beta
Proportion of inverse quadratic intrinsic pT distribution.
void decay(ShowerTreePtr tree, ShowerDecayMap &decay)
Decay a ShowerTree.
void convertHardTree(bool hard, ShowerInteraction type)
Convert the HardTree into an extra shower emission.
bool MECOn() const
Switches for matrix element corrections.
map< tShowerProgenitorPtr, pair< Energy, double > > & intrinsicpT()
Access to the intrinsic for inheriting classes.
bool hardVetoReadOption() const
Switches for vetoing hard emissions.
virtual void setEvolutionPartners(bool hard, ShowerInteraction, bool clear)
set the colour partners
virtual void connectTrees(ShowerTreePtr showerTree, HardTreePtr hardTree, bool hard)
Connect the Hard and Shower trees.
virtual bool truncatedTimeLikeShower(tShowerParticlePtr particle, HardBranchingPtr branch, ShowerInteraction type, Branching fb, bool first)
Truncated shower from a time-like particle.
QTildeShowerHandler()
The default constructor.
virtual bool timeLikeVetoed(const Branching &, ShowerParticlePtr)
Vetos for the timelike shower.
virtual void showerHardProcess(ShowerTreePtr, XCPtr)
Members to perform the shower.
tSplittingGeneratorPtr splittingGenerator() const
Access to the flags and shower variables.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual bool correlations() const
Any correlations.
Energy _iptmax
Upper bound on intrinsic pT for inverse quadratic.
Ptr< BeamParticleData >::const_pointer _beam
The beam particle data for the current initial-state shower.
unsigned int _nReWeight
Number of iterations for reweighting.
bool _reWeight
Whether or not we are reweighting.
bool isTruncatedShowerON() const
Is the truncated shower on?
virtual vector< ShowerProgenitorPtr > setupShower(bool hard)
Extract the particles to be showered, set the evolution scales and apply the hard matrix element corr...
void updateHistory(tShowerParticlePtr particle)
Update of the time-like stuff.
Branching selectSpaceLikeDecayBranching(tShowerParticlePtr particle, const ShowerParticle::EvolutionScales &maxScales, Energy minmass, ShowerInteraction type, HardBranchingPtr branch)
Select the branching for the next space-like emission in a decay.
void initialStateRadiationEnhancementFactor(double in)
Set the enhancement factor for initial-state radiation.
tPartnerFinderPtr partnerFinder() const
Access to the PartnerFinder object.
void fillEventRecord()
At the end of the Showering, transform ShowerParticle objects into ThePEG particles and fill the even...
double finalStateRadiationEnhancementFactor() const
Access the enhancement factor for final-state radiation.
void setupMECorrection(RealEmissionProcessPtr real)
Set up for applying a matrix element correction.
vector< ShowerVetoPtr > _vetoes
Vetoes.
map< tShowerProgenitorPtr, pair< Energy, double > > _intrinsic
Storage of the intrinsic of the particles.
virtual void hardestEmission(bool hard)
Generate the hardest emission.
void removeVeto(ShowerVetoPtr v)
Remove a veto.
bool _hardVetoReadOption
If hard veto pT scale is being read-in this determines whether the read-in value is applied to primar...
bool softMEC() const
Any soft ME correction?
virtual bool showerHardProcessVeto() const
Hook to allow vetoing of event after showering hard sub-process as in e.g.
unsigned int _meCorrMode
Matrix element correction switch.
ShowerTreePtr hard_
Stuff from the ShowerHandler.
void checkFlags()
Check the flags.
bool hardOnly() const
Only generate the hard emission, for testing only.
Energy muPt
The relevant hard scale to be used in the profile scales.
ShowerInteraction interaction_
The option for wqhich interactions to use.
void setupMaximumScales(const vector< ShowerProgenitorPtr > &, XCPtr)
find the maximally allowed pt acc to the hard process.
Branching selectTimeLikeBranching(tShowerParticlePtr particle, ShowerInteraction type, HardBranchingPtr branch)
Select the branching for the next time-like emission.
virtual RealEmissionProcessPtr hardMatrixElementCorrection(bool)
Generate the hard matrix element correction.
bool _trunc_Mode
Truncated shower switch.
double initialStateRadiationEnhancementFactor() const
Enhancement factors for radiation needed to generate the soft matrix element correction.
unsigned int _nis
number of IS emissions
HardTreePtr _hardtree
The HardTree currently being showered.
virtual bool spaceLikeVetoed(const Branching &, ShowerParticlePtr)
Vetos for the spacelike shower.
virtual IBPtr clone() const
Make a simple clone of this object.
ShowerTreePtr _currenttree
The ShowerTree currently being showered.
bool _hardPOWHEG
Option for hard radiation in POWHEG events.
tHardTreePtr hardTree()
Access to set/get the HardTree currently beinging showered.
int hardEmission() const
Mode for hard emissions.
unsigned int maximumTries() const
Access the maximum number of attempts to generate the shower.
void setupHardScales(const vector< ShowerProgenitorPtr > &, XCPtr)
find the relevant hard scales for profile scales.
static bool _missingTruncWarn
True if no warnings about missing truncated shower have been issued yet.
KinematicsReconstructorPtr _reconstructor
Pointer to the various objects.
HwMEBasePtr _hardme
Matrix element.
tPPair remakeRemnant(tPPair oldp)
Fix Remnant connections after ISR.
void hardTree(tHardTreePtr in)
The HardTree currently being showered.
Energy _iptrms
rms intrinsic pT of Gaussian distribution
PPtr findFirstParton(tPPtr seed) const
Find the parton extracted from the incoming particle after ISR.
virtual bool truncatedSpaceLikeDecayShower(tShowerParticlePtr particle, const ShowerParticle::EvolutionScales &maxScales, Energy minimumMass, HardBranchingPtr branch, ShowerInteraction type, Branching fb)
Truncated shower from a time-like particle.
tKinematicsReconstructorPtr kinematicsReconstructor() const
Access methods to access the objects.
int _hardEmission
Mode for the hard emissions.
virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const
Generate hard emissions for CKKW etc.
SplittingGeneratorPtr _splittingGenerator
Pointer to the splitting generator.
HwDecayerBasePtr _decayme
Decayer.
This class is the main driver of the shower: it is responsible for the proper handling of all other s...
Definition: ShowerHandler.h:40
unsigned int spinCorrelations() const
Access to switches for spin correlations.
ShowerInteraction
Handy header file to be included in all Shower classes.
-*- C++ -*-
vector< tcPDPtr > IdList
Definition of the IdList for branchings.
Definition: ShowerConfig.h:64
vector< ShowerParticlePtr > ShowerParticleVector
A Vector of ShowerParticle pointers.
Definition: ShowerConfig.h:54
multimap< Energy, ShowerTreePtr, std::greater< Energy > > ShowerDecayMap
Typedef for map of ShowerTrees for decays.
Definition: ShowerTree.h:29
ThePEG::Ptr< Particle >::transient_pointer tPPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
pair< tPPtr, tPPtr > tPPair
ThePEG::Ptr< Particle >::pointer PPtr
constexpr ZeroUnit ZERO
Iterator find(IteratorRange< Iterator > r, const T &t)
The branching struct is used to store information on the branching.
Definition: Branching.h:20
Struct to store the evolution scales.