Table of Contents
This document should provide a list of usecases to check the behaviour of importance sampling and scoring against. A distinction is made between sampling in a mass and parallel geometry.
Chapter 2 and Chapter 3 give detailed usecase descriptions.
Chapter 4 sum's up the problematic usecases and their possible solutions.
Chapter 5 contains the summary.
Table of Contents
A particle step reaches a boundary between volume A and B of the mass geometry and it's momentum is changed by a multiple scattering process.
Multiple scatteing applies for charged particles. The current version is not intended to be used for charged particles but future versions will.
Three steps 1, 2, 3 occur:
Step one is limited by the transportation. The transportation moves the particle on the boundary and locates it in volume B.
Biasing split's or deletes the particle and changes weight correctly. See also: Section 2.4
Scoring counts the track as entering volume B
Multiple scattering changes the momentum to point back in volume A again.
'nd step:
Transportation limits step. Transportation locates particle in volume A.
Biasing split's or deletes the particle and changes weight correctly. See also: Section 2.4
Scoring counts the track as entering volume A
'rd step:
Step may be limited by any process.
Transportation locates particle at the new position
Multiple scattering is related to volume A therefore the following should be considered:
Importance sampling should neither run in the first nor in the second step.
The particle should not be scored as entering volume B in the first step and it should not be scored as entering A in the second step.
A particle step reaches a boundary between volume A and B of the mass geometry. It is located in volume B. Then a process returns a zero step length, get's called and changes the momentum back to A.
A process should never return step length = 0. But the situation applies also if a process proposes a step length so small that the track is located within a distance of kCarTolerance to the boundary.
Three steps 1, 2, 3 occur:
Step one is limited by the transportation. The transportation moves the particle on the boundary and locates it in volume B.
Biasing split's or deletes the particle and changes weight correctly. See also: Section 2.4
Scoring counts the track as entering volume B
step
A process returns step length = 0.
Scoring may count a collision with the correct weight according to volume B.
The process changes the particles momentum, and may create daughter particles. (See Section 2.3)
step
The step is limited by transportation. Transportation locates the particle in volumeA.
Biasing may delete the particle and change weight.
Scoring counts the track as entering volume A
This way the particle is treated correctly.
A particle step reaches a boundary in the mass geometry between volume A and volume B. A physical process returns steplength =0 and creates a daughter.
A process should never return step length = 0. But the situation applies also if a process proposes a step length so small that the track is located within a distance of kCarTolerance to the boundary.
The description of two steps of the particle and the first step of the daughter created by a physical process on the boundary:
Cross boundary.
This is equivalent to step one in Section 2.2
Physics process.
A physics process returns step length = 0.
Scoring may count collsision with the original track momentum and the correct weight.
The physics process changes the momentum of the particle and creates a daughter with momentum pointing to volume A.
First step 1.d of daughter
The daughter should be located in volume B inspide of having it's momentum pointing to volume A !
In this mass geometry case it should be done correct by the transportation since the Touchable of the doughter can be taken into account for location.
If the daughter particle is located in volume B the situation should be treated correctly.
A parent particle crosses the boundary in the mass geometry. Biasing creates copies of the particle.
The most likely situation if a particle corsses a boundary and the importance of the enterung volume is higher then the importance of the exitiong volume.
A step 1 of the parent and the first step 1.d are shown:
parent step
Step one is limited by the transportation. The transportation moves the particle on the boundary and locates it in volume B.
Biasing split's or deletes the particle and changes weight correctly.
Scoring counts the track as entering volume B
1.d: first step of daughter
G4 locates the daughter in B.
Any process may limit the step.
This should be the coorect treatment of the daughter particle created by importance sampling.
Table of Contents
A particle step is limited by a boundary in the parallel geometry between volumes A and B. Multiple scattering occures.
Multiple scatteing applies for charged particles. The current version is not intended to be used for charged particles but future versions will.
Three steps 1, 2, 3 occur:
The step is limited by a boundary in the parallel geometry found by the ParallelImportanceProcess.
Transportation moves the particle in the mass geometry.
The ParallelImportanceProcess moves the particle on the boundary and locates it in volume B of the parallel geometry. Biasing splits or plays Russian Roulette and changes the weight.
The ParallelImportanceProcess may create daughters see Section 3.4
Scoring counts a track entering.
Multiple scattering changes the momentum of the particle.
Step:
The step is limited by the boundary in the parallel geometry found by the ParallelImportanceProcess.
Biasing split's or deletes the particle and changes weight correctly.
Scoring counts the track as entering volume A
Step:
The step may be limited by any process.
Transportation locates particle at the new position
See the comment in Section 2.1.
A particle step is limited by a boundary in the parallel geometry between volumes A and B. A physics process returns step length = 0.
See Section 2.2.
Three steps 1, 2, 3 occur:
The step is limited by a boundary in the parallel geometry found by the ParallelImportanceProcess.
Transportation moves the particle in the mass geometry.
The ParallelImportanceProcess moves the particle on the boundary and locates it in volume B of the parallel geometry. Biasing splits or plays Russian Roulette and changes the weight.
The ParallelImportanceProcess may create daughters see Section 3.4
Scoring counts a track entering.
Step:
A physics process retruns step length = 0.
Scoring counts a collision in volume B
The physics process changes the momentum of the particle and creates a daughter (See Section 3.3). Both momentums point towards volume A.
Step:
The ParallelImportanceProcess limits the step.
The ParallelImportanceProcess locates it in volume A of the parallel geometry. Biasing splits or plays Russian Roulette and changes the weight.
The ParallelImportanceProcess may create daughters see Section 3.4
Scoring counts a track entering volume A.
This way should be correct.
A particle step reaches a boundary in the parallel geometry between volume A and volume B. A physical process returns steplength =0 and creates a daughter.
See Section 2.3.
The description of two steps of the particle and the first step of the daughter created by a physical process on the boundary:
Cross boundary.
This is equivalent to step one in Section 3.2
Physics process.
A physics process returns step length = 0.
Scoring may count collsision with the original track momentum and the correct weight.
The physics process changes the momentum of the particle and creates a daughter with momentum pointing to volume A.
First step 1.d of daughter
According to the momentum the daughter is located in volume A .
The ParallelImportanceProcess does not occur. Therefore no biasing is applied and the weight is not changed!
Scoring counts a collision in volume A with the wrong weight.
Locating the daughter particle in volume A is wrong.
A parent particle crosses the boundary in the parallel geometry. Biasing creates copies of the particle.
See Section 2.4.
A step 1 of the parent and the first step 1.d are shown:
Step
Step one is limited by a boundary in the parallel geometry found by ParallelImportanceProcess. The ParallelImportanceProcess moves the particle on the boundary and locates it in volume B.
Biasing split's or deletes the particle and changes weight correctly.
Scoring counts the track as entering volume B
1.d: first step of daughter
The ParallelImportanceProcess locates the daughter in B.
Any process may limit the step.
This should be the correct way.
Of this (probably incomplete) list of usecases the cases Section 2.1, Section 3.1 and Section 3.3 are treated wrongly. The first two cases apply to charged particles only. The other usecase applies for the parallel geometry. Therefore this documents does not contain problematic usecases for neutral particles in the mass geometry.
The only wrongly treated usecase in this document applying also for neutral particles is Section 3.3.
The reason for the problem is: In contrast to the mass geometry cases there is no information about the current Touchable in the parallel geometry related to a newly starting particle.
The two types of particles starting on a parallel boundary are:
Section 3.3 particles created by a physical process on the boundary.
Section 3.4 particles created by importance sampling. All particles created by importance sampling start on a boundary.
The particles starting on the boundary may be located in either of both volumes depending on the geometry e.g. which volume is deepest.
In order to treat the much more frequent cases of type number 2. correct it has been chosen to take the direction of the particle momentum into account. But this treats the cases of type 1. wrong.
To solve this problem it has been considered to somehow provide the information about the Touchable in the parallel geometry. It is not clear "who" should give that information to "whom". While the importance sampling process knows about the parallel geometry and therefore could assign a touchable to the particle in principle, the physics processes can't do that.
This document gives a list of usecases which should be considered for the implementation of importance sampling and scoring.
When changing the behaviour of importance sampling the resulting algorithm should be checked at least against the usecases listed here.
The current problem to be solved is to treat the usecase Section 3.3 right without messing up usecase Section 3.4 .