Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:26

0001 #include "GeneratorInterface/Pythia8Interface/plugins/PowhegHooksBB4L.h"
0002 
0003 class EmissionVetoHook1 : public Pythia8::UserHooks {
0004 public:
0005   // Constructor and destructor.
0006   EmissionVetoHook1(int nFinalIn,
0007                     bool vetoOnIn,
0008                     int vetoCountIn,
0009                     int pThardModeIn,
0010                     int pTemtModeIn,
0011                     int emittedModeIn,
0012                     int pTdefModeIn,
0013                     bool MPIvetoOnIn,
0014                     int QEDvetoModeIn,
0015                     int nFinalModeIn,
0016                     int VerbosityIn)
0017       : nFinalExt(nFinalIn),
0018         vetoOn(vetoOnIn),
0019         vetoCount(vetoCountIn),
0020         pThardMode(pThardModeIn),
0021         pTemtMode(pTemtModeIn),
0022         emittedMode(emittedModeIn),
0023         pTdefMode(pTdefModeIn),
0024         MPIvetoOn(MPIvetoOnIn),
0025         QEDvetoMode(QEDvetoModeIn),
0026         nFinalMode(nFinalModeIn),
0027         nISRveto(0),
0028         nFSRveto(0),
0029         Verbosity(VerbosityIn) {}
0030   ~EmissionVetoHook1() override {
0031     std::cout << "Number of ISR vetoed = " << nISRveto << std::endl;
0032     std::cout << "Number of FSR vetoed = " << nFSRveto << std::endl;
0033   }
0034 
0035   //--------------------------------------------------------------------------
0036 
0037   bool canVetoMPIStep() override { return true; }
0038   int numberVetoMPIStep() override { return 1; }
0039   bool doVetoMPIStep(int nMPI, const Pythia8::Event &e) override;
0040 
0041   bool canVetoISREmission() override { return vetoOn; }
0042   bool doVetoISREmission(int, const Pythia8::Event &e, int iSys) override;
0043 
0044   bool canVetoFSREmission() override { return vetoOn; }
0045   bool doVetoFSREmission(int, const Pythia8::Event &e, int iSys, bool) override;
0046 
0047   bool canVetoMPIEmission() override { return MPIvetoOn; }
0048   bool doVetoMPIEmission(int, const Pythia8::Event &e) override;
0049 
0050   void fatalEmissionVeto(std::string message);
0051 
0052   double pTpythia(const Pythia8::Event &e, int RadAfterBranch, int EmtAfterBranch, int RecAfterBranch, bool FSR);
0053 
0054   double pTpowheg(const Pythia8::Event &e, int i, int j, bool FSR);
0055 
0056   double pTcalc(const Pythia8::Event &e, int i, int j, int k, int r, int xSRin);
0057 
0058   //--------------------------------------------------------------------------
0059 
0060 private:
0061   int nFinalExt, vetoOn, vetoCount, pThardMode, pTemtMode, emittedMode, pTdefMode, MPIvetoOn, QEDvetoMode, nFinalMode;
0062   int nFinal;
0063   double pThard, pTMPI;
0064   bool accepted, isEmt;
0065   // The number of accepted emissions (in a row)
0066   int nAcceptSeq;
0067   // Statistics on vetos
0068   unsigned long int nISRveto, nFSRveto;
0069   int Verbosity;
0070 };