DepositionReader module behaves differently between CSV and root

Hello,

I am using the Allpix-squared version:

Allpix Squared version v2.0.1-825-g821398d5c-dirty
               built on 2022-03-20, 17:46:22 UTC
               using Boost.Random 1.78.0
                     ROOT 6.24/06
                     Geant4 10.7.2
               running on 16x Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz

Copyright (c) 2016-2022 CERN and the Allpix Squared authors.

.
Here, I am having a weird problem with the DepositionReader module. The input file in CSV format is correctly read and proper digitization is happening - no problem there. Here is the log of the run:

|17:09:43.164|  (STATUS) Welcome to Allpix^2 v2.0.1-825-g821398d5c-dirty
|17:09:43.165|  (STATUS) Initialized PRNG with system entropy seed 15410518528225184139
|17:09:43.786|  (STATUS) Loaded 8 modules
|17:09:43.786|  (STATUS) Multithreading disabled
|17:09:46.613|  (STATUS) Initialized 8 module instantiations
|17:09:46.613|  (STATUS) Starting event loop
|17:09:46.614|  (STATUS) Buffered 0, finished 1 of 2 events
|17:09:46.621| (WARNING) (Event 2) [R:DepositionReader] Request to terminate:
                                                        Requesting end of run, CSV file only contains data for 2 events
|17:12:12.269|  (STATUS) Finished run of 2 events
|17:12:12.606|  (STATUS) [F:ROOTObjectWriter] Wrote 177632 objects to 5 branches in file:
                                              /Users/arkasantra/AllPix2/allpix-squared/output/dataFile_gPlusLaserBackgroundTDR_EFieldCircularN17Vpercm_Stave01_Event1.root
|17:12:12.611|  (STATUS) Finalization completed
|17:12:12.611| (WARNING) Unused configuration keys in section DetectorHistogrammer:Stave01:
                         output_plots
|17:12:12.612| (WARNING) Unused configuration keys in section ROOTObjectWriter:
                         output_plots
|17:12:12.612|  (STATUS) Executed 8 instantiations in 2 minutes 29 seconds, spending 97% of time in slowest instantiation GenericPropagation:Stave01
|17:12:12.612|  (STATUS) Average processing time is 74411 ms/event, event generation at 0 Hz

If I want to feed the same information to Allpix-squared in root format, I do not see any digitization happening. Here is the log (with TRACE option):

