ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8::DecayToSUEP Class Reference

Pythia8 UserHook to decay a given scalar particle to SUEP. More...

Inheritance diagram for Pythia8::DecayToSUEP:
Collaboration diagram for Pythia8::DecayToSUEP:

Public Member Functions

 DecayToSUEP ()
 ~DecayToSUEP ()
virtual bool canVetoProcessLevel ()
virtual bool doVetoProcessLevel (Event &process)

Private Attributes

Pythia8_UserHooks::UserSetting< int > m_pdgId
 PDG Id of particle to be decayed to SUEP.
Pythia8_UserHooks::UserSetting< double > m_mass
 Mass of system decaying [GeV].
Pythia8_UserHooks::UserSetting< double > m_darkMesonMass
 Dark-meson mass parameter [GeV].
Pythia8_UserHooks::UserSetting< double > m_darkTemperature
 Temperature parameter [GeV].

Detailed Description

Pythia8 UserHook to decay a given scalar particle to SUEP.

Details on models available on arXiv:1612.00850. This is an adaption from the available public code at: https://gitlab.com/simonknapen/suep_generator by Simon Knapen.

Definition at line 37 of file DecayToSUEP.cxx.

Constructor & Destructor Documentation

◆ DecayToSUEP()

Pythia8::DecayToSUEP::DecayToSUEP ( )
inline

Definition at line 41 of file DecayToSUEP.cxx.

41 :
42 m_pdgId("DecayToSUEP:PDGId", 25),
43 m_mass("DecayToSUEP:Mass", 125.0),
44 m_darkMesonMass("DecayToSUEP:DarkMesonMass", 1.),
45 m_darkTemperature("DecayToSUEP:DarkTemperature", 1.) {
46
47 std::cout<<"**********************************************************"<<std::endl;
48 std::cout<<"* *"<<std::endl;
49 std::cout<<"* Enabled SUEP decay UserHook! *"<<std::endl;
50 std::cout<<"* *"<<std::endl;
51 std::cout<<"**********************************************************"<<std::endl;
52
53 }
Pythia8_UserHooks::UserSetting< double > m_darkTemperature
Temperature parameter [GeV].
Pythia8_UserHooks::UserSetting< int > m_pdgId
PDG Id of particle to be decayed to SUEP.
Pythia8_UserHooks::UserSetting< double > m_mass
Mass of system decaying [GeV].
Pythia8_UserHooks::UserSetting< double > m_darkMesonMass
Dark-meson mass parameter [GeV].

◆ ~DecayToSUEP()

Pythia8::DecayToSUEP::~DecayToSUEP ( )
inline

Definition at line 55 of file DecayToSUEP.cxx.

55{}

Member Function Documentation

◆ canVetoProcessLevel()

virtual bool Pythia8::DecayToSUEP::canVetoProcessLevel ( )
inlinevirtual

Definition at line 58 of file DecayToSUEP.cxx.

58 {
59 return true;
60 }

◆ doVetoProcessLevel()

bool Pythia8::DecayToSUEP::doVetoProcessLevel ( Event & process)
virtual

Definition at line 92 of file DecayToSUEP.cxx.

