00001 /******************************************************************* 00002 * 00003 * $Id: StTofCalibration.cxx,v 1.5 2003/09/02 17:59:10 perev Exp $ 00004 * 00005 * Author: Frank Geurts 00006 ***************************************************************** 00007 * 00008 * Description: Calibration class for TOFp 00009 * 00010 ***************************************************************** 00011 * 00012 * $Log: StTofCalibration.cxx,v $ 00013 * Revision 1.5 2003/09/02 17:59:10 perev 00014 * gcc 3.2 updates + WarnOff 00015 * 00016 * Revision 1.4 2002/01/29 23:33:26 geurts 00017 * change default tdc calibration factor 00018 * 00019 * Revision 1.3 2002/01/22 16:12:42 geurts 00020 * minor bugfix for Solaris 00021 * 00022 * Revision 1.2 2002/01/22 07:11:32 geurts 00023 * doxygenized 00024 * 00025 * Revision 1.1 2001/09/28 19:09:39 llope 00026 * first version 00027 * 00028 *******************************************************************/ 00030 00044 #include <Stiostream.h> 00045 #include "StTofCalibration.h" 00046 //#include "St_XDFFile.h" 00047 //#include "St_DataSetIter.h" 00048 //#include "ctf/St_ctg_Module.h" 00049 00051 StTofCalibration::~StTofCalibration(){ /* nope */} 00052 00054 StTofCalibration::StTofCalibration(){ 00055 mSlatCalibVec.clear(); 00056 for(int iRow=0; iRow<TOFP_MAX_SLATS; iRow++){ 00057 StructSlatCalib* tempSlatCalib = new StructSlatCalib; 00058 tempSlatCalib->offset_tdc = 0.; 00059 tempSlatCalib->cc_tdc = 50.0e-12; 00060 tempSlatCalib->ods_tdc = 0.; 00061 tempSlatCalib->offset_adc = 0.; 00062 tempSlatCalib->ods_adc = 0.; 00063 tempSlatCalib->cc_adc = 2.4e-2; // typically this one is nphe_to_adc 00064 mSlatCalibVec.push_back(*tempSlatCalib); 00065 delete tempSlatCalib; 00066 } 00067 } 00068 00069 00071 void StTofCalibration::init(){ 00072 //Char_t *InputXdfFile= "ctg_pars.xdf"; 00073 //St_XDFFile xdf(InputXdfFile); 00074 //St_DataSet *ctfg = xdf.NextEventGet(); 00075 //St_DataSetIter gime(ctfg); 00076 // 00077 //mSlatCalibVec.clear(); 00078 // 00079 //St_ctg_slat* stafSlatParam(0); 00080 //stafSlatParam = (St_ctg_slat *) gime("tof_slat"); 00081 //ctg_slat_st *slatCalib = stafSlatParam->GetTable(); 00082 //for(int iRow=0; iRow<stafSlatParam->GetNRows(); iRow++,slatCalib++){ 00083 // StructSlatCalib* tempSlatCalib = new StructSlatCalib; 00084 // tempSlatCalib->offset_tdc = slatCalib->offset_tdc; // 0. 00085 // tempSlatCalib->cc_tdc = slatCalib->cc_tdc; // 25.0e-12 00086 // tempSlatCalib->ods_tdc = slatCalib->ods_tdc; // 0. 00087 // tempSlatCalib->offset_adc = slatCalib->offset_adc; // 0. 00088 // tempSlatCalib->ods_adc = slatCalib->ods_adc; // 0. 00089 // tempSlatCalib->cc_adc = 0.; // 2.4e-2 typically this one is nphe_to_adc 00090 // 00091 // mSlatCalibVec.push_back(*tempSlatCalib); 00092 // delete tempSlatCalib; 00093 //} 00094 } 00095 00097 void StTofCalibration::print(ostream& os){ 00098 os << "------StTofCalibration:print()----" << endl; 00099 os << " CalibrationVector Size = " << mSlatCalibVec.size() << endl; 00100 for (unsigned int i=0;i<mSlatCalibVec.size();i++){ 00101 os << " slat: " << i 00102 << " tdc: " << mSlatCalibVec[i].offset_tdc << " " << mSlatCalibVec[i].cc_tdc 00103 << " " << mSlatCalibVec[i].ods_tdc 00104 << " adc: " << mSlatCalibVec[i].offset_adc 00105 << " " << mSlatCalibVec[i].ods_adc << " " << mSlatCalibVec[i].cc_adc 00106 << endl; 00107 } 00108 os << "----------------------------------" << endl; 00109 00110 }
1.5.9