Simulating cell phone CMOS with Allpix2

I am Runze Li who is working in DECO project, and we are trying to use Allpix2 to simulate the interaction of cosmic-ray muons in cell phone CMOS sensors.

The specific device we try to work on is HTC Wildfire. Without much technical details from the cell phone constructor, so far we have been trying to guess all kinds of parameters to use, and we wonder if anyone can provide any help or general comments on what we should do.

For our current simulation, we know for sure that the pixel size of HTC Wildfire is 0.9um, with resolution 2592x1944. The depletion thickness is about 26.3um. We do not know what bias voltage HTC Wildfire or any cell phone CMOS use, and for now we are choosing a linear electric field model with bias voltage = -40V.

A complete simulation file is included in the end. Could anyone provide any general comments about this simulation?

There are also several specific questions we have.

  1. For QDC convertor, we are trying to use real charge by setting resolution = 0. Then we do manually the conversion from real charge to 8bit 0 - 255 luminance values. With QDC slope = 0.5, what we do is luminance = charge / 0.5 and cut at 255. I believe this is the algorithm used in Allpix2, is this correct?

  2. For QDC smearing, since the unit is e according to the user manual, we are applying it as a gaussian centered at charge. So:
    gaussian(Charge, QDC smearing) / qdc slope and then cut at 0 - 255
    Is this how QDC smearing applied in Allpix2?

  3. We are not sure how linear field is calculated based on chip thickness, depletion thickness, and bias voltage. For now we are using linear model with bias voltage = -40V and chip thickness = depletion thickness = 26.3um. In the Allpix2 manual section 8.11 it says that for linear model electric field is calculated using a formula based on thickness of sensor, depletion voltage, and bias voltage. However it mentioned later that “When using the depletion depth for the linear model, no depletion voltage can be specified” I wonder how depletion thickness is used to replace depletion voltage, and how it is related to sensor thickness. Can they be set to the same value as what we are doing here?

  4. We are also confused by the electric field model we should use. I wonder if we should switch to TCAD custom model. However, without technical details from cell phone company, it is very hard to make such model. Is there any general comments about what we can do?

Thank you so much!

Simulation file:

log_level = "WARNING"
log_format = "DEFAULT"
number_of_events = 1
detectors_file = "detector.conf"
model_paths = ./

world_material = "vacuum"

physics_list = FTFP_BERT_LIV
charge_creation_energy = 3.62eV
source_position = 0 0 13.15um
source_type = "beam"
beam_direction = 0.532785235417 -0.19917017802 -0.822478652069
beam_divergence = 0.1mrad 0.1mrad
max_step_length = 1um
output_plots = false


temperature = 293K
propagate_electrons = true
propagate_holes = true
charge_per_step = 1
integration_time = 50ns
output_plots = false

max_depth_distance = 1.0um

output_plots = false
threshold = 1e
threshold_smearing = 1e
qdc_resolution = 0
qdc_smearing = 0e
qdc_slope = 1e
gain = 1.0
electronics_noise = 0e
allow_zero_qdc = false

include = "PixelHit"

Detector File

type = "monolithic"

number_of_pixels = 2592 1944
pixel_size = 0.9um 0.9um
sensor_thickness = 26.3um
chip_thickness = 1mm

Dear @patchouli_goo

thanks for reaching out, this is a very interesting project we have been following for a while already! The questions you are posing are quite complex and I fear we cannot answer them very precisely - mostly because the processes and exact sensor designs by commercial CMOS imaging sensors are IP of the respective manufacturer and not publicly available - or even known. We can try to provide you with a few ideas that we have though.

Before diving into this, however, I would like to draw your attention to our latest release v2.1 in which we have published a new module called DepositionCosmics. It provides a convenient interface to the CRY Cosmic radiation simulation framework and uses Geant for tracking the shower particles through the setup - given that you are working with cosmics, maybe this is something that could be of interest. It would for example allow you to easily estimate the total measurement time required for a given number of particles to impinge on your simulated HTC Wildfire CMOS sensor.

You state that you know your sensor has a depletion depth of 26.3um - is this the actually depleted volume or the thickness of the sensor after thinning? From looking at your configuration file with chip_thickness = 1mm it looks more like you have a depleted volume with a depth of 26.3um and a total thickness of your silicon slab of 1mm - could that be? The difference for your simulation is that we will only look at charges generated in the sensor but not in the chip.

The bias voltage seems an order of magnitude too high from our perspective - remember that the voltage needs to be generated in the phone from a few-volts battery pack. Also, usually CMOS sensors cannot withstand more than a few volts of bias: Some of their transistors (either PMOS or NMOS, depending on the substrate) would stop working since this bias voltage will be connected to their gates. Typically the transistors themselves (depending on the technology) are operated with 1.2V or 3.3V and the bias likely doesn’t exceed this significantly.

Given the limited information we have to deal with in these situations, we think that the linear field approximation is reasonable.

