Accessing SK OD Info

Accessing Super-K Outer Detector Info

The tutorials so far all give examples of accessing arrays of Super-K inner detector (ID) charge and time information. The outer detector (OD) information can be obtained from similar arrays in the standard SK commons (found in sktq.h.) However there is a difference in indexing between ID and OD arrays.

ID Array Indexing

ID information is best accessed in an array indexed by cable number, e.g.
               do ihit=1,nqisk

* Output hit number, cable number, charge, time                  
                  write(6,*) ihit,ihcab(ihit),qisk(ihcab(ihit)),
     &                            tisk(ihcab(ihit))

Here, nqisk is the number of ID tubes hit and qisk and tisk are the charge and time arrays, and the cable number ihcab(ihit) is the index to use in these time and charge arrays. For instance qisk(ihcab(ihit)) is the charge for the cable corresponding to hit number ihit.

OD Array Indexing

In contrast, for the OD, the array to use is indexed by hit number. For example:
               do ihit=1,nhitaz

* Output OD hit number, cable number, charge, time                  
                  write(6,*) ihit,icabaz(ihit),qaskz(ihit),
     &                            taskz(ihit)

Here, nhitaz is the number of OD hits, and icabaz, qaskz and taskz are the cable, charge and time corresponding to each hit in the array. The main reason to treat these differently is that hits in the OD array span a wider range of time than the ID, so that more than one cable can be hit in the same event (typically, one wants only hits in time with the trigger.)

Another detail that's different between ID and OD: cable numbers in the OD array have 20000 added to them (so it may be desirable to subtract 20000 from the cable number before use.)

/var/phy/project/hep/neutrino/work/schol/superk/examples/example_od.F contains the source code for a sample program that looks at OD info.