ATLAS Offline Software
Loading...
Searching...
No Matches
ZprimeFlatpT.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
5#include "Pythia8/PhaseSpace.h"
6
7#include "UserSetting.h"
8
9namespace Pythia8{
10 class ZprimeFlatpT;
11}
12
14
15namespace Pythia8 {
16
17 class ZprimeFlatpT : public UserHooks {
18
19 public:
20
21 // Constructor.
23
24 // Destructor.
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
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
80
81
82 };
83
84} // end namespace Pythia8
static const std::map< unsigned int, unsigned int > pow2
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::ZprimeFlatpT > zPrimeFlatpTCreator("ZprimeFlatpT")
Pythia8_UserHooks::UserSetting< double > m_maxSHat
virtual bool canModifySigma()
Pythia8_UserHooks::UserSetting< double > m_doDecayWeightBelow
virtual double multiplySigmaBy(const SigmaProcess *sigmaProcessPtr, const PhaseSpace *phaseSpacePtr, bool)
Author: James Monk (jmonk@cern.ch)