SBNSoftware / sbnana

3 stars 14 forks source link

Broaden 2D spectrum creation #70

Closed henrylay97 closed 2 years ago

henrylay97 commented 2 years ago

I noticed while trying to make a plot recently that there is no support for 2D plots using SpillVar, MultiVar or SpillMultiVar. This PR utilises the current infrastructure for Vars to allow for the creation of spectrums of such types.

I also noticed that the function in Utilities that converts the Spectrum to a TH2 has the title and name fields inverted, I have corrected this.

Below is an example of a dE/dx residual range curve for contained muons created using the SpillMutliVar functionality. dEdx_ResRange_ContainedMuons

henrylay97 commented 2 years ago

Thanks Chris, have responded to your comments. I agree it seemed very surface level, if you have neater solutions that's great!