Skip to content
Snippets Groups Projects
Commit 642d3573 authored by John Chapman's avatar John Chapman
Browse files

Migrate G4UserActions and TrackWriteFastSim packages to use (Const)GenParticlePtr

parent ba77fb24
No related branches found
No related tags found
No related merge requests found
......@@ -46,8 +46,8 @@ namespace G4UA
{
// Why a const_cast???
// This is an ugly way to communicate the GenParticle...
HepMC::GenParticle* part =
const_cast<HepMC::GenParticle*>( trackHelper.GetTrackInformation()->
HepMC::GenParticlePtr part =
const_cast<HepMC::GenParticlePtr>( trackHelper.GetTrackInformation()->
GetHepMCParticle() );
// Assign the GenParticle to the EventInformation.
......
......@@ -51,7 +51,7 @@ G4bool NeutronFastSim::ModelTrigger(const G4FastTrack& fastTrack)
// Not a neutron... Pick it up if the primary had eta>6.0
EventInformation *eventInfo=static_cast<EventInformation*>(G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation());
HepMC::GenParticle *gp = eventInfo->GetCurrentPrimary();
HepMC::GenParticlePtr gp = eventInfo->GetCurrentPrimary();
if (fabs(gp->momentum().eta())>m_etaCut && gp->barcode()<200000){
return true;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment