herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Shower
Dipole
Utility
ConstituentReshuffler.h
1
// -*- C++ -*-
2
//
3
// ConstituentReshuffler.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_ConstituentReshuffler_H
10
#define HERWIG_ConstituentReshuffler_H
11
//
12
// This is the declaration of the ConstituentReshuffler class.
13
//
14
15
#include "ThePEG/Handlers/HandlerBase.h"
16
#include "ThePEG/Utilities/Exception.h"
17
#include "Herwig/Shower/PerturbativeProcess.h"
18
#include "Herwig/Utilities/Reshuffler.h"
19
20
namespace
Herwig
{
21
22
using namespace
ThePEG
;
23
33
class
ConstituentReshuffler
:
public
HandlerBase
,
public
Reshuffler
{
34
35
public
:
36
45
void
reshuffle
(
PList
& out,
46
PPair
& in,
47
PList
& intermediates,
48
const
bool
decay,
49
PList
& decayPartons,
50
PList
& decayRecoilers);
51
60
void
reshuffle
(
PList
& out,
61
PPair
& in,
62
PList
& intermediates,
63
const
bool
decay=
false
) {
64
65
PList
decayPartons;
66
PList
decayRecoilers;
67
68
reshuffle
(out,
69
in,
70
intermediates,
71
decay,
72
decayPartons,
73
decayRecoilers);
74
}
75
76
85
void
hardProcDecayReshuffle
(
PList
& decaying,
86
PList
& eventOutgoing,
87
PList
& eventHard,
88
PPair
& eventIncoming,
89
PList
& eventIntermediates) ;
90
98
void
decayReshuffle
(PerturbativeProcessPtr& decayProc,
99
PList
& eventOutgoing,
100
PList
& eventHard,
101
PList
& eventIntermediates) ;
102
107
void
updateEvent
(
PList
& intermediates,
108
PList
& eventIntermediates,
109
PList
& out,
110
PList
& eventOutgoing,
111
PList
& eventHard,
112
PerturbativeProcessPtr decayProc = PerturbativeProcessPtr() ) ;
113
114
120
void
updateSpinInfo
(
PPtr
& oldPart,
121
PPtr
& newPart ) ;
122
123
protected
:
124
130
struct
DecayReshuffleEquation
{
131
132
DecayReshuffleEquation
(Energy q,
133
PList::iterator m_begin,
134
PList::iterator m_end,
135
PList::iterator n_begin,
136
PList::iterator n_end)
137
: w(q), p_begin(m_begin), p_end(m_end), r_begin(n_begin), r_end(n_end) {}
138
139
typedef
double
ArgType;
140
typedef
double
ValType;
141
142
static
double
aUnit() {
return
1.; }
143
static
double
vUnit() {
return
1.; }
144
145
Energy w;
146
147
PList::iterator p_begin;
148
PList::iterator p_end;
149
150
PList::iterator r_begin;
151
PList::iterator r_end;
152
153
double
operator() (
double
xi)
const
{
154
155
double
r = - w/GeV;
156
157
for
(PList::iterator pIt = p_begin; pIt != p_end; ++pIt) {
158
r +=
sqrt
(
sqr
((**pIt).dataPtr()->constituentMass()) +
159
xi*xi*(
sqr
((**pIt).momentum().t())-
sqr
((**pIt).dataPtr()->mass()))) / GeV;
160
}
161
162
for
(PList::iterator rIt = r_begin; rIt != r_end; ++rIt) {
163
r +=
sqrt
(
sqr
((**rIt).momentum().m()) +
164
xi*xi*(
sqr
((**rIt).momentum().t())-
sqr
((**rIt).momentum().m()))) / GeV;
165
}
166
167
return
r;
168
}
169
170
};
171
172
173
174
public
:
175
182
void
persistentOutput
(
PersistentOStream
& os)
const
;
183
189
void
persistentInput
(
PersistentIStream
& is,
int
version);
191
198
static
void
Init
();
199
200
protected
:
201
208
virtual
IBPtr
clone
()
const
;
209
214
virtual
IBPtr
fullclone
()
const
;
216
217
218
// If needed, insert declarations of virtual function defined in the
219
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
220
221
222
private
:
223
228
static
ClassDescription<ConstituentReshuffler>
initConstituentReshuffler
;
229
234
ConstituentReshuffler
&
operator=
(
const
ConstituentReshuffler
&) =
delete
;
235
236
};
237
238
}
239
240
#include "ThePEG/Utilities/ClassTraits.h"
241
242
namespace
ThePEG
{
243
248
template
<>
249
struct
BaseClassTrait
<
Herwig
::ConstituentReshuffler,1> {
251
typedef
HandlerBase
NthBase
;
252
};
253
256
template
<>
257
struct
ClassTraits
<
Herwig
::ConstituentReshuffler>
258
:
public
ClassTraitsBase
<Herwig::ConstituentReshuffler> {
260
static
string
className
() {
return
"Herwig::ConstituentReshuffler"
; }
268
static
string
library
() {
return
"HwDipoleShower.so"
; }
269
};
270
273
}
274
275
#endif
/* HERWIG_ConstituentReshuffler_H */
Herwig::ConstituentReshuffler
The ConstituentReshuffler class implements reshuffling of partons on their nominal mass shell to thei...
Definition:
ConstituentReshuffler.h:33
Herwig::ConstituentReshuffler::reshuffle
void reshuffle(PList &out, PPair &in, PList &intermediates, const bool decay=false)
Reshuffle the outgoing partons to constituent masses.
Definition:
ConstituentReshuffler.h:60
Herwig::ConstituentReshuffler::operator=
ConstituentReshuffler & operator=(const ConstituentReshuffler &)=delete
The assignment operator is private and must never be called.
Herwig::ConstituentReshuffler::initConstituentReshuffler
static ClassDescription< ConstituentReshuffler > initConstituentReshuffler
The static object used to initialize the description of this class.
Definition:
ConstituentReshuffler.h:228
Herwig::ConstituentReshuffler::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::ConstituentReshuffler::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::ConstituentReshuffler::updateEvent
void updateEvent(PList &intermediates, PList &eventIntermediates, PList &out, PList &eventOutgoing, PList &eventHard, PerturbativeProcessPtr decayProc=PerturbativeProcessPtr())
Update the dipole event record and, if appropriate, the relevant decay process.
Herwig::ConstituentReshuffler::reshuffle
void reshuffle(PList &out, PPair &in, PList &intermediates, const bool decay, PList &decayPartons, PList &decayRecoilers)
Reshuffle the outgoing partons to constituent masses.
Herwig::ConstituentReshuffler::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::ConstituentReshuffler::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::ConstituentReshuffler::hardProcDecayReshuffle
void hardProcDecayReshuffle(PList &decaying, PList &eventOutgoing, PList &eventHard, PPair &eventIncoming, PList &eventIntermediates)
Reshuffle the outgoing partons following the showering of the initial hard interaction to constituent...
Herwig::ConstituentReshuffler::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::ConstituentReshuffler::updateSpinInfo
void updateSpinInfo(PPtr &oldPart, PPtr &newPart)
Update the spinInfo of a particle following reshuffling to take account of the change in momentum.
Herwig::ConstituentReshuffler::decayReshuffle
void decayReshuffle(PerturbativeProcessPtr &decayProc, PList &eventOutgoing, PList &eventHard, PList &eventIntermediates)
Reshuffle the outgoing partons following the showering of a particle decay to constituent masses.
Herwig::Reshuffler
The Reshuffler class implements reshuffling of partons on their nominal mass shell to their constitue...
Definition:
Reshuffler.h:29
ThePEG::ClassDescription
ThePEG::HandlerBase
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::PPair
pair< PPtr, PPtr > PPair
ThePEG::sqrt
double sqrt(int x)
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::PPtr
ThePEG::Ptr< Particle >::pointer PPtr
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
ThePEG::PList
list< PPtr > PList
Herwig::ConstituentReshuffler::DecayReshuffleEquation
The function object defining the equation to be solved in the case of separate recoilers TODO - refin...
Definition:
ConstituentReshuffler.h:130
ThePEG::BaseClassTrait
ThePEG::BaseClassTrait::NthBase
int NthBase
ThePEG::ClassTraitsBase
ThePEG::ClassTraitsBase::className
static string className()
ThePEG::ClassTraitsBase::library
static string library()
ThePEG::ClassTraits
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6