Skip to content

Commit 54a0358

Browse files
committed
A2FileGeneratorPluto: temp fix for having a carbon target
1 parent 8694f3a commit 54a0358

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/A2FileGeneratorPluto.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,15 @@ G4ParticleDefinition* A2FileGeneratorPluto::PlutoToG4(Int_t id)
238238
}
239239
return partDef;
240240
}
241+
else if (id == 614) // Special case for carbon target, TODO code this for general nuclei
242+
{
243+
G4int Z, A, L, J;
244+
G4double E;
245+
if (G4IonTable::GetNucleusByEncoding(1000060120, Z, A, L, E, J))
246+
return G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(Z, A, L, 0.0, J);
247+
else
248+
return 0;
249+
}
241250
else
242251
return 0;
243252
}

0 commit comments

Comments
 (0)