Skip to content

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

Merged
KSkwarczynski merged 15 commits into
mainfrom
jmartin/feature/particle-level-kinpars
Jun 9, 2025
Merged

feat: introduce plotting of particle-level kinematic parameters and make plotting with KinemDistribution configurable#137
KSkwarczynski merged 15 commits into
mainfrom
jmartin/feature/particle-level-kinpars

Conversation

@Jude412

@Jude412 Jude412 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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!

@KSkwarczynski KSkwarczynski left a comment

Copy link
Copy Markdown
Member

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

Comment thread CMakeLists.txt Outdated
Comment thread SamplesTutorial/StructsTutorial.h
Comment thread Test_KinemPlot.pdf Outdated
Comment thread Test.root Outdated
Comment thread Tutorial/KinemDistributionTutorial.cpp Outdated

@KSkwarczynski KSkwarczynski left a comment

Copy link
Copy Markdown
Member

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