ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Pythia8::PoWHEGVetoedShower Class Reference

This UserHook should be used when showering QCD jets generated with PoWHEG-box. More...

Inheritance diagram for Pythia8::PoWHEGVetoedShower:
Collaboration diagram for Pythia8::PoWHEGVetoedShower:

Public Member Functions

 PoWHEGVetoedShower ()
 
 ~PoWHEGVetoedShower ()
 
bool doVetoMPIStep (int nMPI, const Event &evt)
 doVetoMPIStep is called immediately after the MPI generation In this case it never actually vetoes the MPI, but since it is called before the ISR veto check this is a convenient place to find the PoWHEG scale from the LHEF event More...
 
bool doVetoISREmission (int, const Event &evt, int iSys)
 This is called after the generation of each new ISR emission Can use it to test if the last generated emission is above the veto scale. More...
 
bool doVetoFSREmission (int, const Event &evt, int iSys, bool)
 This is similar to the ISR veto. More...
 
bool canVetoMPIStep ()
 Switch on calling of doVetoMPIStep. More...
 
int numberVetoMPIStep ()
 Call doVetoMIStep once. More...
 
bool canVetoISREmission ()
 Switch on veto of ISR. More...
 
bool canVetoFSREmission ()
 Switch off veto of FSR. More...
 

Private Attributes

double m_powhegScale
 

Detailed Description

This UserHook should be used when showering QCD jets generated with PoWHEG-box.

The following settings must be activated in Pythia:

SpaceShower:pTMaxMatch = 2 TimeShower:pTMaxMatch = 2

These set the limit for emission from both initial and final state radiation to the kinematic (beam) energy. The veto hook then vetos any emission that would be above the appropriate scale.

This Hook determines a new (lower) veto scale according to the following prescription: Compute the pT of every PoWHEG leg relative to the beam, and the pT of every outgoing PoWHEG leg relative to all the other legs in the CMS frame. Use the lowest of these values as the new veto scale

This hook is ONLY SUITABLE FOR QCD JET PRODUCTION!!

Definition at line 34 of file PoWHEGVetoedShower.cxx.

Constructor & Destructor Documentation

◆ PoWHEGVetoedShower()

Pythia8::PoWHEGVetoedShower::PoWHEGVetoedShower ( )
inline

Definition at line 38 of file PoWHEGVetoedShower.cxx.

38  : m_powhegScale(0.){
39 
40  std::cout<<"*******************************************************************"<<std::endl;
41  std::cout<<"* *"<<std::endl;
42  std::cout<<"* Using new PoWHEG author scale definition for QCD production! *"<<std::endl;
43  std::cout<<"* *"<<std::endl;
44  std::cout<<"*******************************************************************"<<std::endl;
45 
46  }

◆ ~PoWHEGVetoedShower()

Pythia8::PoWHEGVetoedShower::~PoWHEGVetoedShower ( )
inline

Definition at line 48 of file PoWHEGVetoedShower.cxx.

48 {}

Member Function Documentation

◆ canVetoFSREmission()

bool Pythia8::PoWHEGVetoedShower::canVetoFSREmission ( )
inline

Switch off veto of FSR.

Definition at line 172 of file PoWHEGVetoedShower.cxx.

172 {return true;}

◆ canVetoISREmission()

bool Pythia8::PoWHEGVetoedShower::canVetoISREmission ( )
inline

Switch on veto of ISR.

Definition at line 170 of file PoWHEGVetoedShower.cxx.

170 {return true;}

◆ canVetoMPIStep()

bool Pythia8::PoWHEGVetoedShower::canVetoMPIStep ( )
inline

Switch on calling of doVetoMPIStep.

Definition at line 166 of file PoWHEGVetoedShower.cxx.

166 {return true;}

◆ doVetoFSREmission()

bool Pythia8::PoWHEGVetoedShower::doVetoFSREmission ( int  ,
const Event evt,
int  iSys,
bool   
)
inline

This is similar to the ISR veto.

Definition at line 152 of file PoWHEGVetoedShower.cxx.

152  {
153 
154  // only veto emissions from the hard system
155  if(iSys != 0) return false;
156 
157  size_t emission = Pythia8_UserHooks::findLastFSREmission(evt);
158 
159  // Veto if above the POWHEG scale
160  if (evt[emission].pT() > m_powhegScale) return true;
161 
162  return false;
163  }

◆ doVetoISREmission()

bool Pythia8::PoWHEGVetoedShower::doVetoISREmission ( int  ,
const Event evt,
int  iSys 
)
inline

This is called after the generation of each new ISR emission Can use it to test if the last generated emission is above the veto scale.

Definition at line 136 of file PoWHEGVetoedShower.cxx.

