Changeset 11741 for trunk/FACT++
- Timestamp:
- 08/02/11 20:19:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DataCalib.cc
r11732 r11741 11 11 12 12 vector<int32_t> DataCalib::fOffset(1440*1024, 0); 13 vector<int 32_t> DataCalib::fGain (1440*1024, 2);14 vector<int 32_t> DataCalib::fTrgOff(1440*1024, 0);13 vector<int64_t> DataCalib::fGain (1440*1024, 2); 14 vector<int64_t> DataCalib::fTrgOff(1440*1024, 0); 15 15 vector<float> DataCalib::fStats (1440*1024*6+3); 16 16 … … 172 172 fNumOffset = fNumEntries; 173 173 174 cout << "NUM_OFF=" << fNumOffset << endl; 175 174 176 // 0.5: Scale from ADC to Millivolt 175 177 GetSampleStats(fStats.data()+3, 0.5); … … 179 181 { 180 182 fGain.assign(fSum.begin(), fSum.end()); 181 //fNumGain = fNumEntries*1000;183 fNumGain = fNumEntries*fNumOffset; 182 184 183 185 // DAC: 0..2.5V == 0..65535 184 186 // V-mV: 1000 187 //fNumGain *= 2500*50000; 188 //for (int i=0; i<1024*1440; i++) 189 // fGain[i] *= 65536; 190 fNumGain *= 1953125; 185 191 for (int i=0; i<1024*1440; i++) 186 fGain[i] *= 125; 187 fNumGain = fNumEntries * 65535; 192 fGain[i] *= 1024; 188 193 189 194 // 0.5: Scale from ADC to Millivolt 190 GetSampleStats(fStats.data()+1024*1440*2+3, 0.5);195 GetSampleStats(fStats.data()+1024*1440*2+3, 1./fNumOffset);//0.5); 191 196 reinterpret_cast<uint32_t*>(fStats.data())[1] = GetRunId();; 192 197 } … … 194 199 { 195 200 fTrgOff.assign(fSum.begin(), fSum.end()); 196 fNumTrgOff = fNumEntries ;201 fNumTrgOff = fNumEntries*fNumOffset; 197 202 198 203 // 0.5: Scale from ADC to Millivolt 199 GetSampleStats(fStats.data()+1024*1440*4+3, 0.5);204 GetSampleStats(fStats.data()+1024*1440*4+3, 1./fNumOffset);//0.5); 200 205 reinterpret_cast<uint32_t*>(fStats.data())[2] = GetRunId();; 201 206 } … … 207 212 208 213 fDim.Update(fStats); 214 215 fStep++; 209 216 210 217 return true;
Note:
See TracChangeset
for help on using the changeset viewer.