00001 #include "G4ios.hh" 00002 #include "G4DataHelpers/G4DhPrimaryParticleInformation.h" 00003 #include "HepMC/GenEvent.h" 00004 #include "HepMC/GenVertex.h" 00005 #include "HepMC/GenParticle.h" 00006 00007 G4DhPrimaryParticleInformation::G4DhPrimaryParticleInformation(const HepMC::GenEvent *hepEvent, 00008 const HepMC::GenVertex* hepVertex, 00009 const HepMC::GenParticle* hepParticle) 00010 : mHepEvent(hepEvent) 00011 , mHepVertex(hepVertex) 00012 , mHepParticle(hepParticle) 00013 { 00014 } 00015 00016 void G4DhPrimaryParticleInformation::Print() const 00017 { 00018 G4cout << "G4DhPrimaryVertexInformation" << std::endl; 00019 if(mHepEvent) mHepEvent->print(G4cout); 00020 else G4cout << " HepEvent is null" << std::endl; 00021 if(mHepVertex) mHepVertex->print(G4cout); 00022 else G4cout << " HepVertex is null" << std::endl; 00023 if(mHepParticle) mHepParticle->print(G4cout); 00024 else G4cout << " HepParticle is null" << std::endl; 00025 }