Hi @PKimPhysics ,
and welcome to the ROOT forum.
See e.g. this post for a C++ example of something similar done with RDataFrame.
RDataFrame’s user guide is here and there are a number of C++ and Python tutorials available here.
Basically you want to create a list/vector of RDataFrame results that you fill, in a loop, with several result histograms.
I hope this helps.
Enrico