herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
Shower
QTilde
Kinematics
KinematicsReconstructor.h
1
// -*- C++ -*-
2
//
3
// KinematicsReconstructor.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_KinematicsReconstructor_H
10
#define HERWIG_KinematicsReconstructor_H
11
//
12
// This is the declaration of the KinematicsReconstructor class.
13
//
14
15
#include "ThePEG/Interface/Interfaced.h"
16
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
17
#include "Herwig/Shower/QTilde/Base/ShowerProgenitor.h"
18
#include "Herwig/Shower/QTilde/Base/ShowerTree.h"
19
#include "Herwig/Shower/QTilde/Base/HardTree.h"
20
#include "KinematicsReconstructor.fh"
21
#include <cassert>
22
23
namespace
Herwig
{
24
25
using namespace
ThePEG
;
26
32
struct
KinematicsReconstructionVeto
{};
33
34
39
struct
JetKinStruct
{
40
44
tShowerParticlePtr
parent
;
45
49
Lorentz5Momentum
p
;
50
54
Lorentz5Momentum
q
;
55
};
56
60
typedef
vector<JetKinStruct>
JetKinVect
;
61
65
enum
SystemType
{ UNDEFINED=-1, II, IF, F ,I };
66
70
template
<
typename
Value>
struct
ColourSinglet
{
71
72
typedef
vector<ColourSinglet<Value> > VecType;
73
74
ColourSinglet
() : type(UNDEFINED) {}
75
76
ColourSinglet
(
SystemType
intype,Value inpart)
77
: type(intype),jets(1,inpart) {}
78
82
SystemType
type
;
83
87
vector<Value>
jets
;
88
89
};
90
94
typedef
ColourSinglet<ShowerProgenitorPtr>
ColourSingletSystem
;
95
99
typedef
ColourSinglet<HardBranchingPtr>
ColourSingletShower
;
100
126
class
KinematicsReconstructor
:
public
Interfaced
{
127
128
public
:
129
133
KinematicsReconstructor
() : _reconopt(0), _initialBoost(0),
134
_finalStateReconOption(0),
135
_initialStateReconOption(0),
136
_finalFinalWeight(false), _minQ(MeV) {};
137
150
virtual
bool
reconstructHardJets(ShowerTreePtr hard,
151
const
map<tShowerProgenitorPtr,
152
pair<Energy,double> > & pt,
153
ShowerInteraction
type,
154
bool
switchRecon)
const
;
155
164
virtual
bool
reconstructDecayJets(ShowerTreePtr decay,
165
ShowerInteraction
type)
const
;
167
181
virtual
bool
deconstructDecayJets(HardTreePtr,
ShowerInteraction
)
const
;
182
188
virtual
bool
deconstructHardJets(HardTreePtr,
ShowerInteraction
)
const
;
190
191
public
:
192
199
void
persistentOutput(
PersistentOStream
& os)
const
;
200
206
void
persistentInput(
PersistentIStream
& is,
int
version);
208
215
static
void
Init();
216
217
protected
:
218
236
virtual
bool
reconstructTimeLikeJet(
const
tShowerParticlePtr particleJetParent)
const
;
237
246
bool
reconstructSpaceLikeJet(
const
tShowerParticlePtr particleJetParent)
const
;
247
252
bool
reconstructDecayJet(
const
tShowerParticlePtr particleJetParent)
const
;
254
264
void
reconstructInitialFinalSystem(vector<ShowerProgenitorPtr>)
const
;
265
270
void
reconstructFinalStateSystem(
bool
applyBoost,
271
const
LorentzRotation
& toRest,
272
const
LorentzRotation
& fromRest,
273
vector<ShowerProgenitorPtr>)
const
;
274
278
void
reconstructGeneralSystem(vector<ShowerProgenitorPtr> & ShowerHardJets)
const
;
279
284
void
reconstructFinalFirst(vector<ShowerProgenitorPtr> & ShowerHardJets)
const
;
285
290
void
reconstructColourPartner(vector<ShowerProgenitorPtr> & ShowerHardJets)
const
;
291
295
void
reconstructColourSinglets(vector<ShowerProgenitorPtr> & ShowerHardJets,
296
ShowerInteraction
type)
const
;
297
302
void
reconstructInitialInitialSystem(
bool
& applyBoost,
303
LorentzRotation
& toRest,
304
LorentzRotation
& fromRest,
305
vector<ShowerProgenitorPtr>)
const
;
307
317
void
deconstructFinalStateSystem(
const
LorentzRotation
& toRest,
318
const
LorentzRotation
& fromRest,
319
HardTreePtr,
320
vector<HardBranchingPtr>,
321
ShowerInteraction
)
const
;
322
327
void
deconstructInitialInitialSystem(
bool
& applyBoost,
328
LorentzRotation
& toRest,
329
LorentzRotation
& fromRest,
330
HardTreePtr,
331
vector<HardBranchingPtr>,
332
ShowerInteraction
)
const
;
333
338
void
deconstructInitialFinalSystem(HardTreePtr,
339
vector<HardBranchingPtr>,
340
ShowerInteraction
)
const
;
341
342
bool
deconstructGeneralSystem(HardTreePtr,
343
ShowerInteraction
)
const
;
344
345
bool
deconstructColourSinglets(HardTreePtr,
346
ShowerInteraction
)
const
;
347
348
bool
deconstructColourPartner(HardTreePtr,
349
ShowerInteraction
)
const
;
351
356
void
reconstructFinalFinalOffShell(JetKinVect orderedJets, Energy2 s,
357
bool
recursive)
const
;
358
367
LorentzRotation
solveBoost(
const
double
k,
368
const
Lorentz5Momentum & newq,
369
const
Lorentz5Momentum & oldp)
const
;
370
374
LorentzRotation
solveBoost(
const
Lorentz5Momentum & newq,
375
const
Lorentz5Momentum & oldq)
const
;
376
380
LorentzRotation
solveBoostZ(
const
Lorentz5Momentum & newq,
381
const
Lorentz5Momentum & oldq)
const
;
382
389
void
boostChain(
tPPtr
p,
const
LorentzRotation
& bv,
tPPtr
& parent)
const
;
390
399
Boost solveBoostBeta(
const
double
k,
const
Lorentz5Momentum & newq,
400
const
Lorentz5Momentum & oldp);
401
406
double
getBeta
(
const
double
E,
const
double
q,
407
const
double
Ep,
const
double
qp)
const
408
{
return
(q*E-qp*Ep)/(
sqr
(qp)+
sqr
(E));}
410
426
double
solveKfactor(
const
Energy & root_s,
const
JetKinVect & jets )
const
;
427
442
bool
solveDecayKFactor(Energy mb,
443
const
Lorentz5Momentum & n,
444
const
Lorentz5Momentum & pjet,
445
const
JetKinVect & jetKinematics,
446
ShowerParticlePtr partner,
447
Lorentz5Momentum ppartner[2],
448
double
& k1,
449
double
& k2,
450
Lorentz5Momentum & qt)
const
;
451
458
double
inverseRescalingFactor(vector<Lorentz5Momentum> pout,
459
vector<Energy> mon,Energy roots)
const
;
460
471
bool
inverseDecayRescalingFactor(vector<Lorentz5Momentum> pout,
472
vector<Energy> mon,Energy roots,
473
Lorentz5Momentum ppartner, Energy mbar,
474
double
& k1,
double
& k2)
const
;
475
482
Energy momConsEq(
double
k,
const
Energy & root_s,
483
const
JetKinVect & jets)
const
;
484
485
486
void
findInitialBoost(
const
Lorentz5Momentum & pold,
const
Lorentz5Momentum & pnew,
487
LorentzRotation
& toRest,
LorentzRotation
& fromRest)
const
;
489
494
template
<
typename
Value>
void
findPartners(Value branch,set<Value> & done,
495
const
set<Value> & branchings,
496
vector<Value> & jets)
const
;
497
501
bool
addIntrinsicPt(vector<ShowerProgenitorPtr>)
const
;
502
511
void
deepTransform(
PPtr
particle,
const
LorentzRotation
& r,
512
bool
match
=
true
,
PPtr
original=
PPtr
())
const
;
513
517
Energy findMass(HardBranchingPtr)
const
;
518
522
vector<double> initialStateRescaling(
double
x1,
double
x2,
523
const
Lorentz5Momentum & pold,
524
const
vector<Lorentz5Momentum> & p,
525
const
vector<Lorentz5Momentum> & pq,
526
const
vector<Energy>& highespts)
const
;
527
531
vector<double> inverseInitialStateRescaling(
double
& x1,
double
& x2,
532
const
Lorentz5Momentum & pold,
533
const
vector<Lorentz5Momentum> & p,
534
const
vector<Lorentz5Momentum> & pq)
const
;
535
539
template
<
typename
Value >
540
typename
ColourSinglet<Value>::VecType identifySystems(set<Value> jets,
541
unsigned
int
& nnun,
unsigned
int
& nnii,
542
unsigned
int
& nnif,
unsigned
int
& nnf,
543
unsigned
int
& nni)
const
;
544
548
template
<
typename
Value>
549
void
combineFinalState(vector<
ColourSinglet<Value>
> & systems)
const
;
550
551
protected
:
552
559
virtual
IBPtr
clone
()
const
{
return
new_ptr(*
this
);}
560
565
virtual
IBPtr
fullclone
()
const
{
return
new_ptr(*
this
);}
567
568
protected
:
569
577
virtual
void
doinit();
579
580
private
:
581
586
KinematicsReconstructor
& operator=(
const
KinematicsReconstructor
&) =
delete
;
587
588
private
:
589
593
unsigned
int
_reconopt
;
594
598
unsigned
int
_initialBoost
;
599
603
unsigned
int
_finalStateReconOption
;
604
608
unsigned
int
_initialStateReconOption
;
609
613
bool
_finalFinalWeight
;
614
619
Energy
_minQ
;
620
624
mutable
tShowerParticlePtr
_progenitor
;
625
629
mutable
map<tShowerProgenitorPtr,pair<Energy,double> >
_intrinsic
;
630
634
mutable
tShowerTreePtr
_currentTree
;
635
640
PDVector
_noRescaleVector
;
641
646
set<cPDPtr>
_noRescale
;
647
651
mutable
map<tPPtr,vector<LorentzRotation> >
_boosts
;
652
656
mutable
map<tShowerTreePtr,vector<LorentzRotation> >
_treeBoosts
;
657
};
658
659
}
660
661
#endif
/* HERWIG_KinematicsReconstructor_H */
ThePEG::PPtr
ThePEG::Ptr< Particle >::pointer PPtr
Herwig::KinematicsReconstructor
This class is responsible for the kinematical reconstruction after each showering step...
Definition:
KinematicsReconstructor.h:126
ThePEG::PersistentIStream
Herwig::KinematicsReconstructor::_minQ
Energy _minQ
Minimum invariant mass for initial-final dipoles to allow the reconstruction.
Definition:
KinematicsReconstructor.h:619
Herwig::KinematicsReconstructor::_initialBoost
unsigned int _initialBoost
Option for the boost for initial-initial reconstruction.
Definition:
KinematicsReconstructor.h:598
Herwig::ShowerInteraction
ShowerInteraction
Handy header file to be included in all Shower classes.
Definition:
ShowerInteraction.h:23
Herwig::KinematicsReconstructor::_currentTree
tShowerTreePtr _currentTree
Current ShowerTree.
Definition:
KinematicsReconstructor.h:634
ThePEG::PersistentOStream
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::LorentzRotation
Herwig::KinematicsReconstructor::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition:
KinematicsReconstructor.h:565
sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
ThePEG
Herwig::JetKinStruct::q
Lorentz5Momentum q
Momentum of the particle after reconstruction.
Definition:
KinematicsReconstructor.h:54
Herwig::KinematicsReconstructor::_progenitor
tShowerParticlePtr _progenitor
The progenitor of the jet currently being reconstructed.
Definition:
KinematicsReconstructor.h:624
Herwig::ColourSingletSystem
ColourSinglet< ShowerProgenitorPtr > ColourSingletSystem
Struct to store a colour singlet system of particles.
Definition:
KinematicsReconstructor.h:94
Herwig::KinematicsReconstructor::_initialStateReconOption
unsigned int _initialStateReconOption
Option for the initial state reconstruction.
Definition:
KinematicsReconstructor.h:608
Herwig::ColourSinglet::type
SystemType type
The type of system.
Definition:
KinematicsReconstructor.h:82
Herwig::KinematicsReconstructor::_intrinsic
map< tShowerProgenitorPtr, pair< Energy, double > > _intrinsic
Storage of the intrinsic .
Definition:
KinematicsReconstructor.h:629
ThePEG::ColourSinglet
Herwig::JetKinVect
vector< JetKinStruct > JetKinVect
typedef for a vector of JetKinStruct
Definition:
KinematicsReconstructor.h:60
Herwig::ColourSinglet::jets
vector< Value > jets
The jets in the system.
Definition:
KinematicsReconstructor.h:87
ThePEG::tPPtr
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Herwig::KinematicsReconstructor::getBeta
double getBeta(const double E, const double q, const double Ep, const double qp) const
Compute boost parameter along z axis to get (Ep, any perp, qp) from (E, same perp, q).
Definition:
KinematicsReconstructor.h:406
Herwig::JetKinStruct::parent
tShowerParticlePtr parent
Parent particle of the jet.
Definition:
KinematicsReconstructor.h:44
Herwig::KinematicsReconstructor::_noRescaleVector
PDVector _noRescaleVector
Particles which shouldn't have their masses rescaled as vector for the interface. ...
Definition:
KinematicsReconstructor.h:640
ThePEG::Interfaced
Herwig::JetKinStruct
A simple struct to store the information we need on the showering.
Definition:
KinematicsReconstructor.h:39
Herwig::KinematicsReconstructor::_boosts
map< tPPtr, vector< LorentzRotation > > _boosts
Storage of the boosts applied to enable resetting after failure.
Definition:
KinematicsReconstructor.h:651
Herwig::KinematicsReconstructor::_finalFinalWeight
bool _finalFinalWeight
Option for FF kinematic factor.
Definition:
KinematicsReconstructor.h:613
Herwig::KinematicsReconstructor::_noRescale
set< cPDPtr > _noRescale
Particles which shouldn't have their masses rescaled as set for quick access.
Definition:
KinematicsReconstructor.h:646
Herwig::JetKinStruct::p
Lorentz5Momentum p
Momentum of the particle before reconstruction.
Definition:
KinematicsReconstructor.h:49
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG::PDVector
vector< PDPtr > PDVector
Herwig::RandomHelpers::match
matcher< Density > match(const Generator< Density > &gen)
Indicate that the argument density should be matched to the previous one in a piecewise definition...
Definition:
RandomHelpers.h:573
Herwig::SystemType
SystemType
Enum to identify types of colour singlet systems.
Definition:
KinematicsReconstructor.h:65
Herwig::ColourSingletShower
ColourSinglet< HardBranchingPtr > ColourSingletShower
Struct to store a colour singlet shower.
Definition:
KinematicsReconstructor.h:99
Herwig::KinematicsReconstructor::KinematicsReconstructor
KinematicsReconstructor()
Default constructor.
Definition:
KinematicsReconstructor.h:133
Herwig::KinematicsReconstructor::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Definition:
KinematicsReconstructor.h:559
Herwig::KinematicsReconstructor::_reconopt
unsigned int _reconopt
Option for handling the reconstruction.
Definition:
KinematicsReconstructor.h:593
Herwig::KinematicsReconstructor::_finalStateReconOption
unsigned int _finalStateReconOption
Option for the reconstruction of final state systems.
Definition:
KinematicsReconstructor.h:603
Herwig::KinematicsReconstructor::_treeBoosts
map< tShowerTreePtr, vector< LorentzRotation > > _treeBoosts
Storage of the boosts applied to enable resetting after failure.
Definition:
KinematicsReconstructor.h:656
Herwig::KinematicsReconstructionVeto
Exception class used to communicate failure of kinematics reconstruction.
Definition:
KinematicsReconstructor.h:32
Generated on Sat Apr 11 2020 14:50:30 for Herwig by
1.8.13