--- PamelaDigitizer/Digitizer.h 2008/06/08 06:33:45 1.8 +++ PamelaDigitizer/Digitizer.h 2009/02/20 10:22:18 1.10 @@ -16,35 +16,41 @@ #include "TLeafI.h" #include "TH1.h" #include "TH2.h" +#include "TF1.h" #include "TMath.h" #include "TSQLServer.h" -// +#include "TGraph.h" +#include "GLTables.h" +#include "TSystem.h" +#include "TRandom.h" + #include "CRC.h" +#include +#include "CalibTrk1Event.h" +#include "CalibTrk2Event.h" class Digitizer{ - protected: // in and output data members TTree* fhBookTree; ofstream fOutputfile; - int nspe; - int ntof; - int ncat; - int ncas; - int ncar; - int ncal; - int nnd; - int nstr; - int *ntf; + int *nspe; + int *ntof; + int *ncat; + int *ncas; + int *ncar; + int *ncal; + int *nnd; + int *nstr; static const int fPSCUbuffer = 8; static const int fTRIGGERbuffer = 152; //(bytes) static const int fTOFbuffer = 276; //(bytes) - static const int fRunHeaderbuffer = 27; // ?? - static const int fRunTrailerbuffer = 17; + static const int fRunHeaderbuffer = 37; // 37 not 27 + static const int fRunTrailerbuffer = 25; // 25 not 17 static const int fACbuffer = 128; static const int fNDbuffer = 6; static const int fS4buffer = 3; @@ -146,8 +152,8 @@ Int_t Nthtof; UChar_t *Ipltof; UChar_t *Ipaddle; - UChar_t *Ipartof;//DPMJET - // UShort_t *Ipartof; + // UChar_t *Ipartof;//DPMJET + UShort_t *Ipartof; Float_t *Xintof; Float_t *Yintof; Float_t *Zintof; @@ -185,8 +191,8 @@ Float_t *Pathcas; Float_t *P0cas; Int_t Nthspe; - UChar_t *Iparspe;//DPMJET - // UShort_t *Iparspe; + // UChar_t *Iparspe;//DPMJET + // UShort_t *Iparspe; UChar_t *Itrpb; UChar_t *Itrsl; UChar_t *Itspa; @@ -377,10 +383,10 @@ TBranch *b_Pathcard; //! TBranch *b_P0card; //! // - + TF1 *attenAC; public: - Digitizer(TTree *tree, char* &file_raw,int nspe=200,int ntof=200,int ncat=50,int ncas=50,int ncar=100,int ncal=1000,int nnd=200,int nstr=1000); // constructor + Digitizer(TTree*,char*&,int,int,int,int,int,int,int,int); // constructor void Close(); void SetTree(TTree *tree) {fhBookTree = tree;}; @@ -393,7 +399,7 @@ // void DigitizeTRIGGER(); // SO nov'07: included in DigitizeTOF void DigitizeTOF(int np,float *atte1,float *atte2,float *lambda1,float *lambda2); // digitizes the tof void LoadTOFCalib(int np,float *atte1,float *atte2,float *lambda1,float *lambda2); //load TOF calibration - void DigitizeAC(TF1*); // digitizes the anti-counter + void DigitizeAC(); // digitizes the anti-counter void DigitizeND(); // digitizes the ND void DigitizeS4(); // digitizes the S4 void DigitizeCALO(); // digitizes the calorimeter