Skip to content

Combined pr48 pr35#60

Draft
rahmans1 wants to merge 23 commits into
mainfrom
combined-pr48-pr35
Draft

Combined pr48 pr35#60
rahmans1 wants to merge 23 commits into
mainfrom
combined-pr48-pr35

Conversation

@rahmans1
Copy link
Copy Markdown

DO NOT MERGE

This branch is just for creating test profiling plots for CHEP 2026

Copilot AI and others added 17 commits May 17, 2026 12:20
Agent-Logs-Url: https://github.com/eic/npsim/sessions/f21a9097-2f8b-4486-92e3-771e522e8a8f

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eic/npsim/sessions/1a0bce3d-a9bd-4818-9cc7-9f6d4ea19785

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eic/npsim/sessions/ba4e2433-66ae-4dbf-8578-1179788a6269

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eic/npsim/sessions/45003b90-638f-41c1-82a2-67a63baea600

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eic/npsim/sessions/cadf4be9-5ff6-4152-b088-8895b02fa8a8

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
- Photons outside the specified lambda range now get killed (efficiency=0
  outside the QE table boundaries) instead of being kept. This is
  physically correct: a photocathode with 0% QE at its wavelength
  boundaries has 0% QE outside that range too. Previously, UV Cherenkov
  photons (below 315 nm) were passing unfiltered, dramatically reducing
  the expected hit count reduction.

- Change the destructor summary printout from DEBUG to WARNING so the
  'Suppressed N of M photons in lv ...' message appears in CI runs
  (which use -v WARNING). This provides in-CI verification that the
  stacking action is active and killing photons at the expected rate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lumes

The stacking action should filter photons when they are created in the
radiator volumes, not when they arrive at the sensor surface. This is
the correct place to apply generation-stage QE: the photon wavelength
is set at creation, and any photon that would not pass the sensor QE
can be killed immediately, saving simulation time.

DRICH radiator volumes (both gas ring Cherenkov and proximity-focus
aerogel): DRICH_gas and DRICH_aerogel -> regex DRICH_(gas|aerogel)

PFRICH radiator volumes (gas volume and individual aerogel tiles):
PFRICH_GasVol and PFRICH-aerogel-{ir}-{ia} -> regex
PFRICH(_GasVol|-aerogel-[0-9]+-[0-9]+)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updated import statements for consistency and clarity.
Add per-PDG xy/zr TH2F histograms filled and written alongside global
histograms. Print per-PDG duration summary at end of run. Output file
named histos_YYYYMMDD_HHMMSS.root to avoid overwrites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change global zr histogram from (100, -4.5m, +5.5m) to
(1000, -50m, +50m) to match npsim/src/plugins/include spec.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PerformanceProfileTrackingAction: records per-track wall time, computes
  overhead = tracking - stepping, fills spatial histos (xy, zr) and
  per-PDG overhead distribution histos; writes histos_overhead_<ts>.root
- PerformanceProfileEventAction: signals event boundaries to stepping action
- PerformanceProfileSteppingAction: publishes per-track stepping duration
  to shared data; adds rem_us/track column to summary; unordered_map for
  O(1) hot-path lookups; single steady_clock::now() call per step
- PerformanceProfileSharedData: use unordered_map for all shared maps
- npsim.py: read RANGE_CUT_MM env var to override physics.rangecut at runtime
- scripts/plot_timing_profile.py: region x PDG heatmap + annotated ZR plot
- scripts/plot_overhead_pdg.py: normalized per-PDG overhead distributions
- scripts/plot_overhead_spatial.py: spatial overhead heatmaps (xy, zr)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread scripts/plot_timing_profile.py Fixed
Comment thread scripts/plot_timing_profile.py Fixed
Comment thread scripts/plot_timing_profile.py Fixed
Comment thread src/plugins/include/npdet/PerformanceProfileSteppingAction.h Fixed
Comment thread src/plugins/include/npdet/PerformanceProfileTrackingAction.h Fixed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

rahmans1 and others added 4 commits May 21, 2026 09:44
…angerous function'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…angerous function'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Comment thread scripts/plot_timing_profile.py Fixed
Split per-track overhead into pre-first-step (begin) and post-last-step
(end) components. Begin overhead captures process-manager init and
geometry navigation at track start; end overhead captures trajectory
finalization and hit collection.

- Add first_step_time, last_step_time, begin_overhead_duration,
  end_overhead_duration to PerformanceProfileSharedData
- Fill m_begin_overhead_dist, m_end_overhead_dist TH1F histos per track
- Add per-PDG begin/end overhead TH1F histos written to overhead ROOT file
- Accumulate per-PDG begin/end ms totals; print begin_oh_ms and
  end_oh_ms columns in stepping action summary printout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Produce two heatmaps: central detector and far forward, each normalized
  to their zone's stepping time total
- Separate Far Forward (Other) (Z=5500-34000mm) from Far Forward (Zero
  Degree Calorimeter) (Z=34000-38000mm, R<1500mm)
- Titles updated to "% of Stepping Time in {zone}"
- Subtitle shows absolute ms and % of total for each zone
- Terminal summary prints box integrals for central, far forward, and
  other (outside boxes), summing to total stepping time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(other_regions_time if r == "other regions" else combined_stats.get(r, {}).get('time', 0))
for r in farfwd_cols
)
other_time_ns = max(0, total_time - central_time_ns - farfwd_time_ns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants