52 fEnvelopeBox(nullptr),
53 fEnvelopeVol(nullptr),
54 fPosCenter(G4ThreeVector(0.0)),
55 fPosDelta(G4ThreeVector(0.0)),
62 = particleTable->FindParticle(particleName=
"e-");
64 fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
88 = G4LogicalVolumeStore::GetInstance()->GetVolume(
"phantomContainer");
95 fEnvelopeVol = G4PhysicalVolumeStore::GetInstance()->GetVolume(
"phantomContainer");
105 G4ExceptionDescription msg;
106 msg <<
"Envelope physical volume not found.\n";
107 msg <<
"The gun will be place at the center.";
108 G4Exception(
"Dicom2PrimaryGeneratorAction::GeneratePrimaries()",
109 "DICOM20002",JustWarning, msg);
121 G4ExceptionDescription msg;
122 msg <<
"Envelope volume of box shape not found.\n";
123 msg <<
"The gun will be place at the center.";
124 G4Exception(
"Dicom2PrimaryGeneratorAction::GeneratePrimaries()",
125 "DICOM20003",JustWarning, msg);
131 G4ThreeVector delta(
fPosDelta.x() * (G4UniformRand()-0.5),
144 fParticleGun->SetParticleMomentumDirection(G4RandomDirection());