ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
Pythia8_i
src
UserResonances
ResonanceLQ.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// The ResonanceLQ class modifies the default Pythia8 setup
6
// to allow leptoquarks to decay to top quarks
7
// This is a copy of existing pythia ResonanceLeptoquark class
8
//
9
// author Katharine Leney
10
// based on ResonanceExcitedCI (Olya Igonkina and James Monk)
11
12
#include "
Pythia8_i/UserResonanceFactory.h
"
13
#include "Pythia8/ParticleData.h"
14
15
namespace
Pythia8
{
16
class
ResonanceLQ
;
17
}
18
19
Pythia8_UserResonance::UserResonanceFactory::Creator<Pythia8::ResonanceLQ>
resonanceLeptoquarkCreator
(
"LQ"
);
20
21
namespace
Pythia8
{
22
23
class
ResonanceLQ
:
public
ResonanceWidths {
24
25
public
:
26
27
// Constructor.
28
ResonanceLQ
(
int
idResIn):
29
m_kCoup
(0.)
30
{
31
initBasic(idResIn);
32
std::cout <<
" ResonanceLQ constructor\n"
;
33
}
34
35
private
:
36
37
void
initConstants
() {
38
39
// Locally stored properties and couplings.
40
m_kCoup
= settingsPtr->parm(
"LeptoQuark:kCoup"
);
41
42
// make a copy of shared pointer before usage (starting Py8.307 particlePtr is of a type std::weak_ptr<Pythia8::ParticleDataEntry>
43
#if PYTHIA_VERSION_INTEGER >= 8307
44
ParticleDataEntryPtr
particleSPtr = particlePtr.lock();
45
#else
46
ParticleDataEntry* particleSPtr = particlePtr;
47
#endif
48
49
// Check that flavour info in decay channel is correctly set.
50
int
id1Now = particleSPtr->channel(0).product(0);
51
int
id2Now = particleSPtr->channel(0).product(1);
52
53
// ============================================================
54
// Modify standard Pythia8 setup to allow decays to top quarks
55
// ============================================================
56
57
if
(id1Now < 1 || id1Now > 6) {
58
std::cout <<
"ERROR in ResonanceLQ::init: unallowed input quark flavour reset to u"
<< std::endl;
59
id1Now = 2;
60
particleSPtr->channel(0).product(0, id1Now);
61
}
62
if
(std::abs(id2Now) < 11 || std::abs(id2Now) > 16) {
63
std::cout <<
"ERROR in ResonanceLQ::init:unallowed input lepton flavour reset to e-"
<< std::endl;
64
id2Now = 11;
65
particleSPtr->channel(0).product(1, id2Now);
66
}
67
68
// Set/overwrite charge and name of particle.
69
bool
changed = particleSPtr->hasChanged();
70
71
int
chargeLQ = particleDataPtr->chargeType(id1Now)
72
+ particleDataPtr->chargeType(id2Now);
73
74
particleSPtr->setChargeType(chargeLQ);
75
76
std::string nameLQ =
"LQ_"
+ particleDataPtr->name(id1Now) +
","
77
+ particleDataPtr->name(id2Now);
78
79
particleSPtr->setNames(nameLQ, nameLQ +
"bar"
);
80
if
(!changed) particleSPtr->setHasChanged(
false
);
81
82
return
;
83
}
84
85
//--------------------------------------------------------------------------
86
87
// Calculate various common prefactors for the current mass.
88
89
void
calcPreFac
(
bool
) {
90
91
#ifdef PYTHIA_VERSION_INTEGER
92
#if PYTHIA_VERSION_INTEGER > 8300
93
CoupSM* couplingsPtr = infoPtr->coupSMPtr;
94
#endif
95
#endif
96
alpEM = couplingsPtr->alphaEM(mHat * mHat);
97
preFac = 0.25 * alpEM *
m_kCoup
* mHat;
98
99
return
;
100
}
101
102
//--------------------------------------------------------------------------
103
104
// Calculate width for currently considered channel.
105
106
void
calcWidth
(
bool
) {
107
108
// Check that above threshold.
109
if
(ps == 0.)
return
;
110
111
// Width into lepton plus quark.
112
if
(id1Abs > 10 && id1Abs < 17 && id2Abs < 7) widNow = preFac * pow3(ps);
113
return
;
114
}
115
116
// Locally stored properties and couplings.
117
//double m_lambda, m_coupF, m_coupFprime, m_coupFcol, m_sin2tW, m_cos2tW;
118
double
m_kCoup
;
119
};
120
}
ParticleDataEntryPtr
Pythia8::ParticleDataEntry * ParticleDataEntryPtr
Definition
EvtPythiaEngine.cxx:41
resonanceLeptoquarkCreator
Pythia8_UserResonance::UserResonanceFactory::Creator< Pythia8::ResonanceLQ > resonanceLeptoquarkCreator("LQ")
UserResonanceFactory.h
Pythia8::ResonanceLQ
Definition
ResonanceLQ.cxx:23
Pythia8::ResonanceLQ::initConstants
void initConstants()
Definition
ResonanceLQ.cxx:37
Pythia8::ResonanceLQ::m_kCoup
double m_kCoup
Definition
ResonanceLQ.cxx:118
Pythia8::ResonanceLQ::ResonanceLQ
ResonanceLQ(int idResIn)
Definition
ResonanceLQ.cxx:28
Pythia8::ResonanceLQ::calcPreFac
void calcPreFac(bool)
Definition
ResonanceLQ.cxx:89
Pythia8::ResonanceLQ::calcWidth
void calcWidth(bool)
Definition
ResonanceLQ.cxx:106
Pythia8_UserResonance::UserResonanceFactory::Creator
Definition
UserResonanceFactory.h:42
Pythia8
Author: James Monk (jmonk@cern.ch).
Definition
IPythia8Custom.h:10
Generated on
for ATLAS Offline Software by
1.17.0