ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8::TopRecoilHook Class Reference
Inheritance diagram for Pythia8::TopRecoilHook:
Collaboration diagram for Pythia8::TopRecoilHook:

Public Member Functions

 TopRecoilHook (bool doTopRecoilIn=true, bool useOldDipoleIn=false, bool doListIn=false)
 ~TopRecoilHook () override
virtual bool initAfterBeams () override
virtual bool canVetoFSREmission () override
virtual bool doVetoFSREmission (int sizeOld, const Event &event, int iSys, bool inResonance) override

Private Attributes

bool m_doTopRecoil {}
bool m_useOldDipole {}
bool m_doList {}
bool m_recoilDeadCone {}
Hist * m_wtCorr {}

Detailed Description

Definition at line 21 of file TopRecoilHook.cxx.

Constructor & Destructor Documentation

◆ TopRecoilHook()

Pythia8::TopRecoilHook::TopRecoilHook ( bool doTopRecoilIn = true,
bool useOldDipoleIn = false,
bool doListIn = false )
inline

Definition at line 29 of file TopRecoilHook.cxx.

29 {
30 m_doTopRecoil = doTopRecoilIn;
31 m_useOldDipole = useOldDipoleIn;
32 m_doList = doListIn;
33 // Constructor also creates some histograms for analysis inside User Hook.
34 m_wtCorr = new Hist("corrective weight", 100, 0., 2.);
35 std::cout << " enabling TopRecoilHook"<< std::endl;
36
37 }

◆ ~TopRecoilHook()

Pythia8::TopRecoilHook::~TopRecoilHook ( )
inlineoverride

Definition at line 40 of file TopRecoilHook.cxx.

40 {
41 if (m_doTopRecoil) cout << *m_wtCorr;
42 delete m_wtCorr;
43 }

Member Function Documentation

◆ canVetoFSREmission()

virtual bool Pythia8::TopRecoilHook::canVetoFSREmission ( )
inlineoverridevirtual

Definition at line 62 of file TopRecoilHook.cxx.

62{return m_doTopRecoil;}

◆ doVetoFSREmission()

virtual bool Pythia8::TopRecoilHook::doVetoFSREmission ( int sizeOld,
const Event & event,
int iSys,
bool inResonance )
inlineoverridevirtual

Definition at line 65 of file TopRecoilHook.cxx.

66 {
67
68 // Check that we are inside a resonance decay.
69 if (!inResonance) return false;
70
71 // Check that it is a top decay.
72 int iTop = partonSystemsPtr->getInRes(iSys);
73 if (iTop == 0 || event[iTop].idAbs() != 6) return false;
74
75 // Skip first emission, where ME corrections are already made.
76 int sizeOut = partonSystemsPtr->sizeOut(iSys);
77 if (sizeOut == 2) return false;
78
79 // Location of trial new particles: radiator, emitted, recoiler.
80 int iRad = sizeOld;
81 int iEmt = sizeOld + 1;
82 int iRec = sizeOld + 2;
83
84 // The above partons are after emission;
85 // alternatively use the ones before.
86 if (m_useOldDipole) {
87 iRad = event[iRad].mother1();
88 iRec = event[iRec].mother1();
89 }
90
91 // Check if newly emitted gluon matches (anti)top colour line.
92 if (event[iEmt].id() != 21) return false;
93 if (event[iTop].id() == 6) {
94 if (event[iEmt].col() != event[iTop].col()) return false;
95 } else {
96 if (event[iEmt].acol() != event[iTop].acol()) return false;
97 }
98
99 // Recoiler should now be a W, else something is wrong.
100 if (event[iRec].idAbs() != 24) {
101 cout << " ERROR: recoiler is " << event[iRec].id() << endl;
102 return false;
103 }
104
105 // Denominator: eikonal weight with W as recoiler.
106 double pRadRec = event[iRad].p() * event[iRec].p();
107 double pRadEmt = event[iRad].p() * event[iEmt].p();
108 double pRecEmt = event[iRec].p() * event[iEmt].p();
109 double wtW = 2. * pRadRec / (pRadEmt * pRecEmt)
110 - pow2(event[iRad].m() / pRadEmt);
111 // If m_recoilDeadCone = on, include W mass term in denominator.
112 if (m_recoilDeadCone) wtW -= pow2(event[iRec].m() / pRecEmt);
113
114 // Numerator: eikonal weight with top as recoiler.
115 double pRadTop = event[iRad].p() * event[iTop].p();
116 double pTopEmt = event[iTop].p() * event[iEmt].p();
117 double wtT = 2. * pRadTop / (pRadEmt * pTopEmt)
118 - pow2(event[iRad].m() / pRadEmt) - pow2(event[iTop].m() / pTopEmt);
119
120 // Histogram weight ratio.
121 m_wtCorr->fill( wtT / wtW );
122
123 // List relevant properties.
124 if (m_doList) {
125 std::ios oldState(nullptr);
126 std::cout << "\n now event with sizeOld = " << sizeOld << ", iSys = "
127 << iSys << ", sizeOut = " << sizeOut << scientific
128 << setprecision(3)
129 << ", weight with W = " << wtW << " and with t = " << wtT << std::endl;
130 partonSystemsPtr->list();
131 event.list();
132 std::cout.copyfmt(oldState);
133 }
134
135 // Accept/reject emission. Smooth suppression or step function.
136 return (wtT < wtW * rndmPtr->flat());
137 }
static const std::map< unsigned int, unsigned int > pow2

◆ initAfterBeams()

virtual bool Pythia8::TopRecoilHook::initAfterBeams ( )
inlineoverridevirtual

Definition at line 47 of file TopRecoilHook.cxx.

47 {
48
49 // Switch off if not using simple showers or if recoilToColoured = on.
50 bool recoilToColoured = settingsPtr->flag("TimeShower:recoilToColoured");
51 if (recoilToColoured){
52 m_doTopRecoil=false;
53 std::cout << " TopRecoilHook should not be used with RecoilToColoured=on; disabling"<< std::endl;
54 }
55 // Flag if W mass term is already accounted for (true) or not (false).
56 m_recoilDeadCone = settingsPtr->flag("TimeShower:recoilDeadCone");
57 // All ok.
58 return true;
59 }

Member Data Documentation

◆ m_doList

bool Pythia8::TopRecoilHook::m_doList {}
private

Definition at line 143 of file TopRecoilHook.cxx.

◆ m_doTopRecoil

bool Pythia8::TopRecoilHook::m_doTopRecoil {}
private

Definition at line 143 of file TopRecoilHook.cxx.

◆ m_recoilDeadCone

bool Pythia8::TopRecoilHook::m_recoilDeadCone {}
private

Definition at line 143 of file TopRecoilHook.cxx.

◆ m_useOldDipole

bool Pythia8::TopRecoilHook::m_useOldDipole {}
private

Definition at line 143 of file TopRecoilHook.cxx.

◆ m_wtCorr

Hist* Pythia8::TopRecoilHook::m_wtCorr {}
private

Definition at line 144 of file TopRecoilHook.cxx.

144{};

The documentation for this class was generated from the following file: