GithubHelp home page GithubHelp logo

allpix-squared's Introduction

Allpix2

Generic Pixel Detector Simulation Framework

Allpix2 is a flexible and modular simulation framework for semiconductor radiation detectors, written in modern C++. The goal of the Allpix2 framework is to provide a comprehensive and easy-to-use package for end-to-end simulations of the performance of patterned semiconductor radiation detectors, from incident ionizing radiation to the digitization of pixel hits in the detector ASIC.

For more details about the project please have a look at the website at https://cern.ch/allpix-squared.

build status coverity status zenodo record REUSE status

Using Allpix2

Docker Images

Docker images are provided for all releases and the latest development version of the framework. To create a container from the latest Docker image and start an interactive shell session with the current host system path mounted to /data, run:

$ docker run --interactive --tty --volume "$(pwd)":/data --name=allpix-squared \
             gitlab-registry.cern.ch/allpix-squared/allpix-squared bash

Alternatively it is also possible to directly start the simulation instead of an interactive shell:

$ docker run --tty --rm --volume "$(pwd)":/data --name=allpix-squared \
             gitlab-registry.cern.ch/allpix-squared/allpix-squared "allpix -c my_simulation.conf"

To run a tagged version, append the tag to the image name, e.g. gitlab-registry.cern.ch/allpix-squared/allpix-squared:v2.2.1. More detailed information on the Docker images can be found in the user manual.

Machines with CVMFS

Machines with a supported OS and the CERN Virtual Machine File System (CVMFS) can load Allpix2 and its dependencies from there by sourcing the respective environment:

$ source /cvmfs/clicdp.cern.ch/software/allpix-squared/<version>/x86_64-<system>-<compiler>-opt/setup.sh

where <version> should be replaced with the desired Allpix2 version, e.g. 2.2.1 and <system> with the operating system of the executing machine (centos7, centos8 or mac11). The compiler versions available via the <compiler> tag depend on the selected operating system.

When running for the first time, the CVMFS cache of the executing machine has to be populated with all dependencies. This can lead to a significant start-up time for the first execution, it does not affect simulation performance or subsequent executions with the cache already present.

Compilation from Source

Allpix2 uses the CMake build system, version 3.6.3 or later, to configure and compile the framework. It requires a compiler with full C++17 support. More detailed instructions on how to compile the framework from source can be found in the user manual. The framework has the following external dependencies:

  • ROOT (required, with the GenVector component)
  • Boost.Random (required, version >= 1.64.0)
  • Geant4 (optional, but required for typical purposes, multithreading capabilities should be enabled)
  • Eigen3 (optional, but required for typical purposes)

For machines with CVMFS, e.g. the CERN LXPLUS or DESY NAF clusters, all dependencies and required compiler versions can be satisfied via:

$ source etc/scripts/setup_lxplus.sh

Compilation TL;DR:

$ mkdir build && cd build/
$ cmake ..
$ make install

Documentation

The User Manual of the most recent release version of Allpix2 is available from the website.
The respective Doxygen reference is published online as well.

Citing Allpix2

Allpix2 is distributed freely and openly under the MIT license, but the authors kindly ask to cite the reference paper and the Zenodo record in scientific publications:

  • The reference paper of Allpix2 has been published in Nuclear Instrumentations and Methods in Physics Research A with open access and can be obtained from https://doi.org/10.1016/j.nima.2018.06.020. A preprint version is available on arxiv:1806.05813. Please cite this paper when publishing your work using Allpix2 as:

    S. Spannagel et al., “Allpix2: A modular simulation framework for silicon detectors”, Nucl. Instr. Meth. A 901 (2018) 164 – 172, doi:10.1016/j.nima.2018.06.020, arXiv:1806.05813

  • The versioned Zenodo record can be found at https://doi.org/10.5281/zenodo.3550935. Please cite the version used for the published work. For example, the latest version should be cited as:

    S. Spannagel, K. Wolters & P. Schütze. (2022). Allpix Squared - Generic Pixel Detector Simulation Framework (2.2.0). Zenodo. https://doi.org/10.5281/zenodo.6387859

Further papers with algorithm validations as well as tutorials and seminar talks can be found on the website.

Developing Allpix2

See AUTHORS.md

Contributing to Allpix2

All types of contributions, being it minor and major, are welcome. Please refer to our contribution guidelines for a description on how to get started. Before adding changes it is highly recommended to carefully read through the documentation in the User Manual first.

Licenses

This software is distributed under the terms of the MIT license. The documentation is distributed under the terms of the CC-BY-4.0 license.

This repository follows the REUSE specification, a full copyright report can be created via reuse spdx.

A copy of all licenses can be found in the LICENSES folder.

The following third-party codes are included in the repository:

allpix-squared's People

Contributors

andresailer avatar anurnberg avatar asantra avatar b-ali avatar chunkygrumbler avatar dhynds avatar edorossi avatar enricojr avatar gollumben avatar heller3 avatar kdort avatar koensw avatar lhuth avatar mateus-vicente avatar mathieubenoit avatar mmdonatti avatar msmk0 avatar nashadroid avatar relenk avatar salmanmaq avatar sam-sw avatar sanchitkratos avatar schmidtseb avatar schuetzepaul avatar sebastienmurphy avatar simonge avatar simonspa avatar stephanlachnit avatar tmplt avatar zhixing1996 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

allpix-squared's Issues

CSADigitizer: new ToT mode

Right now, the ToT measurement start on the next clock cycles after the ToA. For the MuPix10, as far as I understood it, this isn't the case. Instead, both TS2 and TS1 are returned, giving a more precise answer.

For example, we might have a 8ns ToA clock, and a 128ns TS2 clock (on the 8ns basis with a clock divider), and the signal crosses the threshold at 20ns and lasts 480ns (i.e. crosses the threshold again at 500ns). In Allpix, the ToA timestamp will be 3 clock cycles, and the TS2 timestamp will also be 3 clock cycles (starting at 128ns and ending at 512ns). So 3 ToT clock cycles would be the definite answer (384ns).

