#include <HepMCHelpers.h>
Definition at line 174 of file HepMCHelpers.h.
◆ add() [1/2]
Definition at line 223 of file HepMCHelpers.h.
225 {
226 decltype(thePart->end_vertex()) EndVert = thePart->end_vertex();
227 decltype(thePart->end_vertex()) pVert(nullptr);
228 if (EndVert != nullptr) {
229 do {
◆ add() [2/2]
Definition at line 204 of file HepMCHelpers.h.
207 if (!parent) continue;
208
209
210 fromBSM |=
isBSM(parent);
auto particles_in(const VTX *p)
bool isBSM(const T &p)
APID: graviton and all Higgs extensions are BSM.
◆ barcode_to_particle() [1/2]
| GenParticlePtr MC::HepMC::GenEventBarcodes::barcode_to_particle |
( |
int | id | ) |
|
|
inline |
Definition at line 198 of file HepMCHelpers.h.
201 {
bool isBeam(const T &p)
Identify if the particle is beam particle.
bool isHadron(const T &p)
◆ barcode_to_particle() [2/2]
◆ barcode_to_particle_map()
| std::map< int, ConstGenParticlePtr > MC::HepMC::GenEventBarcodes::barcode_to_particle_map |
( |
| ) |
const |
|
inline |
◆ barcode_to_vertex() [1/2]
| GenVertexPtr MC::HepMC::GenEventBarcodes::barcode_to_vertex |
( |
int | id | ) |
|
|
inline |
Definition at line 188 of file HepMCHelpers.h.
189 {
190 auto incoming = pVert->particles_in();
191 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;
192 }
◆ barcode_to_vertex() [2/2]
Definition at line 183 of file HepMCHelpers.h.
184 : 0;
185 pV = numOfPartIn && incoming.front() != nullptr ? incoming.front()->production_vertex() : nullptr;
186
187 } while (numOfPartIn == 1 && (std::abs(pdg) < 81 || std::abs(pdg) > 100) && pV != nullptr);
◆ 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.
263 {
265 finalStatePart.insert(finalStatePart.end(),vecPart.begin(),vecPart.end());
266 }
267 }
268 return finalStatePart;
269 }
270#if !defined(XAOD_ANALYSIS)
272inline void GeVToMeV(
HepMC::GenEvent* evt) {
for (
auto& p:
evt->particles()) {
p->set_momentum(
p->momentum()*1000);
p->set_generated_mass(1000*
p->generated_mass());}}
273inline 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());} }
274
275#endif
276}
277#endif
HepMC3::GenEvent GenEvent
void MeVToGeV(HepMC::GenEvent *evt)
void GeVToMeV(HepMC::GenEvent *evt)
auto findFinalStateParticles(V theVert) -> decltype(theVert->particles_out())
Function to find the stable particle descendants of the given vertex..
◆ 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.
254 {};
255 decltype(theVert->particles_out()) finalStatePart;
256 auto outgoing = theVert->particles_out();
257 for (const auto& thePart: outgoing) {
258 if (!thePart) continue;
259 finalStatePart.push_back(thePart);
◆ remove() [1/2]
Definition at line 231 of file HepMCHelpers.h.
234 : outgoing) {
235 if (!itrDaug) continue;
237
238 (outgoing.size() == 1 && incoming.size() == 1 &&
240 itrDaug->pdg_id() == thePart->pdg_id()) {
bool is_same_generator_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same generated particle.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
◆ remove() [2/2]
Definition at line 212 of file HepMCHelpers.h.
213 {
215 return true;
216 }
217 fromHad |=
isFromHadron(parent, hadron, fromTau, fromBSM);
218 }
219 return fromHad;
220 }
221
bool isFromHadron(T p, U hadron, bool &fromTau, bool &fromBSM)
Function to classify the particle.
◆ to_string()
| virtual bool MC::HepMC::GenEventBarcodes::to_string |
( |
std::string & | att | ) |
const |
|
inlineoverridevirtual |
Definition at line 178 of file HepMCHelpers.h.
180 {
181 pVert = pV;
182 auto incoming = pVert->particles_in();
◆ 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: