ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8::PTRelVetoedShower Class Reference

This user hook is derived from the main31 example distributed with Pythia 8 and is for use with QCD events generated with PoWHEG. More...

Inheritance diagram for Pythia8::PTRelVetoedShower:
Collaboration diagram for Pythia8::PTRelVetoedShower:

Public Member Functions

 PTRelVetoedShower ()
 ~PTRelVetoedShower ()
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
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.
bool doVetoFSREmission (int, const Event &evt, int iSys, bool)
 This is similar to the ISR veto.
bool canVetoMPIStep ()
 Switch on calling of doVetoMPIStep.
int numberVetoMPIStep ()
 Call doVetoMIStep once.
bool canVetoISREmission ()
 Switch on veto of ISR.
bool canVetoFSREmission ()
 Switch off veto of FSR.

Private Attributes

const size_t m_nPoWHEGFinal
double m_powhegScale
double m_pxCMS
double m_pyCMS
double m_pzCMS

Detailed Description

This user hook is derived from the main31 example distributed with Pythia 8 and is for use with QCD events generated with PoWHEG.

The following settings must be used 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.

One key difference between this veto and the one implemented in main31 is the determination of the boost to the CMS frame in which the FSR veto is tested. In main31, that boost is determined on each shower emission, with the result that it evolves due to recoil of the incoming partons against ISR. In this veto, the boost is determined once in each event and does not evolve with recoil

Definition at line 35 of file PTRelVetoedShower.cxx.

Constructor & Destructor Documentation

◆ PTRelVetoedShower()

Pythia8::PTRelVetoedShower::PTRelVetoedShower ( )
inline

Definition at line 39 of file PTRelVetoedShower.cxx.

40
41 std::cout<<"*************************************************************************"<<std::endl;
42 std::cout<<"* *"<<std::endl;
43 std::cout<<"* Using PTRel vetoed shower for PoWHEG QCD production! *"<<std::endl;
44 std::cout<<"* *"<<std::endl;
45 std::cout<<"*************************************************************************"<<std::endl;
46
47 m_pxCMS = 0;
48 m_pyCMS = 0;
49 m_pzCMS = 0;
50
51 }

◆ ~PTRelVetoedShower()

Pythia8::PTRelVetoedShower::~PTRelVetoedShower ( )
inline

Definition at line 53 of file PTRelVetoedShower.cxx.

53{}

Member Function Documentation

◆ canVetoFSREmission()

bool Pythia8::PTRelVetoedShower::canVetoFSREmission ( )
inline

Switch off veto of FSR.

Definition at line 203 of file PTRelVetoedShower.cxx.

203{return true;}

◆ canVetoISREmission()

bool Pythia8::PTRelVetoedShower::canVetoISREmission ( )
inline

Switch on veto of ISR.

Definition at line 201 of file PTRelVetoedShower.cxx.

201{return true;}

◆ canVetoMPIStep()

bool Pythia8::PTRelVetoedShower::canVetoMPIStep ( )
inline

Switch on calling of doVetoMPIStep.

Definition at line 197 of file PTRelVetoedShower.cxx.

197{return true;}

◆ doVetoFSREmission()

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

This is similar to the ISR veto.

Definition at line 177 of file PTRelVetoedShower.cxx.

177 {
178 if(iSys != 0) return false;
179
180 size_t emissionIndex = Pythia8_UserHooks::findLastFSREmission(evt);
181 size_t radiatorIndex = Pythia8_UserHooks::findLastFSRRadiator(evt);
182
183 Particle emission(evt[emissionIndex]);
184 Particle radiator(evt[radiatorIndex]);
185
186 emission.bst(m_pxCMS, m_pyCMS, m_pzCMS);
187 radiator.bst(m_pxCMS, m_pyCMS, m_pzCMS);
188
189 double pTRel = Pythia8_UserHooks::pTLeg(emission, radiator);
190 if(pTRel > m_powhegScale) return true;
191
192 return false;
193 }
size_t findLastFSRRadiator(const Pythia8::Event &evt)
size_t findLastFSREmission(const Pythia8::Event &evt)
double pTLeg(const Pythia8::Particle &leg, const Pythia8::Particle &comparison)
Particle_v1 Particle
Define the latest version of the particle class.

◆ doVetoISREmission()

bool Pythia8::PTRelVetoedShower::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 161 of file PTRelVetoedShower.cxx.

161 {
162
163 // only veto emissions from the hard system
164 if(iSys != 0) return false;
165
166 size_t emission = Pythia8_UserHooks::findLastISREmission(evt);
167
168 if(evt[emission].pT() > m_powhegScale) return true;
169
170 return false;
171 }
size_t findLastISREmission(const Pythia8::Event &evt)

◆ doVetoMPIStep()

