= 'perturbative' and 'real' particles; the perturbative weight = == 'perturbative' and 'real' particles == (following text is taken - slightly modified - from: O.Buss, PhD thesis, [http://www.uni-giessen.de/cms/fbz/fb07/fachgebiete/physik/einrichtungen/theorie/theorie1/publications/dissertation/buss_diss pdf], Appendix B.1) Reactions which are so violent that they disassemble the whole target nucleus can be treated only by explicitly propagating all particles, the ones in the target and the ones produced in the collision on the same footing. For reactions which are not violent enough to disrupt the whole target nucleus, e.g. low-energy πA, γA or neutrino A collisions at not too high energies, the target nucleus stays very close to its ground state. Henceforth, one keeps as an approximation the phase-space density of the target nucleus constant in time ('frozen approximation'). In GiBUU this is controlled by the switch `freezeRealParticles`. The test-particles which represent this constant target nucleus are called ''real'' test-particles. However, one also wants to consider the final state particles. Thus one defines another type of test-particles which are called ''perturbative''. The ''perturbative'' test-particles are propagated and may collide with ''real'' ones, the products are ''perturbative'' particles again. However, ''perturbative'' particles may not scatter among each other. Furthermore, their feedback on the actual densities is neglected. One can simulate in this fashion the effects of the almost constant target on the outgoing pparticles without modifying the target. E.g. in πA collisions we initialize all initial state pions as ''perturbative'' test-particles. Thus the target automatically remains frozen and all products of the collisions of pions and target nucleons are assigned to the ''perturbative'' regime. Furthermore, since the ''perturbative'' particles do not react among themselves or modify the ''real'' particles in a reaction, one can also split a ''perturbative'' particle into \(N_{test}\) pieces (several ''perturbative'' particles) during a run. Each piece is given a corresponding weight \(1/N_{test}\) and one simulates like this \(N_{test}\) possible final state scenarios of the same ''perturbative'' particle during one run. == The perturbative weigth 'perWeight' == Usually, in the cases mentioned above, where one uses the seperation into ''real'' and ''perturbative'' particles, one wants to calculate some final quantity like \(d\sigma^A_{tot}=\int_{nucleus}d^3r\int \frac{d^3p}{(2\pi)^3} d\sigma^N_{tot}\,\times\,\dots \). Here we are hiding all medium modifications, as e.g. Pauli blocking, flux corrections or medium modifications of the cross section in the part "\(\,\times\,\dots \)". Now, solving this via the testparticle ansatz (with \(N_{test}\) being the number of test particles), this quantity is calulated as \(d\sigma^A_{tot}=\frac{1}{N_{test}}\sum_{j=1}^{N_{test}\cdot A}d\sigma^j_{tot}\,\times\,\dots \), with \(d\sigma^j_{tot}\) standing for the cross section of the \(j\)-th test-particle. The internal implementation of calculations like this in GiBUU is, that a loop runs over all \(N_{test}\cdot A\) target nucleons and creates some event. Thus all these events have the same probability. But since they should be weighted according \(d\sigma^j_{tot}\), this is corrected by giving all (final state) particles coming out of event \(j\) the weight \(d\sigma^j_{tot}\). This information is stored in the variable `perWeight` in the [//Documentation2016/code/typeDefinitions/particleDefinition_f90.html#robo688 definition of the particle type]. Thus, in order to get the correct final cross section, one has to '''sum the perWeight''', and not the particles. As an example: if you want to calculate the inclusive pion production cross section, you have to loop over all particles and sum the perWeights of all pions. Simply taking the number of all pions would give false results. ''The weights can also be negative''. This happens, e.g., in the case of pion production on nucleons. In this case the cross section is determined by the square of a coherent sum of resonance and background amplitudes and as such is positive. In the code the resonance contribution is separated out as the square of the resonance amplitude and as such is positive as well. The remainder, i.e. the sum of the square of the background amplitude and the interference term of resonance and background amplitudes, can be negative, however. This latter contribution is just the event type labeled 32 and 33 in the code that describes the 1pi bg plus interference. == How to compute cross sections from the perturbative weights == The output file `FinalEvents.dat` contains all the events generated. Per event all the four-momenta of final state particles are listed together with the incoming neutrino energy and various other useful properties (see documentation for `FinalEvents.dat`). As an example we consider here the calculation of the differential cross section dsigma/dE for the outgoing lepton. In `FinalEvents.dat` the lines with the particle number 902 contain all the muon kinematics as well as the perweight. In order to produce a spectrum one first has to bin the muon energies into energy bins. This binning process must preserve the connection between energy and perweight. Then all the perweights in a given energy bin are summed and divided by the bin width to obtain the differential cross section. If the GiBUU run used - for better statistics - a number of runs >1 at the same energies, then this number of runs has to be divided out to obtain the final differential cross section. All cross sections in GiBUU, both the precomputed ones and the reconstructed ones, are given per nucleon. The units are 10^-38^ cm^2^ for neutrinos and 10^-33^ cm^2^ for electrons.