input.memphys

The file input.memphys contains twelve "vertices" of neutrino interactions to be treated by Geant4 (one per Geant4 event).

The input.memphys format is an ascii file format specific to MEMPHYS. The first input event/vertex looks :

$ begin
$ nuance     1
$ vertex     -166.0    -279.2    -436.6  2.28845E+06
$ track       14        300.0000    0.00000    0.00000    1.00000 -1
$ track     2112        915.4158   -0.24057    0.90826    0.34234 -1
$ info 2  949000  0.0000E+00
$ track       13        200.5344   -0.81100    0.53150   -0.24451 -2
$ track     2212       1014.8815    0.31180   -0.06222    0.94811 -2
$ track       13        200.5344   -0.81100    0.53150   -0.24451  0
$ track     2212       1014.8815    0.31180   -0.06222    0.94811  0
$ end

Each vertex is described between "$ begin" and "$ end" lines. Each vertex is read in

    MEMPHYS/source/PrimaryGeneratorAction.cpp

From what we saw in the code (we had no doc when we got MEMPHYS code in 2005) :

    $ nuance   => not used.
    $ vertex   => go straight on Geant4 : particleGun->SetParticlePosition(vtx);
first : 
    $ track    => considered as the "beam". Here 14 = vu-mu.
second :
    $ track    => considered as the "target" . Here 2112 = neutron of the water.
then :
    $ info     => not used.

From the list of following "$ track" (here 4), only the one ending with "0" (here two, a mu- and a proton. It looks ok) are put on the Geant4 primary vertex to be tracked in the detector. For a track, after the PID, the first number is taken as the 4-energy (then "e-kin" = 4-energy-mass). The three following numbers are the normalised momentum direction. In the code, track infos are given to Geant4 with :

    G4double mass = particleGun->GetParticleDefinition()->GetPDGMass(); //from the PID. 
    G4double ekin = energy - mass;

    particleGun->SetParticleEnergy(ekin);
    particleGun->SetParticlePosition(vtx);
    particleGun->SetParticleMomentumDirection(dir);