Add kinetic energy getter for particles
The following discussion from !333 (closed) should be addressed:
-
@carrere-m started a discussion: (+3 comments) I don't know if it's okay but it's very difficult to generate multiple showers without crash events with a cut energy lesser than 60GeV. If I compare with CTA parameters with Corsika 7, there is a big difference :
ECUTS 0.3 0.1 0.020 0.020 // Energy cuts for particles
(I think it's in GeV, I heard values closed to 1 GeV)I tested some values with my input file (with same parameters on the git) in cascade_example_cherenkov_tabulated :
- 0->52 Gev : core dumped
- 53 GeV and more : it's ok
OPTION #VALUE #DESCRIPTION showers #10 #number of showers height_atmosphere #112.8 #height in km height_observator #2.15 #height in km zenith_angle #20. #theta angle in degrees azimutal_angle #180. #phi angle in degrees nuclA #52 #number of nucleus for incident particle nuclZ #26 #number of protons for incident particle E0 #8000. #total energy in GeV for incident particle seed #0 #0 by default for seed all currently registered streams or set an explicit seeds with whatever value energy_cut #53. #cut hadrons and muons in GeV atmosphere_tab #26 #number of atmosphere of CORSIKA7 atmo (1-36), if 0 disable magnetic_field #0.,0.,0. #direction of magnetic field along x,y,z axes in Tesla world_sphere #0.,0.,0.;150. #center position along x,y,z in m and radius in km for world sphere inner_medium #0.,0.,0.;5. #center position along x,y,z in m and radius in km for small sphere shower_axis #0.,0.,-200000.;10000 #direction vector along x,y,z in m and setps row for interpolation for shower axis tel_conf #position_99 #input file for telescope grid configuration
The core dump :
[corsika:debug ] custom pattern: ParticleCut: checking p+, E= 52.2958835720201 GeV, EcutTot=4445.049910790205 GeV [corsika:debug ] custom pattern: discrete process before geometric limit ? yes [corsika:debug ] custom pattern: collide [corsika:debug ] custom pattern: Interaction: LambdaInt: input energy: 52.2958835720201 GeV beam can interact: true beam pid: p+ [corsika:debug ] custom pattern: Interaction: LambdaInt: input energy: 52.2958835720201 GeV beam can interact: true beam pid: p+ [corsika:debug ] custom pattern: ProcessSibyll: DoInteraction: pid p+ interaction [corsika:debug ] custom pattern: Interaction: ebeam lab: 52.2958835720201 GeVInteraction: pbeam lab: (-1.7543e+10 -6.62333e+06 -4.92567e+10) eV GeV [corsika:debug ] custom pattern: Interaction: etarget lab: 0.93892 GeV Interaction: ptarget lab: (0 0 0) [] GeV [corsika:debug ] custom pattern: Interaction: ebeam CoM: 4.999069489266958 GeV Interaction: pbeam CoM: (-1.90735e-15 -9.31323e-19 4.91023) [] GeV [corsika:debug ] custom pattern: Interaction: etarget CoM: 4.999191527839161 GeV Interaction: ptarget CoM: (0 0 -4.91023) [] GeV [corsika:debug ] custom pattern: Interaction: position of interaction: (-1968.31 -0.0398874 107386) m [corsika:debug ] custom pattern: Interaction: time: 1.92169e-05 s terminate called after throwing an instance of 'std::runtime_error' what(): Interaction: getCrossSection: CoM energy outside range for Sibyll!