Project

General

Profile

Bug #17869

Problem in the simulation of single particle using SingleGen_module

Added by Christian Farnese over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Simulation
Target version:
-
Start date:
10/11/2017
Due date:
% Done:

100%

Estimated time:
Spent time:
Occurs In:
Experiment:
ICARUS
Co-Assignees:
Duration:

Description

I was trying to simulate single particle in the ICARUS detector starting from the singles.fcl file. In particular I want to simulate particles with a gaussian energy distribution and also with an gaussian angular distribution. For this reason I set the fcl parameters PDist and AngleDist to 1. But at the end I found that the produced distributions result to be flat.

Looking to the SingleGen_module.cc file, I understand that the problem is related to the lines 240-241: since I'm not using an histogram file fThetaXzYzHist.size() and fPHist.size() are equal to 0 and so fAngleDist and fPDist are set to 0 even if, at the beginning, they are set to 1, preventing the possibility to have a gaussian distribution...

For the moment (following the suggestions from Gianluca) I resolve the problem introducing in the fcl file the definition of the PHist and ThetaXzYzHist variables, even if they are not needed since I'm not using these histogram files..

Can this issue be fixed in some way, without the use of additional (not needed) parameters?

Thanks for the help!
Christian

History

#1 Updated by Lynn Garren over 1 year ago

  • Status changed from New to Assigned
  • Assignee set to Gianluca Petrillo

#2 Updated by Gianluca Petrillo over 1 year ago

  • Category set to Simulation
  • Status changed from Assigned to Work in progress
  • % Done changed from 0 to 90

A new version of SingleGen producer is in branch feature/gp_Issue17869 of larsim.

It not only includes the resolution to this issue, but also a complete revamp of the configuration of the module.
In particular, configuration validation has been introduced, which is both a bug fixer and a breaking change (because if your configuration is wrong now art will stop with some Configuration exception).
Another addition is the ability to specify some options with meaningful keywords instead of magic numbers; for example, a uniform distribution may be requested not only with the magic number 0 (legacy) but also with the word uniform (case unsensitive).
The functions used for this feature may be moved out to larcorealg when proven successful.

#3 Updated by Gianluca Petrillo over 1 year ago

  • Status changed from Work in progress to Resolved
  • % Done changed from 90 to 100

The fixing feature branch (larsim:77d5150 and following) has been merged into v06_54_00.

#4 Updated by Gianluca Petrillo over 1 year ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF