#include <HepMCHelpers.h>
Definition at line 174 of file HepMCHelpers.h.
◆ add() [1/2]
Definition at line 223 of file HepMCHelpers.h.
223 {
224 bool samePart = false;
225 pVert = nullptr;
226 auto outgoing = EndVert->particles_out();
227 auto incoming = EndVert->particles_in();
228 for (const auto& itrDaug: outgoing) {
229 if (!itrDaug) continue;
◆ add() [2/2]
◆ barcode_to_particle() [1/2]
| GenParticlePtr MC::HepMC::GenEventBarcodes::barcode_to_particle |
( |
int | id | ) |
|
|
inline |
Definition at line 198 of file HepMCHelpers.h.
200 : vtx->particles_in() ) {
201 if (!parent) continue;
202
◆ barcode_to_particle() [2/2]
Definition at line 193 of file HepMCHelpers.h.
195 {
197 auto vtx =
p->production_vertex();
bool isBeam(const T &p)
Identify if the particle is beam particle.
bool isHadron(const T &p)
◆ barcode_to_particle_map()
| std::map< int, ConstGenParticlePtr > MC::HepMC::GenEventBarcodes::barcode_to_particle_map |
( |
| ) |
const |
|
inline |
Definition at line 248 of file HepMCHelpers.h.
248 {};
249 decltype(theVert->particles_out()) finalStatePart;
250 auto outgoing = theVert->particles_out();
251 for (const auto& thePart: outgoing) {
252 if (!thePart) continue;
253 finalStatePart.push_back(thePart);
◆ barcode_to_vertex() [1/2]
| GenVertexPtr MC::HepMC::GenEventBarcodes::barcode_to_vertex |
( |
int | id | ) |
|
|
inline |
◆ barcode_to_vertex() [2/2]
Definition at line 183 of file HepMCHelpers.h.
184 {
185 auto incoming = pVert->particles_in();
186 if (incoming.at(0) && incoming.at(1) && (std::abs(incoming.at(0)->pdg_id()) < 7 || incoming.at(0)->pdg_id() == 21) && (std::abs(incoming.at(1)->pdg_id()) < 7 || incoming.at(1)->pdg_id() == 21)) return true;
187 }
◆ barcode_to_vertex_map()
| std::map< int, ConstGenVertexPtr > MC::HepMC::GenEventBarcodes::barcode_to_vertex_map |
( |
| ) |
const |
|
inline |
◆ fillAttribute()
| void MC::HepMC::GenEventBarcodes::fillAttribute |
( |
GenEvent * | e | ) |
|
|
inline |
Definition at line 262 of file HepMCHelpers.h.
266 {
for (
auto& p:
evt->particles()) {
p->set_momentum(
p->momentum()*1000);
p->set_generated_mass(1000*
p->generated_mass());}}
267inline void MeVToGeV(
HepMC::GenEvent* evt) {
for (
auto& p:
evt->particles()) {
p->set_momentum(
p->momentum()*1.0/1000);
p->set_generated_mass(1.0/1000*
p->generated_mass());} }
268
269#endif
270}
271#endif
HepMC3::GenEvent GenEvent
void MeVToGeV(HepMC::GenEvent *evt)
◆ from_string()
| virtual bool MC::HepMC::GenEventBarcodes::from_string |
( |
const std::string & | | ) |
|
|
inlineoverridevirtual |
◆ id_to_barcode_map()
| std::map< int, int > MC::HepMC::GenEventBarcodes::id_to_barcode_map |
( |
| ) |
const |
|
inline |
Definition at line 254 of file HepMCHelpers.h.
257 {
259 finalStatePart.insert(finalStatePart.end(),vecPart.begin(),vecPart.end());
auto findFinalStateParticles(V theVert) -> decltype(theVert->particles_out())
Function to find the stable particle descendants of the given vertex..
◆ remove() [1/2]
Definition at line 231 of file HepMCHelpers.h.
234 {
235 samePart = true;
236 pVert = itrDaug->end_vertex();
237 }
238 }
239 if (samePart) EndVert = pVert;
240 } while (pVert != nullptr && pVert != EndVert);
◆ remove() [2/2]
Definition at line 212 of file HepMCHelpers.h.
219 {
220 decltype(thePart->end_vertex()) EndVert = thePart->end_vertex();
221 decltype(thePart->end_vertex()) pVert(nullptr);
◆ to_string()
| virtual bool MC::HepMC::GenEventBarcodes::to_string |
( |
std::string & | att | ) |
const |
|
inlineoverridevirtual |
Definition at line 178 of file HepMCHelpers.h.
179 : 0;
180 pV = numOfPartIn && incoming.front() != nullptr ? incoming.front()->production_vertex() : nullptr;
181
182 } while (numOfPartIn == 1 && (std::abs(pdg) < 81 || std::abs(pdg) > 100) && pV != nullptr);
◆ m_particleBC
| std::unordered_map<int, GenParticlePtr> MC::HepMC::GenEventBarcodes::m_particleBC |
|
private |
◆ m_vertexBC
| std::unordered_map<int, GenVertexPtr> MC::HepMC::GenEventBarcodes::m_vertexBC |
|
private |
The documentation for this class was generated from the following file: