make scene able to run parallel simulations
This commit is contained in:
@@ -61,6 +61,12 @@ void EmitterPrimary::GeneratePrimaries(G4Event *anEvent) {
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
EmitterPrimary* EmitterPrimary::Clone() const {
|
||||
auto* clone = new EmitterPrimary();
|
||||
clone->SetMatrix(this->GetMatrix());
|
||||
return clone;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// SkyPlaneEmitterPrimary using EcoMug
|
||||
|
||||
@@ -127,6 +133,13 @@ void SkyPlaneEmitterPrimary::GeneratePrimaries(G4Event* anEvent) {
|
||||
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
EmitterPrimary* SkyPlaneEmitterPrimary::Clone() const {
|
||||
auto* clone = new SkyPlaneEmitterPrimary();
|
||||
clone->SetSkySize(this->m_Size);
|
||||
clone->SetMatrix(this->GetMatrix());
|
||||
return clone;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// CylinderEmitterPrimary using EcoMug
|
||||
@@ -188,6 +201,14 @@ void CylinderEmitterPrimary::GeneratePrimaries(G4Event* anEvent) {
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
EmitterPrimary* CylinderEmitterPrimary::Clone() const {
|
||||
auto* clone = new CylinderEmitterPrimary();
|
||||
clone->SetRadius(this->m_Radius);
|
||||
clone->SetHeight(this->m_Height);
|
||||
clone->SetMatrix(this->GetMatrix());
|
||||
return clone;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
@@ -298,6 +319,12 @@ void QuadMeshEmitterPrimary::GeneratePrimaries(G4Event *anEvent) {
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
}
|
||||
EmitterPrimary* QuadMeshEmitterPrimary::Clone() const {
|
||||
auto* clone = new QuadMeshEmitterPrimary();
|
||||
if (m_Mesh) clone->SetMesh(m_Mesh);
|
||||
clone->SetMatrix(this->GetMatrix());
|
||||
return clone;
|
||||
}
|
||||
|
||||
} // namespace Geant
|
||||
} // namespace uLib
|
||||
Reference in New Issue
Block a user