8 #include <boost/phoenix/bind.hpp>
9 #include <boost/math/tools/roots.hpp>
44 m_pdgId(
"DecayToSUEP:PDGId", 25),
45 m_mass(
"DecayToSUEP:Mass", 125.0),
49 std::cout<<
"**********************************************************"<<std::endl;
50 std::cout<<
"* *"<<std::endl;
51 std::cout<<
"* Enabled SUEP decay UserHook! *"<<std::endl;
52 std::cout<<
"* *"<<std::endl;
53 std::cout<<
"**********************************************************"<<std::endl;
97 std::cout <<
"[SUEP_DEBUG] " <<
"Start of user hook for this event." << std::endl;
101 bool particleFound=
false;
104 for (
int ii=0; ii <
process.size(); ++ii) {
105 std::cout <<
"[SUEP_DEBUG] " << ii <<
": id=" <<
process[ii].id() <<
", Final=" <<
process[ii].isFinal() <<
", Status=" <<
process[ii].status() <<
", daughter1=" <<
process[ii].daughter1() <<
", daughter2=" <<
process[ii].daughter2() << std::endl;
109 for (
int ii=0; ii <
process.size(); ++ii) {
112 Vec4 higgs4mom, mesonmom;
113 vector< Vec4 > suep_shower4momenta;
120 std::cout <<
"[SUEP_DEBUG] " <<
"Particle (pdgId=" <<
m_pdgId(settingsPtr) <<
", isFinal=True) found. Decaying to SUEP now." << std::endl;
126 int originalEventSize =
process.size();
130 int nShowerAttempts=0;
135 if( suep_shower4momenta.size()<3){
140 nShowerAttempts = -1;
147 }
while ((nShowerAttempts > 0) && (nShowerAttempts < 3));
148 if (nShowerAttempts >= 3) {
150 std::cout <<
"[SUEP] WARNING: Something went wrong in generating the shower. Skipping the event." << std::endl;
155 for (
unsigned j = 0; j < suep_shower4momenta.size(); ++j){
157 mesonmom = suep_shower4momenta[j];
160 mesonmom.bst(higgs4mom.px()/higgs4mom.e(),higgs4mom.py()/higgs4mom.e(), higgs4mom.pz()/higgs4mom.e());
163 process.append(999999, 91, ii, 0, 0, 0, 0, 0, mesonmom.px(), mesonmom.py(), mesonmom.pz(), mesonmom.e(),
m_darkMesonMass(settingsPtr));
166 std::cout <<
"[SUEP_DEBUG] " <<
"Adding dark meson with px=" << mesonmom.px() <<
", py=" << mesonmom.py() <<
", pz=" << mesonmom.pz() <<
", m=" <<
m_darkMesonMass(settingsPtr) << std::endl;
171 if ( suep_shower4momenta.size() > 0 ) {
173 std::cout <<
"[SUEP_DEBUG] " <<
"Setting original particle status-code as non-Final particle. Adding daughters with indices: " << originalEventSize <<
" - " <<
process.size()-1 << std::endl;
189 if (not particleFound) {
190 std::cout <<
"[DecayToSUEP] " <<
"Particle " <<
m_pdgId(settingsPtr) <<
" not found. Nothing to decay to SUEP for this event." << std::endl;
193 std::cout <<
"[SEUP_DEBUG] " <<
"All Done for this event." << std::endl;
197 std::cout <<
"[SUEP_DEBUG] Printing event after adding SUEP:" << std::endl;
198 for (
int ii=0; ii <
process.size(); ++ii) {
199 std::cout <<
"[SUEP_DEBUG] " << ii <<
": id=" <<
process[ii].id() <<
", Final=" <<
process[ii].isFinal() <<
", mayDecay=" <<
process[ii].mayDecay() <<
", Status=" <<
process[ii].status() <<
", daughter1=" <<
process[ii].daughter1() <<
", daughter2=" <<
process[ii].daughter2() << std::endl;