Help on Method/s to create Tree from multi-fold gamma-ray coincidence data

I think you can easily reduce the amount of the required RAM by (up to) a factor 6, if you explicitly sort your gammas:

#include <algorithm>
// ...
      for(int j = 0; j < (No_Clover - 2); j++) {
        for(int k = (j + 1); k < (No_Clover - 1); k++) { // (k > j)
          for(int l = (k + 1); l < No_Clover; l++) { // (l > k)
            // ...
                        // Double_t x[3] = {(Double_T_t)Eclab[j], (Double_T_t)Eclab[k], (Double_T_t)Eclab[l]};
                        // Double_t x[3] = {(Eclab[j] + 1.e-6), (Eclab[k] + 1.e-6), (Eclab[l] + 1.e-6)};
                        Double_t x[3] = {(Eclab[j] + 0.5), (Eclab[k] + 0.5), (Eclab[l] + 0.5)};
                        std::sort(x, x + 3); // sort in an increasing order
                        if (his3D->GetNbins() <= MaxNbins) his3D->Fill(x);
                        // ...

When you do not sort your gammas, each triple of energies appears 6 times in your 3D histogram so, there are 6 “peaks” in different areas of the 3D histogram (where 6 is the number of permutations, of course).

If you sort them (in an increasing order), you will get 1 “peak” only (always energy_gamma_1 <= energy_gamma_2 <= energy_gamma_3).

This makes your 3D histogram “totally unsymmetric” but, I think you can take it into account when projecting / analysing it later (well, I’m afraid that this idea requires some detailed thoughtful examination so, you should discuss it with your colleagues).

1 Like