next up previous
Next: 5 INTERACTIVE COMMANDS Up: Advanced Geometry Interface for Previous: 3 CREATING GEANT HITS

4 DIGITISATION

The detector digitisation , i.e. simulation of the response of individual elements of a given detector after tracking of a compete event, can be done in a separate geant module gif.

Such digitisation module should have the header and the data handling part similar to a geometry module, but instead of blocks, describing detector geometry, it describes how a specific detector response in each separate element is produced, taken into account multiple hit overlap, noises, thresholds etc.

When a user reads measured quantities from hits, standard GEANT user's facilities, like the transformation from local coordinates to MRS, are automatically available, thus allowing to use significantly more dense hit formats.

4.1 Collecting all hits in a detector element

The AgSTAR interface provieds 2 integer functions (AgFHIT0, AgFHIT1) which perform the hit access. Their execution and the print verbosity are controlled by the datacards in a way described later. If the operation was successful, the functions return the OK flag (0 value).

To select a hit set to be analyzed, a AgFHIT0(Cset,Cdet) function should be called, where Cset and Cdet are 4-letter names of an STAR system and its sensitive detector. The function returns OK if the selected set contains hits, and the digitisation of this systemwas allowed by control cards, otherwise the digitisation should be abandoned.

After the initialization call is successfully done, the AgSTAR interface is ready to provide sequentially all hits in each detector element by performing the AGFHIT1 (IH, ITRA, NUMBV, HITS) function.

Here the output arguments of the function are :

The function itself returns OK until all hits in the selected set are used.

In this way in the digitization routine the user does not need neither to introduce arrays to accumulate the information from different detector elements in parallel, nor even to know the full number of the detector elements. Moreover, if a user needs to know the space position of a hit, he can simply use the GEANT routine GDTOM to translate a point in the current detector element to the Master Reference System, after the content of the necessary common blocks is restored by the AGFPATH routine.

Below is an example how all hits in the TPC can be read and analized:

     Module  TPCEDIG is the TPC digitization
     Author  P.Nevski
     Created on sunday afternoon
* 
     integer AgFHIT0,AgFHIT1,i,ih,itra,NumBV(5)
     real    hits(15),Esum
*
     check AgFHIT0('TPCE','TPAD') == ok
     Do While (AgFHIT1(ih,itra,NumBV,hits) == ok)
        If (abs(IH)==1) then
*          we are getting a new padraw
           Esum=0
           CALL AGFPATH(NumBV)
        endif
*
        Esum=Esum+abs(HITS(11))
*
        If (IH<=0) then
*          this is the last hit in the padraw
           print *,' Padrow number ',(NumBV(i),i=1,3),
                   ' energy sum is ',Esum
        endif
     enddo
     END


next up previous
Next: 5 INTERACTIVE COMMANDS Up: Advanced Geometry Interface for Previous: 3 CREATING GEANT HITS


 


William J. Llope

Thu Aug 15 17:05:49 EDT 1996