#include <GenEvent.h>
Definition at line 174 of file GenEvent.h.
◆ add() [1/2]
Definition at line 223 of file GenEvent.h.
223 {
224 if (!p) return;
228 }
229 }
std::unordered_map< int, GenParticlePtr > m_particleBC
const std::string barcode
◆ add() [2/2]
Definition at line 204 of file GenEvent.h.
204 {
205 if (!p) return;
209 }
210 }
std::unordered_map< int, GenVertexPtr > m_vertexBC
◆ barcode_to_particle() [1/2]
Definition at line 198 of file GenEvent.h.
198 {
201 return nullptr;
202 }
◆ barcode_to_particle() [2/2]
Definition at line 193 of file GenEvent.h.
193 {
196 return nullptr;
197 }
◆ barcode_to_particle_map()
| std::map< int, ConstGenParticlePtr > HepMC::GenEventBarcodes::barcode_to_particle_map |
( |
| ) |
const |
|
inline |
Definition at line 248 of file GenEvent.h.
248 {
249 std::map<int, ConstGenParticlePtr> ret;
251 ret.insert({bcpartpair.first, std::const_pointer_cast<const HepMC3::GenParticle>(bcpartpair.second)});
252 return ret;
253 }
◆ barcode_to_vertex() [1/2]
| GenVertexPtr HepMC::GenEventBarcodes::barcode_to_vertex |
( |
int | id | ) |
|
|
inline |
Definition at line 188 of file GenEvent.h.
188 {
191 return nullptr;
192 }
◆ barcode_to_vertex() [2/2]
Definition at line 183 of file GenEvent.h.
183 {
186 return nullptr;
187 }
◆ barcode_to_vertex_map()
| std::map< int, ConstGenVertexPtr > HepMC::GenEventBarcodes::barcode_to_vertex_map |
( |
| ) |
const |
|
inline |
Definition at line 242 of file GenEvent.h.
242 {
243 std::map<int, ConstGenVertexPtr> ret;
245 ret.insert({bcvertpair.first, std::const_pointer_cast<const HepMC3::GenVertex>(bcvertpair.second)});
246 return ret;
247 }
◆ fillAttribute()
| void HepMC::GenEventBarcodes::fillAttribute |
( |
GenEvent * | e | ) |
|
|
inline |
Definition at line 262 of file GenEvent.h.
262 {
263 const auto eventAttributes =
e->attributes();
265 const bool hasBarcodeAttribute = barcodeAttributeIt != eventAttributes.end();
266
269 if (hasBarcodeAttribute && barcodeAttributeIt->second.count(i) > 0) {
270 const auto &
ptr = barcodeAttributeIt->second.at(i);
271 if (
ptr->is_parsed()) {
272 m_particleBC[
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()] =
ptr->particle();
273 }
274 else {
276 }
277 } else {
279 }
280 }
281 const auto &vertices =
e->vertices();
282 for (
size_t i = 1;
i <= vertices.size();
i++) {
283 if (hasBarcodeAttribute && barcodeAttributeIt->second.count(-i) > 0) {
284 const auto &
ptr = barcodeAttributeIt->second.at(-i);
285 if (
ptr->is_parsed()) {
286 m_vertexBC[
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()] =
ptr->vertex();
287 }
288 else {
290 }
291 } else {
293 }
294 }
295 set_is_parsed(true);
296 }
◆ from_string()
| virtual bool HepMC::GenEventBarcodes::from_string |
( |
const std::string & | | ) |
|
|
inlineoverridevirtual |
◆ id_to_barcode_map()
| std::map< int, int > HepMC::GenEventBarcodes::id_to_barcode_map |
( |
| ) |
const |
|
inline |
Definition at line 254 of file GenEvent.h.
254 {
255 std::map<int, int> ret;
256 for (
const auto &bcvertpair:
m_vertexBC) ret.insert({bcvertpair.second->id(), bcvertpair.first});
257 for (
const auto &bcpartpair:
m_particleBC) ret.insert({bcpartpair.second->id(), bcpartpair.first});
258 return ret;
259 }
◆ remove() [1/2]
Definition at line 231 of file GenEvent.h.
231 {
232 if (!p) return;
238 }
239 }
240 }
◆ remove() [2/2]
Definition at line 212 of file GenEvent.h.
212 {
213 if (!p) return;
219 }
220 }
221 }
◆ to_string()
| virtual bool HepMC::GenEventBarcodes::to_string |
( |
std::string & | att | ) |
const |
|
inlineoverridevirtual |
Definition at line 178 of file GenEvent.h.
179 {
180 att = "GenEventBarcodes";
181 return true;
182 }
◆ m_particleBC
| std::unordered_map<int, GenParticlePtr> HepMC::GenEventBarcodes::m_particleBC |
|
private |
◆ m_vertexBC
| std::unordered_map<int, GenVertexPtr> HepMC::GenEventBarcodes::m_vertexBC |
|
private |
The documentation for this class was generated from the following file: