herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
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
21namespace Herwig {
22
23using namespace ThePEG;
24
29class ShowerProgenitor : public Base {
30
31public:
32
36 enum Reconstructed { notReconstructed=0, done, dontReconstruct};
37
38
42typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
43
44public:
45
54 ShowerProgenitor(PPtr original,PPtr copy, ShowerParticlePtr particle,
55 Energy pT=ZERO,bool emitted=false)
57 _particle(particle), _highestpT(pT),
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::QEDQCD && type!=ShowerInteraction::ALL && type!=ShowerInteraction::UNDEFINED);
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
194
199
200private:
201
206
211
217
221 ShowerParticlePtr _particle;
222
227
231 map<ShowerInteraction,Energy> _maxpT;
232
237
244
249
254
259
260};
261}
262
263#endif /* HERWIG_ShowerProgenitor_H */
A struct to store information on the perturbative particle which initiates a shower.
void maxHardPt(Energy in)
Set the maximum hard , given by the hard process.
Energy maxHardPt() const
Set/Get methods for whether the particle has radiated.
PPtr copy() const
Access to the colour isolated copy.
void copy(PPtr in)
Set the copy.
ShowerProgenitor(PPtr original, PPtr copy, ShowerParticlePtr particle, Energy pT=ZERO, bool emitted=false)
Constructor for the class.
ShowerParticlePtr progenitor() const
Access to the particle.
Energy highestpT() const
Set/Get methods for the hardest so far.
Reconstructed reconstructed() const
Whether or not the recon has been performed.
void hasEmitted(bool in)
Set whether or not this particle has radiated.
void perturbative(bool in)
Whether the particle came from the hard process or was added by the matrix element correction.
PPtr _original
Pointer to the original particle.
bool _perturbative
Whether the particle came from the hard process or was added by the matrix element correction.
bool perturbative() const
Whether the particle came from the hard process or was added by the matrix element correction.
Energy _maxHardPt
maximum hard from the hard process
void highestpT(Energy in)
Set the of the hardest emission so far.
void hardScale(Energy in)
Set the relevant hard scale to be used in profile scales; usually this is taken to be the maximum pt,...
PPtr _copy
Pointer to the colour isolated copy of the original particle.
long id() const
The id of the particle.
Reconstructed _reconstructed
Whether or not the reconstruction has been performed.
tcBeamPtr _beam
The BeamParticleData object.
void progenitor(ShowerParticlePtr in)
Set the particle.
ShowerParticlePtr _particle
Pointer to the ShowerParticle.
PPtr original() const
Access to the original particle.
void maximumpT(Energy in, ShowerInteraction type)
Set the maximum for radiation.
Energy _highestpT
Highest emitted in the shower from this particle.
Energy hardScale() const
Access the relevant hard scale to be used in profile scales; usually this is taken to be the maximum ...
map< ShowerInteraction, Energy > _maxpT
Maximum allowed for emission from this particle.
Ptr< BeamParticleData >::transient_const_pointer tcBeamPtr
Typedef for the BeamParticleData objects.
bool hasEmitted() const
Has this particle radiated.
Energy maximumpT(ShowerInteraction type) const
Set/Get methods for the maximum .
Reconstructed
Enum for the reconstruction state of this progentitor.
void reconstructed(Reconstructed recon)
Whether or not the recon has been performed.
bool _hasEmitted
Has there been radiation.
Energy _hardScale
The relevant hard scale to be used in profile scales; usually this is taken to be the maximum pt,...
tcBeamPtr beam()
The BeamParticleData object.
ShowerInteraction
Handy header file to be included in all Shower classes.
-*- C++ -*-
constexpr Energy MaxEnergy
ThePEG::Ptr< Particle >::pointer PPtr
constexpr ZeroUnit ZERO