ATLAS Offline Software
Loading...
Searching...
No Matches
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
13#include "Pythia8/ParticleData.h"
14
15namespace Pythia8{
16 class ResonanceLQ;
17}
18
20
21namespace 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
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}
Pythia8::ParticleDataEntry * ParticleDataEntryPtr
Pythia8_UserResonance::UserResonanceFactory::Creator< Pythia8::ResonanceLQ > resonanceLeptoquarkCreator("LQ")
ResonanceLQ(int idResIn)
Author: James Monk (jmonk@cern.ch)