@@ -17,8 +17,9 @@ using namespace Pythia8;
1717
1818#include " GeneratorInterface/Pythia8Interface/interface/Py8HMC3InterfaceBase.h"
1919
20- #include " GeneratorInterface/Pythia8Interface/plugins/ ReweightUserHooks.h"
20+ #include " ReweightUserHooks.h"
2121#include " GeneratorInterface/Pythia8Interface/interface/CustomHook.h"
22+ #include " TopRecoilHook.h"
2223
2324// PS matchning prototype
2425//
@@ -150,6 +151,9 @@ class Pythia8HepMC3Hadronizer : public Py8HMC3InterfaceBase {
150151 // Generic customized hooks vector
151152 std::shared_ptr<UserHooksVector> fCustomHooksVector ;
152153
154+ // RecoilToTop userhook
155+ std::shared_ptr<TopRecoilHook> fTopRecoilHook ;
156+
153157 int EV1_nFinal;
154158 bool EV1_vetoOn;
155159 int EV1_maxVetoCount;
@@ -412,6 +416,14 @@ bool Pythia8HepMC3Hadronizer::initializeForInternalPartons() {
412416 (fUserHooksVector ->hooks ).push_back (fPowhegHooksBB4L );
413417 }
414418
419+ bool TopRecoilHook1 = fMasterGen ->settings .flag (" TopRecoilHook:doTopRecoilIn" );
420+ if (TopRecoilHook1) {
421+ edm::LogInfo (" Pythia8Interface" ) << " Turning on RecoilToTop hook from Pythia8Interface" ;
422+ if (!fTopRecoilHook .get ())
423+ fTopRecoilHook .reset (new TopRecoilHook ());
424+ (fUserHooksVector ->hooks ).push_back (fTopRecoilHook );
425+ }
426+
415427 // adapted from main89.cc in pythia8 examples
416428 bool internalMatching = fMasterGen ->settings .flag (" JetMatching:merge" );
417429 bool internalMerging = !(fMasterGen ->settings .word (" Merging:Process" ) == " void" );
@@ -571,6 +583,14 @@ bool Pythia8HepMC3Hadronizer::initializeForExternalPartons() {
571583 (fUserHooksVector ->hooks ).push_back (fPowhegHooksBB4L );
572584 }
573585
586+ bool TopRecoilHook1 = fMasterGen ->settings .flag (" TopRecoilHook:doTopRecoilIn" );
587+ if (TopRecoilHook1) {
588+ edm::LogInfo (" Pythia8Interface" ) << " Turning on RecoilToTop hook from Pythia8Interface" ;
589+ if (!fTopRecoilHook .get ())
590+ fTopRecoilHook .reset (new TopRecoilHook ());
591+ (fUserHooksVector ->hooks ).push_back (fTopRecoilHook );
592+ }
593+
574594 // adapted from main89.cc in pythia8 examples
575595 bool internalMatching = fMasterGen ->settings .flag (" JetMatching:merge" );
576596 bool internalMerging = !(fMasterGen ->settings .word (" Merging:Process" ) == " void" );
0 commit comments