Timepix4 simulation by Allpix2


I am a new user of Allpix2, just started following the manual and trying to play with the example.conf file.

I changed the detector in the example.conf to timepix4, wanted to get x ,y, ToT, ToA, fToA (also ufToA) values of each cluster. I searched the data.root file (I am also a newbie in root), but it seems this information is not there. How to get ToT and ToA information of each cluster from the simulation? Can someone help me with this simulation? Here are my example.conf file and detector.conf:


log_level = "INFO"
log_format = "DEFAULT"
detectors_file = "detector.conf"
number_of_events = 100


physics_list = FTFP_BERT_LIV
particle_type = "e-"
source_energy = 200keV
source_position = 33um 66um -500um
source_type = "beam"
beam_size = 100um
beam_direction = 0 0 1
number_of_particles = 10
max_step_length = 1um

model = "mesh"
file_name = "example_electric_field.init"

temperature = 293K
charge_per_step = 100

max_depth_distance = 5um


name = "detector1"

# replace by [VisualizationGeant4] to run the visualization
mode = "gui"


type = "timepix4"
position = 0 0 0
orientation = 0 0 0


Hi @yuezhang

first of all, the values you are looking for are very detector-specific, and you will have to implement some conversion from a time measurement to fToA and the like yourself - or you take your data and convert that into a real timestamp to compare with simulation.

Secondly, the simulation you have started setting up is not complete yet, i.e. you are missing all of the front-end electronics. You should at least add a [SimpleTransfer] and a {DefaultDigitizer] module to get digitized PixelHit objects out at the end. You also need to store your data somehow, for example using [ROOTObjectWriter].

If you are venturing into time-respolved simulations eventually (after getting a reasonable simulation with the above modules, you could start looking into [TransientPropagation] in conjunction with [PulseTransfer] and [CSADigitizer] to get a more realistic description of an amplifier front-end.


Hi Simon,

Thank you for your very useful answer. Now I know in which direction I should explore.

Cheers, Yue