93 {
94#ifdef SUEP_DEBUG
95 std::cout << "[SUEP_DEBUG] " << "Start of user hook for this event." << std::endl;
96#endif
97
98 //First, find the particle to decay
99 bool particleFound=false;
100
101#ifdef SUEP_DEBUG
102 for (int ii=0; ii < process.size(); ++ii) {
103 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;
104 }
105#endif
106
107 for (int ii=0; ii < process.size(); ++ii) {
108 if ( (process[ii].id() == m_pdgId(settingsPtr)) and (process[ii].daughter1()!=process[ii].daughter2() && process[ii].daughter1()>0 && process[ii].daughter2()>0) ) {
109
110 Vec4 higgs4mom, mesonmom;
111 vector< Vec4 > suep_shower4momenta;
112 particleFound=true;
113
114 //setup SUEP shower
115 static Suep_shower suep_shower(m_darkMesonMass(settingsPtr), m_darkTemperature(settingsPtr), m_mass(settingsPtr), rndmPtr);
116
117#ifdef SUEP_DEBUG
118 std::cout << "[SUEP_DEBUG] " << "Particle (pdgId=" << m_pdgId(settingsPtr) << ", isFinal=True) found. Decaying to SUEP now." << std::endl;
119#endif
120
121 // First undo decay
122 process[ii].undoDecay();
123
124 int originalEventSize = process.size();
125
126 // Generate the shower, output are 4 vectors in the rest frame of the shower
127 higgs4mom=process[ii].p();
128 int nShowerAttempts=0;
129 do {
130 try {
131 nShowerAttempts++;
132 suep_shower4momenta=suep_shower.generate_shower();
133 if( suep_shower4momenta.size()<3){
134 //Failed to balance energy or less than 3 particles in the shower
135 //Try again until nShowerAttempts >= 3
136 } else {
137 //All ok!
138 nShowerAttempts = -1; //exit condition
139 }
140 } catch (std::exception &e) {
141 //Failed to generate the shower!
142 //Can happen in some rare circumstances,
143 //Try again until nShowerAttempts >= 3
144 }
145 } while ((nShowerAttempts > 0) && (nShowerAttempts < 3));
146 if (nShowerAttempts >= 3) {
147 //Something is seriously wrong then, print warning and skip to next event
148 std::cout << "[SUEP] WARNING: Something went wrong in generating the shower. Skipping the event." << std::endl;
149 return true; //veto the event!
150 }
151
152 // Loop over hidden sector mesons and append to the event
153 for (unsigned j = 0; j < suep_shower4momenta.size(); ++j){
154 //construct pythia 4vector
155 mesonmom = suep_shower4momenta[j];
156
157 // boost to the lab frame
158 mesonmom.bst(higgs4mom.px()/higgs4mom.e(),higgs4mom.py()/higgs4mom.e(), higgs4mom.pz()/higgs4mom.e());
159
160 //append particle to the event. Hidden/dark meson pdg code is 999999.
161 process.append(999999, 91, ii, 0, 0, 0, 0, 0, mesonmom.px(), mesonmom.py(), mesonmom.pz(), mesonmom.e(), m_darkMesonMass(settingsPtr));
162
163#ifdef SUEP_DEBUG
164 std::cout << "[SUEP_DEBUG] " << "Adding dark meson with px=" << mesonmom.px() << ", py=" << mesonmom.py() << ", pz=" << mesonmom.pz() << ", m=" << m_darkMesonMass(settingsPtr) << std::endl;
165#endif
166 }
167
168 // Just to be sure, only modify Higgs status and daughters if a valid decay did happen
169 if ( suep_shower4momenta.size() > 0 ) {
170#ifdef SUEP_DEBUG
171 std::cout << "[SUEP_DEBUG] " << "Setting original particle status-code as non-Final particle. Adding daughters with indices: " << originalEventSize << " - " << process.size()-1 << std::endl;
172#endif
173 // Change the status code of the Higgs to reflect that it has decayed.
174 process[ii].statusNeg();
175
176 //set daughters of the Higgs. Take advantage that we just appended them
177 process[ii].daughters(originalEventSize, process.size()-1);
178 }
179
180 //no need to continue the loop
181 break;
182
183 } // if particle to decay found
184
185 } // loop over particles in the event
186
187 if (not particleFound) {
188 std::cout << "[DecayToSUEP] " << "Particle " << m_pdgId(settingsPtr) << " not found. Nothing to decay to SUEP for this event." << std::endl;
189 } else {
190#ifdef SUEP_DEBUG
191 std::cout << "[SEUP_DEBUG] " << "All Done for this event." << std::endl;
192#endif
193 }
194#ifdef SUEP_DEBUG
195 std::cout << "[SUEP_DEBUG] Printing event after adding SUEP:" << std::endl;
196 for (int ii=0; ii < process.size(); ++ii) {
197 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;
198 }
199#endif
200
201 //return false: let the event continue
202 return false;
203 }
const std::string process
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

Member Data Documentation

◆ m_darkMesonMass

Pythia8_UserHooks::UserSetting<double> Pythia8::DecayToSUEP::m_darkMesonMass
private

Dark-meson mass parameter [GeV].

Definition at line 81 of file DecayToSUEP.cxx.

◆ m_darkTemperature

Pythia8_UserHooks::UserSetting<double> Pythia8::DecayToSUEP::m_darkTemperature
private

Temperature parameter [GeV].

Definition at line 84 of file DecayToSUEP.cxx.

◆ m_mass

Pythia8_UserHooks::UserSetting<double> Pythia8::DecayToSUEP::m_mass
private

Mass of system decaying [GeV].

Definition at line 78 of file DecayToSUEP.cxx.

◆ m_pdgId

Pythia8_UserHooks::UserSetting<int> Pythia8::DecayToSUEP::m_pdgId
private

PDG Id of particle to be decayed to SUEP.

Definition at line 75 of file DecayToSUEP.cxx.


The documentation for this class was generated from the following file: