herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
ShowerParticle.h
1 // -*- C++ -*-
2 //
3 // ShowerParticle.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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/Core/SplittingFunctions/SplittingFunction.fh"
17 #include "Herwig/Shower/Core/ShowerConfig.h"
18 #include "ShowerBasis.h"
19 #include "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  Max_Q2(Constants::MaxEnergy2)
108  {}
109 
113  Energy QED;
114 
118  Energy QCD_c;
119 
123  Energy QCD_ac;
124 
128  Energy QED_noAO;
129 
133  Energy QCD_c_noAO;
134 
138  Energy QCD_ac_noAO;
139 
143  Energy2 Max_Q2;
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 
176 public:
177 
181  void setShowerMomentum(bool timelike);
182 
186  void constructSpinInfo(bool timelike);
187 
191  void initializeDecay();
192 
197  void initializeInitialState(PPtr parent);
198 
202  void initializeFinalState();
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 
289  void vetoEmission(ShowerPartnerType type, Energy scale);
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 
375 public:
376 
380  RhoDMatrix extractRhoMatrix(bool forward);
381 
382 protected:
383 
391  bool getMapping(SpinPtr &, RhoDMatrix & map);
392 
393 protected:
394 
398  virtual PPtr clone() const;
399 
403  virtual PPtr fullclone() const;
404 
405 private:
406 
411  static ClassDescription<ShowerParticle> initShowerParticle;
412 
417  ShowerParticle & operator=(const ShowerParticle &) = delete;
418 
419 private:
420 
424  bool _isFinalState;
425 
429  unsigned int _perturbative;
430 
434  bool _initiatesTLS;
435 
439  Parameters _parameters;
440 
444  double _x;
445 
449  ShoKinPtr _showerKinematics;
450 
454  ShowerBasisPtr _showerBasis;
455 
459  EvolutionScales scales_;
460 
464  Energy _vMass;
465 
469  tShowerParticlePtr _partner;
470 
474  const tcPPtr _thePEGBase;
475 
479  tShowerParticlePtr _progenitor;
480 
484  vector<EvolutionPartner> partners_;
485 
486 };
487 
488 inline ostream & operator<<(ostream & os, const ShowerParticle::EvolutionScales & es) {
489  os << "Scales: QED=" << es.QED / GeV
490  << " QCD_c=" << es.QCD_c / GeV
491  << " QCD_ac=" << es.QCD_ac / GeV
492  << " QED_noAO=" << es.QED_noAO / GeV
493  << " QCD_c_noAO=" << es.QCD_c_noAO / GeV
494  << " QCD_ac_noAO=" << es.QCD_ac_noAO / GeV
495  << '\n';
496  return os;
497 }
498 
499 }
500 
501 #include "ThePEG/Utilities/ClassTraits.h"
502 
503 namespace ThePEG {
504 
509 template <>
510 struct BaseClassTrait<Herwig::ShowerParticle,1> {
512  typedef Particle NthBase;
513 };
514 
517 template <>
518 struct ClassTraits<Herwig::ShowerParticle>
519  : public ClassTraitsBase<Herwig::ShowerParticle> {
521  static string className() { return "Herwig::ShowerParticle"; }
523  static TPtr create() { return TPtr::Create(Herwig::ShowerParticle(tcEventPDPtr(),true)); }
524 };
525 
528 }
529 
530 #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.
Energy2 Max_Q2
Maximum allowed virtuality of the particle.
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.
constexpr Energy2 MaxEnergy2
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.