ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollectionCnv_p4.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// McEventCollectionCnv_p4.cxx
8// Implementation file for class McEventCollectionCnv_p4
9// Author: S.Binet<binet@cern.ch>
11
12
13// STL includes
14#include <utility>
15#include <cmath>
16#include <cfloat> // for DBL_EPSILON
17
18// GeneratorObjectsTPCnv includes
20#include "HepMcDataPool.h"
21
23
25#include "GaudiKernel/ThreadLocalContext.h"
27
29// Constructors
31
32
34 Base_t( ),
35 m_isPileup(false),m_hepMCWeightSvc("HepMCWeightSvc","McEventCollectionCnv_p4")
36{}
37
39 Base_t( rhs ),
40 m_isPileup(false),m_hepMCWeightSvc("HepMCWeightSvc","McEventCollectionCnv_p4")
41{}
42
45{
46 if ( this != &rhs ) {
47 Base_t::operator=( rhs );
50 }
51 return *this;
52}
53
54// Destructor
56
58= default;
59
61// Const methods:
63
65 McEventCollection* transObj,
66 MsgStream& msg )
67{
68 const EventContext& ctx = Gaudi::Hive::currentContext();
69
70 msg << MSG::DEBUG << "Loading McEventCollection from persistent state..."
71 << endmsg;
72
73 // elements are managed by DataPool
74 if (!m_isPileup)
75 {
76 transObj->clear(SG::VIEW_ELEMENTS);
77 }
78 HepMC::DataPool datapools;
79 const unsigned int nVertices = persObj->m_genVertices.size();
80 datapools.vtx.prepareToAdd(nVertices);
81 const unsigned int nParts = persObj->m_genParticles.size();
82 datapools.part.prepareToAdd(nParts);
83 const unsigned int nEvts = persObj->m_genEvents.size();
84 datapools.evt.prepareToAdd(nEvts);
85
86 transObj->reserve( nEvts );
87 for ( std::vector<GenEvent_p4>::const_iterator
88 itr = persObj->m_genEvents.begin(),
89 itrEnd = persObj->m_genEvents.end();
90 itr != itrEnd;
91 ++itr )
92 {
93 const GenEvent_p4& persEvt = *itr;
94 HepMC::GenEvent * genEvt(nullptr);
95 if(m_isPileup)
96 {
97 genEvt = new HepMC::GenEvent();
98 }
99 else
100 {
101 genEvt = datapools.getGenEvent();
102 }
103 genEvt->add_attribute (HepMCStr::barcodes, std::make_shared<HepMC::GenEventBarcodes>());
104 genEvt->add_attribute(HepMCStr::signal_process_id, std::make_shared<HepMC3::IntAttribute>(persEvt.m_signalProcessId));
105 genEvt->set_event_number(persEvt.m_eventNbr);
106 genEvt->add_attribute(HepMCStr::event_scale, std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_eventScale));
107 genEvt->add_attribute(HepMCStr::alphaQCD, std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_alphaQCD));
108 genEvt->add_attribute(HepMCStr::alphaQED, std::make_shared<HepMC3::DoubleAttribute>(persEvt.m_alphaQED));
109 genEvt->weights() = persEvt.m_weights;
110 genEvt->add_attribute(HepMCStr::random_states, std::make_shared<HepMC3::VectorLongIntAttribute>(persEvt.m_randomStates));
111 //restore weight names from the dedicated svc (which was keeping them in metadata for efficiency)
112 if(!genEvt->run_info()) genEvt->set_run_info(std::make_shared<HepMC3::GenRunInfo>());
113 if(genEvt->run_info()) genEvt->run_info()->set_weight_names(m_hepMCWeightSvc->weightNameVec(ctx));
114
115
116 // pdfinfo restore
117 if (!persEvt.m_pdfinfo.empty())
118 {
119 const std::vector<double>& pdf = persEvt.m_pdfinfo;
120 HepMC3::GenPdfInfoPtr pi = std::make_shared<HepMC3::GenPdfInfo>();
121 pi->set(
122 static_cast<int>(pdf[6]), // id1
123 static_cast<int>(pdf[5]), // id2
124 pdf[4], // x1
125 pdf[3], // x2
126 pdf[2], // scalePDF
127 pdf[1], // pdf1
128 pdf[0] ); // pdf2
129 genEvt->set_pdf_info(std::move(pi));
130 }
131
132 transObj->push_back( genEvt );
133
134 // create a temporary map associating the barcode of an end-vtx to its
135 // particle.
136 // As not all particles are stable (d'oh!) we take 50% of the number of
137 // particles as an initial size of the hash-map (to prevent re-hash)
138 ParticlesMap_t partToEndVtx( (persEvt.m_particlesEnd-persEvt.m_particlesBegin)/2 );
139 // This is faster than the HepMC::barcode_to_vertex
140 std::map<int, HepMC::GenVertexPtr> brc_to_vertex;
141 // create the vertices
142 const unsigned int endVtx = persEvt.m_verticesEnd;
143 for ( unsigned int iVtx= persEvt.m_verticesBegin; iVtx != endVtx; ++iVtx )
144 {
145 auto vtx = createGenVertex( *persObj, persObj->m_genVertices[iVtx], partToEndVtx, datapools, genEvt );
146 brc_to_vertex[persObj->m_genVertices[iVtx].m_barcode] = std::move(vtx);
147 } //> end loop over vertices
148
149 // set the signal process vertex
150 const int sigProcVtx = persEvt.m_signalProcessVtx;
151 if ( sigProcVtx != 0 && brc_to_vertex.count(sigProcVtx) ) {
152 HepMC::set_signal_process_vertex(genEvt, brc_to_vertex[sigProcVtx] );
153 }
154
155 // connect particles to their end vertices
156 for (auto & p : partToEndVtx) {
157 if ( brc_to_vertex.count(p.second) ) {
158 auto decayVtx = brc_to_vertex[p.second];
159 decayVtx->add_particle_in( p.first );
160 } else {
161 msg << MSG::ERROR << "GenParticle points to null end vertex !!" << endmsg;
162 }
163 }
164
165 } //> end loop over m_genEvents
166
167 msg << MSG::DEBUG << "Loaded McEventCollection from persistent state [OK]"
168 << endmsg;
169}
170
172 McEventCollection_p4* persObj,
173 MsgStream& msg )
174{
175 const EventContext& ctx = Gaudi::Hive::currentContext();
176
177 msg << MSG::DEBUG << "Creating persistent state of McEventCollection..."
178 << endmsg;
179 persObj->m_genEvents.reserve( transObj->size() );
180
181 const std::pair<unsigned int,unsigned int> stats = nbrParticlesAndVertices( transObj );
182 persObj->m_genParticles.reserve( stats.first );
183 persObj->m_genVertices.reserve ( stats.second );
184
185 const McEventCollection::const_iterator itrEnd = transObj->end();
186 for ( McEventCollection::const_iterator itr = transObj->begin();
187 itr != itrEnd;
188 ++itr )
189 {
190 const unsigned int nPersVtx = persObj->m_genVertices.size();
191 const unsigned int nPersParts = persObj->m_genParticles.size();
192 const HepMC::GenEvent* genEvt = *itr;
193 //save the weight names to metadata via the HepMCWeightSvc
194 if (genEvt->run_info()) {
195 if (!genEvt->run_info()->weight_names().empty()) {
196 m_hepMCWeightSvc->setWeightNames( names_to_name_index_map(genEvt->weight_names()), ctx ).ignore();
197 } else {
198 //AV : This to be decided if one would like to have default names.
199 //std::vector<std::string> names{"0"};
200 //m_hepMCWeightSvc->setWeightNames( names_to_name_index_map(names), ctx );
201 }
202 }
203 auto A_signal_process_id=genEvt->attribute<HepMC3::IntAttribute>(HepMCStr::signal_process_id);
204 auto A_event_scale=genEvt->attribute<HepMC3::DoubleAttribute>(HepMCStr::event_scale);
205 auto A_alphaQCD=genEvt->attribute<HepMC3::DoubleAttribute>(HepMCStr::alphaQCD);
206 auto A_alphaQED=genEvt->attribute<HepMC3::DoubleAttribute>(HepMCStr::alphaQED);
207 auto signal_process_vertex = HepMC::signal_process_vertex(genEvt);
208 auto A_random_states=genEvt->attribute<HepMC3::VectorLongIntAttribute>(HepMCStr::random_states);
209
210 persObj->m_genEvents.
211 emplace_back( A_signal_process_id?(A_signal_process_id->value()):0,
212 genEvt->event_number(),
213 A_event_scale?(A_event_scale->value()):0.0,
214 A_alphaQCD?(A_alphaQCD->value()):0.0,
215 A_alphaQED?(A_alphaQED->value()):0.0,
216 signal_process_vertex?HepMC::barcode(signal_process_vertex):0,
217 genEvt->weights(),
218 std::vector<double>(),//No idea why it is empty
219 A_random_states?(A_random_states->value()):std::vector<long>(),
220 nPersVtx,
221 nPersVtx + genEvt->vertices().size(),
222 nPersParts,
223 nPersParts + genEvt->particles().size() );
224
225 //PdfInfo encoding
226 if (genEvt->pdf_info())
227 {
228 auto pi=genEvt->pdf_info();
229 GenEvent_p4& persEvt = persObj->m_genEvents.back();
230 std::vector<double>& pdfinfo = persEvt.m_pdfinfo;
231 pdfinfo.resize(7);
232 pdfinfo[6] = static_cast<double>(pi->parton_id[0]);
233 pdfinfo[5] = static_cast<double>(pi->parton_id[1]);
234 pdfinfo[4] = pi->x[0];
235 pdfinfo[3] = pi->x[1];
236 pdfinfo[2] = pi->scale;
237 pdfinfo[1] = pi->xf[0];
238 pdfinfo[0] = pi->xf[1];
239 }
240 // create vertices
241 for ( const auto& v: genEvt->vertices())
242 {
243 writeGenVertex( v, *persObj );
244 }
245
246 } //> end loop over GenEvents
247
248 msg << MSG::DEBUG << "Created persistent state of HepMC::GenEvent [OK]"
249 << endmsg;
250}
251
252
255 const GenVertex_p4& persVtx,
256 ParticlesMap_t& partToEndVtx,
257 HepMC::DataPool& datapools, HepMC::GenEvent* parent ) const
258{
259 HepMC::GenVertexPtr vtx(nullptr);
260 if(m_isPileup)
261 {
263 }
264 else
265 {
266 vtx = datapools.getGenVertex();
267 }
268 if (parent) parent->add_vertex(vtx);
269 vtx->set_position(HepMC::FourVector( persVtx.m_x , persVtx.m_y , persVtx.m_z ,persVtx.m_t ));
270 vtx->set_status(HepMC::new_vertex_status_from_old(persVtx.m_id, persVtx.m_barcode)); // UPDATED STATUS VALUE TO NEW SCHEME
271 // cast from std::vector<float> to std::vector<double>
272 std::vector<double> weights( persVtx.m_weights.begin(), persVtx.m_weights.end() );
273 vtx->add_attribute(HepMCStr::weights,std::make_shared<HepMC3::VectorDoubleAttribute>(weights));
275
276 // handle the in-going (orphans) particles
277 //Is this needed in HepMC3?
278 const unsigned int nPartsIn = persVtx.m_particlesIn.size();
279 for ( unsigned int i = 0; i != nPartsIn; ++i )
280 {
281 createGenParticle( persEvt.m_genParticles[persVtx.m_particlesIn[i]], partToEndVtx, datapools, vtx, false );
282 }
283
284 // now handle the out-going particles
285 const unsigned int nPartsOut = persVtx.m_particlesOut.size();
286 for ( unsigned int i = 0; i != nPartsOut; ++i )
287 {
288 createGenParticle( persEvt.m_genParticles[persVtx.m_particlesOut[i]], partToEndVtx, datapools, vtx );
289 }
290
291 return vtx;
292}
293
296 ParticlesMap_t& partToEndVtx,
297 HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent, bool add_to_output ) const
298{
299 HepMC::GenParticlePtr p(nullptr);
300 if (m_isPileup)
301 {
303 }
304 else
305 {
306 p = datapools.getGenParticle();
307 }
308 if (parent) add_to_output?parent->add_particle_out(p):parent->add_particle_in(p);
309 p->set_pdg_id( persPart.m_pdgId);
310 p->set_status(HepMC::new_particle_status_from_old(persPart.m_status, persPart.m_barcode)); // UPDATED STATUS VALUE TO NEW SCHEME
311 p->add_attribute(HepMCStr::phi,std::make_shared<HepMC3::DoubleAttribute>(persPart.m_phiPolarization));
312 p->add_attribute(HepMCStr::theta,std::make_shared<HepMC3::DoubleAttribute>(persPart.m_thetaPolarization));
314
315 // Note: do the E calculation in extended (long double) precision.
316 // That happens implicitly on x86 with optimization on; saying it
317 // explicitly ensures that we get the same results with and without
318 // optimization. (If this is a performance issue for platforms
319 // other than x86, one could change to double for those platforms.)
320 if ( 0 == persPart.m_recoMethod )
321 {
322 double temp_e = std::sqrt( (long double)(persPart.m_px)*persPart.m_px +
323 (long double)(persPart.m_py)*persPart.m_py +
324 (long double)(persPart.m_pz)*persPart.m_pz +
325 (long double)(persPart.m_m) *persPart.m_m );
326 p->set_momentum( HepMC::FourVector(persPart.m_px,persPart.m_py,persPart.m_pz,temp_e));
327 }
328 else
329 {
330 const int signM2 = ( persPart.m_m >= 0. ? 1 : -1 );
331 const double persPart_ene =
332 std::sqrt( std::abs((long double)(persPart.m_px)*persPart.m_px +
333 (long double)(persPart.m_py)*persPart.m_py +
334 (long double)(persPart.m_pz)*persPart.m_pz +
335 signM2* (long double)(persPart.m_m)* persPart.m_m));
336 const int signEne = ( persPart.m_recoMethod == 1 ? 1 : -1 );
337 p->set_momentum( HepMC::FourVector( persPart.m_px,
338 persPart.m_py,
339 persPart.m_pz,
340 signEne * persPart_ene ));
341 }
342
343 // setup flow
344 std::vector<int> flows;
345 const unsigned int nFlow = persPart.m_flow.size();
346 for ( unsigned int iFlow= 0; iFlow != nFlow; ++iFlow ) {
347 flows.push_back(persPart.m_flow[iFlow].second );
348 }
349 //We construct it here as vector w/o gaps.
350 p->add_attribute(HepMCStr::flows, std::make_shared<HepMC3::VectorIntAttribute>(flows));
351
352 if ( persPart.m_endVtx != 0 )
353 {
354 partToEndVtx[p] = persPart.m_endVtx;
355 }
356
357 return p;
358}
359
361 McEventCollection_p4& persEvt )
362{
363 const HepMC::FourVector& position = vtx->position();
364 auto A_weights=vtx->attribute<HepMC3::VectorDoubleAttribute>(HepMCStr::weights);
365 auto A_barcode=vtx->attribute<HepMC3::IntAttribute>(HepMCStr::barcode);
366 std::vector<float> weights;
367 if (A_weights) {
368 auto weights_d = A_weights->value();
369 for (auto& w: weights_d) weights.push_back(w);
370 }
371 persEvt.m_genVertices.emplace_back( position.x(),
372 position.y(),
373 position.z(),
374 position.t(),
375 HepMC::old_vertex_status_from_new(vtx->status()), // REVERTED STATUS VALUE TO OLD SCHEME
376 weights.begin(),
377 weights.end(),
378 A_barcode?(A_barcode->value()):vtx->id()
379 );
380 GenVertex_p4& persVtx = persEvt.m_genVertices.back();
381 // we write only the orphans in-coming particles and beams
382 persVtx.m_particlesIn.reserve(vtx->particles_in().size());
383 for ( const auto& p: vtx->particles_in())
384 {
385 if ( !p->production_vertex() || p->production_vertex()->id() == 0 )
386 {
387 persVtx.m_particlesIn.push_back( writeGenParticle(p, persEvt ));
388 }
389 }
390 persVtx.m_particlesOut.reserve(vtx->particles_out().size());
391 for ( const auto& p: vtx->particles_out())
392 {
393 persVtx.m_particlesOut.push_back( writeGenParticle(p, persEvt ) );
394 }
395 }
396
398 McEventCollection_p4& persEvt )
399{
400 const HepMC::FourVector& mom = p->momentum();
401 const double ene = mom.e();
402 const double m2 = mom.m2();
403
404 // Definitions of Bool isTimeLilike, isSpacelike and isLightlike according to HepLorentzVector definition
405 const bool useP2M2 = !(m2 > 0) && // !isTimelike
406 (m2 < 0) && // isSpacelike
407 !(std::abs(m2) < 2.0*DBL_EPSILON*ene*ene); // !isLightlike
408
409 const short recoMethod = ( !useP2M2 ? 0: ( ene >= 0. ? 1 : 2 ) );
410 auto A_theta=p->attribute<HepMC3::DoubleAttribute>(HepMCStr::theta);
411 auto A_phi=p->attribute<HepMC3::DoubleAttribute>(HepMCStr::phi);
412 auto A_flows=p->attribute<HepMC3::VectorIntAttribute>(HepMCStr::flows);
413
414
415 persEvt.m_genParticles.emplace_back( mom.px(),
416 mom.py(),
417 mom.pz(),
418 mom.m(),
419 p->pdg_id(),
420 HepMC::old_particle_status_from_new(p->status()), // REVERTED STATUS VALUE TO OLD SCHEME
421 A_flows?(A_flows->value().size()):0,
422 A_theta?(A_theta->value()):0.0,
423 A_phi?(A_phi->value()):0.0,
424 p->production_vertex()?(HepMC::barcode(p->production_vertex())):0,
425 p->end_vertex()?(HepMC::barcode(p->end_vertex())):0,
427 recoMethod );
428
429 std::vector< std::pair<int,int> > flow_hepmc2;
430 if(A_flows) flow_hepmc2=vector_to_vector_int_int(A_flows->value());
431 persEvt.m_genParticles.back().m_flow.assign( flow_hepmc2.begin(),flow_hepmc2.end() );
432 // we return the index of the particle in the big vector of particles
433 // (contained by the persistent GenEvent)
434 return (persEvt.m_genParticles.size() - 1);
435}
436
#define endmsg
#define pi
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
void clear()
Erase all the elements in the collection.
double m_alphaQED
value of the QED coupling.
Definition GenEvent_p4.h:83
double m_alphaQCD
value of the QCD coupling.
Definition GenEvent_p4.h:79
double m_eventScale
Energy scale.
Definition GenEvent_p4.h:75
std::vector< double > m_weights
Weights for this event.
Definition GenEvent_p4.h:94
int m_signalProcessId
Id of the processus being generated.
Definition GenEvent_p4.h:67
int m_eventNbr
Event number.
Definition GenEvent_p4.h:71
std::vector< double > m_pdfinfo
Container of HepMC::PdfInfo object translated to vector<double> for simplicity.
Definition GenEvent_p4.h:99
unsigned int m_verticesEnd
End position in the vector of vertices composing this event.
unsigned int m_particlesEnd
End position in the vector of particles composing this event.
unsigned int m_verticesBegin
Begin position in the vector of vertices composing this event.
unsigned int m_particlesBegin
Begin position in the vector of particles composing this event.
int m_signalProcessVtx
Barcode of the GenVertex holding the signal process.
Definition GenEvent_p4.h:89
std::vector< long int > m_randomStates
Container of random numbers for the generator states.
float m_px
x-component of the 4-momentum of this particle
float m_m
m-component of the 4-momentum of this particle
float m_py
y-component of the 4-momentum of this particle
short m_recoMethod
switch to know which method to chose to better recover the original HepLorentzVector.
int m_pdgId
identity of this particle, according to the Particle Data Group notation
std::vector< std::pair< int, int > > m_flow
Flow for this particle.
float m_phiPolarization
phi polarization
float m_pz
z-component of the 4-momentum of this particle
float m_thetaPolarization
polarization
int m_endVtx
Barcode of the decay vertex of this particle.
int m_status
Status of this particle.
int m_barcode
barcode of this particles (uniquely identifying this particle within a given GenEvent)
float m_x
x-coordinate of the vertex
float m_t
t-coordinate of the vertex
std::vector< int > m_particlesIn
collection of barcodes of in-going particles connected to this vertex
float m_y
y-coordinate of the vertex
std::vector< float > m_weights
Weights for this vertex.
float m_z
z-coordinate of the vertex
int m_barcode
barcode of this vertex (uniquely identifying a vertex within an event)
std::vector< int > m_particlesOut
collection of barcodes of out-going particles connected to this vertex
int m_id
Id of this vertex.
virtual void persToTrans(const McEventCollection_p4 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
HepMC::GenParticlePtr createGenParticle(const GenParticle_p4 &p, ParticlesMap_t &partToEndVtx, HepMC::DataPool &datapools, const HepMC::GenVertexPtr &parent=nullptr, bool add_to_output=true) const
Create a transient GenParticle from a persistent one (vers.1) It returns the new GenParticle.
static int writeGenParticle(const HepMC::ConstGenParticlePtr &p, McEventCollection_p4 &persEvt)
Method to write a persistent GenParticle object It returns the index of the persistent GenParticle in...
McEventCollectionCnv_p4 & operator=(const McEventCollectionCnv_p4 &rhs)
Assignement operator.
virtual ~McEventCollectionCnv_p4()
Destructor.
McEventCollectionCnv_p4()
Default constructor:
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p4 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p4 from its transient representation ...
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p4 > Base_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
HepMC::GenVertexPtr createGenVertex(const McEventCollection_p4 &persEvts, const GenVertex_p4 &vtx, ParticlesMap_t &bcToPart, HepMC::DataPool &datapools, HepMC::GenEvent *parent=nullptr) const
Create a transient GenVertex from a persistent one (version 1) It returns the new GenVertex.
static void writeGenVertex(const HepMC::ConstGenVertexPtr &vtx, McEventCollection_p4 &persEvt)
Method to write a persistent GenVertex object.
ServiceHandle< IHepMCWeightSvc > m_hepMCWeightSvc
std::vector< GenParticle_p4 > m_genParticles
The vector of persistent representation of GenParticles.
std::vector< GenVertex_p4 > m_genVertices
The vector of persistent representation of GenVertices.
std::vector< GenEvent_p4 > m_genEvents
The vector of persistent representation of GenEvents.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
const std::string event_scale
const std::string phi
const std::string barcode
const std::string flows
const std::string weights
const std::string theta
const std::string signal_process_id
const std::string random_states
const std::string alphaQED
const std::string alphaQCD
const std::string barcodes
int barcode(const T *p)
Definition Barcode.h:15
HepMC3::FourVector FourVector
void set_signal_process_vertex(GenEvent *e, T &v)
Definition GenEvent.h:591
ConstGenVertexPtr signal_process_vertex(const GenEvent *e)
Definition GenEvent.h:597
GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom=HepMC3::FourVector::ZERO_VECTOR(), int pid=0, int status=0)
Definition GenParticle.h:21
bool suggest_barcode(T &p, int i)
Definition GenEvent.h:607
int new_vertex_status_from_old(const int oldStatus, const int barcode)
Get vertex status in the new scheme from the barcode and status in the old scheme.
int old_vertex_status_from_new(const int newStatus)
Get vertex status in the old scheme from the status in the new scheme.
HepMC3::GenParticlePtr GenParticlePtr
Definition GenParticle.h:19
GenVertexPtr newGenVertexPtr(const HepMC3::FourVector &pos=HepMC3::FourVector::ZERO_VECTOR(), const int i=0)
Definition GenVertex.h:25
HepMC3::GenVertexPtr GenVertexPtr
Definition GenVertex.h:23
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition GenParticle.h:20
int new_particle_status_from_old(const int oldStatus, const int barcode)
Get particle status in the new scheme from the barcode and status in the old scheme.
int old_particle_status_from_new(const int newStatus)
Get particle status in the old scheme from the status in the new scheme.
HepMC3::ConstGenVertexPtr ConstGenVertexPtr
Definition GenVertex.h:24
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
::DataPool< HepMC::GenEvent, ClearGenEvent > evt
::DataPool< HepMC::GenParticle, ClearGenParticle > part
HepMC::GenParticlePtr getGenParticle()
HepMC::GenEvent * getGenEvent()
HepMC::GenVertexPtr getGenVertex()
::DataPool< HepMC::GenVertex, ClearGenVertex > vtx
MsgStream & msg
Definition testRead.cxx:32