ATLAS Offline Software
Loading...
Searching...
No Matches
WZVetoedShower.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "UserHooksUtils.h"
7#include <stdexcept>
8#include <iostream>
9
10namespace Pythia8{
11 class WZVetoedShower;
12}
13
15
16namespace Pythia8{
17
43
44 class WZVetoedShower : public UserHooks{
45
46 public:
47
49
50 std::cout<<"*******************************************************************"<<std::endl;
51 std::cout<<"* *"<<std::endl;
52 std::cout<<"* Using vetoed shower for PoWHEG colourless resonance production! *"<<std::endl;
53 std::cout<<"* *"<<std::endl;
54 std::cout<<"*******************************************************************"<<std::endl;
55
56 }
57
59
66 bool doVetoMPIStep(int nMPI, const Event &){
67
68 // Only do anything on the first call.
69 if(nMPI > 1) return false;
70
71 m_powhegScale = infoPtr->QRen();
72// m_powhegScale = infoPtr->QFac();
73
74// std::cout<<" ******** veto scale = "<<m_powhegScale<<", "<<infoPtr->QRen() <<" *********"<<std::endl;
75
76 return false;
77 }
78
85 bool doVetoISREmission(int, const Event &evt, int iSys){
86
87 // only veto emissions from the hard system
88 if(iSys != 0) return false;
89
90 size_t emission = Pythia8_UserHooks::findLastISREmission(evt);
91
92 // Veto emission above the veto scale
93 if(evt[emission].pT() > m_powhegScale) return true;
94
95 return false;
96 }
97
101 bool doVetoFSREmission(int, const Event &evt, int iSys, bool){
102
103 // only veto emissions from the hard system
104 if(iSys != 0) return false;
105
106 size_t emission = Pythia8_UserHooks::findLastFSREmission(evt);
107
108 // Veto if above the POWHEG scale
109 if (evt[emission].pT() > m_powhegScale) return true;
110
111 return false;
112 }
113
115 bool canVetoMPIStep(){return true;}
117 int numberVetoMPIStep(){return 1;}
119 bool canVetoISREmission(){return true;}
121 bool canVetoFSREmission(){return true;}
122
123 private:
124
126 };
127}
128
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::WZVetoedShower > wzVetoedShowerCreator("WZVetoedShower")
This UserHook should be used when showering W, Z or other colourless resonances generated with PoWHEG...
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 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 doVetoMPIStep(int nMPI, const Event &)
doVetoMPIStep is called immediately after the MPI generation In this case it never actually vetoes th...
bool canVetoFSREmission()
Switch off veto of FSR.
size_t findLastISREmission(const Pythia8::Event &evt)
size_t findLastFSREmission(const Pythia8::Event &evt)
Author: James Monk (jmonk@cern.ch)