Welcome to the first prototype of the gPamela digitizer.

The "library" consists of 

the main routine:

Pamelagp2Digits.cxx

the class:

Digitizer.cxx

the header file:

Digitizer.h

The Digitizer class contains methods such as

Loop()
DigitizeAC()
DigitizeDummy()

Loop() loops over the events, calls the Digitize methods and writes the result 
to a file.

The digitization methods have access to the entries in the gpamela ntuple and
calculate from the variables contained therein (for example released energy etc.etc.) PAMELA raw data, which is filled in data members, such as:

UShort_t fDataAC[fACbuffer];
UShort_t fDataDummy[fDummybuffer];

The task for the subdetector experts is to write  own DigitizeXYZ() routinewhich calculate their own digits in the format which front end produces.


Installing:

Prerequesits:
- CERNLIB
- ROOT with libHbook.so

Installation:
- inflate Pamelagp2Digits.tar.gz
- in directory PamelaDigitizer
- make

Usage:
Pamelagp2Digits gpam.hbook gpam.root gpam.pam

The code is heavily commented. 


Please let me know all bugs, critizism, sugestions.


Known issues:
- if we produce a Pamela Raw file it seems difficult (impossible) to 
  add MC information. We will have access to it as the gpamela root 
  file, and once event structure (instead of yoda structure) is restored
  we might be able to use it by making the DarthVader tree and gpamela root 
  tree friends.
