herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ShowerProgenitor.h
1 // -*- C++ -*-
2 //
3 // ShowerProgenitor.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_ShowerProgenitor_H
10 #define HERWIG_ShowerProgenitor_H
11 //
12 // This is the declaration of the ShowerProgenitor struct.
13 //
14 
15 #include "ThePEG/Config/ThePEG.h"
16 #include "Herwig/Shower/QTilde/ShowerConfig.h"
17 #include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
18 #include "ShowerProgenitor.fh"
19 #include "ThePEG/PDF/BeamParticleData.h"
20 
21 namespace Herwig {
22 
23 using namespace ThePEG;
24 
29 class ShowerProgenitor : public Base {
30 
31 public:
32 
36  enum Reconstructed { notReconstructed=0, done, dontReconstruct};
37 
38 
42 typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
43 
44 public:
45 
54  ShowerProgenitor(PPtr original,PPtr copy, ShowerParticlePtr particle,
55  Energy pT=ZERO,bool emitted=false)
56  : _original(original), _copy(copy), _perturbative(true),
57  _particle(particle), _highestpT(pT),
58  _maxHardPt(ZERO), _hardScale(ZERO), _hasEmitted(emitted),
59  _reconstructed(notReconstructed) {
60  // get the BeamParticleData object
61  if ( original->parents().empty() ) {
62  _beam=dynamic_ptr_cast<tcBeamPtr>(original->dataPtr());
63  }
64  else {
65  _beam=dynamic_ptr_cast<tcBeamPtr>(original->parents()[0]->dataPtr());
66  }
67  }
68 
72  ShowerParticlePtr progenitor() const { return _particle; }
73 
77  void progenitor(ShowerParticlePtr in) { _particle=in; }
78 
82  PPtr original() const { return _original; }
83 
87  PPtr copy() const { return _copy; }
88 
92  void copy(PPtr in) { _copy=in; }
93 
98  bool perturbative() const { return _perturbative; }
99 
104  void perturbative(bool in) { _perturbative=in; }
105 
113  Energy highestpT() const { return _highestpT; }
114 
118  void highestpT(Energy in) { _highestpT=in; }
120 
128  Energy maximumpT(ShowerInteraction type) const {
129  assert(type!=ShowerInteraction::Both);
130  map<ShowerInteraction,Energy>::const_iterator it = _maxpT.find(type);
131  return it !=_maxpT.end() ? it->second : Constants::MaxEnergy;
132  }
133 
137  void maximumpT(Energy in,ShowerInteraction type) {
138  _maxpT[type]=in; }
140 
148  Energy maxHardPt() const { return _maxHardPt; }
149 
153  void maxHardPt(Energy in) { _maxHardPt = in; }
154 
160  Energy hardScale() const { return _hardScale; }
161 
167  void hardScale(Energy in) { _hardScale = in; }
168 
172  bool hasEmitted() const { return _hasEmitted; }
173 
177  void hasEmitted(bool in) { _hasEmitted=in; }
179 
183  long id() const { return _particle->id(); }
184 
188  tcBeamPtr beam() { return _beam; }
189 
193  Reconstructed reconstructed() const {return _reconstructed;}
194 
198  void reconstructed(Reconstructed recon) {_reconstructed = recon;}
199 
200 private:
201 
206 
211 
217 
221  ShowerParticlePtr _particle;
222 
226  Energy _highestpT;
227 
231  map<ShowerInteraction,Energy> _maxpT;
232 
236  Energy _maxHardPt;
237 
243  Energy _hardScale;
244 
249 
253  tcBeamPtr _beam;
254 
259 
260 };
261 }
262 
263 #endif /* HERWIG_ShowerProgenitor_H */
ThePEG::Ptr< Particle >::pointer PPtr
PPtr _original
Pointer to the original particle.
ShowerProgenitor(PPtr original, PPtr copy, ShowerParticlePtr particle, Energy pT=ZERO, bool emitted=false)
Constructor for the class.
ShowerInteraction
Handy header file to be included in all Shower classes.
bool _hasEmitted
Has there been radiation.
PPtr copy() const
Access to the colour isolated copy.
Energy _highestpT
Highest emitted in the shower from this particle.
void highestpT(Energy in)
Set the of the hardest emission so far.
Energy maxHardPt() const
Set/Get methods for whether the particle has radiated.
Reconstructed reconstructed() const
Whether or not the recon has been performed.
Energy maximumpT(ShowerInteraction type) const
Set/Get methods for the maximum .
void copy(PPtr in)
Set the copy.
ShowerParticlePtr _particle
Pointer to the ShowerParticle.
map< ShowerInteraction, Energy > _maxpT
Maximum allowed for emission from this particle.
PPtr original() const
Access to the original particle.
tcBeamPtr _beam
The BeamParticleData object.
bool perturbative() const
Whether the particle came from the hard process or was added by the matrix element correction...
ShowerParticlePtr progenitor() const
Access to the particle.
PPtr _copy
Pointer to the colour isolated copy of the original particle.
tcBeamPtr beam()
The BeamParticleData object.
Reconstructed _reconstructed
Whether or not the reconstruction has been performed.
long id() const
The id of the particle.
Energy hardScale() const
Access the relevant hard scale to be used in profile scales; usually this is taken to be the maximum ...
void hasEmitted(bool in)
Set whether or not this particle has radiated.
Energy _maxHardPt
maximum hard from the hard process
void perturbative(bool in)
Whether the particle came from the hard process or was added by the matrix element correction...
void hardScale(Energy in)
Set the relevant hard scale to be used in profile scales; usually this is taken to be the maximum pt...
void maxHardPt(Energy in)
Set the maximum hard , given by the hard process.
-*- C++ -*-
Energy _hardScale
The relevant hard scale to be used in profile scales; usually this is taken to be the maximum pt...
Ptr< BeamParticleData >::transient_const_pointer tcBeamPtr
Typedef for the BeamParticleData objects.
void maximumpT(Energy in, ShowerInteraction type)
Set the maximum for radiation.
Energy highestpT() const
Set/Get methods for the hardest so far.
void reconstructed(Reconstructed recon)
Whether or not the recon has been performed.
void progenitor(ShowerParticlePtr in)
Set the particle.
bool hasEmitted() const
Has this particle radiated.
constexpr ZeroUnit ZERO
bool _perturbative
Whether the particle came from the hard process or was added by the matrix element correction...
Reconstructed
Enum for the reconstruction state of this progentitor.
A struct to store information on the perturbative particle which initiates a shower.