ujphys / 4lMET_Ana

.
0 stars 0 forks source link

Expand code to loop over particles #16

Open rsamconn opened 1 week ago

rsamconn commented 1 week ago

Add loop over particles (S, Zd, H, leptons) to:

Could simply change the main function so that now it uses a new function which just takes in some parameters and loops over particles, which it inputs into the previous main function (need to rewrite parts of this previous main function).

rsamconn commented 6 days ago

Current strategy: Have nested loops in this order:

  1. Particles (H, S, Zd, e, u)
  2. Variables (phi, eta, pT, mass)
  3. mH masses AND/ OR number of particles

The purpose of these loops is just to create strings - filenames, input and output histogram names. These strings are then passed to functions which sum, scale, etc. the histograms. Thus, the challenge is just to give the right strings to these functions (and maybe edit the functions so they output the right histograms to the right places).

Current issues:

  1. Not all particles have the same variables, e.g. leptons don't have mass histograms. SOLUTION - have a default variable list, {"S", "Zd", "e", "u"}, then reset it for leptons
  2. Some variables (e.g. MET) are not associated with any particles SOLUTION - MET could be a particle? Then it's variable list will just be empty
rsamconn commented 2 days ago

You can't slice and edit standard C++ arrays as easily as you can with lists in Python, instead I should learn to use the std::vector class.