On the MuPix10, we have TS2 and TS1 relative to some internal time, so we can subtract them with ToT = TS2_signal * TS2_clk - TS1_signal * TS1_clk (essentially, I'm still trying to figure out the details).

If we assume the random internal time to be 0 at 0ns, we would know that TS2 is at 512ns, and TS1 at 24ns, giving a more precise 488ns.

Also, the TS2 timestep isn't set on the first crossing from above to below threshold, but rather on the last crossing within a certain time window after TS1. I believe this makes some difference when having a high noise to signal ratio (e.g. in our case measurements with Fe55).

This would require a rewriting of get_tot() in it's current form, and also requires new options. Any suggestions?

Mesh Converter broken

I'm having issues converting the meshes to the apf file format. It seems to be stuck at (STATUS) Starting regular grid interpolation with 8 threads.
I let it run one time for at least 4 hours, basically no CPU usage during that process, no additional output. When hitting Ctrl+C it exits with the expect Interrupted! message. This was tried in both Release and RelWithDebInfo mode, same behaviour.

However, running in a Debug build shows a SIGABRT signal (see log below).
I think this was introduced in https://gitlab.cern.ch/allpix-squared/allpix-squared/-/merge_requests/414, since the mesh converter works fine when running at version 1.6.1 from January.

Log in Debug mode:

|11:29:47.729|  (STATUS) Welcome to the Mesh Converter Tool of Allpix^2 v1.6.0+1247^gc8c6e1ab
|11:29:47.729|  (STATUS) Using mupix10_20V.conf configuration file
|11:29:47.730|  (STATUS) Reading mesh grid from file "mupix10_20V.grd"
|11:30:42.428|    (INFO) Parsing grid file: done.
|11:30:56.749|    (INFO) Grid sizes for all regions:
|11:30:56.749|    (INFO) 	al-1                      1786
|11:30:56.749|    (INFO) 	al-11                     570
|11:30:56.749|    (INFO) 	al-12                     570
|11:30:56.749|    (INFO) 	al-13                     558
|11:30:56.749|    (INFO) 	al-14                     558
|11:30:56.749|    (INFO) 	al-2                      1786
|11:30:56.749|    (INFO) 	al-4                      1786
|11:30:56.749|    (INFO) 	al-6                      1786
|11:30:56.749|    (INFO) 	hv_p_contact              2032
|11:30:56.749|    (INFO) 	n_contact_1               744
|11:30:56.749|    (INFO) 	oxide-1                   3483
|11:30:56.749|    (INFO) 	oxide-11                  7226
|11:30:56.749|    (INFO) 	oxide-12                  7226
|11:30:56.749|    (INFO) 	oxide-13                  5020
|11:30:56.750|    (INFO) 	oxide-14                  5020
|11:30:56.750|    (INFO) 	oxide-15                  25947
|11:30:56.750|    (INFO) 	oxide-2                   3483
|11:30:56.750|    (INFO) 	oxide-3                   3431
|11:30:56.750|    (INFO) 	oxide-4                   3431
|11:30:56.750|    (INFO) 	substrate-r               283841
|11:30:56.836|  (STATUS) Reading field from file "mupix10_20V.dat"
|11:31:40.887|    (INFO) Parsing field data file: done.
|11:31:40.887|    (INFO) Field sizes for all regions and observables:
|11:31:40.887|    (INFO)  al-1:
|11:31:40.887|    (INFO) 	ElectricField             1786
|11:31:40.887|    (INFO) 	ElectrostaticPotential    1786
|11:31:40.887|    (INFO)  al-11:
|11:31:40.887|    (INFO) 	ElectricField             570
|11:31:40.887|    (INFO) 	ElectrostaticPotential    570
|11:31:40.887|    (INFO)  al-12:
|11:31:40.887|    (INFO) 	ElectricField             570
|11:31:40.887|    (INFO) 	ElectrostaticPotential    570
|11:31:40.887|    (INFO)  al-13:
|11:31:40.888|    (INFO) 	ElectricField             558
|11:31:40.888|    (INFO) 	ElectrostaticPotential    558
|11:31:40.888|    (INFO)  al-14:
|11:31:40.888|    (INFO) 	ElectricField             558
|11:31:40.888|    (INFO) 	ElectrostaticPotential    558
|11:31:40.888|    (INFO)  al-2:
|11:31:40.888|    (INFO) 	ElectricField             1786
|11:31:40.888|    (INFO) 	ElectrostaticPotential    1786
|11:31:40.888|    (INFO)  al-4:
|11:31:40.888|    (INFO) 	ElectricField             1786
|11:31:40.888|    (INFO) 	ElectrostaticPotential    1786
|11:31:40.888|    (INFO)  al-6:
|11:31:40.888|    (INFO) 	ElectricField             1786
|11:31:40.888|    (INFO) 	ElectrostaticPotential    1786
|11:31:40.888|    (INFO)  oxide-1:
|11:31:40.888|    (INFO) 	ElectricField             3483
|11:31:40.888|    (INFO) 	ElectrostaticPotential    3483
|11:31:40.889|    (INFO)  oxide-11:
|11:31:40.889|    (INFO) 	ElectricField             7226
|11:31:40.889|    (INFO) 	ElectrostaticPotential    7226
|11:31:40.889|    (INFO)  oxide-12:
|11:31:40.889|    (INFO) 	ElectricField             7226
|11:31:40.889|    (INFO) 	ElectrostaticPotential    7226
|11:31:40.889|    (INFO)  oxide-13:
|11:31:40.889|    (INFO) 	ElectricField             5020
|11:31:40.889|    (INFO) 	ElectrostaticPotential    5020
|11:31:40.889|    (INFO)  oxide-14:
|11:31:40.889|    (INFO) 	ElectricField             5020
|11:31:40.889|    (INFO) 	ElectrostaticPotential    5020
|11:31:40.889|    (INFO)  oxide-15:
|11:31:40.889|    (INFO) 	ElectricField             25947
|11:31:40.889|    (INFO) 	ElectrostaticPotential    25947
|11:31:40.889|    (INFO)  oxide-2:
|11:31:40.890|    (INFO) 	ElectricField             3483
|11:31:40.890|    (INFO) 	ElectrostaticPotential    3483
|11:31:40.890|    (INFO)  oxide-3:
|11:31:40.890|    (INFO) 	ElectricField             3431
|11:31:40.890|    (INFO) 	ElectrostaticPotential    3431
|11:31:40.890|    (INFO)  oxide-4:
|11:31:40.890|    (INFO) 	ElectricField             3431
|11:31:40.890|    (INFO) 	ElectrostaticPotential    3431
|11:31:40.890|    (INFO)  substrate-r:
|11:31:40.890|    (INFO) 	AcceptorConcentration     283841
|11:31:40.890|    (INFO) 	DonorConcentration        283841
|11:31:40.890|    (INFO) 	DopingConcentration       283841
|11:31:40.890|    (INFO) 	ElectricField             283841
|11:31:40.890|    (INFO) 	ElectrostaticPotential    283841
|11:31:40.924|    (INFO) Using initial neighbor search radius of 0.35
|11:31:40.925|  (STATUS) Mesh dimensions: 80 x 35 x 80
                         New mesh element dimension: 0.8 x 0.35 x 0.8 ==>  Volume = 0.224
|11:31:40.925|    (INFO) Reading the files took 113 seconds.
|11:31:41.175|  (STATUS) Starting regular grid interpolation with 8 threads.
mesh_converter: ../src/core/module/ThreadPool.tpp:27: bool allpix::ThreadPool::SafeQueue<T>::pop(T&, const std::function<void()>&, size_t) [with T = std::unique_ptr<std::packaged_task<void()> >; size_t = long unsigned int]: Assertion `buffer_left <= max_priority_size_' failed.
mesh_converter: ../src/core/module/ThreadPool.tpp:27: bool allpix::ThreadPool::SafeQueue<T>::pop(T&, const std::function<void()>&, size_t) [with T = std::unique_ptr<std::packaged_task<void()> >; size_t = long unsigned int]: Assertion `buffer_left <= max_priority_size_' failed.
Aborted

With gdb:

|11:11:12.222|  (STATUS) Starting regular grid interpolation with 8 threads.
408	        std::vector<Point> e_field_new_mesh;
(gdb) n
411	        auto init_function = [log_level = allpix::Log::getReportingLevel(), log_format = allpix::Log::getFormat()]() {
(gdb) n
416	        };
(gdb) n
411	        auto init_function = [log_level = allpix::Log::getReportingLevel(), log_format = allpix::Log::getFormat()]() {
(gdb) n
416	        };
(gdb) n
418	        ThreadPool pool(num_threads, num_threads * 1024, init_function);
(gdb) n
[New Thread 0x7ffff66d4700 (LWP 9789)]
mesh_converter: ../src/core/module/ThreadPool.tpp:27: bool allpix::ThreadPool::SafeQueue<T>::pop(T&, const std::function<void()>&, size_t) [with T = std::unique_ptr<std::packaged_task<void()> >; size_t = long unsigned int]: Assertion `buffer_left <= max_priority_size_' failed.
[New Thread 0x7fffeded3700 (LWP 9790)]
mesh_converter: ../src/core/module/ThreadPool.tpp:27: bool allpix::ThreadPool::SafeQueue<T>::pop(T&, const std::function<void()>&, size_t) [with T = std::unique_ptr<std::packaged_task<void()> >; size_t = long unsigned int]: Assertion `buffer_left <= max_priority_size_' failed.
[New Thread 0x7ffff5ed3700 (LWP 9791)]
    
Thread 2 "mesh_converter" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff66d4700 (LWP 9789)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50

Sr90 decay cutoff time

So I've been measuring with Sr90 in the lab and I found large discrepancies between a simulation with AP2 and the chip results (MuPix10). Even ignoring our still somewhat beta pulse parameters, the difference is way to large.

Quick reminder: Sr90 has a beta decay with up to ca 500keV and a half life of ca 29 years. The decay product is Y90, which also has a beta decay, the max energy is ca 2.3 MeV and the half life ca 64 hours.

After showing some energy vs ToT plots, someone in our group pointed out, that they would except an energy up to 2 MeV, including the electron from the Y90 decay, because most low energy electron are probably already absorbed in the source itself. Running the simulation with Y90 indeed gives a ToT spectrum that looks roughly like what I measured with the chip.

To come back to Allpix Squared: I think this might be interesting not just for me, but also other people measuring with Sr90. The question is if this should be addressed in AP2 or not. The docs already mention the cutoff time, but I think it's easy to overlook (e.g. in my case).

One could figure out an appropriate cutoff time using simple math, i.e. we can calculate the expect ratio of nuclei in the source. For a decay chain of length two you would get N_2 / N_1 = t_2 / (t_1 - t_2) for the ratio (N_1 is the number of nuclei that are first in the decay chain, with t_1 being it's life time, N_2, t_2 for the second particle in the decay chain).
Thus, with a probability of t_2 / (t_1 - t_2) you would want to have a second decay. Since the first particle decays instantly, we only need to figure out how long it takes for the decay product to reach that probability. Using P_seconddecay(t) = 1- exp(-t/t_2), the resulting cutoff time is t_2 * ln( (t_1 - t_2) / (t_1 - 2 * t_2) ).

The problem of course is, this is only this easy when the decay chain has two particles. This doesn't seem like fun for Am241. And of course, for custom ions, this wouldn't apply as well.
Going through the list, Sr90 is the only one where we have a decay chain of two particles. The question is if it is worth to program this into AP2, or simply mentioning that Sr90 might require a higher cutoff time in the docs?

Mesh Converter batch mode

This is a feature request, nothing really important but a nice to have.

When extracting different observables with the mesh converter, only one can be selected at a time. It would be nice if a array of observables could be selected instead, which would be run in batch mode. This way the file only needs to be read once and one doesn't need to change the config file.

E.g. instead of

mode = "APF"
parser = "DF-ISE"
region = "substrate-r"
observable = "ElectricField"

rather

mode = "APF"
parser = "DF-ISE"
region = "substrate-r"
observable = "ElectricField", "DopingConcentration"

Custom radioactive ions don't decay instantly

When using custom ions such as Y90, the ions aren't set to decay immediately in Geant4.
Relevant part of the code:

if(isotopes_.find(particle_type_) != isotopes_.end()) {
auto isotope = isotopes_[particle_type_];
// Set radioactive isotope:
particle = G4IonTable::GetIonTable()->GetIon(std::get<0>(isotope), std::get<1>(isotope), std::get<3>(isotope));
// Force the radioactive isotope to decay immediately:
particle->SetPDGLifeTime(0.);
single_source->SetParticleCharge(std::get<2>(isotope));
// Warn about non-zero source energy:
if(config_.get<double>("source_energy") > 0) {
LOG(WARNING)
<< "A radioactive isotope is used as particle source, but the source energy is not set to zero.";
}
} else if(particle_type_.substr(0, 3) == "ion") {
// Parse particle type as ion with components /Z/A/Q/E
std::smatch ion;
if(std::regex_match(
particle_type_, ion, std::regex("ion/([0-9]+)/([0-9]+)/([-+]?[0-9]+)/([0-9.]+(?:[a-zA-Z]+)?)")) &&
ion.ready()) {
particle = G4IonTable::GetIonTable()->GetIon(
allpix::from_string<int>(ion[1]), allpix::from_string<int>(ion[2]), allpix::from_string<double>(ion[4]));
single_source->SetParticleCharge(allpix::from_string<int>(ion[3]));
} else {
throw InvalidValueError(config_, "particle_type", "cannot parse parameters for ion.");
}
}

Since ions can of course also be used as beam, simply setting the PDG lifetime to zero for all ions is maybe not the best idea. Are there beams with radioactive ions though? I see three ways to fix this:

  1. Always set the PDG lifetime to zero and assume that people don't use radioactive ions in beams.
  2. Add another parameter for the PDG lifetime, e.g. ion/Z/A/Q/E/L, where L is the PDG lifetime in seconds (float).
  3. Set the lifetime to zero only if the source type is point.
  4. Add a new option to the module like decay_instantly

I prefer 2 or 3, and would do a PR for the option you prefer.

/cc @simonspa @schuetzepaul

Segfault when using DepositionReader

I'm now getting segfaults when using the DepositionReader module. I assume it is due to the new parallel event processing, I'm still trying to dig deeper into it. Maybe relevant: https://gitlab.cern.ch/allpix-squared/allpix-squared/-/issues/210

It doesn't matter if MT is enabled or not, it will segfault in both cases. I don't get any segfaults when using DepositionGeant4 in the same config.

Output (MT disabled):

(S) Welcome to Allpix^2 v1.6.0+1245^g32183d1a
(S) Initialized PRNG with system entropy seed 7229497434922716424
(W) Main ROOT file /home/stephan/Projects/allpix-squared/bin/output/modules.root exists and will be overwritten.
(S) Loaded 6 modules                  
(S) Initializing 6 module instantiations
(I) [I:ElectricFieldReader:detector] Setting linear electric field from -20V bias voltage and -20V depletion voltage
(I) [I:DepositionReader] Initialized tree reader for tree Deposition, found 311911 entries
(W) [I:ROOTObjectWriter] File /home/stephan/Projects/allpix-squared/bin/output/data.root exists and will be overwritten.
(S) Initialized 6 module instantiations
(S) Multithreading disabled
(I) Starting event 1 with seed 4599098356598016987
(I) (E: 1) [R:DepositionReader] Finished reading event 0x56128da1ae90
(I) (E: 1) [R:GenericPropagation:detector] Propagated 1581454 charges in 158370 steps in average time of 1.20079ns
                                           Recombined 0 charges during transport
(I) (E: 1) [R:PulseTransfer:detector] Total charge induced on all pixels: 764046e
(I) (E: 1) [R:CSADigitizer:detector] Initialized impulse response with timestep 10ps and integration time 10us, samples: 1000000
(I) (E: 1) [R:CSADigitizer:detector] Digitized 2 pixel hits

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f0cd3cf51c6 in __GI___wait4 (pid=99049, stat_loc=stat_loc
entry=0x7fff28c82eb8, options=options
entry=0, usage=usage
entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
#1  0x00007f0cd3cf5187 in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc
entry=0x7fff28c82eb8, options=options
entry=0) at waitpid.c:38
#2  0x00007f0cd3c72aa7 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:172
#3  0x00007f0cd4402551 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x561289e6e580) at ../core/unix/src/TUnixSystem.cxx:2117
#4  TUnixSystem::StackTrace (this=0x561289e6e580) at ../core/unix/src/TUnixSystem.cxx:2408
#5  0x00007f0cd43ff9c5 in TUnixSystem::DispatchSignals (this=0x561289e6e580, sig=kSigSegmentationViolation) at ../core/unix/src/TUnixSystem.cxx:3646
#6  <signal handler called>
#7  0x0000000000000000 in ?? ()
#8  0x00007f0cd430b428 in TRef::operator= (this=0x56128dafa360, obj=0x56128cde1830) at ../core/base/src/TRef.cxx:284
#9  0x00007f0cd5481a23 in allpix::Object::BaseWrapper<allpix::MCParticle>::store (this=0x56128dafa350) at ../src/objects/Object.hpp:142
#10 0x00007f0cd5489618 in allpix::MCParticle::petrifyHistory (this=0x56128dafa2c8) at ../src/objects/MCParticle.cpp:157
#11 0x00007f0cdc5440f0 in allpix::ROOTObjectWriterModule::run (this=0x56128cdedeb0, event=0x56128da1ae90) at ../src/modules/ROOTObjectWriter/ROOTObjectWriterModule.cpp:192
#12 0x00007f0cd56ca225 in operator()<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&>(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module>, std::allocator<std::shared_ptr<allpix::Module> > >::iterator, long double, struct {...} &) (__closure=0x56128d8dbd78, event=std::shared_ptr<allpix::Event> (use count 1, weak count 0) = {...}, module_iter=std::shared_ptr<allpix::Module> (use count 4, weak count 0) = {get() = 0x56128cdedeb0}, event_time=118.737900077000000001, self_func=...) at ../src/core/module/ModuleManager.cpp:786
#13 0x00007f0cd56c91f4 in std::__invoke_impl<void, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&, std::nullptr_t&, std::_List_iterator<std::shared_ptr<allpix::Module> >&, int&, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#14 0x00007f0cd56c9079 in std::__invoke<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&, std::nullptr_t&, std::_List_iterator<std::shared_ptr<allpix::Module> >&, int&, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&>(struct {...} &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:95
#15 0x00007f0cd56c8edc in std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>::__call<void, 0, 1, 2, 3>(std::tuple<> &&, std::_Index_tuple<0, 1, 2, 3>) (this=0x56128d8dbd78, __args=...) at /usr/include/c++/10/functional:416
#16 0x00007f0cd56c8dba in std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>::operator()<>(void) (this=0x56128d8dbd78) at /usr/include/c++/10/functional:499
#17 0x00007f0cd56c8cb2 in std::__invoke_impl<void, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(std::__invoke_other, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#18 0x00007f0cd56c896a in std::__invoke<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:95
#19 0x00007f0cd56c855c in std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>::__call<void>(std::tuple<> &&, std::_Index_tuple<>) (this=0x56128d8dbd78, __args=...) at /usr/include/c++/10/functional:416
#20 0x00007f0cd56c802e in std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>::operator()<>(void) (this=0x56128d8dbd78) at /usr/include/c++/10/functional:499
#21 0x00007f0cd56c7aa2 in std::__invoke_impl<void, std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>&>(std::__invoke_other, std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()> &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#22 0x00007f0cd56c75ca in std::__invoke_r<void, std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>&>(std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()> &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:110
#23 0x00007f0cd56c716f in operator() (this=0x56128d8dbd50) at /usr/include/c++/10/future:1432
#24 0x00007f0cd56c898f in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void>::operator()(void) const (this=0x7fff28c87e20) at /usr/include/c++/10/future:1373
#25 0x00007f0cd56c85c4 in std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void> &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#26 0x00007f0cd56c80da in std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void> &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:113
#27 0x00007f0cd56c7b21 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>(), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/10/bits/std_function.h:292
#28 0x00007f0cda02bd99 in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const (this=<optimized out>) at /usr/include/c++/10/bits/std_function.h:622
#29 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (this=0x56128d8dbd50, __f=<optimized out>, __did_set=0x7fff28c87d87) at /usr/include/c++/10/future:572
#30 0x00007f0cd582434f in __pthread_once_slow (once_control=0x56128d8dbd68, init_routine=0x7f0cd401afc0 <__once_proxy>) at pthread_once.c:116
#31 0x00007f0cd56cfb11 in __gthread_once (__once=0x56128d8dbd68, __func=0x7f0cd401afc0 <__once_proxy>) at /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:700
#32 0x00007f0cd56d21a6 in std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (__once=..., __f=
0x7fff28c87da0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x7f0cda02bd70 <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>) at /usr/include/c++/10/mutex:729
#33 0x00007f0cd56d0853 in std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) (this=0x56128d8dbd50, __res=..., __ignore_failure=false) at /usr/include/c++/10/future:412
#34 0x00007f0cd56c71ce in std::__future_base::_Task_state<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void()>::_M_run(void) (this=0x56128d8dbd50) at /usr/include/c++/10/future:1435
#35 0x00007f0cd56d5f95 in std::packaged_task<void ()>::operator()() (this=0x7fff28c87ec0) at /usr/include/c++/10/future:1568
#36 0x00007f0cd56c0344 in operator() (this=0x7fff28c87ec0) at ../src/core/module/ThreadPool.tpp:197
#37 0x00007f0cd56c04c9 in allpix::ThreadPool::submit<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(uint64_t, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (this=0x56128d6a3a90, n=18446744073709551615, func=...) at ../src/core/module/ThreadPool.tpp:202
#38 0x00007f0cd56c0683 in allpix::ThreadPool::submit<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (this=0x56128d6a3a90, func=...) at ../src/core/module/ThreadPool.tpp:182
#39 0x00007f0cd56c1b35 in allpix::ModuleManager::run (this=0x561289fc0180, seeder=...) at ../src/core/module/ModuleManager.cpp:847
#40 0x00007f0cd5740ea6 in allpix::Allpix::run (this=0x561289fbebc0) at ../src/core/Allpix.cpp:219
#41 0x0000561289ce791d in main (argc=3, argv=0x7fff28c8b1a8) at ../src/exec/allpix.cpp:200
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum https://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern.ch/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#7  0x0000000000000000 in ?? ()
#8  0x00007f0cd430b428 in TRef::operator= (this=0x56128dafa360, obj=0x56128cde1830) at ../core/base/src/TRef.cxx:284
#9  0x00007f0cd5481a23 in allpix::Object::BaseWrapper<allpix::MCParticle>::store (this=0x56128dafa350) at ../src/objects/Object.hpp:142
#10 0x00007f0cd5489618 in allpix::MCParticle::petrifyHistory (this=0x56128dafa2c8) at ../src/objects/MCParticle.cpp:157
#11 0x00007f0cdc5440f0 in allpix::ROOTObjectWriterModule::run (this=0x56128cdedeb0, event=0x56128da1ae90) at ../src/modules/ROOTObjectWriter/ROOTObjectWriterModule.cpp:192
#12 0x00007f0cd56ca225 in operator()<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&>(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module>, std::allocator<std::shared_ptr<allpix::Module> > >::iterator, long double, struct {...} &) (__closure=0x56128d8dbd78, event=std::shared_ptr<allpix::Event> (use count 1, weak count 0) = {...}, module_iter=std::shared_ptr<allpix::Module> (use count 4, weak count 0) = {get() = 0x56128cdedeb0}, event_time=118.737900077000000001, self_func=...) at ../src/core/module/ModuleManager.cpp:786
#13 0x00007f0cd56c91f4 in std::__invoke_impl<void, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&, std::nullptr_t&, std::_List_iterator<std::shared_ptr<allpix::Module> >&, int&, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#14 0x00007f0cd56c9079 in std::__invoke<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&, std::nullptr_t&, std::_List_iterator<std::shared_ptr<allpix::Module> >&, int&, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>&>(struct {...} &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:95
#15 0x00007f0cd56c8edc in std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>::__call<void, 0, 1, 2, 3>(std::tuple<> &&, std::_Index_tuple<0, 1, 2, 3>) (this=0x56128d8dbd78, __args=...) at /usr/include/c++/10/functional:416
#16 0x00007f0cd56c8dba in std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>::operator()<>(void) (this=0x56128d8dbd78) at /usr/include/c++/10/functional:499
#17 0x00007f0cd56c8cb2 in std::__invoke_impl<void, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(std::__invoke_other, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#18 0x00007f0cd56c896a in std::__invoke<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:95
#19 0x00007f0cd56c855c in std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>::__call<void>(std::tuple<> &&, std::_Index_tuple<>) (this=0x56128d8dbd78, __args=...) at /usr/include/c++/10/functional:416
#20 0x00007f0cd56c802e in std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>::operator()<>(void) (this=0x56128d8dbd78) at /usr/include/c++/10/functional:499
#21 0x00007f0cd56c7aa2 in std::__invoke_impl<void, std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>&>(std::__invoke_other, std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()> &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#22 0x00007f0cd56c75ca in std::__invoke_r<void, std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>&>(std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()> &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:110
#23 0x00007f0cd56c716f in operator() (this=0x56128d8dbd50) at /usr/include/c++/10/future:1432
#24 0x00007f0cd56c898f in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void>::operator()(void) const (this=0x7fff28c87e20) at /usr/include/c++/10/future:1373
#25 0x00007f0cd56c85c4 in std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void> &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#26 0x00007f0cd56c80da in std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void> &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:113
#27 0x00007f0cd56c7b21 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>(), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void, {}>::<lambda()>, void> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/10/bits/std_function.h:292
#28 0x00007f0cda02bd99 in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const (this=<optimized out>) at /usr/include/c++/10/bits/std_function.h:622
#29 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (this=0x56128d8dbd50, __f=<optimized out>, __did_set=0x7fff28c87d87) at /usr/include/c++/10/future:572
#30 0x00007f0cd582434f in __pthread_once_slow (once_control=0x56128d8dbd68, init_routine=0x7f0cd401afc0 <__once_proxy>) at pthread_once.c:116
#31 0x00007f0cd56cfb11 in __gthread_once (__once=0x56128d8dbd68, __func=0x7f0cd401afc0 <__once_proxy>) at /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:700
#32 0x00007f0cd56d21a6 in std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (__once=..., __f=
0x7fff28c87da0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x7f0cda02bd70 <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>) at /usr/include/c++/10/mutex:729
#33 0x00007f0cd56d0853 in std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) (this=0x56128d8dbd50, __res=..., __ignore_failure=false) at /usr/include/c++/10/future:412
#34 0x00007f0cd56c71ce in std::__future_base::_Task_state<std::_Bind<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>()>, std::allocator<int>, void()>::_M_run(void) (this=0x56128d8dbd50) at /usr/include/c++/10/future:1435
#35 0x00007f0cd56d5f95 in std::packaged_task<void ()>::operator()() (this=0x7fff28c87ec0) at /usr/include/c++/10/future:1568
#36 0x00007f0cd56c0344 in operator() (this=0x7fff28c87ec0) at ../src/core/module/ThreadPool.tpp:197
#37 0x00007f0cd56c04c9 in allpix::ThreadPool::submit<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(uint64_t, std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (this=0x56128d6a3a90, n=18446744073709551615, func=...) at ../src/core/module/ThreadPool.tpp:202
#38 0x00007f0cd56c0683 in allpix::ThreadPool::submit<std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)>&>(std::_Bind<allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>(std::nullptr_t, std::_List_iterator<std::shared_ptr<allpix::Module> >, int, allpix::ModuleManager::run(allpix::RandomNumberGenerator&)::<lambda(std::shared_ptr<allpix::Event>, std::__cxx11::list<std::shared_ptr<allpix::Module> >::iterator, long double, auto:2&&)>)> &) (this=0x56128d6a3a90, func=...) at ../src/core/module/ThreadPool.tpp:182
#39 0x00007f0cd56c1b35 in allpix::ModuleManager::run (this=0x561289fc0180, seeder=...) at ../src/core/module/ModuleManager.cpp:847
#40 0x00007f0cd5740ea6 in allpix::Allpix::run (this=0x561289fbebc0) at ../src/core/Allpix.cpp:219
#41 0x0000561289ce791d in main (argc=3, argv=0x7fff28c8b1a8) at ../src/exec/allpix.cpp:200
===========================================================