|17:49:19.640|   (TRACE) Global log level is set to TRACE
|17:49:19.640|   (TRACE) Global log format is set to DEFAULT
|17:49:19.640|   (TRACE) Loading Allpix
|17:49:19.640|  (STATUS) Welcome to Allpix^2 v2.0.1-825-g821398d5c-dirty
|17:49:19.641|  (STATUS) Initialized PRNG with system entropy seed 176769788218657048
|17:49:19.641|   (DEBUG) Output directory /Users/arkasantra/AllPix2/allpix-squared/output already exists
|17:49:20.331|   (TRACE) Adding physical units
|17:49:20.331|   (TRACE) Setting ROOT plotting style
|17:49:20.331|   (DEBUG) Loading detectors
|17:49:20.331|   (DEBUG) Detector Stave01:
|17:49:20.331|   (DEBUG) Position:    (97.83mm,618.72um,3962.01mm)
|17:49:20.331|   (DEBUG)  misaligned: (97.83mm,618.72um,3962.01mm)
|17:49:20.332|   (DEBUG) Orientation: (0deg,0deg,0deg)
|17:49:20.332|   (DEBUG)  misaligned: (0deg,0deg,0deg)
|17:49:20.332|   (DEBUG) Interpreting Euler angles as XYZ rotation
|17:49:20.332|   (TRACE) Registering new detector Stave01
|17:49:20.332|   (TRACE) Registered model paths from configuration.
|17:49:20.332|   (TRACE) Registered model path: /Users/arkasantra/AllPix2/allpix-squared/models
|17:49:20.332|   (TRACE) Registered path of configuration file as model location.
|17:49:20.332| (WARNING) Main ROOT file "/Users/arkasantra/AllPix2/allpix-squared/output/modules_gPlusLaserBackgroundTDR_EFieldCircularN17Vpercm_Stave01_Event1.root" exists and will be overwritten.
|17:49:20.333|  (STATUS) Loading module DepositionReader
|17:49:20.334|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleDepositionReader.dylib
|17:49:20.335|   (DEBUG) Creating unique instantiation DepositionReader
|17:49:20.336|   (TRACE) Local log level is set to WARNING
|17:49:20.336|   (TRACE) [C:DepositionReader] Reset log level to global level of TRACE
|17:49:20.336|  (STATUS) Loading module ElectricFieldReader
|17:49:20.337|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleElectricFieldReader.dylib
|17:49:20.339|   (DEBUG) Creating instantions for detector module ElectricFieldReader
|17:49:20.340|   (TRACE) Starting geometry closing procedure
|17:49:20.341|   (TRACE) Loading remaining default models
|17:49:20.341|   (TRACE) Reading model files
|17:49:20.341|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/alpide_no_support.conf"
|17:49:20.341|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/alpide_no_support.conf"
|17:49:20.342|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1_CSV.conf"
|17:49:20.342|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1_CSV.conf"
|17:49:20.345|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1.conf"
|17:49:20.345|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1.conf"
|17:49:20.348|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/Stave01.conf"
|17:49:20.349|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/Stave01.conf"
|17:49:20.350|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/velopix.conf"
|17:49:20.351|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/velopix.conf"
|17:49:20.354|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/rd53a_25.conf"
|17:49:20.354|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/rd53a_25.conf"
|17:49:20.355|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/clicpix2.conf"
|17:49:20.355|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/clicpix2.conf"
|17:49:20.357|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/timepix4.conf"
|17:49:20.357|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/timepix4.conf"
|17:49:20.357|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/test.conf"
|17:49:20.358|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/test.conf"
|17:49:20.358|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/atlas_itk_r0.conf"
|17:49:20.358|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/atlas_itk_r0.conf"
|17:49:20.358|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/alpide_no_support.conf"
|17:49:20.366|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/alpide_no_support.conf"
|17:49:20.366|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/clicpix.conf"
|17:49:20.367|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/clicpix.conf"
|17:49:20.368|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/medipix3.conf"
|17:49:20.368|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/medipix3.conf"
|17:49:20.369|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/diode.conf"
|17:49:20.369|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/diode.conf"
|17:49:20.369|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/mimosa26.conf"
|17:49:20.369|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/mimosa26.conf"
|17:49:20.370|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/timepix.conf"
|17:49:20.370|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/timepix.conf"
|17:49:20.371|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/fei3.conf"
|17:49:20.371|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/fei3.conf"
|17:49:20.371|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/ibl_planar.conf"
|17:49:20.371|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/ibl_planar.conf"
|17:49:20.372|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/alpide.conf"
|17:49:20.373|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/alpide.conf"
|17:49:20.374|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/cmsp1.conf"
|17:49:20.374|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/cmsp1.conf"
|17:49:20.376|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/rd53a_50.conf"
|17:49:20.377|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/rd53a_50.conf"
|17:49:20.377|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/models/mimosa23.conf"
|17:49:20.378|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/models/mimosa23.conf"
|17:49:20.378|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/alpide_no_support.conf"
|17:49:20.378|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/alpide_no_support.conf"
|17:49:20.379|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1_CSV.conf"
|17:49:20.379|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1_CSV.conf"
|17:49:20.382|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1.conf"
|17:49:20.382|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1.conf"
|17:49:20.384|   (TRACE) Reading model "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/Stave01.conf"
|17:49:20.384|   (TRACE) Parsing configuration file "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/Stave01.conf"
|17:49:20.385|   (TRACE) Parsing models
|17:49:20.387|   (TRACE) Registering new model alpide_no_support
|17:49:20.387|   (TRACE) Skipping not required model simulationStave01Event1_CSV in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1_CSV.conf"
|17:49:20.387|   (TRACE) Skipping not required model simulationStave01Event1 in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1.conf"
|17:49:20.388|   (TRACE) Skipping not required model Stave01 in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/Stave01.conf"
|17:49:20.388|   (TRACE) Skipping not required model velopix in path "/Users/arkasantra/AllPix2/allpix-squared/models/velopix.conf"
|17:49:20.389|   (TRACE) Skipping not required model rd53a_25 in path "/Users/arkasantra/AllPix2/allpix-squared/models/rd53a_25.conf"
|17:49:20.389|   (TRACE) Skipping not required model clicpix2 in path "/Users/arkasantra/AllPix2/allpix-squared/models/clicpix2.conf"
|17:49:20.389|   (TRACE) Skipping not required model timepix4 in path "/Users/arkasantra/AllPix2/allpix-squared/models/timepix4.conf"
|17:49:20.389|   (TRACE) Skipping not required model test in path "/Users/arkasantra/AllPix2/allpix-squared/models/test.conf"
|17:49:20.390|   (TRACE) Skipping not required model atlas_itk_r0 in path "/Users/arkasantra/AllPix2/allpix-squared/models/atlas_itk_r0.conf"
|17:49:20.391|   (DEBUG) Skipping overwritten model alpide_no_support in path "/Users/arkasantra/AllPix2/allpix-squared/models/alpide_no_support.conf"
|17:49:20.391|   (TRACE) Skipping not required model clicpix in path "/Users/arkasantra/AllPix2/allpix-squared/models/clicpix.conf"
|17:49:20.391|   (TRACE) Skipping not required model medipix3 in path "/Users/arkasantra/AllPix2/allpix-squared/models/medipix3.conf"
|17:49:20.392|   (TRACE) Skipping not required model diode in path "/Users/arkasantra/AllPix2/allpix-squared/models/diode.conf"
|17:49:20.392|   (TRACE) Skipping not required model mimosa26 in path "/Users/arkasantra/AllPix2/allpix-squared/models/mimosa26.conf"
|17:49:20.392|   (TRACE) Skipping not required model timepix in path "/Users/arkasantra/AllPix2/allpix-squared/models/timepix.conf"
|17:49:20.392|   (TRACE) Skipping not required model fei3 in path "/Users/arkasantra/AllPix2/allpix-squared/models/fei3.conf"
|17:49:20.392|   (TRACE) Skipping not required model ibl_planar in path "/Users/arkasantra/AllPix2/allpix-squared/models/ibl_planar.conf"
|17:49:20.393|   (TRACE) Skipping not required model alpide in path "/Users/arkasantra/AllPix2/allpix-squared/models/alpide.conf"
|17:49:20.393|   (TRACE) Skipping not required model cmsp1 in path "/Users/arkasantra/AllPix2/allpix-squared/models/cmsp1.conf"
|17:49:20.393|   (TRACE) Skipping not required model rd53a_50 in path "/Users/arkasantra/AllPix2/allpix-squared/models/rd53a_50.conf"
|17:49:20.393|   (TRACE) Skipping not required model mimosa23 in path "/Users/arkasantra/AllPix2/allpix-squared/models/mimosa23.conf"
|17:49:20.394|   (DEBUG) Skipping overwritten model alpide_no_support in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/alpide_no_support.conf"
|17:49:20.395|   (TRACE) Skipping not required model simulationStave01Event1_CSV in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1_CSV.conf"
|17:49:20.396|   (TRACE) Skipping not required model simulationStave01Event1 in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/simulationStave01Event1.conf"
|17:49:20.399|   (TRACE) Skipping not required model Stave01 in path "/Users/arkasantra/AllPix2/allpix-squared/examples/arkaExamples/checkCSVAndRootReader/Stave01.conf"
|17:49:20.402|   (TRACE) Closed geometry
|17:49:20.403|   (DEBUG) Creating detector instantiation ElectricFieldReader:Stave01
|17:49:20.404|   (TRACE) Local log level is set to WARNING
|17:49:20.404|   (TRACE) [C:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:20.404|  (STATUS) Loading module GenericPropagation
|17:49:20.406|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleGenericPropagation.dylib
|17:49:20.407|   (DEBUG) Creating instantions for detector module GenericPropagation
|17:49:20.408|   (DEBUG) Creating detector instantiation GenericPropagation:Stave01
|17:49:20.409|  (STATUS) Loading module SimpleTransfer
|17:49:20.410|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleSimpleTransfer.dylib
|17:49:20.411|   (DEBUG) Creating instantions for detector module SimpleTransfer
|17:49:20.411|   (DEBUG) Creating detector instantiation SimpleTransfer:Stave01
|17:49:20.411|  (STATUS) Loading module DefaultDigitizer
|17:49:20.411|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleDefaultDigitizer.dylib
|17:49:20.412|   (DEBUG) Creating instantions for detector module DefaultDigitizer
|17:49:20.412|   (DEBUG) Creating detector instantiation DefaultDigitizer:Stave01
|17:49:20.412|   (TRACE) Local log level is set to WARNING
|17:49:20.419|   (TRACE) [C:DefaultDigitizer:Stave01] Reset log level to global level of TRACE
|17:49:20.420|  (STATUS) Loading module DetectorHistogrammer
|17:49:20.421|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleDetectorHistogrammer.dylib
|17:49:20.422|   (DEBUG) Creating instantions for detector module DetectorHistogrammer
|17:49:20.422|   (DEBUG) Creating detector instantiation DetectorHistogrammer:Stave01
|17:49:20.422|  (STATUS) Loading module ROOTObjectWriter
|17:49:20.422|   (DEBUG) Found library during global search in runtime paths at /Users/arkasantra/AllPix2/allpix-squared/lib/libAllpixModuleROOTObjectWriter.dylib
|17:49:20.423|   (DEBUG) Creating unique instantiation ROOTObjectWriter
|17:49:20.423|  (STATUS) Loaded 7 modules
|17:49:20.423|   (TRACE) Initializing Allpix
|17:49:20.423|   (TRACE) Register number of workers for possible multithreading
|17:49:20.423|  (STATUS) Multithreading disabled
|17:49:20.423|   (TRACE) Initializing DepositionReader
|17:49:20.423|   (TRACE) Creating and accessing ROOT directory
|17:49:20.426|   (TRACE) Local log level is set to WARNING
|17:49:20.511|   (TRACE) [I:DepositionReader] Reset log level to global level of TRACE
|17:49:20.511|   (TRACE) Initializing ElectricFieldReader:Stave01
|17:49:20.511|   (TRACE) Creating and accessing ROOT directory
|17:49:20.514|   (TRACE) Local log level is set to WARNING
|17:49:23.306|   (TRACE) [I:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:23.306|   (TRACE) Initializing GenericPropagation:Stave01
|17:49:23.306|   (TRACE) Creating and accessing ROOT directory
|17:49:23.306|    (INFO) [I:GenericPropagation:Stave01] Selected mobility model "jacoboni"
|17:49:23.306|    (INFO) [I:GenericPropagation:Stave01] No charge carrier recombination model chosen, finite lifetime not simulated
|17:49:23.306|    (INFO) [I:GenericPropagation:Stave01] Selected recombination model "none"
|17:49:23.306|    (INFO) [I:GenericPropagation:Stave01] No charge carrier trapping model chosen, no trapping simulated
|17:49:23.307|    (INFO) [I:GenericPropagation:Stave01] Selected trapping model "none"
|17:49:23.307|    (INFO) [I:GenericPropagation:Stave01] No charge carrier detrapping simulated
|17:49:23.307|   (TRACE) Initializing SimpleTransfer:Stave01
|17:49:23.307|   (TRACE) Creating and accessing ROOT directory
|17:49:23.307|   (TRACE) Initializing DefaultDigitizer:Stave01
|17:49:23.307|   (TRACE) Creating and accessing ROOT directory
|17:49:23.307|   (TRACE) Local log level is set to WARNING
|17:49:23.308|   (TRACE) [I:DefaultDigitizer:Stave01] Reset log level to global level of TRACE
|17:49:23.312|   (TRACE) Initializing DetectorHistogrammer:Stave01
|17:49:23.313|   (TRACE) Creating and accessing ROOT directory
|17:49:23.313|   (DEBUG) [I:DetectorHistogrammer:Stave01] In-pixel plot granularity: (29,26)
|17:49:23.313|   (TRACE) [I:DetectorHistogrammer:Stave01] Creating histograms
|17:49:23.429|   (TRACE) Initializing ROOTObjectWriter
|17:49:23.429|   (TRACE) Creating and accessing ROOT directory
|17:49:23.430| (WARNING) [I:ROOTObjectWriter] File "/Users/arkasantra/AllPix2/allpix-squared/output/dataFile_gPlusLaserBackgroundTDR_EFieldCircularN17Vpercm_Stave01_Event1.root" exists and will be overwritten.
|17:49:23.432|  (STATUS) Initialized 7 module instantiations
|17:49:23.432|   (TRACE) Running Allpix
|17:49:23.433|   (TRACE) Initializing thread pool with 0 threads
|17:49:23.433|   (TRACE) Local log level is set to WARNING
|17:49:23.433|   (TRACE) [T:DepositionReader] Reset log level to global level of TRACE
|17:49:23.433|   (TRACE) Local log level is set to WARNING
|17:49:23.433|   (TRACE) [T:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:23.433|   (TRACE) [T:GenericPropagation:Stave01] Initializing thread 0x1129bd600
|17:49:23.433|   (TRACE) [T:SimpleTransfer:Stave01] Initializing thread 0x1129bd600
|17:49:23.434|   (TRACE) Local log level is set to WARNING
|17:49:23.434|   (TRACE) [T:DefaultDigitizer:Stave01] Reset log level to global level of TRACE
|17:49:23.434|   (TRACE) [T:DetectorHistogrammer:Stave01] Initializing thread 0x1129bd600
|17:49:23.434|   (TRACE) [T:ROOTObjectWriter] Initializing thread 0x1129bd600
|17:49:23.434|  (STATUS) Starting event loop
|17:49:23.435|    (INFO) Starting event 1 with seed 13029374864965267594
|17:49:23.435|   (TRACE) Running event 1 [DepositionReader]
|17:49:23.435|   (TRACE) Local log level is set to WARNING
|17:49:23.438| (WARNING) (Event 1) [R:DepositionReader] Request to terminate:
                                                        Requesting end of run: end of tree reached
|17:49:23.439|   (TRACE) (Event 1) [R:DepositionReader] Reset log level to global level of TRACE
|17:49:23.439|   (TRACE) Running event 1 [ElectricFieldReader:Stave01]
|17:49:23.439|   (TRACE) Local log level is set to WARNING
|17:49:23.439|   (TRACE) (Event 1) [R:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:23.439|   (TRACE) Running event 1 [GenericPropagation:Stave01]
|17:49:23.439|   (TRACE) Not all required messages are received for GenericPropagation:Stave01, skipping module!
|17:49:23.440|   (TRACE) Running event 1 [SimpleTransfer:Stave01]
|17:49:23.440|   (TRACE) Not all required messages are received for SimpleTransfer:Stave01, skipping module!
|17:49:23.440|   (TRACE) Running event 1 [DefaultDigitizer:Stave01]
|17:49:23.440|   (TRACE) Not all required messages are received for DefaultDigitizer:Stave01, skipping module!
|17:49:23.440|   (TRACE) Running event 1 [DetectorHistogrammer:Stave01]
|17:49:23.441|   (TRACE) Not all required messages are received for DetectorHistogrammer:Stave01, skipping module!
|17:49:23.441|   (TRACE) Running event 1 [ROOTObjectWriter]
|17:49:23.441|   (TRACE) (Event 1) [R:ROOTObjectWriter] Writing new objects to tree
|17:49:23.442|  (STATUS) Buffered 0, finished 1 of 2 events
|17:49:23.442|    (INFO) Interrupting event loop after 1 events because of request to terminate
|17:49:23.442|   (TRACE) Local log level is set to WARNING
|17:49:23.442|   (TRACE) [T:DepositionReader] Reset log level to global level of TRACE
|17:49:23.442|   (TRACE) Local log level is set to WARNING
|17:49:23.442|   (TRACE) [T:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:23.443|   (TRACE) [T:GenericPropagation:Stave01] Finalizing thread 0x1129bd600
|17:49:23.443|   (TRACE) [T:SimpleTransfer:Stave01] Finalizing thread 0x1129bd600
|17:49:23.443|   (TRACE) Local log level is set to WARNING
|17:49:23.443|   (TRACE) [T:DefaultDigitizer:Stave01] Reset log level to global level of TRACE
|17:49:23.443|   (TRACE) [T:DetectorHistogrammer:Stave01] Finalizing thread 0x1129bd600
|17:49:23.443|   (TRACE) [T:ROOTObjectWriter] Finalizing thread 0x1129bd600
|17:49:23.444|   (TRACE) All events have been initialized. Waiting for thread pool to finish...
|17:49:23.444|  (STATUS) Finished run of 1 events
|17:49:23.444|   (TRACE) Destroying thread pool
|17:49:23.444|   (TRACE) Local log level is set to WARNING
|17:49:23.444|   (TRACE) [T:DepositionReader] Reset log level to global level of TRACE
|17:49:23.444|   (TRACE) Local log level is set to WARNING
|17:49:23.444|   (TRACE) [T:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:23.445|   (TRACE) [T:GenericPropagation:Stave01] Finalizing thread 0x1129bd600
|17:49:23.445|   (TRACE) [T:SimpleTransfer:Stave01] Finalizing thread 0x1129bd600
|17:49:23.445|   (TRACE) Local log level is set to WARNING
|17:49:23.445|   (TRACE) [T:DefaultDigitizer:Stave01] Reset log level to global level of TRACE
|17:49:23.445|   (TRACE) [T:DetectorHistogrammer:Stave01] Finalizing thread 0x1129bd600
|17:49:23.445|   (TRACE) [T:ROOTObjectWriter] Finalizing thread 0x1129bd600
|17:49:23.445|   (TRACE) Finalizing Allpix
|17:49:23.446|   (TRACE) Finalizing DepositionReader
|17:49:23.446|   (TRACE) Local log level is set to WARNING
|17:49:23.449|   (TRACE) [F:DepositionReader] Reset log level to global level of TRACE
|17:49:23.449|   (TRACE) Finalizing ElectricFieldReader:Stave01
|17:49:23.450|   (TRACE) Local log level is set to WARNING
|17:49:23.450|   (TRACE) [F:ElectricFieldReader:Stave01] Reset log level to global level of TRACE
|17:49:23.450|   (TRACE) Finalizing GenericPropagation:Stave01
|17:49:23.450|    (INFO) [F:GenericPropagation:Stave01] Propagated total of 0 charges in 0 steps in average time of 0ns
|17:49:23.450|   (TRACE) Finalizing SimpleTransfer:Stave01
|17:49:23.450|    (INFO) [F:SimpleTransfer:Stave01] Transferred total of 0 charges
|17:49:23.450|   (TRACE) Finalizing DefaultDigitizer:Stave01
|17:49:23.451|   (TRACE) Local log level is set to WARNING
|17:49:23.451|   (TRACE) [F:DefaultDigitizer:Stave01] Reset log level to global level of TRACE
|17:49:23.451|   (TRACE) Finalizing DetectorHistogrammer:Stave01
|17:49:23.457|   (TRACE) [F:DetectorHistogrammer:Stave01] Writing histograms to file
|17:49:23.763|   (TRACE) Finalizing ROOTObjectWriter
|17:49:23.763|   (TRACE) [F:ROOTObjectWriter] Writing objects to file
|17:49:23.763|   (TRACE) [F:ROOTObjectWriter] Writing global configuration
|17:49:23.763|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: DepositionReader
|17:49:23.764|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: ElectricFieldReader:Stave01
|17:49:23.764|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: GenericPropagation:Stave01
|17:49:23.765|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: SimpleTransfer:Stave01
|17:49:23.765|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: DefaultDigitizer:Stave01
|17:49:23.766|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: DetectorHistogrammer:Stave01
|17:49:23.766|   (TRACE) [F:ROOTObjectWriter] Writing configuration for: ROOTObjectWriter
|17:49:23.766|   (TRACE) [F:ROOTObjectWriter] Writing detector configuration for: Stave01
|17:49:23.772|  (STATUS) [F:ROOTObjectWriter] Wrote 0 objects to 0 branches in file:
                                              /Users/arkasantra/AllPix2/allpix-squared/output/dataFile_gPlusLaserBackgroundTDR_EFieldCircularN17Vpercm_Stave01_Event1.root
|17:49:23.777|  (STATUS) Finalization completed
|17:49:23.777| (WARNING) Unused configuration keys in section DetectorHistogrammer:Stave01:
                         output_plots
|17:49:23.777| (WARNING) Unused configuration keys in section ROOTObjectWriter:
                         output_plots
|17:49:23.778|  (STATUS) Executed 7 instantiations in 3 seconds, spending 84% of time in slowest instantiation ElectricFieldReader:Stave01
|17:49:23.778|    (INFO)  Module DepositionReader took 0.0931718 seconds
|17:49:23.778|    (INFO)  Module ElectricFieldReader:Stave01 took 2.79329 seconds
|17:49:23.778|    (INFO)  Module GenericPropagation:Stave01 took 0.00217389 seconds
|17:49:23.778|    (INFO)  Module SimpleTransfer:Stave01 took 0.000498389 seconds
|17:49:23.778|    (INFO)  Module DefaultDigitizer:Stave01 took 0.0137549 seconds
|17:49:23.778|    (INFO)  Module DetectorHistogrammer:Stave01 took 0.427594 seconds
|17:49:23.779|    (INFO)  Module ROOTObjectWriter took 0.0123057 seconds
|17:49:23.779|  (STATUS) Average processing time is 3350 ms/event, event generation at 0 Hz

I am not sure why this is happening. I am attaching relevant files (CSV config and root config with identical input files in CSV and root format) to reproduce this issue. I will be glad if this is investigated and I am pointed to the mistake I am committing.

Thank you very much,
Arka

EDIT 1: If it helps, this is the Allpix-squared git branch that I am using:
arka-git

Hi @asantra ,

interesting indeed… One warning: you are running allpix in the TRACE verbosity level, but in the config file you overwrite it with WARNING for the DepositionReader, the one you’d like to look at.

Now, once one fixes this, this message appears for every deposit:

(TRACE) (Event 1) [R:DepositionReader] Ignored detector "Stave01", not found in current simulation

and this is puzzling, as Stave01 is the only detector in your geometry. So the problem is identified, but I don’t know the cause yet. Please have a bit of patience, I will look into it in the coming days.

Cheers
Paul

Hi @pschutze ,
Thanks for the heads up. I identified the source of the problem. I looked at this variable:

detector_name_chars = 0

According to the manual, this means Allpix-squared will look for the exact name of the detector. For some reason, it is adding some non-sensical element after the detector name “Stave01”, and it cannot get the detector because of that extra element. If I now change to

detector_name_chars = 7 # exact number of elements in the detector name

then it identifies my detector. After that change, the simulation goes smooth.

That said, I like to know how to set this particular variable detector_name_chars when in the simulation, I have multiple detectors with different lengths in the name string.

Best,
Arka

Hi @asantra ,

great, I’m glad you found and fixed this.

That said, I like to know how to set this particular variable detector_name_chars when in the simulation, I have multiple detectors with different lengths in the name string.

This might be tricky indeed, but it might be a challenge already at the stage of producing the tree, to be honest. The value filled into the detector name branch is defined as a vector of chars, but you need to provide a length of the string when defining the branch. This will be valid for all the entries then. Hence, I strongly recommend to use a common length of the detector name.

Another option that should work, is to have different files for different detectors, and you’d call the DepositionReader several times.

That being said, I know there is a workaround, which is not implemented in Allpix Squared, but we could think about it: one would allocate a sufficient length for this vector to fit in all possible detector names. Then, additionally to this branch, one would create a second branch that, per deposit, holds an integer with the length of the detector name. In this case, we could then in Allpix use the substring with the corresponding length.
As said, this is not implemented yet, but could be an option for the future, if making all names equally long doesn’t work for you.

What do you think?

Cheers
Paul

Hi @pschutze ,
Thank you very much for the information. Unfortunately, I am stuck with different lengths in the detector name as of now. As a workaround, I am using a script which will count the number of elements in the detector name and then will prepare separate config files for separate detectors.

Best,
Arka

Hi @asantra @pschutze

I think the problem rather is the “nonsensical element”. Char arrays (C-style “strings”) as used by ROOT in its trees are terminated by a \0 character. We check for the total length of the detector name and remove that one last character - but maybe something goes wrong here?
Do you have a sample ROOT tree for me with just one event or so, @asantra ?

/Simon

for reference

Hi @simonspa ,
You can find one such root file (with one event and 3 entries corresponding to that) here.

Thank you,
Arka

Hi @asantra

it was a bug in how we read the detector name from the tree. Here is the fix:

Works fine with your example, thanks for sending it!

/Simon