At each step I output particle, process and prestep/poststep PV and energy. When I don’t set SetScintByParticleType to true, I see that triton ends with a process of scintillaiton and the next particles stepped are optical photons (also, my alphas have the processes ionioni/noprocess but still produce optical photons). But if I change nothing but SetScintByParticleType(true), then the triton scintillation process is followed by gammas and no optical photons are produced except for Cherenkov.
Here is the code I use to set my scintillation properties. I called SetScintByParticleType in my main code after adding my physics list
auto pt20 = new G4MaterialPropertiesTable;
double energies[2] = {1. * eV, 6. * MeV};
G4double alpha[2] = {1255.23 / MeV, 1255.23 / MeV};
G4double triton[2] = {1255.23 / MeV, 1255.23 / MeV};
G4double electron[2] = {3765. / MeV, 3765. / MeV};
pt20->AddProperty("ALPHASCINTILLATIONYIELD", energies, alpha, 2);
pt20->AddProperty("TRITONSCINTILLATIONYIELD", energies, triton, 2);
pt20->AddProperty("ELECTRONSCINTILLATIONYIELD", energies, electron, 2);
pt20->AddProperty("IONSCINTILLATIONYIELD", energies, alpha, 2);
pt20->AddProperty("PROTONSCINTILLATIONYIELD", energies, alpha, 2);
pt20->AddProperty("DEUTERONSCINTILLATIONYIELD", energies, alpha, 2);
// No special Fano factor
pt20->AddConstProperty("SCINTILLATIONYIELD", 1255.23 / MeV);
pt20->AddConstProperty("RESOLUTIONSCALE", 1.);
// Decay time
pt20->AddConstProperty("SCINTILLATIONTIMECONSTANT1", 57. * ns);
// All fast component, no slow component
pt20->AddConstProperty("SCINTILLATIONYIELD1", 1.);
G4double ScintEnergy[] = {
1.771147508*eV, 1.785693715*eV, 1.806886491*eV, 1.835205916*eV, 1.859861711*eV, 1.887526235 *eV,
1.911215667*eV, 1.937982147*eV, 1.968038263*eV, 1.993817314*eV, 2.025656659*eV, 2.052965257 *eV,
2.086731237*eV, 2.11868072 *eV, 2.14858044 *eV, 2.176213997*eV, 2.214200693*eV, 2.243574408 *eV,
2.270347301*eV, 2.294304242*eV, 2.322309111*eV, 2.354650359*eV, 2.376721902*eV, 2.406788116 *eV,
2.433745705*eV, 2.469279938*eV, 2.493591512*eV, 2.522559239*eV, 2.556474115*eV, 2.586920261 *eV,
2.609157128*eV, 2.627217637*eV, 2.650155755*eV, 2.673476749*eV, 2.692441907*eV, 2.711710765 *eV,
2.726355401*eV, 2.746080968*eV, 2.761100218*eV, 2.77121984 *eV, 2.796776839*eV, 2.817562006 *eV,
2.828136098*eV, 2.8547708 *eV, 2.871018238*eV, 2.892938281*eV, 2.898532973*eV, 2.915258618 *eV,
2.926567493*eV, 2.937990045*eV, 2.955188453*eV, 2.966796809*eV, 2.978496723*eV, 2.990276024 *eV,
2.996253925*eV, 3.008174378*eV, 3.020203583*eV, 3.038367271*eV, 3.050653453*eV, 3.069200332 *eV,
3.081737652*eV, 3.100651336*eV, 3.139096176*eV, 3.191743043*eV, 3.225507311*eV, 3.239154774 *eV,
3.245982849*eV, 3.259772991*eV, 3.273696694*eV, 3.2806075 *eV, 3.294726235*eV, 3.301758535 *eV,
3.308837152*eV, 3.323134953*eV, 3.330272736*eV, 3.337474277*eV, 3.344707031*eV, 3.351971202 *eV,
3.359216802*eV, 3.366443383*eV, 3.366544205*eV, 3.381295329*eV, 3.396090789*eV, 3.396227597 *eV,
3.411206068*eV, 3.418692972*eV, 3.426230217*eV, 3.441598022*eV, 3.449219077*eV, 3.464740871 *eV,
3.480313198*eV, 3.495989894*eV, 3.496098625*eV, 3.520093022*eV, 3.528102993*eV, 3.544381799 *eV,
3.560849122*eV, 3.569083637*eV, 3.60277172 *eV, 3.654582691*eV, 3.735258252*eV, 3.829204446 *eV,
3.927975404*eV, 4.010757254*eV, 4.130449603*eV, 4.245659698*eV, 4.367453005*eV, 4.470036937 *eV,
4.577524753*eV, 4.763720755*eV, 4.886025126*eV, 5.06482313 *eV, 5.293804937*eV, 5.464820789 *eV,
5.64730209 *eV, 5.864795368*eV, 6.149039422*eV
};
const G4int nPoints = sizeof(ScintEnergy)/sizeof(G4double);
G4double ScintFast[nPoints] = {
0.004514673, 0.006772009, 0.006772009, 0.009029345, 0.006772009, 0.004514673,
0.002257336, 0.004514673, 0.002257336, 0.004514673, 0.006772009, 0.004514673,
0.004514673, 0.006772009, 0.006772009, 0.004514673, 0.006772009, 0.009029345,
0.011286682, 0.013544018, 0.015801354, 0.020316027, 0.0248307 , 0.027088036,
0.033860045, 0.036117381, 0.047404063, 0.058690745, 0.065462754, 0.074492099,
0.090293454, 0.101580135, 0.11738149 , 0.128668172, 0.139954853, 0.158013544,
0.173814898, 0.18510158 , 0.200902935, 0.214446953, 0.23476298 , 0.250564334,
0.270880361, 0.293453725, 0.311512415, 0.329571106, 0.34537246 , 0.358916479,
0.376975169, 0.399548533, 0.415349887, 0.431151242, 0.446952596, 0.460496614,
0.476297968, 0.489841986, 0.505643341, 0.519187359, 0.53724605 , 0.553047404,
0.571106095, 0.584650113, 0.598194131, 0.598194131, 0.591422122, 0.58013544,
0.568848758, 0.553047404, 0.539503386, 0.519187359, 0.507900677, 0.492099323,
0.478555305, 0.458239278, 0.440180587, 0.426636569, 0.413092551, 0.399548533,
0.379232506, 0.35214447 , 0.365688488, 0.338600451, 0.300225734, 0.318284424,
0.286681716, 0.264108352, 0.243792325, 0.227990971, 0.205417607, 0.182844244,
0.148984199, 0.110609481, 0.124153499, 0.09255079 , 0.074492099, 0.056433409,
0.042889391, 0.029345372, 0.018058691, 0.009029345, 0.006772009, 0.006772009,
0.004514673, 0.004514673, 0.004514673, 0.006772009, 0.006772009, 0.006772009,
0.004514673, 0.004514673, 0.004514673, 0.004514673, 0.006772009, 0.006772009,
0.009029345, 0.006772009, 0.006772009,
};
G4double r_ind[nPoints] = {
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55, 1.55, 1.55,
1.55, 1.55, 1.55, 1.55, 1.55
};
G4double abs[nPoints] = {
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm, 100*cm, 100*cm, 100*cm,
100*cm, 100*cm, 100*cm
};
pt20->AddProperty("SCINTILLATIONCOMPONENT1", ScintEnergy, ScintFast, nPoints);
pt20->AddProperty("RINDEX", ScintEnergy, r_ind, nPoints);
pt20->AddProperty("ABSLENGTH", ScintEnergy, abs, nPoints);
gs20->SetMaterialPropertiesTable(pt20);
m_materials[Material::GS20] = gs20;