CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PrimaryTransformer.cc
Go to the documentation of this file.
2 
3 #include "G4ParticleDefinition.hh"
4 
5 PrimaryTransformer::PrimaryTransformer() : G4PrimaryTransformer() { unknownParticleDefined = false; }
6 
8 
9 G4ParticleDefinition* PrimaryTransformer::GetDefinition(G4PrimaryParticle* pp) {
10  G4ParticleDefinition* partDef = pp->GetG4code();
11  if (!partDef)
12  partDef = particleTable->FindParticle(pp->GetPDGcode());
13  if (unknownParticleDefined && ((!partDef) || partDef->IsShortLived()))
14  partDef = unknown;
15  return partDef;
16 }
tuple pp
Definition: createTree.py:17
G4ParticleDefinition * GetDefinition(G4PrimaryParticle *pp) override
~PrimaryTransformer() override