CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/SimG4Core/Application/src/PrimaryTransformer.cc

Go to the documentation of this file.
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 }