00001 00002 // 00003 // to d-calibrate ADC in dEmcRawData for the purpose of lvl2 simulation 00004 // 00005 // problem report to: xiewei@rcf2.rhic.bnl.gov 00006 // 00007 00008 #ifndef __EmcSimuRawDataReCal_H__ 00009 #define __EmcSimuRawDataReCal_H__ 00010 00011 #define NTOWER 24768 00012 00013 #include "phool.h" 00014 00015 class PHCompositeNode; 00016 class EmcEnergyAfterBurnerv1; 00017 00020 class EmcSimuRawDataReCal 00021 { 00022 00023 private: 00024 00025 float *final_gain; //.. = db_gain*mip_gain*burner_gain 00026 float *db_gain; //.. 1st step EMCal calibration, directly from DB 00027 float *mip_gain; //.. 2nd step, now from ascii file by Hisa 00028 float *burner_gain; //.. 3rd step afterburner from uDST to uDST 00029 float *pedestal; //.. pedestal from DB for real data 00030 00031 EmcEnergyAfterBurnerv1* emcEnergyaftb; //.. to get EMCal afterburner factor 00032 00033 private: 00034 00035 void Reset(); 00036 void SetGainFromDB(); //.. 1st step EMCal calibration 00037 void SetGainFromMIP(int runNumber); //.. 2nd step EMCal calibration 00038 void SetGainFromAfterBurner(int runNumber); //.. 3rd step EMCal calibration 00039 int getTowerID(int towerkey); //... get TowerID from softkey ... 00040 float GetGainFactorFromDB(int twrId); 00041 00042 public: 00043 00044 EmcSimuRawDataReCal(); 00045 virtual ~EmcSimuRawDataReCal(); 00046 00047 void SetCalibConst(int runNumber); //.. fill *pedestal/*gain 00048 PHBoolean event(PHCompositeNode*); 00049 00050 float get_final_gain(int towerID) const {return final_gain[towerID];} 00051 float get_db_gain(int towerID) const {return db_gain[towerID];} 00052 float get_mip_gain(int towerID) const {return mip_gain[towerID];} 00053 float get_burner_gain(int towerID) const {return burner_gain[towerID];} 00054 }; 00055 #endif /*__EmcSimuRawDataReCal_H__*/