--- DarthVader/CalorimeterLevel2/inc/CaloLevel0.h 2007/09/09 18:57:25 1.3 +++ DarthVader/CalorimeterLevel2/inc/CaloLevel0.h 2008/02/08 11:55:30 1.7 @@ -12,6 +12,8 @@ #include #include #include +#include +#include // #include #include @@ -32,7 +34,8 @@ public: Bool_t debug; ///< debugging flag Bool_t verbose; ///< verbose flag - Bool_t crosst; + Bool_t crosst; ///< Cross talk correction flag (true apply false do not apply) + Bool_t ctground; ///< Cross talk correction type (true ground, false flight) // // variables in which it is stored the calibration information for the four sections // @@ -50,7 +53,7 @@ void Set(){ de = new CalorimeterEvent(); }; - void Clear(){}; + void Clear(Option_t *t=""){}; void* GetPointerToCalorimeterEvent(){ return &de; }; CalorimeterEvent* GetCalorimeterEvent(){ return de; }; // @@ -72,6 +75,8 @@ Float_t dexyc[2][22][96]; ///< RAW ADC data Float_t base[2][22][6]; ///< baselines for this event Float_t sbase[2][22][6]; ///< saved baselines from previous events + Float_t ctprecor[2][22][6]; ///< 'cross-talk' correction factor for each pre from pulse calibration + Float_t ctneigcor[2][22][6]; ///< 'cross-talk' correction factor for each pre, neighbour strips from pulse calibration // // Energy vector // @@ -90,15 +95,13 @@ UInt_t ftcalopar3; ///< parameter set 103 lower limit validity UInt_t ttcalopar3; ///< parameter set 103 upper limit validity // - // private methods - // -/** - * \param s calorimeter section. -**/ void ClearCalibVals(Int_t s); ///< clear calibration values for section s void ClearCommonVar(); ///< clear common variables void ClearTrkVar(); ///< clear track-related variables void FindBaseRaw(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from RAW data + void FindBaseCompress(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from COMPRESS data + void FindBaseRaw(Int_t l, Int_t m, Int_t pre,Int_t &nst, Float_t &qp); ///< calculate baselines starting from RAW data + void FindBaseCompress(Int_t l, Int_t m, Int_t pre,Int_t &nst, Float_t &qp); ///< calculate baselines starting from COMPRESS data Int_t Update(GL_TABLES *glt, UInt_t atime, Int_t s); ///< update calibration for this event Int_t LoadCalib(Int_t s); ///< load calibrations @@ -107,6 +110,7 @@ // Float_t mip[2][22][96]; ///< ADC to MIP conversion values Int_t obadmask[2][22][96]; ///< Offline mask of bad strips (not used to calculate baselines and calorimeter variables) + Int_t obadpulsemask[2][22][96]; ///< Offline mask of bad pulser (not used to calculate crosstalk corrections) Float_t emin; ///< Offline threshold to separate noise from signal // // Structures to pass data from/to F77 @@ -122,6 +126,7 @@ // Int_t ChkParam(GL_TABLES *glt, UInt_t runheader, Bool_t mech); ///< check and load parameters data Int_t ChkCalib(GL_TABLES *glt, UInt_t atime); ///< check and load calibration data + Int_t CalcCrossTalkCorr(GL_TABLES *glt, UInt_t runheader); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations Int_t Calibrate(Int_t ei); ///< perform data calibration void GetCommonVar(); ///< call fortran common variables program void GetTrkVar(); ///< call fortran track-related variables program @@ -130,6 +135,7 @@ void FillTrkVar(CaloLevel2 *ca, Int_t nutrk); ///< copy track-related variables from structure to class void RunClose(); ///< clear variables which could change from one run to another void SetCrossTalk(Bool_t ct); + void SetCrossTalkType(Bool_t ct); void SetVerbose(Bool_t ct); // // constructor