Changeset 11892
- Timestamp:
- 08/11/11 21:06:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fadctrl.cc
r11839 r11892 474 474 475 475 bool CmdSetRoi(uint16_t val) { return CmdSetRoi(-1, val); } 476 477 void AmplitudeCalibration()478 {479 // ------------- case baseline -----------------480 481 CmdSetRoi(-1, FAD::kMaxBins);482 483 CmdSetDacValue(1, 0);484 CmdSetDacValue(2, 0);485 CmdSetDacValue(3, 0);486 487 // Take N events488 489 /*490 // ====== Part B: Baseline calibration =====491 492 // Loop over all channels(ch) and time-slices (t)493 T0 = TriggerCell[chip]494 Sum[ch][(t+T0) % kMaxBins] += Data[ch][t];495 // FIXME: Determine median instead of average496 497 Baseline[ch][slice] = MEDIAN( sum[ch][slice] )498 */499 500 // --------------- case gain -------------------501 502 // Set new DAC values and start accumulation503 CmdSetDacValue(1, 50000);504 CmdSetDacValue(2, 50000);505 CmdSetDacValue(3, 50000);506 507 // Take N events508 509 /*510 // ====== Part C: Gain calibration =====511 512 T0 = TriggerCell[chip]513 Sum[ch][(t+T0) % kMaxBins] += Data[ch][t];514 // FIXME: Determine median instead of average515 516 Gain[ch][slice] = MEDIAN( sum[ch][slice] ) - Baseline[ch][slice]517 */518 519 // --------------- secondary ------------------520 521 // FIXME: Can most probably be done together with the baseline calibration522 // FIXME: Why does the secondary baseline not influence the baseline?523 524 CmdSetDacValue(1, 0);525 CmdSetDacValue(2, 0);526 CmdSetDacValue(3, 0);527 528 // Take N events529 530 /*531 // ====== Part D: Secondary calibration =====532 533 T0 = TriggerCell[chip]534 Sum[ch][t] = Data[ch][t] - Baseline[ch][(i-T0) % kMaxBins];535 536 // Determine secondary baseline if integration finished537 SecondaryBaseline[ch][t] = MEDIAN( Sum[ch][t] )538 */539 }540 476 541 477 void SetVerbose(bool b)
Note:
See TracChangeset
for help on using the changeset viewer.