To perform this tting, usually a previous treatment of the experimental DDP needs to be performed. Specially in the case of electron doses, sometimes the experimental proles do not have a soft shape and present some irregularities. This may aect the tting process as these errors are introduced in the algorithm. To avoid it and to guaranteer an accurate adjustment, a previous treatment is done to the DDP by approximating it to a general function with the form:
f (x) = Ae−Bx− Ce−Dx e−Ex4+F x2
G + H (4.6)
Figure 4.2 shows the treatment done to an experimental DDP from a NOVAC R accelerator with
9 MeV.
Figure 4.2: Experimental DDP and adjusted DDP for a 9 MeV NOVAC R with 4 cm diameter.
4.4 PHSP weighting algorithm
Once the energy spectrum is optimized, we need to generate the tuned phase space le. To do this, the monochromatic PHSP les are weighted with the optimized energy spectrum from the genetic algorithm and merged to obtain the nal PHSP le. This le also needs to include a scale factor that is going to be applied to the nal dose so that it is scaled to the input experimental DDP.
The genetic algorithm supplies a scale factor needed to scale the adjusted DDP to the experimental one, and applies a normalization of the spectrum that will have to be considered in the nal scale of the weighting procedure. However, this factor will not be sucient to scale the problem, and we will need to introduce an extra scale factor derived from the number of particles used to calculate the monochromatic DDPs.
The nal scale factor will be a contribution of both factors:
f = fgenetic· fweighting (4.7)
The weighting procedure will depend on the way the monochromatic DDPs are generated. Dose distributions obtained with any MC algorithm are always dened as dose per primary history. When the primary beam travels through the dierent elements of the accelerator head or the applicators, some of the original particles are absorbed or scattered and do not reach the PHSP recollection plane. The number of lost particles increases as the energy decreases, so the monochromatic PHSP les will not have information of the same number of particles for all the energies. However, if the monochromatic DDPs are calculated in the same simulation as the PHSP les, these dose distributions will be all divided by the same number of histories, ie. the initial primary histories of the simulations. But if these curves are obtained with other code, such as DPM or the hybrid MC algorithm described in chapter 6, they are going to be calculated from the monochromatic PHSP les, and every curve will be divided by a dierent number of primary histories.
Therefore, two dierent approaches must be taken into consideration, depending on the procedure used for generating the monochromatic DDPs.
4.4.1 Weighting approach for DDPs with the same number of histories If the monochromatic DDPs have been generated at the same time as the PHSP les, and therefore they are all divided by the same number of primary histories, the optimized spectrum will be used to directly weight the monochromatic PHSP les. The dose distribution obtained with the optimized PHSP le will be divided by the number of its primary histories, which in this case will be sum of the number of histories of each monochromatic PHSP le multiplied by the corresponding value of the energy spectrum:
[ Emax
X
i=1
P HSP (i) · spectrum(i)] → PE dose
max
i=1 [weightP HSP(i) · spectrum(i)]
4.4. PHSP weighting algorithm Where weightP HSP(i) is the number of histories of the monochromatic PHSP le with energy i. As mentioned before, there is also a normalization factor coming from the genetic tting that needs to be included, the spectrum normalization. With this information, the extra scale factor needed to reproduce the experimental dose will then be:
fweighting =
PEmax
i=1 [weightP HSP(i) · spectrum(i)] PEmax
i=1 spectrum(i)
(4.9)
4.4.2 Weighting approach for DDPs with dierent number of histories If the monochromatic DDPs have been calculated from the monoenergetic PHSP les, each one will be divided by a dierent number of primary particles. Therefore, in this case, the merging procedure needs to be corrected by the number of histories of each monochromatic PHSP le, the weightP HSP(i). So the merging we have to consider is:
Emax X i=1 P HSP (i) · spectrum(i) weightP HSP(i) (4.10) The dose per history we will obtain from the merged PHSP will then be:
Emax X i=1 P HSP (i) · spectrum(i) weightP HSP(i) → dose PEmax i=1 hweight P HSP(i)·spectrum(i)) weightP HSP(i) i (4.11)
And if we nally incorporate the normalization factor of the energy spectrum from the genetic tting:
fweighting = Emax
X
i=1
weightP HSP(i) · spectrum(i)) weightP HSP(i) 1 PEmax i=1 spectrum(i) = 1 (4.12)