41 G4VModularPhysicsList::AddTransportation();
51 G4ParallelWorldScoringProcess* LArVoxelParallelWorldScoringProcess =
52 new G4ParallelWorldScoringProcess(
"LArVoxelReadoutScoringProcess");
54 G4ParallelWorldScoringProcess* OpDetParallelWorldScoringProcess =
55 new G4ParallelWorldScoringProcess(
"OpDetReadoutScoringProcess");
59 LArVoxelParallelWorldScoringProcess->SetParallelWorld(
"LArVoxelReadoutGeometry");
60 OpDetParallelWorldScoringProcess->SetParallelWorld(
"OpDetReadoutGeometry");
66 static G4ParticleTable* fParticleTable = G4ParticleTable::GetParticleTable();
67 G4ParticleTable::G4PTblDicIterator* theParticleIterator;
68 theParticleIterator = fParticleTable->GetIterator();
69 theParticleIterator->reset();
70 while ((*theParticleIterator)()) {
71 G4ParticleDefinition* particle = theParticleIterator->value();
73 if (particle->GetParticleType() ==
"opticalphoton") {
74 G4ProcessManager* pmanager = particle->GetProcessManager();
75 pmanager->AddProcess(OpDetParallelWorldScoringProcess);
76 pmanager->SetProcessOrderingToLast(OpDetParallelWorldScoringProcess, idxAtRest);
77 pmanager->SetProcessOrdering(OpDetParallelWorldScoringProcess, idxAlongStep, 1);
78 pmanager->SetProcessOrderingToLast(OpDetParallelWorldScoringProcess, idxPostStep);
83 else if (particle->GetPDGCharge() != 0 && !particle->IsShortLived()) {
84 G4ProcessManager* pmanager = particle->GetProcessManager();
85 if (!DisableWireplanes) {
86 pmanager->AddProcess(LArVoxelParallelWorldScoringProcess);
87 pmanager->SetProcessOrderingToLast(LArVoxelParallelWorldScoringProcess, idxAtRest);
88 pmanager->SetProcessOrdering(LArVoxelParallelWorldScoringProcess, idxAlongStep, 1);
89 pmanager->SetProcessOrderingToLast(LArVoxelParallelWorldScoringProcess, idxPostStep);
93 G4bool genSecondaries(
false);
95 if (((particle->GetParticleName() == G4MuonPlus::MuonPlus()->GetParticleName() ||
96 particle->GetParticleName() == G4MuonMinus::MuonMinus()->GetParticleName()) &&
98 ((particle->GetParticleName() == G4Proton::Proton()->GetParticleName() ||
99 particle->GetParticleName() == G4Neutron::Neutron()->GetParticleName() ||
100 particle->GetParticleName() == G4KaonZeroShort::KaonZeroShort()->GetParticleName() ||
101 particle->GetParticleName() == G4KaonZeroLong::KaonZeroLong()->GetParticleName() ||
102 particle->GetParticleName() == G4Lambda::Lambda()->GetParticleName()) &&
106 it != EnabledPhysics.end();
108 std::string PhysicsName = (*it);
109 if (!PhysicsName.compare(
"SynchrotronAndGN") && lgp->
K0Bias()) {
110 genSecondaries =
true;
112 if (!PhysicsName.compare(
"ChargeExchange")) { cE =
true; }
116 if (genSecondaries) {
117 G4int nSecondaries(lgp->
K0Bias());
121 <<
"Turning on WrappedMuNuclear for " << particle->GetParticleName() <<
"s with " 122 << nSecondaries <<
" appropriately weighted secondaries." 123 <<
" XSBias is set to " << xSBias
124 <<
" and the cross-section is increased by a factor of " << fXSBias <<
".";
125 G4MuonNuclearProcess* g4MNI =
new G4MuonNuclearProcess();
126 MuNuclearSplittingProcessXSecBias* munuclSplitting =
127 new MuNuclearSplittingProcessXSecBias();
130 munuclSplitting->SetNSplit(nSecondaries, xSBias, fXSBias);
131 munuclSplitting->SetIsActive(active);
132 munuclSplitting->RegisterProcess(g4MNI);
135 if (xSBias && (fXSBias > 1))
136 pmanager->AddProcess(munuclSplitting, -1, 1, 1);
138 pmanager->AddProcess(munuclSplitting, -1, -1, 1);
143 <<
"Turning on ChargeExchange for " << particle->GetParticleName() <<
"s.";
144 G4ChargeExchange* model =
new G4ChargeExchange();
145 G4ChargeExchangeProcess* p =
new G4ChargeExchangeProcess();
147 p->RegisterMe(model);
148 pmanager->AddDiscreteProcess(p);
166 (*itr)->ConstructProcess();
const std::vector< std::string > & EnabledPhysics() const
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
#define G4MT_physicsVector
bool UseCustomPhysics() const
bool DisableWireplanes() const