BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
HepMcParticleLink.cxx
Go to the documentation of this file.
1
#include "GeneratorObject/HepMcParticleLink.h"
2
// #include "GeneratorObject/McEventCollection.h"
3
// #include "StoreGate/StoreGate.h"
4
#include "HepMC/GenEvent.h"
5
#include "HepMC/GenParticle.h"
6
#include <cassert>
7
8
HepMcParticleLink::HepMcParticleLink
(
const
HepMC::GenParticle* part,
index_type
eventIndex
)
9
: m_particle( const_cast<
HepMC
::GenParticle*>( part ) )
10
, m_extBarcode( ( 0 != part ) ? part->
barcode
() : 0,
eventIndex
) {
11
assert( part );
12
}
13
14
const
HepMC::GenParticle*
HepMcParticleLink::cptr
()
const
{
15
if
( !m_particle )
16
{
17
/*const McEventCollection* pEvtColl;
18
if ((StoreGate::instance().retrieve(pEvtColl)).isSuccess()) { //FIXME SLOW
19
m_particle = pEvtColl->at(eventIndex())->barcode_to_particle(barcode());
20
}*/
21
}
22
return
m_particle;
23
}
HepMcParticleLink::eventIndex
index_type eventIndex() const
Definition
Event/GeneratorObject/include/GeneratorObject/HepMcParticleLink.h:45
HepMcParticleLink::HepMcParticleLink
HepMcParticleLink()
Definition
Event/GeneratorObject/include/GeneratorObject/HepMcParticleLink.h:23
HepMcParticleLink::index_type
unsigned int index_type
Definition
Event/GeneratorObject/include/GeneratorObject/HepMcParticleLink.h:19
HepMcParticleLink::barcode
int barcode() const
Definition
Event/GeneratorObject/include/GeneratorObject/HepMcParticleLink.h:44
HepMcParticleLink::cptr
const HepMC::GenParticle * cptr() const
Definition
HepMcParticleLink.cxx:14
HepMC
Definition
GenIMCselector.h:12
8.0.0
BOSS_Source
Event
GeneratorObject
src
HepMcParticleLink.cxx
Generated by
1.16.1