GSSort, User code example

In the generation of KH matrices, we found some events where it seemed the cut off of the hi-res signal did not cut off the lo-res signal. To investigate what the reason could be, we wanted to make a matrix of hi-res vs. lo-res signals and see how well they correlated.

Thus, we added the following few lines to the User include files to accomplish this task:


UserDeclare.h
-----------------------------------
TH2F           *hilo;
-----------------------------------


UserInit.h
-----------------------------------
sprintf(str1,"lohi");
sprintf(str2,"lohi");
hilo = mkTH2F(str1,str2,2048,0,2047,512,0,511);
-----------------------------------


UserEv.h
-----------------------------------
for (j = 0; j < hdr.len; j++)
  if (ev[j].ehi>0 || ev[j].elo>0)
    if (ev[j].ehi<2048)
      if (ev[j].elo<511)
        hilo->Fill(ev[j].ehi,ev[j].elo);
-----------------------------------


After the sort, the 2D matrix "hilo" was available for inspection like any other matrix from GSSort. The matrix showed that the lo- and hi- res signals do not correlate perfectly and, thus, partially explained the extra counts we found in the sumelo spectrum.