00001 #include "SimG4Core/Application/interface/PrimaryTransformer.h" 00002 00003 #include "G4ParticleDefinition.hh" 00004 00005 PrimaryTransformer::PrimaryTransformer() : G4PrimaryTransformer() 00006 { unknownParticleDefined = false; } 00007 00008 PrimaryTransformer::~PrimaryTransformer() {} 00009 00010 G4ParticleDefinition * PrimaryTransformer::GetDefinition(G4PrimaryParticle * pp) 00011 { 00012 G4ParticleDefinition * partDef = pp->GetG4code(); 00013 if(!partDef) partDef = particleTable->FindParticle(pp->GetPDGcode()); 00014 if(unknownParticleDefined && ((!partDef)||partDef->IsShortLived())) partDef = unknown; 00015 return partDef; 00016 }