Concerning your specific questions:

  1. The formula used for the QDC in the DefaultDigitizer module is the following:

    Q = clamp((QDC_offset + Q_in + Q_smearing) / QDC_slope),
              (1 << QDC_resolution) - 1))

    where Q_in is the initial charge (after threshold) and Q_smearing = Gauss(0, QDC_smearing). The other parameters are the respective configuration parameters. The clamp method is equivalent to max(1, min(Q, (1 << QDC_resolution) - 1)), restricting the resulting values to [1, MAX] of the QDC.

  2. Yes, see above

  3. Sensor thickness and depletion depth are two different things. Sensor thickness represents the physical thickness of the slab of silicon used to detect particles. The depletion depth is the depth from the sensor surface in which the space charge region extends at the given bias voltage. On the other hand, the depletion voltage is the voltage at which the full sensor volume is depleted.

    If you now specify the depletion voltage and the depletion depth, you have an overdetermined system of equations. So you can either know how deep your sensor is depleted at a given voltage or how high of a voltage is required to reach full depletion. In both cases these parameters depend on the resistivity of your material, i.e. on the doping/impurity concentrations in your silicon.

    The reason why bias and depletion voltage can be set separately is, that you can (given a known full depletion voltage) still operate your sensor above or below this value to get under- or overdepletion.

  4. Without a very detailed insight into the design of these sensors, looking into TCAD does not make sense for you. We recommend sticking with the linear electric field for now.

Depending on the calibration measurements you have made already (e.g. measurements with a radioactive source) it might be possible to tune your field model a bit further as we have for example done in our example for the MIMOSA26 sensors in the repository but for this it would probably beneficial to have a meeting and discuss the possibilities. Also, it would be good to evaluate how much you will win for your analysis from this increase in precision.

Some additional hints concerning your configuration files:

  • In the ElectricFieldReader setting your depletion depth to exactly your sensor depth is equivalent to not setting it - if no depletion depth or depletion bias is given, it will assume you just depleted the sensor with the given voltage, without overdepletion.
  • If you use GenericPropagation, there is no need to propagate both electrons and holes, you can safely switch off holes (in your case you collect electrons given the e-field) to speed up things
  • If you output also the PixelCharge obejcts in your TextWriter module you have the full collected charge in electrons and can compare to what your front-end simulation in the DefaultDigitizer did to it.

We hope, this gives you some useful insights. Please feel free to contact us directly if you would like to have a chat!

All the best,
Simon, Paul

1 Like

Hi Simon

Thank you so much for your response, which is super helpful.
There is one thing I hope to clarify based on your response though. For the difference between chip thickness, sensor thickness, and depletion thickness, it is:

  1. Chip thickness is the total thickness of silicon slab
  2. Sensor thickness is the thickness of detector region
  3. Depletion thickness is the thickness of the region where electron-hole pairs will be generated (fully depleted)
  4. The reason depletion thickness and sensor thickness are both used is to make over/under depletion possible
  5. We can ignore depletion thickness and depletion voltage if we use fully depleted 26.3um sensor region

Are these what you mean?

Also, I agree with your comment that bias voltage = -40V seems to be too large. However this is the only way we can make our simulated images similar with real events on the width and luminance, since smaller voltage creates larger horizontal drift which leads to fewer charge on single pixel. Bias around 10V also gives us a good result, but bias voltage < 10V makes large charge spread on pixel and the matching with real events is very bad. As you mentioned, due to the lack of knowledge, every parameters we choose are based on the matching between simulation and real events, so that is why we choose voltage ~ 10V. (I can show you those comparisons about image at different voltage if we will have a meeting)

There are several remaining questions also:

  1. For QDC smearing, do you have any recommended value to use? Since we use 8 bit values (RGB color is 0 - 255), we choose it to be less than 10e. Does this make sense?
  2. Also is there any recommended value to use for minimum charge to be considered as a hit? (threshold and threshold smearing)

We will be really appreciated for a meeting so that we can do a small presentation about where we are and discuss some related questions with you. However, we may need to meet ourselves first so that we can make an outline about what to ask. Besides this forum, is there anyway we can contact you directly, maybe through email?

Thank you very much again!

Best wishes
Runze Li

1 Like

Hi @patchouli_goo


  1. Chip and sensor are different slabs of silicon. Having a chip at all for monolithic sensors was a bit of an odd choice some years ago and will be removed for Allpix Squared 3.0.
  2. see above
  3. e/h pairs are generated in all of the sensor volume, the depletion thickness only specifies where we have an electric field. Outside that region, but still in the sensor, we have zero field and therefore charge carrier motion by means of diffusion only
  4. see above, and yes. :slight_smile:
  5. Yes, but only if you expect to operate exactly at the depletion voltage, so if no overdepletion happens.

For all the rest I suggest to have a meeting - feel free to contact me via simon.spannagel -at-


Hi Simon

I have sent you an email yesterday about our meeting, but I am not sure if it has reached you. Could you please let me know if it has not?

Runze Li

Hi @patchouli_goo

sure, just didn’t get 'round answering yet. You have mail now :slight_smile: