82 auto particleIterator=GetParticleIterator();
83 particleIterator->reset();
84 while ((*particleIterator)())
86 G4ParticleDefinition* particle = particleIterator->value();
87 G4ProcessManager* pmanager = particle->GetProcessManager();
95 G4ProcessVector* processVector = pmanager->GetProcessList();
96 for (
size_t i=0; i<processVector->length(); ++i )
98 G4Decay* decay =
dynamic_cast<G4Decay*
>((*processVector)[i]);
106 #ifdef EXPLICIT_CHARM_LIST 107 std::set<int> abspdglist = { 411, 421, 10411, 10421, 413,
108 423, 10413, 10423, 20413, 20423,
109 415, 425, 431, 10431, 433,
110 10433, 20433, 435, 441, 10441,
111 100441, 443, 10443, 20443,100443,
114 int abspdg =
abs(particle->GetPDGEncoding());
115 if ( abspdglist.find(abspdg) != abspdglist.end() )
117 int abspdg =
abs(particle->GetPDGEncoding());
120 int n_q2 = (abspdg/100 )%10;
121 int n_q1 = (abspdg/1000)%10;
124 if ( n_q2 == 4 || n_q1 == 4 || n_q2 == 5 || n_q1 == 5 )
127 if ( particle->GetDecayTable() )
129 delete particle->GetDecayTable();
130 particle->SetDecayTable(
nullptr);
132 decay->SetExtDecayer(extDecayer);
136 if ( !particle->GetDecayTable() )
138 decay->SetExtDecayer(extDecayer);
constexpr auto abs(T v)
Returns the absolute value of the argument.