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;
64 if(nMPI > 1)
return false;
68 size_t nPwgOutgoing = 0;
70 for(
int ii = evt.size()-1; ii > 0; --ii){
71 if(! (evt[ii].isFinal()))
break;
78 throw std::runtime_error(
"Wrong number of final state PoWHEG legs: " + std::to_string(nPwgOutgoing));
88 std::vector<Particle> powhegLegs;
92 for(
int ii=1; ii != evt.size(); ++ii){
95 if(evt[ii].status() == -21){
103 if(evt[ii].isFinal()){
104 powhegLegs.push_back(Particle(evt[ii]));
115 for(std::vector<Particle>::const_iterator leg=powhegLegs.begin();
116 leg != powhegLegs.end(); ++leg){
117 double pTTmp = leg->pT();
122 double norm = (eCMS == 0.)? 0 : -1./eCMS;
128 for(std::vector<Particle>::iterator leg=powhegLegs.begin();
129 leg != powhegLegs.end(); ++leg){
133 for(std::vector<Particle>::const_iterator leg=powhegLegs.begin();
134 leg != powhegLegs.end(); ++leg){
137 for(std::vector<Particle>::const_iterator otherLeg = powhegLegs.begin();
138 otherLeg != powhegLegs.end(); ++otherLeg){
139 if(otherLeg == leg)
continue;
149 throw std::runtime_error(
"Veto scale could not be determined!");
164 if(iSys != 0)
return false;
178 if(iSys != 0)
return false;
183 Particle emission(evt[emissionIndex]);
184 Particle radiator(evt[radiatorIndex]);
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::PTRelVetoedShower > pTRelVetoedShowerCreator("PTRelVetoedShower")
This user hook is derived from the main31 example distributed with Pythia 8 and is for use with QCD e...
bool doVetoFSREmission(int, const Event &evt, int iSys, bool)
This is similar to the ISR veto.
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...
bool canVetoISREmission()
Switch on veto of ISR.
bool canVetoMPIStep()
Switch on calling of doVetoMPIStep.
int numberVetoMPIStep()
Call doVetoMIStep once.
bool doVetoMPIStep(int nMPI, const Event &evt)
doVetoMPIStep is called immediately after the MPI generation In this case it never actually vetoes th...
const size_t m_nPoWHEGFinal
bool canVetoFSREmission()
Switch off veto of FSR.
size_t findLastFSRRadiator(const Pythia8::Event &evt)
size_t findLastISREmission(const Pythia8::Event &evt)
size_t findLastFSREmission(const Pythia8::Event &evt)
double pTLeg(const Pythia8::Particle &leg, const Pythia8::Particle &comparison)
Author: James Monk (jmonk@cern.ch)