AGATAGeFEM
AGATAGeFEM simulation framework#
Preparation#
Details on the code and its installation can be found here
The reference paper of AGATAGeFEM is available here
A docker container is provided to have the full environment ready. The following manual is based on the docker usage.
Download/update the docker image#
Download/update the docker image#
You can then run the AGATAGeFEM command-line interface from a folder where the basis will be created with:
docker run --rm -it \ # --rm to delete the docker at exit, -it to launch it in interactive mode
--user $(id -u):$(id -g) \ # to share the user and group ids
-v ${PWD}:/data \ # to link to current directory with /data in the docker
gitlab-registry.in2p3.fr/ip2igamma/docker_images:agatagefem # name of the docker image
cd /data # move in the /data directory to start AGATAGeFEM
Example of crystal basis creation#
The processing time is very long, it is advised to launch it on a server using screen/tmux or equivalent
1 - Define geometry#
First one has to calculate the electric field and the weighting fields. They are defined in the files found in the directory:
and the geometry is given by files found in the:
There is of course different ways of naming crystals... So a A detector should have an AGATARed*.list file with it. A B an AGATAGreen*.list and a C an AGATABlue*.list
Copy, e.g. for A001 with a 6 mm radius on the central contact:
cp /opt/agatagefem/agatagefem/inputfiles/A001_Gaps .
cp /opt/agatagefem/agatagefem/AGATAGeometries/AGATARedR_6p0.list* .
2 - Calculate electric field and the weighting fields#
This can takes almost one day of calculations
when this command has finished time to check that all fields where correctly calculated with:
this will give fields that did not finish (for whatever reason). They should then be rerun with different parameters for refining coursening and max/min dof.
Here we got: A001_WB1.gmv did not exist!
I have no name!@dc02d2daf6c1:/data$ AGATAGeFEMCheckFieldsWereCalculated.py -f A001_Gaps -o A001
A001_WB1.gmv did not exist!
so we rerun with something like:
Once terminated, check again with the previous command that there is no remaining missing files:
I have no name!@dc02d2daf6c1:/data$ AGATAGeFEMCheckFieldsWereCalculated.py -f A001_Gaps -o A001
I have no name!@dc02d2daf6c1:/data$
3 - Calculate pulses#
Next step is to calculate pulses. Here we do a PSA basis as example. First copy database input (generic for all crystals) and anisotropy files.
cp /opt/agatagefem/agatagefem/basesinputfiles/databaseinput .
cp /opt/agatagefem/agatagefem/aniosotropyfiles/anisotropy_completeRotZ045deg .
Most crystals have 45 deg axes rotation but this might not be correct. Then run the command:
AGATAGeFEM_NumberOfThreads=6 AGATAGeFEM_Writelibfield=YES AGATAGeFEM_tstop=1e-6 AGATAGeFEM --calculateP A001 anisotropy_completeRotZ045deg AGATARedR_6p0.list databaseinput A001RotZ45deg 2> /dev/null
The first time calculated fields are used they are read from the raw calculations, which takes time. This is speeded up for later usage as they then are stored in a presorted binary format.
After this step there will be two files called: A001RotZ45deg.pulsesraw and A001RotZ45deg.trajectories
4 - calculate neutron damage correction coefficients#
This is done using the trajectories file.
AGATAGeFEM_NumberOfThreads=16 AGATAGeFEM_Writelibfield=YES AGATAGeFEM --NeutronSensitivity A001 anisotropy_completeRotZ045deg AGATARedR_6p0.list A001RotZ45deg 2> /dev/null
which will produce a file called A001RotZ45deg.ns
5 - Produce a basis in with AGAPRO format#
to convert to the format used (called Bart after Bart Bruyneel). This is done with the command:
which will give the bases baseA001RotZ45deg.dat