bool Pythia8::PTRelVetoedShower::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 61 of file PTRelVetoedShower.cxx.

61 {
62
63 // Only do anything on the first call.
64 if(nMPI > 1) return false;
65
66 m_powhegScale = infoPtr->QRen();
67
68 size_t nPwgOutgoing = 0;
69
70 for(int ii = evt.size()-1; ii > 0; --ii){
71 if(! (evt[ii].isFinal())) break;
72 ++nPwgOutgoing;
73 }
74
75 if(nPwgOutgoing == m_nPoWHEGFinal) return false;
76
77 if(nPwgOutgoing != m_nPoWHEGFinal + 1){
78 throw std::runtime_error("Wrong number of final state PoWHEG legs: " + std::to_string(nPwgOutgoing));
79 }
80
81 // momentum components to boost to CMS frame
82 m_pxCMS = 0.;
83 m_pyCMS = 0.;
84 m_pzCMS = 0.;
85 double eCMS = 0.;
86
87 // The outgoing powheg legs
88 std::vector<Particle> powhegLegs;
89
90 // Find the entries corresponding to outgoing legs from PoWHEG
91 // start the loop at 1, since entry 0 represents the event as a whole
92 for(int ii=1; ii != evt.size(); ++ii){
93
94 // status -21 is the incoming hard partons
95 if(evt[ii].status() == -21){
96 m_pxCMS += evt[ii].px();
97 m_pyCMS += evt[ii].py();
98 m_pzCMS += evt[ii].pz();
99 eCMS += evt[ii].e();
100 }
101
102 // here Event::isFinal refers to whether the particle can still decay/radiate, or whether it is an internal leg
103 if(evt[ii].isFinal()){
104 powhegLegs.push_back(Particle(evt[ii]));
105 }
106 }
107
108 // Start the search for the powheg scale above the collision energy,
109 // which is guaranteed to be above the veto scale.
110
111 m_powhegScale = 1.1*infoPtr->s();
112
113 // compare the pT of each leg to the powheg scale.
114 // Set the scale to the lowest
115 for(std::vector<Particle>::const_iterator leg=powhegLegs.begin();
116 leg != powhegLegs.end(); ++leg){
117 double pTTmp = leg->pT();
118 if(pTTmp < m_powhegScale )m_powhegScale = pTTmp;
119 }
120
121 // normalise the boost vector to the CMS frame...
122 double norm = -1./eCMS;
123 m_pxCMS *= norm;
124 m_pyCMS *= norm;
125 m_pzCMS *= norm;
126
127 // ...and boost all outgoing legs to that frame
128 for(std::vector<Particle>::iterator leg=powhegLegs.begin();
129 leg != powhegLegs.end(); ++leg){
130 leg->bst(m_pxCMS, m_pyCMS, m_pzCMS);
131 }
132
133 for(std::vector<Particle>::const_iterator leg=powhegLegs.begin();
134 leg != powhegLegs.end(); ++leg){
135 // calculate the pT relative to each other leg
136 // if any such pT is lower than the current scale, reset the scale to that value
137 for(std::vector<Particle>::const_iterator otherLeg = powhegLegs.begin();
138 otherLeg != powhegLegs.end(); ++otherLeg){
139 if(otherLeg == leg) continue;
140
141 double pTLeg = Pythia8_UserHooks::pTLeg(*leg, *otherLeg);
142
143 if(pTLeg < m_powhegScale) m_powhegScale = pTLeg;
144 }
145 }
146
147 // barf if the scale was not found properly!
148 if(m_powhegScale > infoPtr->s()){
149 throw std::runtime_error("Veto scale could not be determined!");
150 }
151
152 return false;
153 }
status
Definition merge.py:16

◆ numberVetoMPIStep()

int Pythia8::PTRelVetoedShower::numberVetoMPIStep ( )
inline

Call doVetoMIStep once.

Definition at line 199 of file PTRelVetoedShower.cxx.

199{return 1;}

Member Data Documentation

◆ m_nPoWHEGFinal

const size_t Pythia8::PTRelVetoedShower::m_nPoWHEGFinal
private

Definition at line 207 of file PTRelVetoedShower.cxx.

◆ m_powhegScale

double Pythia8::PTRelVetoedShower::m_powhegScale
private

Definition at line 209 of file PTRelVetoedShower.cxx.

◆ m_pxCMS

double Pythia8::PTRelVetoedShower::m_pxCMS
private

Definition at line 212 of file PTRelVetoedShower.cxx.

◆ m_pyCMS

double Pythia8::PTRelVetoedShower::m_pyCMS
private

Definition at line 213 of file PTRelVetoedShower.cxx.

◆ m_pzCMS

double Pythia8::PTRelVetoedShower::m_pzCMS
private

Definition at line 214 of file PTRelVetoedShower.cxx.


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