herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
23 namespace Herwig {
24 
25 using namespace ThePEG;
26 
60 class ShowerParticle: public Particle {
61 
62 public:
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 
105  EvolutionScales() : QED(),QCD_c(),QCD_ac(),
106  QED_noAO(),QCD_c_noAO(),QCD_ac_noAO()
107  {}
108 
112  Energy QED;
113 
117  Energy QCD_c;
118 
122  Energy QCD_ac;
123 
127  Energy QED_noAO;
128 
132  Energy QCD_c_noAO;
133 
137  Energy QCD_ac_noAO;
138 
139  };
140 
141 
144 
153  ShowerParticle(tcEventPDPtr x, bool fs, bool tls=false)
154  : Particle(x), _isFinalState(fs),
155  _perturbative(0), _initiatesTLS(tls), _x(1.0), _showerKinematics(),
156  _vMass(ZERO), _thePEGBase() {}
157 
165  ShowerParticle(const Particle & x, unsigned int pert, bool fs, bool tls=false)
166  : Particle(x), _isFinalState(fs),
167  _perturbative(pert), _initiatesTLS(tls), _x(1.0), _showerKinematics(),
168  _vMass(ZERO), _thePEGBase(&x) {}
170 
171 public:
172 
176  void setShowerMomentum(bool timelike);
177 
181  void constructSpinInfo(bool timelike);
182 
186  void initializeDecay();
187 
192  void initializeInitialState(PPtr parent);
193 
197  void initializeFinalState();
198 
207  bool isFinalState() const { return _isFinalState; }
208 
213  bool initiatesTLS() const { return _initiatesTLS; }
214 
220  unsigned int perturbative() const { return _perturbative; }
222 
230  void x(double x) { _x = x; }
231 
235  double x() const { return _x; }
237 
245  const ShoKinPtr & showerKinematics() const { return _showerKinematics; }
246 
247 
251  void showerKinematics(const ShoKinPtr in) { _showerKinematics = in; }
253 
261  const ShowerBasisPtr & showerBasis() const { return _showerBasis; }
262 
263 
267  void showerBasis(const ShowerBasisPtr in, bool copy) {
268  if(!copy)
269  _showerBasis = in;
270  else {
271  _showerBasis = new_ptr(ShowerBasis());
272  _showerBasis->setBasis(in->pVector(),in->nVector(),in->frame());
273  }
274  }
276 
284  void vetoEmission(ShowerPartnerType type, Energy scale);
285 
289  const EvolutionScales & scales() const {return scales_;}
290 
294  EvolutionScales & scales() {return scales_;}
295 
299  Energy virtualMass() const { return _vMass; }
300 
304  void virtualMass(Energy mass) { _vMass = mass; }
305 
309  tShowerParticlePtr partner() const { return _partner; }
310 
314  void partner(const tShowerParticlePtr partner) { _partner = partner; }
315 
319  vector<EvolutionPartner> & partners() { return partners_; }
320 
324  void addPartner(EvolutionPartner in );
325 
329  void clearPartners() { partners_.clear(); }
330 
334  tShowerParticlePtr progenitor() const { return _progenitor; }
335 
339  void progenitor(const tShowerParticlePtr progenitor) { _progenitor = progenitor; }
341 
342 
348  struct Parameters {
349  Parameters() : alpha(1.), beta(), ptx(), pty(), pt() {}
350  double alpha;
351  double beta;
352  Energy ptx;
353  Energy pty;
354  Energy pt;
355  };
356 
357 
361  Parameters & showerParameters() { return _parameters; }
363 
368  const tcPPtr thePEGBase() const { return _thePEGBase; }
369 
370 public:
371 
375  RhoDMatrix extractRhoMatrix(bool forward);
376 
384  bool getMapping(SpinPtr &, RhoDMatrix & map);
385 
386 protected:
387 
391  virtual PPtr clone() const;
392 
396  virtual PPtr fullclone() const;
397 
398 private:
399 
404  static ClassDescription<ShowerParticle> initShowerParticle;
405 
410  ShowerParticle & operator=(const ShowerParticle &) = delete;
411 
412 private:
413 
417  bool _isFinalState;
418 
422  unsigned int _perturbative;
423 
427  bool _initiatesTLS;
428 
432  Parameters _parameters;
433 
437  double _x;
438 
442  ShoKinPtr _showerKinematics;
443 
447  ShowerBasisPtr _showerBasis;
448 
452  EvolutionScales scales_;
453 
457  Energy _vMass;
458 
462  tShowerParticlePtr _partner;
463 
467  const tcPPtr _thePEGBase;
468 
472  tShowerParticlePtr _progenitor;
473 
477  vector<EvolutionPartner> partners_;
478 
479 };
480 
481 inline ostream & operator<<(ostream & os, const ShowerParticle::EvolutionScales & es) {
482  os << "Scales: QED=" << es.QED / GeV
483  << " QCD_c=" << es.QCD_c / GeV
484  << " QCD_ac=" << es.QCD_ac / GeV
485  << " QED_noAO=" << es.QED_noAO / GeV
486  << " QCD_c_noAO=" << es.QCD_c_noAO / GeV
487  << " QCD_ac_noAO=" << es.QCD_ac_noAO / GeV
488  << '\n';
489  return os;
490 }
491 
492 }
493 
494 #include "ThePEG/Utilities/ClassTraits.h"
495 
496 namespace ThePEG {
497 
502 template <>
503 struct BaseClassTrait<Herwig::ShowerParticle,1> {
505  typedef Particle NthBase;
506 };
507 
510 template <>
511 struct ClassTraits<Herwig::ShowerParticle>
512  : public ClassTraitsBase<Herwig::ShowerParticle> {
514  static string className() { return "Herwig::ShowerParticle"; }
516  static TPtr create() { return TPtr::Create(Herwig::ShowerParticle(tcEventPDPtr(),true)); }
517 };
518 
521 }
522 
523 #endif /* HERWIG_ShowerParticle_H */
Energy QCD_ac_noAO
QCD anticolour scale.
ThePEG::Ptr< Particle >::pointer PPtr
EvolutionScales & scales()
Access to the evolution scales.
ShowerPartnerType
Enum for the type of shower partner.
The ShowerBasis class stores the basis vectors used by the shower.
Definition: ShowerBasis.h:21
const ShowerBasisPtr & showerBasis() const
Set/Get methods for the ShowerBasis objects.
tShowerParticlePtr partner
The partner.
const ShoKinPtr & showerKinematics() const
Set/Get methods for the ShowerKinematics objects.
Energy scale
The assoicated evolution scale.
EvolutionPartner(tShowerParticlePtr p, double w, ShowerPartnerType t, Energy s)
Constructor.
void showerBasis(const ShowerBasisPtr in, bool copy)
Set the ShowerBasis object.
unsigned int perturbative() const
Access the flag which tells us where the particle came from This is 0 for a particle produced in the ...
Struct for all the info on an evolution partner.
ostream & operator<<(ostream &, const DecayIntegrator &)
Output information on the DecayIntegrator for debugging purposes.
ShowerParticle(const Particle &x, unsigned int pert, bool fs, bool tls=false)
Copy constructor from a ThePEG Particle.
ThePEG::Ptr< Particle >::transient_const_pointer tcPPtr
ShowerParticle(tcEventPDPtr x, bool fs, bool tls=false)
Standard Constructor.
This class represents a particle in the showering process.
ThePEG::Ptr< SpinInfo >::pointer SpinPtr
const EvolutionScales & scales() const
Access to the evolution scales.
void x(double x)
Set/Get the momentum fraction for initial-state particles.
bool isFinalState() const
Access/Set various flags about the state of the particle.
-*- C++ -*-
bool initiatesTLS() const
Access the flag that tells if the particle is initiating a time like shower when it has been emitted ...
void showerKinematics(const ShoKinPtr in)
Set the ShowerKinematics object.
double x() const
For an initial state particle set the fraction of the beam momentum.
Ptr< ParticleDataClass >::transient_const_pointer tcEventPDPtr
constexpr ZeroUnit ZERO
Struct to store the evolution scales.
Energy QCD_ac
QCD anticolour scale.