CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PowhegResHook Class Reference

#include <PowhegResHook.h>

Inheritance diagram for PowhegResHook:

Public Member Functions

bool canSetResonanceScale () override
 
 PowhegResHook ()
 
double scaleResonance (const int iRes, const Pythia8::Event &event) override
 
 ~PowhegResHook () override
 

Private Attributes

bool calcScales_
 

Detailed Description

Definition at line 6 of file PowhegResHook.h.

Constructor & Destructor Documentation

◆ PowhegResHook()

PowhegResHook::PowhegResHook ( )
inline

Definition at line 9 of file PowhegResHook.h.

9 {}

◆ ~PowhegResHook()

PowhegResHook::~PowhegResHook ( )
inlineoverride

Definition at line 10 of file PowhegResHook.h.

10 {}

Member Function Documentation

◆ canSetResonanceScale()

bool PowhegResHook::canSetResonanceScale ( )
inlineoverride

Definition at line 12 of file PowhegResHook.h.

12 { return true; }

◆ scaleResonance()

double PowhegResHook::scaleResonance ( const int  iRes,
const Pythia8::Event &  event 
)
override

Definition at line 11 of file PowhegResHook.cc.

11  {
12  calcScales_ = settingsPtr->flag("POWHEGres:calcScales");
13 
14  double scale = 0.;
15 
16  int nDau = event[iRes].daughterList().size();
17 
18  if (!calcScales_ or nDau == 0) {
19  // No resonance found, set scale to high value
20  // Pythia will shower any MC generated resonance unrestricted
21  scale = 1e30;
22  }
23 
24  else if (nDau < 3) {
25  // No radiating resonance found
26  scale = 0.8;
27  }
28 
29  else if (abs(event[iRes].id()) == 6) {
30  // Find top daughters
31  int idw = -1, idb = -1, idg = -1;
32 
33  for (int i = 0; i < nDau; i++) {
34  int iDau = event[iRes].daughterList()[i];
35  if (abs(event[iDau].id()) == 24)
36  idw = iDau;
37  if (abs(event[iDau].id()) == 5)
38  idb = iDau;
39  if (abs(event[iDau].id()) == 21)
40  idg = iDau;
41  }
42 
43  // Get daughter 4-vectors in resonance frame
44  Vec4 pw(event[idw].p());
45  pw.bstback(event[iRes].p());
46 
47  Vec4 pb(event[idb].p());
48  pb.bstback(event[iRes].p());
49 
50  Vec4 pg(event[idg].p());
51  pg.bstback(event[iRes].p());
52 
53  // Calculate scale
54  scale = sqrt(2 * pg * pb * pg.e() / pb.e());
55  }
56 
57  else if (abs(event[iRes].id()) == 24) {
58  // Find W daughters
59  int idq = -1, ida = -1, idg = -1;
60 
61  for (int i = 0; i < nDau; i++) {
62  int iDau = event[iRes].daughterList()[i];
63  if (event[iDau].id() == 21)
64  idg = iDau;
65  else if (event[iDau].id() > 0)
66  idq = iDau;
67  else if (event[iDau].id() < 0)
68  ida = iDau;
69  }
70 
71  // Get daughter 4-vectors in resonance frame
72  Vec4 pq(event[idq].p());
73  pq.bstback(event[iRes].p());
74 
75  Vec4 pa(event[ida].p());
76  pa.bstback(event[iRes].p());
77 
78  Vec4 pg(event[idg].p());
79  pg.bstback(event[iRes].p());
80 
81  // Calculate scale
82  Vec4 pw = pq + pa + pg;
83  double q2 = pw * pw;
84  double csi = 2 * pg.e() / sqrt(q2);
85  double yq = 1 - pg * pq / (pg.e() * pq.e());
86  double ya = 1 - pg * pa / (pg.e() * pa.e());
87 
88  scale = sqrt(min(1 - yq, 1 - ya) * pow2(csi) * q2 / 2);
89  }
90 
91  return scale;
92 }

References funct::abs(), mps_fire::i, min(), or, AlCaHLTBitMon_ParallelJobs::p, q2, Scenarios_cff::scale, and mathSSE::sqrt().

Member Data Documentation

◆ calcScales_

bool PowhegResHook::calcScales_
private

Definition at line 19 of file PowhegResHook.h.

mps_fire.i
i
Definition: mps_fire.py:355
min
T min(T a, T b)
Definition: MathUtil.h:58
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Vec4
ExtVec< T, 4 > Vec4
Definition: ExtVec.h:64
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
q2
double q2[4]
Definition: TauolaWrapper.h:88
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
PowhegResHook::calcScales_
bool calcScales_
Definition: PowhegResHook.h:19
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
event
Definition: event.py:1