Skip to content

feat: introduce plotting of particle-level kinematic parameters and make plotting with KinemDistribution configurable #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 9, 2025

Conversation

Jude412
Copy link
Contributor

@Jude412 Jude412 commented Jun 5, 2025

Pull request description:

Tutorial now supports plotting histograms of particle-level kinematic parameters, and KinemDistribution plots are configurable

Changes or fixes:

Particle-level parameters can be plotted with Get1DVarHist and Get2DVarHist on the similarly named branch of MaCh3 core. These functions check if the plotting variable is from the map "KinematicParameters" (ie. an event-level variable) or from "KinematicVectors" (ie. a subevent-level variable) and then either fill for every event or every particle accordingly. For such plots, one can also introduce kinematic cuts on particle-level variables. This is now implemented in Tutorial in KinemDistribution. Use the yaml file to define which plots to make and which cuts.

Examples:

Some plots made in MaCh3Tutorial are shown below (note that the tutorial samples have no particle-level info so I have generated fake values for particle-level parameters in each event.

Original plots are unaffected:

image

1D hist, event level parameter:

image

1D hist, subevent-level parameter with subevent-level cut (particle pdg):

image

1D hist, subevent-level parameter with both subevent and event level cuts (particle pdg and true enu):

image

2D hist, subevent vs subevent level parameter:

image

2D hist, subevent vs event level parameter with both subevent and event level cuts (particle pdg and true enu):

image

@Jude412 Jude412 requested a review from KSkwarczynski as a code owner June 5, 2025 16:37
@github-actions github-actions bot added Tutorial Extra attention is needed Cmake labels Jun 5, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is your first PR, thank you for contributing to MaCh3!

Copy link
Member

@KSkwarczynski KSkwarczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several minor comments but overall looking good

Copy link
Member

@KSkwarczynski KSkwarczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@KSkwarczynski KSkwarczynski merged commit f7fc996 into main Jun 9, 2025
9 checks passed
@KSkwarczynski KSkwarczynski deleted the jmartin/feature/particle-level-kinpars branch June 9, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmake Tutorial Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants