Not able to see Drift Diffusion visualization plot

Continuing the discussion from Not able to see Drift Diffusion visualization plots:

Respected Allpix Developers,
Greetings! My input configuration file is as follows, I have followed the procedures in the manual and still my Drift and diffusion visualization does not work. I cannot see any plot in the Generic propagation in the ROOT browser. Can you please help me in resolving this issue.

Also, Is there a way to get this plot as a gif or an animation?

Thanks very much!

log_level = “INFO”
log_format = “DEFAULT”
detectors_file = “input_detector.conf”
number_of_events = 200

world_material = “vacuum”

physics_list = QGSP_BERT_HP
particle_type = “neutron”
source_energy = 0.025eV
source_position = 0um 0um -200mm
source_type = “beam”
beam_size = 2mm
beam_direction = 0 0 1
number_of_particles = 1
max_step_length = 1um

model = “init”
file_name = “PlanarField100V.init”

charge_per_step = 1
timestep_min = 0.1ps
timestep_max = 0.4ps
spatial_precision = 0.01nm
propagate_holes = true

max_depth_distance = 5um


name = “detector1”
file_name = “test1”



Dear Sanshit,

the reason for you not seeing anything is that no energy is deposited in your detector. Your energy deposition is defined by this section of your configuration:

A 0.025eV neutron will have a hard time to raise the 3.6eV required for one e/h pair. If you go to higher energies or to an ionizing particle, you will see the desired plots. Here is one I produced using your configuration but swapping neutrons for protons and increasing the energy to 25keV. (I also replaced your electric field with a linear one and 100V bias).

Respected Dr. Spannagel,

Greetings! Thanks a lot for the reply. I believe I did not explained my problem in detail. We are using Lithium Fluoride(Li-6 enriched) as a material in support layer with timepix model. The electron holes are being generated by the secondary particles (alphas and tritions >2MeV).

The allpix output is showing electrons and holes being propagated, and the charge map is being generated. However, we are not able to generate the plot that you attached in your previous message. Is it possible that we do not see this plot because all our ionization is from secondary particles? Any insight from your end is much appreciated.

Also, Can you please email me the root data file which has the above plot?

Thanks a lot.

Dear Sanchit,

where are you looking for the plot? It should be in the modules root file, under GenericPropagation/detector1. Please find my ROOT file attached for reference.

In more recent versions of Allpix Squared, it might be necessary to explicitly set the parameter

output_linegraphs = true


modules.root (69.2 MB)

Thanks a lot. I got this.

Hi Simon,

How to reproduce such plot? which modules do I need?


Hi @Tasneem,

this is described in the manual in the FAQ:

It’s the [GenericPropagation] module which can produce these graphs.


Hi @simonspa ,

I have used it, as I described previously in my question. But you said that in this module the color option is not working! So how this plot has been produced?


Hi @Tasneem

sorry for the misunderstanding. You reported that the color option for animations does not work - the line graphs (which are not animated but static pictures) are always colored.


Aha, I see @simonspa .

So to reproduce such a plot, I need to include only the option for line graphs in the module “GenericPropagation” :
output_linegraphs = true

That’s all?? How and Where are such graphes are saved?

Hi @Tasneem

yes, that’s all - you might have to tune the propagation parameter a little to make them look nice, but nothing else.

The graphs are stored inside the modules.root ROOT file produced by the framework, one per event you simulate. They are stored as TGraph3D, so you can even rotate them the way you want, the examples shown here are simply projections in one direction.


Thanks @simonspa , it works.
The problem was when I turn on both option (linegraphs and animation), I didn’t’t have the linegraphs output, I had only the animation and contouring plots. Does this sound normal for you?


Hm, not completely… :slight_smile:

I’ll have a look and see if something went wrong there.