ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
Pythia8_i
src
UserHooks
ZprimeFlatpT.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
Pythia8_i/UserHooksFactory.h
"
5
#include "Pythia8/PhaseSpace.h"
6
7
#include "
UserSetting.h
"
8
9
namespace
Pythia8
{
10
class
ZprimeFlatpT
;
11
}
12
13
Pythia8_UserHooks::UserHooksFactory::Creator<Pythia8::ZprimeFlatpT>
zPrimeFlatpTCreator
(
"ZprimeFlatpT"
);
14
15
namespace
Pythia8
{
16
17
class
ZprimeFlatpT
:
public
UserHooks {
18
19
public
:
20
21
// Constructor.
22
ZprimeFlatpT
(){}
23
24
// Destructor.
25
~ZprimeFlatpT
(){}
26
27
// Allow process cross section to be modified...
28
virtual
bool
canModifySigma
() {
return
true
;}
29
30
// ...which gives access to the event at the trial level, before selection.
31
virtual
double
multiplySigmaBy
(
const
SigmaProcess* sigmaProcessPtr,
32
const
PhaseSpace* phaseSpacePtr,
33
bool
/* inEvent */
) {
34
// All events should be 2 -> 1, but kill them if not.
35
// if (sigmaProcessPtr->nFinal() != 1) return 0.;
36
if
(sigmaProcessPtr->nFinal() != 1)
return
0.;
37
38
// Weight cross section with BW propagator, i.e. to remove it.
39
// (inEvent = false for initialization).
40
// No inEvent criteria, want weight both for cross section
41
// and MC generation.
42
int
idRes = sigmaProcessPtr->resonanceB();
43
double
mRes = particleDataPtr->m0(idRes);
44
45
double
wRes = particleDataPtr->mWidth(idRes);
46
double
m2Res = mRes*mRes;
47
double
GamMRat = wRes/mRes;
48
double
sHat = phaseSpacePtr->sHat();
49
long
double
weightBW =
pow2
(sHat - m2Res) +
pow2
(sHat * GamMRat);
50
long
double
weightpT= 1;
51
double
rH = std::sqrt(sHat);
52
53
double
par[2]={-8.95719e+00,1.62584e-03};
54
weightpT=std::exp(par[0]+par[1]*rH);
55
if
(rH>=
m_maxSHat
(settingsPtr)){ weightpT=0; }
56
57
double
weightDecay = 1.;
58
59
if
(rH <
m_doDecayWeightBelow
(settingsPtr)){
60
double
p0 = -0.000527117;
61
double
p1 = 2.64665e-06;
62
63
weightDecay = 0.008/(p0+(p1*rH));
64
}
65
66
long
double
weight = weightBW * weightpT * weightDecay;
67
return
weight;
68
69
}
70
71
private
:
72
73
// This sets the \sqrt{\hat{s}} above which no events will be generated
74
// It is 3000. GeV by default for consistency with the first incarnation of this hook
75
Pythia8_UserHooks::UserSetting<double>
m_maxSHat
=
Pythia8_UserHooks::UserSetting<double>
(
"ZprimeFlatpT:MaxSHat"
, 3000.);
76
77
// This sets the \sqrt{\hat{s}} below which an additional decay weight will be added
78
// It is zero by default, since this feature did not exist inthe earlier incarnation of this hook
79
Pythia8_UserHooks::UserSetting<double>
m_doDecayWeightBelow
=
Pythia8_UserHooks::UserSetting<double>
(
"ZprimeFlatpT:DoDecayWeightBelow"
, 0.);
80
81
82
};
83
84
}
// end namespace Pythia8
pow2
static const std::map< unsigned int, unsigned int > pow2
Definition
TriggerProcessor.cxx:23
UserHooksFactory.h
UserSetting.h
zPrimeFlatpTCreator
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::ZprimeFlatpT > zPrimeFlatpTCreator("ZprimeFlatpT")
Pythia8::ZprimeFlatpT
Definition
ZprimeFlatpT.cxx:17
Pythia8::ZprimeFlatpT::m_maxSHat
Pythia8_UserHooks::UserSetting< double > m_maxSHat
Definition
ZprimeFlatpT.cxx:75
Pythia8::ZprimeFlatpT::~ZprimeFlatpT
~ZprimeFlatpT()
Definition
ZprimeFlatpT.cxx:25
Pythia8::ZprimeFlatpT::canModifySigma
virtual bool canModifySigma()
Definition
ZprimeFlatpT.cxx:28
Pythia8::ZprimeFlatpT::m_doDecayWeightBelow
Pythia8_UserHooks::UserSetting< double > m_doDecayWeightBelow
Definition
ZprimeFlatpT.cxx:79
Pythia8::ZprimeFlatpT::multiplySigmaBy
virtual double multiplySigmaBy(const SigmaProcess *sigmaProcessPtr, const PhaseSpace *phaseSpacePtr, bool)
Definition
ZprimeFlatpT.cxx:31
Pythia8::ZprimeFlatpT::ZprimeFlatpT
ZprimeFlatpT()
Definition
ZprimeFlatpT.cxx:22
Pythia8_UserHooks::UserHooksFactory::Creator
Definition
UserHooksFactory.h:54
Pythia8_UserHooks::UserSetting
Definition
UserSetting.h:17
Pythia8
Author: James Monk (jmonk@cern.ch).
Definition
IPythia8Custom.h:10
Generated on
for ATLAS Offline Software by
1.17.0