CMS 3D CMS Logo

EmissionVetoHook1.h
Go to the documentation of this file.
1 class EmissionVetoHook1 : public Pythia8::UserHooks {
2 
3 public:
4 
5  // Constructor and destructor.
6  EmissionVetoHook1(int nFinalIn, bool vetoOnIn, int vetoCountIn,
7  int pThardModeIn, int pTemtModeIn, int emittedModeIn,
8  int pTdefModeIn, bool MPIvetoOnIn, int VerbosityIn) :
9  nFinalExt(nFinalIn),
10  vetoOn(vetoOnIn), vetoCount(vetoCountIn),
11  pThardMode(pThardModeIn), pTemtMode(pTemtModeIn),
12  emittedMode(emittedModeIn), pTdefMode(pTdefModeIn),
13  MPIvetoOn(MPIvetoOnIn), nISRveto(0), nFSRveto(0),
14  Verbosity(VerbosityIn) {}
15  ~EmissionVetoHook1() override {
16  std::cout << "Number of ISR vetoed = " << nISRveto << std::endl;
17  std::cout << "Number of FSR vetoed = " << nFSRveto << std::endl;
18  }
19 
20 //--------------------------------------------------------------------------
21 
22  bool canVetoMPIStep() override { return true; }
23  int numberVetoMPIStep() override { return 1; }
24  bool doVetoMPIStep(int nMPI, const Pythia8::Event &e) override;
25 
26  bool canVetoISREmission() override { return vetoOn; }
27  bool doVetoISREmission(int, const Pythia8::Event &e, int iSys) override;
28 
29  bool canVetoFSREmission() override { return vetoOn; }
30  bool doVetoFSREmission(int, const Pythia8::Event &e, int iSys, bool) override;
31 
32  bool canVetoMPIEmission() override { return MPIvetoOn; }
33  bool doVetoMPIEmission(int, const Pythia8::Event &e) override;
34 
36 
37  double pTpythia(const Pythia8::Event &e, int RadAfterBranch,
38  int EmtAfterBranch, int RecAfterBranch, bool FSR);
39 
40  double pTpowheg(const Pythia8::Event &e, int i, int j, bool FSR);
41 
42  double pTcalc(const Pythia8::Event &e, int i, int j, int k, int r, int xSRin);
43 
44 //--------------------------------------------------------------------------
45 
46 private:
49  int nFinal;
50  double pThard, pTMPI;
51  bool accepted;
52  // The number of accepted emissions (in a row)
54  // Statistics on vetos
55  unsigned long int nISRveto, nFSRveto;
56  int Verbosity;
57 };
bool canVetoISREmission() override
EmissionVetoHook1(int nFinalIn, bool vetoOnIn, int vetoCountIn, int pThardModeIn, int pTemtModeIn, int emittedModeIn, int pTdefModeIn, bool MPIvetoOnIn, int VerbosityIn)
bool doVetoFSREmission(int, const Pythia8::Event &e, int iSys, bool) override
bool doVetoISREmission(int, const Pythia8::Event &e, int iSys) override
unsigned long int nISRveto
int numberVetoMPIStep() override
double pTpowheg(const Pythia8::Event &e, int i, int j, bool FSR)
int k[5][pyjets_maxn]
bool doVetoMPIStep(int nMPI, const Pythia8::Event &e) override
bool canVetoMPIEmission() override
bool canVetoFSREmission() override
unsigned long int nFSRveto
double pTcalc(const Pythia8::Event &e, int i, int j, int k, int r, int xSRin)
double pTpythia(const Pythia8::Event &e, int RadAfterBranch, int EmtAfterBranch, int RecAfterBranch, bool FSR)
~EmissionVetoHook1() override
bool canVetoMPIStep() override
void fatalEmissionVeto(std::string message)
bool doVetoMPIEmission(int, const Pythia8::Event &e) override