DepositionReader reads from root file, but no meaningful output obtained

Hello,
I am trying to read deposition information from an external GEANT4 simulation. I am following the instruction here
src/modules/DepositionReader · master · Allpix Squared / Allpix Squared · GitLab.

While the tree is being read by AllPix2, I see histograms being empty in DetectorHistogrammer (hit_map, charge_map, cluster_map etc). While I run the simulation with TRACE log_level, I do see these messages
|21:36:33.469| (TRACE) Running event 1 of 1 [ProjectionPropagation:Stave00]
|21:36:33.470| (TRACE) Not all required messages are received for ProjectionPropagation:Stave00,
skipping module!
|21:36:33.470| (TRACE) Running event 1 of 1 [SimpleTransfer:Stave00]
|21:36:33.470| (TRACE) Not all required messages are received for SimpleTransfer:Stave00, skipping
module!
|21:36:33.470| (TRACE) Running event 1 of 1 [DefaultDigitizer:Stave00]
|21:36:33.470| (TRACE) Not all required messages are received for DefaultDigitizer:Stave00,
skipping module!
|21:36:33.470| (TRACE) Running event 1 of 1 [DetectorHistogrammer:Stave00]
|21:36:33.471| (TRACE) Not all required messages are received for DetectorHistogrammer:Stave00,
skipping module!

I am not sure why it is printing this message. I have the files for reproducing the problem kept in this github repository

  1. This is the conf file tutorial-simulation.conf

and this is the geometry file tutorial-geometry.conf that I used for this run.
2. The detector model alpideARKA.conf is just the active layers of the alpide model.
3. A small input root file is this: InputForAllPix_SignalFilew0_3000nm_FewEvents.root
4. The debugLog and traceLog can also be found in this repository.

Any help will be greatly appreciated.

Many thanks,
Arka

Hi @asantra

before coming to your problem, a few suggestions for your config file:

  • Remove GeometrybuilderGeant4 - it’s not needed because you don’t run Geant4
  • Remove VisualizationGeant4 - it’s of no use because you don’t have track information from Geant4
  • Set log_level only for the module of interest instead of globally to reduce the amount of information printed
  • Set model_paths to the path where your detector model lives (alpideARKA.conf in your case). If it’s in the same directory as your config file, simply do
[Allpix]
number_of_events = 1
detectors_file = "tutorial-geometry.conf"
model_paths = ./

Now to your actual problem. The issue is just that your first event appears to be empty, but you’re only reading a single one. Just try setting umber_of_events = 2 and observe the output:

|08:50:14.626|  (STATUS) Running event 1 of 2
|08:50:14.626|   (DEBUG) [R:DepositionReader] Start reading event 1
|08:50:14.627|    (INFO) [R:DepositionReader] Finished reading event 1
|08:50:14.627|  (STATUS) Running event 2 of 2
|08:50:14.628|   (DEBUG) [R:DepositionReader] Start reading event 2
|08:50:14.628|   (DEBUG) [R:DepositionReader] Found detector "Stave00"
|08:50:14.628|   (DEBUG) [R:DepositionReader] Found deposition of 1422 e/h pairs inside sensor at (26.3048mm,5.32346mm,-2.5um) in detector Stave00, global (79.0785mm,-925.664um,3864.51mm), particleID -11
|08:50:14.628|   (DEBUG) [R:DepositionReader] Found detector "Stave00"
|08:50:14.628|   (DEBUG) [R:DepositionReader] Found deposition of 2174 e/h pairs inside sensor at (7.87156mm,5.64175mm,-2.5um) in detector Stave00, global (60.6453mm,-607.368um,3864.51mm), particleID -11
|08:50:14.629|   (DEBUG) [R:DepositionReader] Found detector "Stave00"
|08:50:14.629|   (DEBUG) [R:DepositionReader] Found deposition of 318 e/h pairs inside sensor at (7.87156mm,5.64176mm,-2.5um) in detector Stave00, global (60.6453mm,-607.356um,3864.51mm), particleID 11
|08:50:14.629|    (INFO) [R:DepositionReader] Finished reading event 2
|08:50:14.629|   (DEBUG) [R:DepositionReader] Detector Stave00 has 6 deposits

…and voila, you have your input to the simulation being sent off to the subsequent modules.

If your input events are not sorted but come in random order, we have just merged code to allow reading them in, just splitting events but not caring about their order. You can use this with the current master branch by setting

[DepositionReader]
require_sequential_events = false

All the best,
Simon

Hi @simonspa ,
Thank you for your help and the suggestions. I could now see some plots in the modules.root file for the “ProjectionPropagation”, “SimpleTransfer” and “DefaultDigitizer” module. But I see that the histograms in DetectorHistogrammer module are empty. I am not sure why this is, because from the log I don’t see any obvious problem. Here is the “TRACE” log for one such run

Cheers,
Arka

Hi @asantra

it’s right here:

|14:53:05.067| (WARNING) [I:DepositionReader] No MCParticle objects will be produced

The DetectorHistogrammer needs MCParticles because it uses the MCTruth information to make plots with.

/Simon