Closed VictorBarbosaMartins closed 3 months ago
Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w
Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w
Did you check the trigger rates with the results we had before? 4 kHz seems to be quite low for an MST - I remember it to be in the rage of 10-15 kHz.
Note also that bias curves are calculates as a function of trigger threshold setting (depending on the trigger type; e.g., as function of discriminator threshold) and not as function of energy. In bias curves, we also include pure NSB trigger (which gives us the threshold).
Did you check the trigger rates with the results we had before? 4 kHz seems to be quite low for an MST - I remember it to be in the rage of 10-15 kHz.
Note also that bias curves are calculates as a function of trigger threshold setting (depending on the trigger type; e.g., as function of discriminator threshold) and not as function of energy. In bias curves, we also include pure NSB trigger (which gives us the threshold).
I believe it is because we used to use the threshold at 8 GeV before and not it is at 10 GeV, but I will double check. The simtools trigger rate tool was already validated by the rht tool, so I tend to believe the results at this first glance.
I am not aware of the definitions you mentioned of "discriminator threshold" and threshold estimated from the NSB. I followed your explanation here https://github.com/gammasim/simtools/issues/1001#issuecomment-2180440189. Could you point me to some references? Ok, so no need for an application to estimate the bias curve for now.
Hi @GernotMaier, thank you for the comments. Please let me know if something is missing and you can have a look again once the tests pass.
The important point is that we want to get an understand how telescope triggers change with changes in the setting of the trigger parameters (e.g., trigger discriminator thresholds (or sums), patterns, multiplicities). So will need the trigger rate as function of those parameters for both proton and NSB triggers.
I've looked again into KB's results (here and those results give:
So LST/MST look fine; SST a bit high.
(the 10-15 kHz for the MST I had in mind was protons + NSB trigger).
Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w
Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w
The important point is that we want to get an understand how telescope triggers change with changes in the setting of the trigger parameters (e.g., trigger discriminator thresholds (or sums), patterns, multiplicities). So will need the trigger rate as function of those parameters for both proton and NSB triggers.
I've looked again into KB's results (here and those results give:
- SST: 350-450 Hz (above value given is 1.3 kHz; much higher)
- MST-N: 2.8-4.2 kHz depending on the trigger settings (above value is 4 kHz, so probably fine; but need to check the corresponding trigger setting)
- LST-N: 4.2-6 kHz (above value is 4.7 kHz; check settings)
So LST/MST look fine; SST a bit high.
(the 10-15 kHz for the MST I had in mind was protons + NSB trigger).
I used the very same simulation results for the SST here as input to the rht tool and got 1.38 KHz, hence compatible with the simtools trigger estimate. The differences are either configuration or model:
(base) ./rht $USERMASSSTORAGE/CTA/simtools/run000003_proton_za020deg_azm000deg_South_1SST_simulate_showers_for_trigger_rates.hdata.zst --show-num
# Read 151 histograms from /lustre/fs23/group/hess/user/vimartin/CTA/simtools/run000003_proton_za020deg_azm000deg_South_1SST_simulate_showers_for_trigger_rates.hdata.zst
# Maximum actual core range of simulations: 1499.87 m
Attention: Core range in histograms not matching. Use common part.
Attention: Energy range in histograms not matching. Use common part.
# Core range up to 3000 m, energy range 0.001 to 10000 TeV
# Cone angle = 10 deg. (solid angle = 0.0954557 sr)
# No histogram 11000
# Maximum radius from histogram #1006 = 1499.87 m.
#@EA lg(E) Aeff diff.Rate E
#@EA [(TeV)] [m^2] [Hz/bin] [TeV]
@EA -1.975 0 0 0.0105925
@EA -1.925 0 0 0.011885
@EA -1.875 0 0 0.0133352
@EA -1.825 0 0 0.0149624
@EA -1.775 0 0 0.016788
@EA -1.725 0 0 0.0188365
@EA -1.675 0 0 0.0211349
@EA -1.625 0 0 0.0237137
@EA -1.575 0 0 0.0266073
@EA -1.525 0 0 0.0298538
@EA -1.475 0 0 0.0334965
@EA -1.425 0 0 0.0375837
@EA -1.375 0 0 0.0421697
@EA -1.325 0 0 0.0473151
@EA -1.275 0 0 0.0530884
@EA -1.225 0 0 0.0595662
@EA -1.175 0 0 0.0668344
@EA -1.125 0 0 0.0749894
@EA -1.075 0 0 0.0841395
@EA -1.025 0 0 0.0944061
@EA -0.975 306.645 155.619 0.105925
@EA -0.925 0 0 0.11885
@EA -0.875 0 0 0.133352
@EA -0.825 0 0 0.149624
@EA -0.775 0 0 0.16788
@EA -0.725 0 0 0.188365
@EA -0.675 0 0 0.211349
@EA -0.625 0 0 0.237137
@EA -0.575 0 0 0.266073
@EA -0.525 1984.17 176.204 0.298538
@EA -0.475 3162.27 231.059 0.334965
@EA -0.425 864.895 51.9902 0.375837
@EA -0.375 0 0 0.421697
@EA -0.325 2810.91 114.329 0.473151
@EA -0.275 0 0 0.530884
@EA -0.225 4216.36 116.006 0.595662
@EA -0.175 1466.56 33.184 0.668344
@EA -0.125 0 0 0.749894
@EA -0.075 0 0 0.841395
@EA -0.025 0 0 0.944061
@EA 0.025 5189.37 53.6978 1.05925
@EA 0.075 11243.6 95.6709 1.1885
@EA 0.125 0 0 1.33352
@EA 0.175 8432.73 48.5163 1.49624
@EA 0.225 11243.6 53.1917 1.6788
@EA 0.275 0 0 1.88365
@EA 0.325 33730.9 107.892 2.11349
@EA 0.375 5621.82 14.7859 2.37137
@EA 0.425 0 0 2.66073
@EA 0.475 28912.2 51.4123 2.98538
@EA 0.525 11243.6 16.4398 3.34965
@EA 0.575 0 0 3.75837
@EA 0.725 0 0 5.30884
@EA 0.775 33730.9 18.5367 5.95662
@EA 0.825 33730.9 15.2418 6.68344
@EA 0.875 0 0 7.49894
@EA 0.975 0 0 9.44061
@EA 1.025 33730.9 6.96689 10.5925
@EA 1.125 101193 14.1306 13.3352
@EA 1.525 134924 3.93642 33.4965
@EA 1.775 33730.9 0.369864 59.5662
@EA 1.875 67461.8 0.500117 74.9894
@EA 2.325 67461.8 0.0859156 211.349
# Proton trigger rate(#1007/#1006) = 1379.77 Hz.
# Rate in range: 1379.77 (1379.77)
# dN/dE peak at 0.105925 TeV
# dN/d log E peak at 0.324882 TeV
# Median energy 0.481731 TeV
# 10% of events below 0.110747 TeV
# 1% of events below 0.101026 TeV
# 0.1% of events below 0.100102 TeV
# Total number of events simulated: 200000
# Total number of events triggered: 48
#@TA Rate Pk(dN/dlogE) Pk(dN/dE) Median 10%< 1%< 0.1%< Filename
#@TA [Hz] [TeV] ...
@TA 1379.77 0.324882 0.105925 0.481731 0.110747 0.101026 0.100102 run000003_proton_za020deg_azm000deg_South_1SST_simulate_showers_for_trigger_rates.hdata.zst
Summary of class constructor, Reset(), and Clear() calls:
iactio::MultiDimHistogram: 19, 0, 1, 0
Thanks for checking the SST rates. All good now and ready to merge.
Thanks!
Summary:
This PR improves and tests the
simtools-simulate-showers-for-trigger-rates
application. It includes also a new file in the DB (see details below). Related to #1001.Small history of the development:
simtools-simulate-showers-for-trigger-rates
for a very concentrated energetic (1TeV) beam of protons with--array_layout_name 1MST
has never lead to triggered events (always 0).array_triggers
which points to a filearray_trigger_prod5_lapalma_extended.dat
where the array trigger conditions are defined. In this file, every trigger condition is defined starting with at least 2 telescopes, which explains why it did not work to use this trigger condition for a single telescope;array_trigger_1MST_lapalma.dat
with a single lineTrigger 1 of 1
replacing the previous list of trigger conditions and uploaded this file to our currently default DBStaging-CTA-Simulation-Model-v0-3-0
;array_triggers
to point to the new file in the DB.simtools-simulate-showers-for-trigger-rates
with this commandsimtools-simulate-showers-for-trigger-rates --array_layout_name 1MST --primary proton --scatter_x 5 --scatter_y 5 --energy_min 1 --energy_max 2 --site North --nruns 1 --nevents 1 --view_cone 1 --submit_command local --output_path 1MST --use_plain_output_path --run_number 1
and calculated the trigger rate of the resulting simulation withsimtools-calculate-trigger-rate --simtel_file_names simtools-output/simulate_showers_for_trigger_rates/simtel-data/North/proton/data/run000001_proton_za020deg_azm000deg_North_1MST_simulate_showers_for_trigger_rates.simtel.zst
and finally got all of the simulated events also triggered by the single MST at the center of the array.Statistics of the simulation and trigger rate estimate
MST (North)
time simtools-simulate-showers-for-trigger-rates --array_layout_name 1MST --primary proton --energy_min 0.01 --energy_max 300 --scatter_x 1500 --scatter_y 0 --site North --nruns 1 --nevents 10000 --view_cone 10 --submit_command local --output_path 1MST --use_plain_output_path --run_number 1
. Total time real 28m1.828ssimtools-calculate-trigger-rate --simtel_file_names simtools-output/simulate_showers_for_trigger_rates/simtel-data/North/proton/data/run000001_proton_za020deg_azm000deg_North_1MST_simulate_showers_for_trigger_rates.simtel.zst
. Trigger rate 3.9522e+03 ± 4.8656e+02 HzLST (North)
time simtools-simulate-showers-for-trigger-rates --array_layout_name 1LST --primary proton --energy_min 0.01 --energy_max 300 --scatter_x 1500 --scatter_y 0 --site North --nruns 1 --nevents 10000 --view_cone 10 --submit_command local --output_path 1LST --use_plain_output_path --run_number 2
. Total time real 41m31.767ssimtools-calculate-trigger-rate --simtel_file_names simtools-output/simulate_showers_for_trigger_rates/simtel-data/North/proton/data/run000002_proton_za020deg_azm000deg_North_1LST_simulate_showers_for_trigger_rates.simtel.zst
. Trigger rate 4.7178e+03 ± 4.8932e+02 HzSST (South)
time simtools-simulate-showers-for-trigger-rates --array_layout_name 1SST --primary proton --energy_min 0.01 --energy_max 300 --scatter_x 1500 --scatter_y 0 --site South --nruns 1 --nevents 10000 --view_cone 10 --submit_command local --output_path 1SST --use_plain_output_path --run_number 3
. Total time real 33m12.787ssimtools-calculate-trigger-rate --simtel_file_names simtools-output/simulate_showers_for_trigger_rates/simtel-data/South/proton/data/run000003_proton_za020deg_azm000deg_South_1SST_simulate_showers_for_trigger_rates.simtel.zst
. Trigger rate 1.3247e+03 ± 1.9122e+02 HzBias curve
Should we perhaps create an application to directly generate bias curves @GernotMaier ?