Problems with [WeightingPotentialReader]

Dear developers,
I am currently working on importing a TCAD field generated by my colleague into Allpix Squared and have encountered some issues with the [WeightingPotentialReader].
I simply used the ‘mesh_converter’ tool to convert the TCAD file to an .apf file.
Here is the configuration.conf file I used:
model=“apf”

dimension=2

region = “p-bulk”

observable= “ElectrostaticPotential”

observable_units = “”

With the .apf file I got an error in [WeightingPotentialReader]:

I have read some other posts with the similar issue and known that TCAD files usually do not directly contain weighting potentials. And my questions are:
1.Is it necessary for me to adjust the geometry in Allpix Squared (the detector_file) to match the exact geometry used in TCAD?
2.Could there be any other possible reasons that could cause this error?

Many many thanks in advance :blush:
Pellin

Hi @Pellin

a weighting potential is not an electrostatic potential. Please have a look at the documentation that describes how to obtain a weighting potential:

At the end you need a normalized field going from 1 (unit potential on the electrode in question) to 0 (all other electrodes)

Best regards,
Simon