CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Pythia8::TopRecoilHook Class Reference

#include <TopRecoilHook.h>

Inheritance diagram for Pythia8::TopRecoilHook:

Public Member Functions

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

Private Attributes

bool doList
 
bool doTopRecoil
 
bool recoilDeadCone
 
bool useOldDipole
 
Hist * wtCorr
 

Detailed Description

Definition at line 21 of file TopRecoilHook.h.

Constructor & Destructor Documentation

◆ TopRecoilHook()

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

Definition at line 27 of file TopRecoilHook.h.

References doList, doTopRecoil, useOldDipole, and wtCorr.

27  {
28  doTopRecoil = doTopRecoilIn;
29  useOldDipole = useOldDipoleIn;
30  doList = doListIn;
31  // Constructor also creates some histograms for analysis inside User Hook.
32  wtCorr = new Hist("corrective weight", 100, 0., 2.);
33  }
cms::cuda::HistoContainer< uint8_t, 256, 16000, 8, uint16_t > Hist

◆ ~TopRecoilHook()

Pythia8::TopRecoilHook::~TopRecoilHook ( )
inlineoverride

Definition at line 36 of file TopRecoilHook.h.

References wtCorr.

36 { delete wtCorr; }

Member Function Documentation

◆ canVetoFSREmission()

bool Pythia8::TopRecoilHook::canVetoFSREmission ( )
inlineoverride

Definition at line 51 of file TopRecoilHook.h.

References doTopRecoil.

51 { return doTopRecoil; }

◆ doVetoFSREmission()

bool Pythia8::TopRecoilHook::doVetoFSREmission ( int  sizeOld,
const Event event,
int  iSys,
bool  inResonance 
)
inlineoverride

Definition at line 54 of file TopRecoilHook.h.

References cuy::col, doList, visualization-live-secondInstance_cfg::m, L1TauEmu::pow2(), recoilDeadCone, useOldDipole, and wtCorr.

54  {
55  // Check that we are inside a resonance decay.
56  if (!inResonance)
57  return false;
58 
59  // Check that it is a top decay.
60  int iTop = partonSystemsPtr->getInRes(iSys);
61  if (iTop == 0 || event[iTop].idAbs() != 6)
62  return false;
63 
64  // Skip first emission, where ME corrections are already made.
65  int sizeOut = partonSystemsPtr->sizeOut(iSys);
66  if (sizeOut == 2)
67  return false;
68 
69  // Location of trial new particles: radiator, emitted, recoiler.
70  int iRad = sizeOld;
71  int iEmt = sizeOld + 1;
72  int iRec = sizeOld + 2;
73 
74  // The above partons are after emission;
75  // alternatively use the ones before.
76  if (useOldDipole) {
77  iRad = event[iRad].mother1();
78  iRec = event[iRec].mother1();
79  }
80 
81  // Check if newly emitted gluon matches (anti)top colour line.
82  if (event[iEmt].id() != 21)
83  return false;
84  if (event[iTop].id() == 6) {
85  if (event[iEmt].col() != event[iTop].col())
86  return false;
87  } else {
88  if (event[iEmt].acol() != event[iTop].acol())
89  return false;
90  }
91 
92  // Recoiler should now be a W, else something is wrong.
93  if (event[iRec].idAbs() != 24) {
94  return false;
95  }
96 
97  // Denominator: eikonal weight with W as recoiler.
98  double pRadRec = event[iRad].p() * event[iRec].p();
99  double pRadEmt = event[iRad].p() * event[iEmt].p();
100  double pRecEmt = event[iRec].p() * event[iEmt].p();
101  double wtW = 2. * pRadRec / (pRadEmt * pRecEmt) - pow2(event[iRad].m() / pRadEmt);
102  // If recoilDeadCone = on, include W mass term in denominator.
103  if (recoilDeadCone)
104  wtW -= pow2(event[iRec].m() / pRecEmt);
105 
106  // Numerator: eikonal weight with top as recoiler.
107  double pRadTop = event[iRad].p() * event[iTop].p();
108  double pTopEmt = event[iTop].p() * event[iEmt].p();
109  double wtT =
110  2. * pRadTop / (pRadEmt * pTopEmt) - pow2(event[iRad].m() / pRadEmt) - pow2(event[iTop].m() / pTopEmt);
111 
112  // Histogram weight ratio.
113  wtCorr->fill(wtT / wtW);
114 
115  // List relevant properties.
116  if (doList) {
117  partonSystemsPtr->list();
118  event.list();
119  }
120  //std::cout << "BEGIN TOP TEST: " << (wtT / wtW) << " | END TOP TEST" << endl;
121 
122  // Accept/reject emission. Smooth suppression or step function.
123  return (wtT < wtW * rndmPtr->flat());
124  }
constexpr int pow2(int x)
Definition: TauNNIdHW.h:59
col
Definition: cuy.py:1009
Definition: event.py:1

◆ initAfterBeams()

bool Pythia8::TopRecoilHook::initAfterBeams ( )
inlineoverride

Definition at line 39 of file TopRecoilHook.h.

References doTopRecoil, and recoilDeadCone.

39  {
40  // Switch off if recoilToColoured = on.
41  bool recoilToColoured = settingsPtr->flag("TimeShower:recoilToColoured");
42  if (recoilToColoured)
43  doTopRecoil = false;
44  // Flag if W mass term is already accounted for (true) or not (false).
45  recoilDeadCone = settingsPtr->flag("TimeShower:recoilDeadCone");
46  // All ok.
47  return true;
48  }

Member Data Documentation

◆ doList

bool Pythia8::TopRecoilHook::doList
private

Definition at line 128 of file TopRecoilHook.h.

Referenced by doVetoFSREmission(), and TopRecoilHook().

◆ doTopRecoil

bool Pythia8::TopRecoilHook::doTopRecoil
private

Definition at line 128 of file TopRecoilHook.h.

Referenced by canVetoFSREmission(), initAfterBeams(), and TopRecoilHook().

◆ recoilDeadCone

bool Pythia8::TopRecoilHook::recoilDeadCone
private

Definition at line 128 of file TopRecoilHook.h.

Referenced by doVetoFSREmission(), and initAfterBeams().

◆ useOldDipole

bool Pythia8::TopRecoilHook::useOldDipole
private

Definition at line 128 of file TopRecoilHook.h.

Referenced by doVetoFSREmission(), and TopRecoilHook().

◆ wtCorr

Hist* Pythia8::TopRecoilHook::wtCorr
private

Definition at line 129 of file TopRecoilHook.h.

Referenced by doVetoFSREmission(), TopRecoilHook(), and ~TopRecoilHook().