136  {
137 
138  // only veto emissions from the hard system
139  if(iSys != 0) return false;
140 
141  size_t emission = Pythia8_UserHooks::findLastISREmission(evt);
142 
143  // Veto emission above the veto scale
144  if(evt[emission].pT() > m_powhegScale) return true;
145 
146  return false;
147  }

◆ doVetoMPIStep()

bool Pythia8::PoWHEGVetoedShower::doVetoMPIStep ( int  nMPI,
const Event evt 
)
inline

doVetoMPIStep is called immediately after the MPI generation In this case it never actually vetoes the MPI, but since it is called before the ISR veto check this is a convenient place to find the PoWHEG scale from the LHEF event

Definition at line 56 of file PoWHEGVetoedShower.cxx.

56  {
57 
58  // Only do anything on the first call.
59  if(nMPI > 1) return false;
60 
61  m_powhegScale = infoPtr->QRen();;
62 
63  // momentum components to boost to CMS frame
64  double pxCMS = 0.;
65  double pyCMS = 0.;
66  double pzCMS = 0.;
67  double eCMS = 0.;
68 
69  std::vector<Particle> powhegLegs;
70 
71  // Find the entries corresponding to outgoing legs from PoWHEG
72  // start the loop at 1, since entry 0 represents the event as a whole
73  for(int ii=1; ii != evt.size(); ++ii){
74 
75  // status -21 is the incoming hard partons
76  if(evt[ii].status() == -21){
77  pxCMS += evt[ii].px();
78  pyCMS += evt[ii].py();
79  pzCMS += evt[ii].pz();
80  eCMS += evt[ii].e();
81  }
82 
83  // here Event::isFinal refers to whether the particle can still decay/radiate, or whether it is an internal leg
84  if(evt[ii].isFinal()){
85  powhegLegs.push_back(Particle(evt[ii]));
86  }
87  }
88 
89  // compare the pT of each leg to the powheg scale.
90  // Set the scale to the lowest (or leave the scale unchanged if it is already lower)
91  for(std::vector<Particle>::const_iterator leg=powhegLegs.begin();
92  leg != powhegLegs.end(); ++leg){
93  if(leg->pT() < m_powhegScale )m_powhegScale = leg->pT();
94  }
95 
96  double norm = -1./eCMS;
97  pxCMS *= norm;
98  pyCMS *= norm;
99  pzCMS *= norm;
100 
101  // boost all outgoing legs to the CMS frame
102  for(std::vector<Particle>::iterator leg=powhegLegs.begin();
103  leg != powhegLegs.end(); ++leg){
104  leg->bst(pxCMS, pyCMS, pzCMS);
105  }
106 
107  for(std::vector<Particle>::const_iterator leg=powhegLegs.begin();
108  leg != powhegLegs.end(); ++leg){
109 
110  if(leg->pT() < m_powhegScale )m_powhegScale = leg->pT();
111 
112  // calculate the pT relative to each other leg
113  // if any such pT is lower than the current scale, reset the scale to that value
114  for(std::vector<Particle>::const_iterator otherLeg = powhegLegs.begin();
115  otherLeg != powhegLegs.end(); ++otherLeg){
116  if(otherLeg == leg) continue;
117 
118  double pTLeg = Pythia8_UserHooks::pTLeg(*leg, *otherLeg);
119 
121  }
122  }
123 
124 // std::cout<<m_powhegScale<<" "<<infoPtr->QRen()<<std::endl;
125 
126 
127  return false;
128  }

◆ numberVetoMPIStep()

int Pythia8::PoWHEGVetoedShower::numberVetoMPIStep ( )
inline

Call doVetoMIStep once.

Definition at line 168 of file PoWHEGVetoedShower.cxx.

168 {return 1;}

Member Data Documentation

◆ m_powhegScale

double Pythia8::PoWHEGVetoedShower::m_powhegScale
private

Definition at line 176 of file PoWHEGVetoedShower.cxx.


The documentation for this class was generated from the following file:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
Pythia8::PoWHEGVetoedShower::m_powhegScale
double m_powhegScale
Definition: PoWHEGVetoedShower.cxx:176
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
xAOD::Particle
Particle_v1 Particle
Define the latest version of the particle class.
Definition: Event/xAOD/xAODParticleEvent/xAODParticleEvent/Particle.h:17
compute_lumi.leg
leg
Definition: compute_lumi.py:95
Pythia8_UserHooks::pTLeg
double pTLeg(const Pythia8::Particle &leg, const Pythia8::Particle &comparison)
Definition: UserHooksUtils.h:50
Pythia8_UserHooks::findLastISREmission
size_t findLastISREmission(const Pythia8::Event &evt)
Definition: UserHooksUtils.h:80
merge.status
status
Definition: merge.py:17
Pythia8_UserHooks::findLastFSREmission
size_t findLastFSREmission(const Pythia8::Event &evt)
Definition: UserHooksUtils.h:89