Changeset 3019
- Timestamp:
- 02/04/04 16:50:23 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3018 r3019 21 21 22 22 23 2004/02/0 3: Abelardo Moralejo23 2004/02/04: Abelardo Moralejo 24 24 25 25 * macros/starmc2.C … … 28 28 29 29 30 2004/02/0 3: Markus Gaug30 2004/02/04: Markus Gaug 31 31 32 32 * manalysis/MPedestalCam.[h,cc], manalysis/MPedestalPix.[h,cc], … … 41 41 * manalysis/MExtractSignal.cc 42 42 - remove uncommented code 43 44 * mcalib/MCalibrationCalc.[h,cc] 45 - modified way to handle histogram overflow: Now flags are set and 46 ChargevsN histogram is not tried to be filled subsequently 43 47 44 48 -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r3015 r3019 145 145 SETBIT(fFlags, kUseQualityChecks); 146 146 147 CLRBIT(fFlags, kBlindPixelOverFlow); 148 CLRBIT(fFlags, kPINDiodeOverFlow); 149 CLRBIT(fFlags, kHiGainOverFlow); 150 CLRBIT(fFlags, kLoGainOverFlow); 147 151 // As long as we don't have the PIN Diode: 148 152 CLRBIT(fFlags, kUsePinDiodeFit); 149 153 154 155 150 156 fEvents = 0; 151 157 fCosmics = 0; 158 152 159 fNumHiGainSamples = 0; 153 160 fNumLoGainSamples = 0; … … 430 437 fEvents++; 431 438 432 Int_t overflow = 0;433 439 Float_t referencetime = 0.; 434 440 … … 508 514 } 509 515 510 if (!blindpixel.FillRChargevsTime(sumhi,fEvents)) 511 *fLog << warn << 512 "Overflow or Underflow occurred filling Blind Pixel eventnr = " << fEvents << endl; 516 if (!TESTBIT(fFlags,kBlindPixelOverFlow)) 517 if (!blindpixel.FillRChargevsTime(sumhi,fEvents)) 518 { 519 *fLog << warn << 520 "Overflow or Underflow occurred filling Blind Pixel eventnr = " << fEvents << endl; 521 SETBIT(fFlags,kBlindPixelOverFlow); 522 } 523 513 524 break; 514 525 … … 529 540 } 530 541 531 if (!pindiode.FillRChargevsTime(sumhi,fEvents)) 532 *fLog << warn << 533 "Overflow or Underflow occurred filling PINDiode: eventnr = " << fEvents << endl; 542 if (!TESTBIT(fFlags,kPINDiodeOverFlow)) 543 if (!pindiode.FillRChargevsTime(sumhi,fEvents)) 544 { 545 *fLog << warn 546 << "Overflow or Underflow occurred filling PINDiode: eventnr = " 547 << fEvents << endl; 548 SETBIT(fFlags,kPINDiodeOverFlow); 549 } 534 550 break; 535 551 … … 538 554 pix.FillChargesInGraph(sumhi,sumlo); 539 555 540 if (!pix.FillRChargevsTimeLoGain(sumlo,fEvents)) 541 overflow++; 542 543 if (!pix.FillRChargevsTimeHiGain(sumhi,fEvents)) 544 overflow++; 556 if (!TESTBIT(fFlags,kLoGainOverFlow)) 557 if (!pix.FillRChargevsTimeLoGain(sumlo,fEvents)) 558 { 559 *fLog << warn 560 << "Overflow filling Histogram ChargevsNLoGain eventnr = " 561 << fEvents << endl; 562 SETBIT(fFlags,kLoGainOverFlow); 563 } 564 565 if (!TESTBIT(fFlags,kHiGainOverFlow)) 566 if (!pix.FillRChargevsTimeHiGain(sumhi,fEvents)) 567 { 568 *fLog << warn 569 << "Overflow filling Histogram ChargevsNHiGain eventnr = " 570 << fEvents << endl; 571 SETBIT(fFlags,kHiGainOverFlow); 572 } 573 545 574 546 575 if (sig.IsLoGainUsed()) … … 583 612 } /* while (pixel.Next()) */ 584 613 585 if (overflow)586 *fLog << warn << "Overflow occurred filling Charges vs. EvtNr " << overflow << " times" << endl;587 588 614 return kTRUE; 589 615 } … … 655 681 pederr = TMath::Sqrt(pederr)*sqrslice; 656 682 657 const Float_t pedsigma = pedhist.GetChargeSigma()*sqrslice; 658 const Float_t pedsigmaerr = pedhist.GetChargeSigmaErr()*sqrslice; 683 // 684 // Fitted sigma: 1. one sqrt(Nr. slices) for the division which is not 685 // not appropriate: sigma(real)/slice = GetSigma*sqrt(nslices) 686 // 2. another sqrt(Nr. slices) to calculate back to number 687 // of slices 688 // 689 const Float_t pedsigma = pedhist.GetChargeSigma()*nslices; 690 const Float_t pedsigmaerr = pedhist.GetChargeSigmaErr()*nslices; 659 691 660 692 hist->SetMeanPedestal(peddiff); -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h
r2971 r3019 55 55 Int_t fEvents; // Number of events 56 56 Int_t fCosmics; // Number of events due to supposed cosmics 57 57 58 58 Byte_t fNumHiGainSamples; 59 59 Byte_t fNumLoGainSamples; … … 61 61 62 62 Float_t fConversionHiLo; 63 Byte_tfFlags; // Flag for the fits used63 Int_t fFlags; // Flag for the fits used 64 64 65 65 TString fExcludedPixelsFile; … … 67 67 68 68 enum { kUseTimes, kUseBlindPixelFit, kUsePinDiodeFit, 69 kUseCosmicsRejection, kUseQualityChecks }; 69 kUseCosmicsRejection, kUseQualityChecks, 70 kBlindPixelOverFlow, kPINDiodeOverFlow, 71 kHiGainOverFlow, kLoGainOverFlow }; 70 72 71 73 public:
Note:
See TracChangeset
for help on using the changeset viewer.