CMS 3D CMS Logo

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 }
PrimaryTransformer::~PrimaryTransformer
~PrimaryTransformer() override
Definition: PrimaryTransformer.cc:7
PrimaryTransformer::GetDefinition
G4ParticleDefinition * GetDefinition(G4PrimaryParticle *pp) override
Definition: PrimaryTransformer.cc:9
PrimaryTransformer::PrimaryTransformer
PrimaryTransformer()
Definition: PrimaryTransformer.cc:5
PrimaryTransformer.h
createTree.pp
pp
Definition: createTree.py:17
susybsm::HSCParticleType::unknown
Definition: HSCParticle.h:20