Segmentation fault

Variable CSA response curve

@simonspa I'm working on writing a simulation for the MuPix10 with Allpix-Squared. We have a CSA, but the impulse response curve doesn't look like the one from the CSADigitizer module, it falls linearly. A possible parameterization is A * (1-exp(-x/tauR_) ) - tauLinearF * x, and 0 when when the linear part becomes larger than the exponential one.

My question is what the best way is to implement this, if we want to upstream it. My idea was to add a new model (so that there would be simple, csa and mupix). However, this would require a model-dependent impulse response here:

std::call_once(first_event_flag_, [&]() {
// initialize impulse response function - assume all time bins are equal
impulse_response_function_.reserve(ntimepoints);
auto calculate_impulse_response = [&](double x) {
return (resistance_feedback_ * (exp(-x / tauF_) - exp(-x / tauR_)) / (tauF_ - tauR_));
};
for(size_t itimepoint = 0; itimepoint < ntimepoints; ++itimepoint) {
impulse_response_function_.push_back(calculate_impulse_response(timestep * static_cast<double>(itimepoint)));
}

Since it's only called once I don't see a big problem there. Let me know what you think. Also, the documentation for the module would require some rewriting.

CSADigitizer: Wrong time when setting ToA binsize (?)

I've looked a little bit in the code of the ToA / ToT measurement, and something seems off to me. I'm not sure if this is just me being stupid or if there is actually something wrong.

Looking at:

hits.emplace_back(pixel, time, pixel_charge.getGlobalTime() + time, charge, &pixel_charge);

We seem to add the local time, the global time, and the charge in the vector. "charge" in this case can also mean ToT signal (or rather TS2, I'll explain later). Everything is fine there. However, time can also mean the ToA signal in clock cycles. That in itself is also fine, if we know that. However, adding time to pixel_charge.getGlobalTime() doesn't make sense in that case. We add clock cycles to something which is in nanoseconds. Am I missing something, or is this wrong?

A fix could be multiplying the time with the bin size here:

auto time = (store_toa_ ? static_cast<double>(std::get<1>(arrival)) : std::get<2>(arrival));

Related to this:
I realized that the signal only is the "ToT", but that actually isn't the time over threshold, but rather only the second timestamp (that's why I prefer TS2 / TS1 to avoid misconceptions). A proper ToT would be TS2-TS1. Of course, this would mean that we would need to add some code that handles different clock sizes. One idea would be simply to do TS2_signal * TS2_clk - ToA_signal * ToA_clk, which then wouldn't return the signal in clock cycles but the resulting time from it.

I see that this would drastically change the way how this would work, and this can be relatively easy achieved by analysis after the run. Let me know what you think about this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.