Commit f99c88e3 authored by Håkan Wennlöf's avatar Håkan Wennlöf
Browse files

Merge branch 'b-creation' into 'v3.0-stable'

[v3.0-stable]  Fix type conversion for deposits causing peak shifts (GH PR 43)

See merge request allpix-squared/allpix-squared!1067
parents 2cde80f6 849d33a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ The following authors, in alphabetical order, have developed or contributed to A
* Thomas Billoud, Université de Montréal, [tbilloud](https://gitlab.cern.ch/tbilloud)
* Tobias Bisanz, CERN, [tbisanz](https://gitlab.cern.ch/tbisanz)
* Bogdan-Mihail Blidaru, Heidelberg University, [mblidaru](https://gitlab.cern.ch/mblidaru)
* Sebbe Blokhuizen, Stockholm University, Sioux Technologies, [SBlokhuizen](https://github.com/SBlokhuizen)
* Marco Bomben, Université de Paris, [mbomben](https://gitlab.cern.ch/mbomben)
* Koen van den Brandt, Nikhef, [kvandenb](https://gitlab.cern.ch/kvandenb)
* Carsten Daniel Burgard, DESY, [cburgard](https://gitlab.cern.ch/cburgard)
+1 −1
Original line number Diff line number Diff line
@@ -34,4 +34,4 @@ propagate_holes = true
[DefaultDigitizer]
log_level = DEBUG

#PASS (Event 20) [R:DefaultDigitizer:mydetector] Passed threshold: 35408.8e > 631.069e
#PASS (Event 20) [R:DefaultDigitizer:mydetector] Passed threshold: 35516.9e > 560.183e
+1 −1
Original line number Diff line number Diff line
@@ -35,4 +35,4 @@ propagate_holes = true
[DefaultDigitizer]
log_level = DEBUG

#PASS (DEBUG) (Event 20) [R:DefaultDigitizer:mydetector] Passed threshold: 35408.8e > 631.069e
#PASS (DEBUG) (Event 20) [R:DefaultDigitizer:mydetector] Passed threshold: 35516.9e > 560.183e
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ G4bool SensitiveDetectorActionG4::ProcessHits(G4Step* step, G4TouchableHistory*)
    // excitations via the Fano factor. We assume Gaussian statistics here.
    auto mean_charge = edep / charge_creation_energy_;
    allpix::normal_distribution<double> charge_fluctuation(mean_charge, std::sqrt(mean_charge * fano_factor_));
    auto charge = static_cast<unsigned int>(std::max(charge_fluctuation(random_generator_), 0.));
    auto charge = static_cast<unsigned int>(std::max(charge_fluctuation(random_generator_), 0.) + 0.5);

    const auto* userTrackInfo = dynamic_cast<TrackInfoG4*>(track->GetUserInformation());
    if(userTrackInfo == nullptr) {
+1 −1
Original line number Diff line number Diff line
@@ -26,4 +26,4 @@ depletion_voltage = 150V
temperature = 293K
propagate_holes = true

#PASS Deposited 73176 charges in sensor of detector mydetector
#PASS Deposited 73786 charges in sensor of detector mydetector
Loading