| 12 |
#include <PamelaRun.h> |
#include <PamelaRun.h> |
| 13 |
#include <physics/calorimeter/CalorimeterEvent.h> |
#include <physics/calorimeter/CalorimeterEvent.h> |
| 14 |
#include <CalibCalPedEvent.h> |
#include <CalibCalPedEvent.h> |
| 15 |
|
#include <CalibCalPulse1Event.h> |
| 16 |
|
#include <CalibCalPulse2Event.h> |
| 17 |
// |
// |
| 18 |
#include <CaloCore.h> |
#include <CaloCore.h> |
| 19 |
#include <CaloLevel1.h> |
#include <CaloLevel1.h> |
| 34 |
public: |
public: |
| 35 |
Bool_t debug; ///< debugging flag |
Bool_t debug; ///< debugging flag |
| 36 |
Bool_t verbose; ///< verbose flag |
Bool_t verbose; ///< verbose flag |
| 37 |
Bool_t crosst; |
Bool_t crosst; ///< Cross talk correction flag (true apply false do not apply) |
| 38 |
|
Bool_t ctground; ///< Cross talk correction type (true ground, false flight) |
| 39 |
// |
// |
| 40 |
// variables in which it is stored the calibration information for the four sections |
// variables in which it is stored the calibration information for the four sections |
| 41 |
// |
// |
| 53 |
|
|
| 54 |
void Set(){ de = new CalorimeterEvent(); }; |
void Set(){ de = new CalorimeterEvent(); }; |
| 55 |
|
|
| 56 |
void Clear(){}; |
void Clear(Option_t *t=""){}; |
| 57 |
void* GetPointerToCalorimeterEvent(){ return &de; }; |
void* GetPointerToCalorimeterEvent(){ return &de; }; |
| 58 |
CalorimeterEvent* GetCalorimeterEvent(){ return de; }; |
CalorimeterEvent* GetCalorimeterEvent(){ return de; }; |
| 59 |
// |
// |
| 75 |
Float_t dexyc[2][22][96]; ///< RAW ADC data |
Float_t dexyc[2][22][96]; ///< RAW ADC data |
| 76 |
Float_t base[2][22][6]; ///< baselines for this event |
Float_t base[2][22][6]; ///< baselines for this event |
| 77 |
Float_t sbase[2][22][6]; ///< saved baselines from previous events |
Float_t sbase[2][22][6]; ///< saved baselines from previous events |
| 78 |
|
Float_t ctprecor[2][22][6]; ///< 'cross-talk' correction factor for each pre from pulse calibration |
| 79 |
|
Float_t ctneigcor[2][22][6]; ///< 'cross-talk' correction factor for each pre, neighbour strips from pulse calibration |
| 80 |
// |
// |
| 81 |
// Energy vector |
// Energy vector |
| 82 |
// |
// |
| 95 |
UInt_t ftcalopar3; ///< parameter set 103 lower limit validity |
UInt_t ftcalopar3; ///< parameter set 103 lower limit validity |
| 96 |
UInt_t ttcalopar3; ///< parameter set 103 upper limit validity |
UInt_t ttcalopar3; ///< parameter set 103 upper limit validity |
| 97 |
// |
// |
|
// private methods |
|
|
// |
|
|
/** |
|
|
* \param s calorimeter section. |
|
|
**/ |
|
| 98 |
void ClearCalibVals(Int_t s); ///< clear calibration values for section s |
void ClearCalibVals(Int_t s); ///< clear calibration values for section s |
| 99 |
void ClearCommonVar(); ///< clear common variables |
void ClearCommonVar(); ///< clear common variables |
| 100 |
void ClearTrkVar(); ///< clear track-related variables |
void ClearTrkVar(); ///< clear track-related variables |
| 101 |
void FindBaseRaw(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from RAW data |
void FindBaseRaw(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from RAW data |
| 102 |
|
void FindBaseCompress(Int_t l, Int_t m, Int_t pre); ///< calculate baselines starting from COMPRESS data |
| 103 |
|
void FindBaseRaw(Int_t l, Int_t m, Int_t pre,Int_t &nst, Float_t &qp); ///< calculate baselines starting from RAW data |
| 104 |
|
void FindBaseCompress(Int_t l, Int_t m, Int_t pre,Int_t &nst, Float_t &qp); ///< calculate baselines starting from COMPRESS data |
| 105 |
Int_t Update(GL_TABLES *glt, UInt_t atime, Int_t s); ///< update calibration for this event |
Int_t Update(GL_TABLES *glt, UInt_t atime, Int_t s); ///< update calibration for this event |
| 106 |
Int_t LoadCalib(Int_t s); ///< load calibrations |
Int_t LoadCalib(Int_t s); ///< load calibrations |
| 107 |
|
|
| 110 |
// |
// |
| 111 |
Float_t mip[2][22][96]; ///< ADC to MIP conversion values |
Float_t mip[2][22][96]; ///< ADC to MIP conversion values |
| 112 |
Int_t obadmask[2][22][96]; ///< Offline mask of bad strips (not used to calculate baselines and calorimeter variables) |
Int_t obadmask[2][22][96]; ///< Offline mask of bad strips (not used to calculate baselines and calorimeter variables) |
| 113 |
|
Int_t obadpulsemask[2][22][96]; ///< Offline mask of bad pulser (not used to calculate crosstalk corrections) |
| 114 |
Float_t emin; ///< Offline threshold to separate noise from signal |
Float_t emin; ///< Offline threshold to separate noise from signal |
| 115 |
// |
// |
| 116 |
// Structures to pass data from/to F77 |
// Structures to pass data from/to F77 |
| 125 |
// useful methods |
// useful methods |
| 126 |
// |
// |
| 127 |
Int_t ChkParam(GL_TABLES *glt, UInt_t runheader, Bool_t mech); ///< check and load parameters data |
Int_t ChkParam(GL_TABLES *glt, UInt_t runheader, Bool_t mech); ///< check and load parameters data |
| 128 |
|
Int_t ChkParam(TSQLServer *dbc, UInt_t runheader, Bool_t mech); ///< check and load parameters data |
| 129 |
|
Int_t ChkParamDo(TSQLServer *dbc, UInt_t runheader, Bool_t mech); ///< check and load parameters data |
| 130 |
Int_t ChkCalib(GL_TABLES *glt, UInt_t atime); ///< check and load calibration data |
Int_t ChkCalib(GL_TABLES *glt, UInt_t atime); ///< check and load calibration data |
| 131 |
|
Int_t CalcCrossTalkCorr(GL_TABLES *glt, UInt_t runheader); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations |
| 132 |
|
Int_t CalcCrossTalkCorr(TSQLServer *dbc, UInt_t runheader); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations |
| 133 |
|
Int_t CalcCrossTalkCorrDo(TSQLServer *dbc, UInt_t runheader); ///< calculate the cross talk corretion using CaloPulse information from flight calibrations |
| 134 |
Int_t Calibrate(Int_t ei); ///< perform data calibration |
Int_t Calibrate(Int_t ei); ///< perform data calibration |
| 135 |
void GetCommonVar(); ///< call fortran common variables program |
void GetCommonVar(); ///< call fortran common variables program |
| 136 |
void GetTrkVar(); ///< call fortran track-related variables program |
void GetTrkVar(); ///< call fortran track-related variables program |
| 139 |
void FillTrkVar(CaloLevel2 *ca, Int_t nutrk); ///< copy track-related variables from structure to class |
void FillTrkVar(CaloLevel2 *ca, Int_t nutrk); ///< copy track-related variables from structure to class |
| 140 |
void RunClose(); ///< clear variables which could change from one run to another |
void RunClose(); ///< clear variables which could change from one run to another |
| 141 |
void SetCrossTalk(Bool_t ct); |
void SetCrossTalk(Bool_t ct); |
| 142 |
|
void SetCrossTalkType(Bool_t ct); |
| 143 |
void SetVerbose(Bool_t ct); |
void SetVerbose(Bool_t ct); |
| 144 |
// |
// |
| 145 |
// constructor |
// constructor |
| 146 |
// |
// |
| 147 |
CaloLevel0(); ///< contructor |
CaloLevel0(); ///< contructor |
| 148 |
void ProcessingInit(GL_TABLES *glt, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object |
void ProcessingInit(GL_TABLES *glt, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object |
| 149 |
|
void ProcessingInit(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object |
| 150 |
|
void InitDo(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t debug, Bool_t verbose); ///< initialize caloprocessing object |
| 151 |
// |
// |
| 152 |
// destructor |
// destructor |
| 153 |
// |
// |
| 154 |
~CaloLevel0();///< destructor |
~CaloLevel0();///< destructor |
| 155 |
// |
// |
| 156 |
ClassDef(CaloLevel0,1); |
ClassDef(CaloLevel0,3); |
| 157 |
}; |
}; |
| 158 |
|
|
| 159 |
#endif |
#endif |