SPECT application

Before reading this chapter we recommend you to read the chapter on Detector, that contains the utilities that are common to all detector applications.

The SPECT example is quite similar to the PET one; we will describe here the main characteristics that differentiate it and refer to the PET example for those characteristics they share.

Many of the utilities for SPECT detectors are related to the sensitive detectors that they contain, so please read the Sensitive Detectors chapter if you have not done it yet.

SPECT event classification

The class SPECTEventClassifierUA in the directory SPECT classifies the events as SPECT by looking at the reconstructed hits. It is a GAMOS user action, so you can activate it with the command

/gamos/userAction SPECTEventClassifierUA

The first thing you have to define is the original gamma energy, what you can do with the parameter:

/gamos/setParam SPECT:EvtClass:GammaEnergy ENERGY

Another thing you have to define is where is your collimator. You can define it by giving the collimator volume name:

/gamos/setParam SPECT:EvtClass:CollimatorVolume VOLUME_NAME

Then the user action counts how many reconstructed hits have this energy within a precision given by the two parameters

/gamos/setParam SPECT:EvtClass:EPrecMin ENERGY_MIN

/gamos/setParam SPECT:EvtClass:EPrecMax ENERGY_MAX

where ENERGY_MIN is the minimum energy, that by default takes a value of 0.7*GammaEnergy, and ENERGY_MAX is the maximum energy, that by default takes a value of 1.3*GammaEnergy.

To recover hits when one of several Compton interactions have occurred you may switch the merging of hits that are close into one. You may set the distance to merge hits with the parameter

/gamos/setParam SPECT:EvtClass:ComptonRecHitDist DIST

DIST takes by default a value of 0, what means that no Compton hits merging will be done. If you want hits merging you may select as position of the combined hits the one of the biggest energy, or the second biggest, or the n-th biggest, where the order is given by the parameter

/gamos/setParam SPECT:EvtClass:SelectPosOrder ORDER

ORDER takes by default a value of 1, that is, the position is that of the hit with biggest energy.

If one good hit is finally found, the event is classified as a good SPECT event. Then the sub-classification code enters in the game:

  • More than one hit: If more than one hit is found, the one that is closer to the GammaEnergy will be taken and the event will receive a sub-classification type of 2->1.
  • %If the distance to the event vertex is too big, we can check if still the distance to the phantom is too big (TO BE DONE)
  • Random coincidence: It is checked that the hit is built only from tracks from the same ‘original’ gamma ‘original’ gammas are gammas that are primary particles or that are directly created by the annihilation of positron that is a primary particle
  • Scattered: The event is classified as scattered if any of the original gamma has suffered an interaction in the list of volumes defined by the parameter /gamos/setParam DetCountScatteringUA:VolumeNames VOLUME_1 VOLUME_2 … and this interaction is of one of the process types defined by the parameter /gamos/setParam DetCountScatteringUA:ProcessNames PROCESS_1 PROCESS_2 … (by default Compton are Rayleigh interactions are counted); and it has lost in the volumes more energy than the parameter /gamos/setParam DetCountScatteringUA:EnergyMin ENER\_MIN (by default the minimal energy is 0.)
  • Check SPECT line distance: a line joining the position of the hit with the centre of the collimator volume is built and the distance of closest approach (DCA) to the origin of the positron is calculated; the events are classified as ‘near’ of ‘far’ if the DCA is smaller or bigger than the parameter /gamos/setParam SPECT:EvtClass:LineDistToVtx DISTANCE where DISTANCE has a default value of 10*mm.
  • Gamma traversed collimator: it checks if the original gamma (or one of them if there are several) that left the hits traversed the volume(s) defined as collimator with the parameter: /gamos/setParam SPECT:EvtClass:CollimatorVolume VOLUME_1 VOLUME_2 … where DISTANCE has a default value of 10*mm.

The event will be rejected if the number of hits found is bigger than the value given by the parameter

/gamos/setParam SPECT:EvtClass:RejectIfNRecHits VALUE

The ClassifySPECT method returns an integer with several digits containing the event classification:

  • 0 if it is not SPECT, 1 if it is SPECT and SPECT line is close to the event vertex, 2 if it is SPECT and SPECT line is far from event vertex
  • 10*1 if the search for 511-keV reconstructed hits found more than 2
  • 100*1 if the event is a random coincidence event
  • 1000*1 if the event is a scattered event
  • 10000*1 if there are several collimators and the collimator traversed by the original gamma is the wrong one, i.e. not the one closest to the hit
  • 20000*1 if the original gamma did not traverse a collimator

At the end of the run a table is printed with the number of events in each of the combinations of the sub-classification types. You may

SPECT histograms: event classification

These histograms are related to the event classification explained above. They are produced if the event classification user action is selected. The name of all these histograms starts with “SPECTEvtClass: “ and all are written in the file spect.root/csv.

The following histograms are written:

  • Classification index of event (“SPECT classification”). This index is the one described in the precedent section.
  • % For a more compact presentation of the results, those events with an index digit 1,2 are summed up in the bin with index digit 5 (i.e. 0,1 and 2 in bin 5, 10, 11 and 12 in bin 15, 1, 11 and 21 in bin 51, etc.)
  • Number of 511-keV reconstructed hits before cleaning if there are more than two and searching for Compton hits, i.e., hits produced merging two crystals (see above) (“N 511 recHits initial”)
  • The energy of the 511-keV reconstructed hits (“RecHit energy (keV)”)
  • Distance of closest approach between vertex and the line joining the two 511-keV reconstructed hits (=DCA) (“SPECT dist line - vertex (mm)”)
  • Distance of closest approach between vertex and the line joining the two 511-keV reconstructed hits in Z axis (=DCA) (“SPECT dist line - vertex Z (mm)”)
  • Distance of closest approach between vertex and the line joining the two 511-keV reconstructed hits in R-phi plane (=DCA) (“SPECT dist line - vertex RPHI (mm)”)

There are also a histogram of the DCA and the reconstructed hit energies for each of the sixteen sub-classification types (combinations of the 4 sub-indices) and also for the all the events that are far from vertex, all the events where there were more than two hits, all the events with random coincidences and all the scattered events.

SPECT output for reconstruction

If the event is classified as a SPECT one, it may be dumped in a binary file, if the following parameter is set to 1

/gamos/setParam SPECT:DumpEvent MY_FILENAME

The file name is given by the parameter

/gamos/setParam SPECT:FileName MY_FILENAME

that takes the name spect.out by default. The variables written are given by the structure

struct SPECTOutput
{
char name[8];
float xVtx,yVtx,zVtx,x1,y1,z1,x2,y2,z2,ener,class;
}

where name is SPECT, xVtx, yVtx, zVtx are the coordinates of the event vertex, x1, y1, z1 are the coordinates of the reconstructed hit, x2, y2, z2 are the coordinates of the collimator centre, ener is the hit energy and class is the SPECT classification.

The same data that is written to the file can be written in the standard output if the parameter

/gamos/setParam SPECT:DumpToCout TRUE

is set to true. The positions in the standard output (not in the file) will be written in cylindrical coordinates by default. If you want them in cartesian coordinates you should set to true the parameter

/gamos/setParam SPECT:DumpCartesian TRUE