herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ShowerParticle.h
1// -*- C++ -*-
2//
3// ShowerParticle.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_ShowerParticle_H
10#define HERWIG_ShowerParticle_H
11//
12// This is the declaration of the ShowerParticle class.
13//
14
15#include "ThePEG/EventRecord/Particle.h"
16#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.fh"
17#include "Herwig/Shower/QTilde/ShowerConfig.h"
18#include "Herwig/Shower/QTilde/Kinematics/ShowerBasis.h"
19#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.h"
20#include "ShowerParticle.fh"
21#include <iosfwd>
22
23namespace Herwig {
24
25using namespace ThePEG;
26
60class ShowerParticle: public Particle {
61
62public:
63
68
72 EvolutionPartner(tShowerParticlePtr p,double w, ShowerPartnerType t,
73 Energy s) : partner(p), weight(w), type(t), scale(s)
74 {}
75
79 tShowerParticlePtr partner;
80
84 double weight;
85
90
94 Energy scale;
95 };
96
101
107 {}
108
112 Energy QED;
113
117 Energy QCD_c;
118
122 Energy QCD_ac;
123
127 Energy QED_noAO;
128
133
138
142 Energy EW;
143
144 };
145
146
149
158 ShowerParticle(tcEventPDPtr x, bool fs, bool tls=false)
159 : Particle(x), _isFinalState(fs),
160 _perturbative(0), _initiatesTLS(tls), _x(1.0), _showerKinematics(),
161 _vMass(ZERO), _thePEGBase() {}
162
170 ShowerParticle(const Particle & x, unsigned int pert, bool fs, bool tls=false)
171 : Particle(x), _isFinalState(fs),
172 _perturbative(pert), _initiatesTLS(tls), _x(1.0), _showerKinematics(),
173 _vMass(ZERO), _thePEGBase(&x) {}
175
176public:
177
181 void setShowerMomentum(bool timelike);
182
186 void constructSpinInfo(bool timelike);
187
192
198
203
212 bool isFinalState() const { return _isFinalState; }
213
218 bool initiatesTLS() const { return _initiatesTLS; }
219
225 unsigned int perturbative() const { return _perturbative; }
227
235 void x(double x) { _x = x; }
236
240 double x() const { return _x; }
242
250 const ShoKinPtr & showerKinematics() const { return _showerKinematics; }
251
252
256 void showerKinematics(const ShoKinPtr in) { _showerKinematics = in; }
258
266 const ShowerBasisPtr & showerBasis() const { return _showerBasis; }
267
268
272 void showerBasis(const ShowerBasisPtr in, bool copy) {
273 if(!copy)
274 _showerBasis = in;
275 else {
276 _showerBasis = new_ptr(ShowerBasis());
277 _showerBasis->setBasis(in->pVector(),in->nVector(),in->frame());
278 }
279 }
281
290
294 const EvolutionScales & scales() const {return scales_;}
295
299 EvolutionScales & scales() {return scales_;}
300
304 Energy virtualMass() const { return _vMass; }
305
309 void virtualMass(Energy mass) { _vMass = mass; }
310
314 tShowerParticlePtr partner() const { return _partner; }
315
319 void partner(const tShowerParticlePtr partner) { _partner = partner; }
320
324 vector<EvolutionPartner> & partners() { return partners_; }
325
329 void addPartner(EvolutionPartner in );
330
334 void clearPartners() { partners_.clear(); }
335
339 tShowerParticlePtr progenitor() const { return _progenitor; }
340
344 void progenitor(const tShowerParticlePtr progenitor) { _progenitor = progenitor; }
346
347
353 struct Parameters {
354 Parameters() : alpha(1.), beta(), ptx(), pty(), pt() {}
355 double alpha;
356 double beta;
357 Energy ptx;
358 Energy pty;
359 Energy pt;
360 };
361
362
366 Parameters & showerParameters() { return _parameters; }
368
373 const tcPPtr thePEGBase() const { return _thePEGBase; }
374
375public:
376
380 RhoDMatrix extractRhoMatrix(bool forward);
381
389 bool getMapping(SpinPtr &, RhoDMatrix & map);
390
391protected:
392
396 virtual PPtr clone() const;
397
401 virtual PPtr fullclone() const;
402
403private:
404
409 static ClassDescription<ShowerParticle> initShowerParticle;
410
415 ShowerParticle & operator=(const ShowerParticle &) = delete;
416
417private:
418
422 bool _isFinalState;
423
427 unsigned int _perturbative;
428
432 bool _initiatesTLS;
433
437 Parameters _parameters;
438
442 double _x;
443
447 ShoKinPtr _showerKinematics;
448
452 ShowerBasisPtr _showerBasis;
453
457 EvolutionScales scales_;
458
462 Energy _vMass;
463
467 tShowerParticlePtr _partner;
468
472 const tcPPtr _thePEGBase;
473
477 tShowerParticlePtr _progenitor;
478
482 vector<EvolutionPartner> partners_;
483
484};
485
486inline ostream & operator<<(ostream & os, const ShowerParticle::EvolutionScales & es) {
487 os << "Scales: QED=" << es.QED / GeV
488 << " QCD_c=" << es.QCD_c / GeV
489 << " QCD_ac=" << es.QCD_ac / GeV
490 << " EW=" << es.EW / GeV
491 << " QED_noAO=" << es.QED_noAO / GeV
492 << " QCD_c_noAO=" << es.QCD_c_noAO / GeV
493 << " QCD_ac_noAO=" << es.QCD_ac_noAO / GeV
494 << '\n';
495 return os;
496}
497
498}
499
500#include "ThePEG/Utilities/ClassTraits.h"
501
502namespace ThePEG {
503
508template <>
509struct BaseClassTrait<Herwig::ShowerParticle,1> {
511 typedef Particle NthBase;
512};
513
516template <>
517struct ClassTraits<Herwig::ShowerParticle>
518 : public ClassTraitsBase<Herwig::ShowerParticle> {
520 static string className() { return "Herwig::ShowerParticle"; }
522 static TPtr create() { return TPtr::Create(Herwig::ShowerParticle(tcEventPDPtr(),true)); }
523};
524
527}
528
529#endif /* HERWIG_ShowerParticle_H */
The ShowerBasis class stores the basis vectors used by the shower.
This class represents a particle in the showering process.
EvolutionScales & scales()
Access to the evolution scales.
bool initiatesTLS() const
Access the flag that tells if the particle is initiating a time like shower when it has been emitted ...
void initializeDecay()
Perform any initial calculations needed after the branching has been selected.
void vetoEmission(ShowerPartnerType type, Energy scale)
Members relating to the initial evolution scale and partner for the particle.
const ShoKinPtr & showerKinematics() const
Set/Get methods for the ShowerKinematics objects.
void x(double x)
Set/Get the momentum fraction for initial-state particles.
unsigned int perturbative() const
Access the flag which tells us where the particle came from This is 0 for a particle produced in the ...
const EvolutionScales & scales() const
Access to the evolution scales.
void showerBasis(const ShowerBasisPtr in, bool copy)
Set the ShowerBasis object.
void initializeFinalState()
Perform any initial calculations needed after the branching has been selected.
bool isFinalState() const
Access/Set various flags about the state of the particle.
ShowerParticle(tcEventPDPtr x, bool fs, bool tls=false)
Standard Constructor.
void initializeInitialState(PPtr parent)
Perform any initial calculations needed after the branching has been selected.
ShowerParticle(const Particle &x, unsigned int pert, bool fs, bool tls=false)
Copy constructor from a ThePEG Particle.
void setShowerMomentum(bool timelike)
Set a preliminary momentum for the particle.
void showerKinematics(const ShoKinPtr in)
Set the ShowerKinematics object.
double x() const
For an initial state particle set the fraction of the beam momentum.
const ShowerBasisPtr & showerBasis() const
Set/Get methods for the ShowerBasis objects.
void constructSpinInfo(bool timelike)
Construct the spin info object for a shower particle.
Particle & operator=(const Particle &)=delete
virtual PPtr clone() const
Energy mass() const
Energy2 scale() const
-*- C++ -*-
ShowerPartnerType
Enum for the type of shower partner.
Qty< 0, 1, 0 > Energy
ThePEG::Ptr< SpinInfo >::pointer SpinPtr
ThePEG::Ptr< Particle >::transient_const_pointer tcPPtr
ThePEG::Ptr< Particle >::pointer PPtr
constexpr ZeroUnit ZERO
ostream & operator<<(ostream &, const Collision &)
Ptr< ParticleDataClass >::transient_const_pointer tcEventPDPtr
Struct for all the info on an evolution partner.
EvolutionPartner(tShowerParticlePtr p, double w, ShowerPartnerType t, Energy s)
Constructor.
tShowerParticlePtr partner
The partner.
Energy scale
The assoicated evolution scale.
Struct to store the evolution scales.
Energy QCD_ac
QCD anticolour scale.
Energy QCD_ac_noAO
QCD anticolour scale.
static string className()
ThePEG::Ptr< T >::pointer TPtr