24{
25 G4UImanager *ui = G4UImanager::GetUIpointer();
26 ui->ApplyCommand("/run/setCutForAGivenParticle proton 0 mm");
27
28 G4ScoringManager* ScM = G4ScoringManager::GetScoringManagerIfExist();
29
30 if(!ScM) { return; }
31
32 ui->ApplyCommand("/score/create/cylinderMesh cylMesh_1");
33
34 ui->ApplyCommand("/score/mesh/cylinderSize 12. 24. m");
35
36
37 ui->ApplyCommand("/score/mesh/nBin 120 480 1");
38
39 ui->ApplyCommand("/score/quantity/energyDeposit eDep");
40
41 ui->ApplyCommand("/score/quantity/cellFlux CF_photon");
42 ui->ApplyCommand("/score/filter/particle photonFilter gamma");
43
44
45 ui->ApplyCommand("/score/quantity/cellFlux CF_neutron");
46 ui->ApplyCommand("/score/filter/particle neutronFilter neutron");
47
48 ui->ApplyCommand("/score/quantity/cellFlux CF_HEneutron");
49 ui->ApplyCommand("/score/filter/particleWithKineticEnergy HEneutronFilter 20 7000000 MeV neutron");
50
51 ui->ApplyCommand("/score/quantity/doseDeposit dose");
52
53 ui->ApplyCommand("/score/close");
54 ui->ApplyCommand("/score/list");
55
56 G4int nPar = ScM->GetNumberOfMesh();
57
58 if(nPar<1) { return; }
59
60 G4ParticleTable::G4PTblDicIterator* particleIterator
61 = G4ParticleTable::GetParticleTable()->GetIterator();
62
63 for(G4int iw=0;iw<nPar;iw++) {
64 G4VScoringMesh* mesh = ScM->GetMesh(iw);
65 G4VPhysicalVolume* pWorld
66 = G4TransportationManager::GetTransportationManager()
67 ->IsWorldExisting(ScM->GetWorldName(iw));
68 if(!pWorld) {
69 pWorld = G4TransportationManager::GetTransportationManager()
70 ->GetParallelWorld(ScM->GetWorldName(iw));
71 pWorld->SetName(ScM->GetWorldName(iw));
72
73 G4ParallelWorldScoringProcess* theParallelWorldScoringProcess
74 = new G4ParallelWorldScoringProcess(ScM->GetWorldName(iw));
75 theParallelWorldScoringProcess->SetParallelWorld(ScM->GetWorldName(iw));
76
77 particleIterator->reset();
78 while( (*particleIterator)() ) {
79 G4ParticleDefinition*
particle = particleIterator->value();
80 G4ProcessManager* pmanager =
particle->GetProcessManager();
81 if(pmanager) {
82 pmanager->AddProcess(theParallelWorldScoringProcess);
83 pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess, idxAtRest);
84 pmanager->SetProcessOrderingToSecond(theParallelWorldScoringProcess, idxAlongStep);
85 pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess, idxPostStep);
86 }
87 }
88 }
89
90 mesh->Construct(pWorld);
91 }
92 return;
93}
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses