Changeset 3427 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 03/07/04 17:12:28 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r3422 r3427 154 154 SetHiGainFitted ( kFALSE ); 155 155 SetLoGainFitted ( kFALSE ); 156 SetHiGainOscillating ( kFALSE );157 SetLoGainOscillating ( kFALSE );158 156 SetExcluded ( kFALSE ); 159 SetChargeValid ( kFALSE );160 157 SetBlindPixelMethodValid ( kFALSE ); 161 158 SetFFactorMethodValid ( kFALSE ); 162 159 SetPINDiodeMethodValid ( kFALSE ); 163 160 SetCombinedMethodValid ( kFALSE ); 164 165 SetMeanTimeInFirstBin ( kFALSE );166 SetMeanTimeInLastBin ( kFALSE );167 161 168 162 fHiGainMeanCharge = -1.; … … 357 351 // -------------------------------------------------------------------------- 358 352 // 359 // Set the Excluded Bit from outside360 //361 void MCalibrationChargePix::SetChargeValid(Bool_t b )362 {363 b ? SETBIT(fFlags, kChargeValid) : CLRBIT(fFlags, kChargeValid);364 }365 366 // --------------------------------------------------------------------------367 //368 353 // Set the Fitted Bit from outside 369 354 // … … 380 365 { 381 366 b ? SETBIT(fFlags, kLoGainFitted) : CLRBIT(fFlags, kLoGainFitted); 382 }383 384 // --------------------------------------------------------------------------385 //386 // Set the Ocillating Bit from outside387 //388 void MCalibrationChargePix::SetHiGainOscillating(const Bool_t b )389 {390 b ? SETBIT(fFlags, kHiGainOscillating) : CLRBIT(fFlags, kHiGainOscillating);391 }392 393 // --------------------------------------------------------------------------394 //395 // Set the Ocillating Bit from outside396 //397 void MCalibrationChargePix::SetLoGainOscillating(const Bool_t b )398 {399 b ? SETBIT(fFlags, kLoGainOscillating) : CLRBIT(fFlags, kLoGainOscillating);400 367 } 401 368 … … 452 419 } 453 420 454 void MCalibrationChargePix::SetMeanTimeInFirstBin(const Bool_t b)455 {456 b ? SETBIT(fFlags,kMeanTimeInFirstBin) : CLRBIT(fFlags,kMeanTimeInFirstBin);457 }458 459 void MCalibrationChargePix::SetMeanTimeInLastBin(const Bool_t b)460 {461 b ? SETBIT(fFlags,kMeanTimeInLastBin) : CLRBIT(fFlags,kMeanTimeInLastBin);462 }463 464 421 Float_t MCalibrationChargePix::GetMeanCharge() const 465 422 { … … 492 449 } 493 450 494 Bool_t MCalibrationChargePix::IsOscillating() const495 {496 return IsHiGainSaturation() ? IsLoGainOscillating() : IsHiGainOscillating();497 }498 499 Bool_t MCalibrationChargePix::IsMeanTimeInFirstBin() const500 {501 return TESTBIT(fFlags,kMeanTimeInFirstBin);502 }503 504 Bool_t MCalibrationChargePix::IsMeanTimeInLastBin() const505 {506 return TESTBIT(fFlags,kMeanTimeInLastBin);507 }508 509 510 451 511 452 Bool_t MCalibrationChargePix::IsExcluded() const … … 524 465 } 525 466 526 Bool_t MCalibrationChargePix::IsChargeValid() const527 {528 return TESTBIT(fFlags, kChargeValid);529 }530 531 467 Bool_t MCalibrationChargePix::IsHiGainFitted() const 532 468 { … … 537 473 { 538 474 return TESTBIT(fFlags, kLoGainFitted); 539 }540 541 Bool_t MCalibrationChargePix::IsHiGainOscillating() const542 {543 return TESTBIT(fFlags, kHiGainOscillating);544 }545 546 Bool_t MCalibrationChargePix::IsLoGainOscillating() const547 {548 return TESTBIT(fFlags, kLoGainOscillating);549 475 } 550 476 … … 578 504 // 4) Pixel has a charge sigma bigger than its Pedestal RMS 579 505 // 580 voidMCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad)506 Bool_t MCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad) 581 507 { 582 508 … … 588 514 *fLog << warn << "WARNING: Fitted Charge is smaller than " 589 515 << fChargeLimit << " Pedestal RMS in Pixel " << fPixId << endl; 590 bad->SetCalcChargePedestal(); 516 if (bad) 517 bad->SetCalcChargePedestal(); 518 else 519 return kFALSE; 591 520 } 592 521 else 593 bad->SetNoCalcChargePedestal(); 522 if (bad) 523 bad->SetNoCalcChargePedestal(); 594 524 595 525 … … 598 528 *fLog << warn << "WARNING: Error of Fitted Charge is smaller than " 599 529 << fChargeErrLimit << " in Pixel " << fPixId << endl; 600 bad->SetNoCalcChargeErrValid(); 530 if (bad) 531 bad->SetNoCalcChargeErrValid(); 532 else 533 return kFALSE; 601 534 } 602 535 else 603 bad->SetCalcChargeErrValid(); 536 if (bad) 537 bad->SetCalcChargeErrValid(); 604 538 605 539 if (GetMeanCharge() < fChargeRelErrLimit*GetMeanChargeErr()) … … 607 541 *fLog << warn << "WARNING: Fitted Charge is smaller than " 608 542 << fChargeRelErrLimit << "* its error in Pixel " << fPixId << endl; 609 bad->SetNoCalcChargeRelErrValid(); 543 if (bad) 544 bad->SetNoCalcChargeRelErrValid(); 545 else 546 return kFALSE; 610 547 } 611 548 else 612 bad->SetCalcChargeRelErrValid(); 549 if (bad) 550 bad->SetCalcChargeRelErrValid(); 613 551 614 552 if (GetSigmaCharge() < GetPedRms()) 615 553 { 616 *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in Pixel " << fPixId << endl; 617 bad->SetNoCalcChargeSigmaValid(); 554 *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in Pixel " 555 << fPixId << endl; 556 if (bad) 557 bad->SetNoCalcChargeSigmaValid(); 558 else 559 return kFALSE; 618 560 } 619 561 else 620 bad->SetCalcChargeSigmaValid(); 621 562 if (bad) 563 bad->SetCalcChargeSigmaValid(); 564 565 return kTRUE; 622 566 } 623 567 … … 627 571 // The mean arrival time is at least 1.0 slices from the used edge slices 628 572 // 629 voidMCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad)630 { 631 632 633 634 635 573 Bool_t MCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad) 574 { 575 576 const Float_t loweredge = IsHiGainSaturation() ? fTimeFirstHiGain : fTimeFirstLoGain; 577 const Float_t upperedge = IsHiGainSaturation() ? fTimeLastHiGain : fTimeLastLoGain; 578 579 if ( fAbsTimeMean < loweredge+1.) 636 580 { 637 *fLog << warn << "WARNING: Mean ArrivalTime in first extraction bin of the Pixel " << fPixId << endl; 581 *fLog << warn << "WARNING: Mean ArrivalTime in first extraction bin of the Pixel " << fPixId << endl; 582 if (bad) 638 583 bad->SetMeanTimeInFirstBin(); 584 else 585 return kFALSE; 639 586 } 640 641 642 643 587 else 588 bad->SetNoMeanTimeInFirstBin(); 589 590 if ( fAbsTimeMean > upperedge-1.) 644 591 { 645 *fLog << warn << "WARNING: Mean ArrivalTime in last extraction bin of the Pixel " << fPixId << endl; 592 *fLog << warn << "WARNING: Mean ArrivalTime in last extraction bin of the Pixel " << fPixId << endl; 593 if (bad) 646 594 bad->SetMeanTimeInLastBin(); 595 else 596 return kFALSE; 647 597 } 648 else 649 bad->SetNoMeanTimeInLastBin(); 650 598 else 599 bad->SetNoMeanTimeInLastBin(); 600 601 return kTRUE; 651 602 } 652 603 … … 743 694 { 744 695 745 if (!IsChargeValid())746 return kFALSE;747 748 696 if (fRSigmaCharge < 0.) 749 697 return kFALSE; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h
r3362 r3427 15 15 class MRawEvtData; 16 16 class MGeomCam; 17 class MBadPixelsCam; 17 18 class MCalibrationChargeCam; 18 19 class MCalibrationChargePix; … … 39 40 MRawEvtData *fRawEvt; //! Raw event data (time slices) 40 41 MGeomCam *fGeom; //! MAGIC geometry 42 MBadPixelsCam *fBadPixels; //! Bad Pixels 41 43 42 44 Int_t fNumInnerPixels; 43 45 Int_t fNumOuterPixels; 46 Int_t fNumExcluded; 44 47 45 48 void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix);
Note:
See TracChangeset
for help on using the changeset viewer.