Changeset 3426 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 03/07/04 17:10:43 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r3354 r3426 131 131 #include "MGeomPix.h" 132 132 133 #include "MBadPixelsCam.h" 134 #include "MBadPixelsPix.h" 135 133 136 #include "MCalibrationChargePix.h" 134 137 #include "MCalibrationChargeBlindPix.h" … … 152 155 : fBlindPixel(NULL), 153 156 fPINDiode(NULL), 157 fGeomCam(NULL), 158 fBadPixels(NULL), 154 159 fOffsets(NULL), 155 160 fSlopes(NULL), … … 296 301 { 297 302 298 if ( pix->IsChargeValid() && !pix->IsExcluded() && !pix->IsOscillating())299 { 303 if ((*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK() && !pix->IsExcluded()) 304 { 300 305 301 306 *fLog << all << "Pix " << pix->GetPixId() … … 320 325 { 321 326 322 if (!pix->IsExcluded() && ! pix->IsChargeValid())327 if (!pix->IsExcluded() && !(*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK()) 323 328 { 324 329 … … 345 350 { 346 351 347 if ( pix->IsOscillating() && !pix->IsExcluded())352 if ( (*fBadPixels)[pix->GetPixId()].IsCalibrationOscillating() && !pix->IsExcluded()) 348 353 { 349 354 … … 509 514 break; 510 515 case 4: 511 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())516 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 512 517 return kFALSE; 513 518 val = (*this)[idx].GetChargeProb(); 514 519 break; 515 520 case 5: 516 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())521 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 517 522 return kFALSE; 518 523 if ((*this)[idx].GetRSigmaCharge() == -1.) … … 521 526 break; 522 527 case 6: 523 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())528 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 524 529 return kFALSE; 525 530 if ((*this)[idx].GetRSigmaCharge() == -1.) … … 528 533 break; 529 534 case 7: 530 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())535 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 531 536 return kFALSE; 532 537 if ((*this)[idx].GetRSigmaCharge() == -1.) … … 535 540 break; 536 541 case 8: 537 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())542 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 538 543 return kFALSE; 539 544 if ((*this)[idx].GetRSigmaCharge() == -1.) … … 551 556 break; 552 557 case 9: 553 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())558 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid()) 554 559 return kFALSE; 555 560 val = (*this)[idx].GetPheFFactorMethod(); 556 561 break; 557 562 case 10: 558 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())563 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid()) 559 564 return kFALSE; 560 565 val = (*this)[idx].GetPheFFactorMethodErr(); 561 566 break; 562 567 case 11: 563 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())568 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid()) 564 569 return kFALSE; 565 570 val = (*this)[idx].GetMeanConversionFFactorMethod(); 566 571 break; 567 572 case 12: 568 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())573 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid()) 569 574 return kFALSE; 570 575 val = (*this)[idx].GetConversionFFactorMethodErr(); 571 576 break; 572 577 case 13: 573 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())578 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid()) 574 579 return kFALSE; 575 580 val = (*this)[idx].GetTotalFFactorFFactorMethod(); 576 581 break; 577 582 case 14: 578 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsFFactorMethodValid())583 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsFFactorMethodValid()) 579 584 return kFALSE; 580 585 val = (*this)[idx].GetTotalFFactorErrFFactorMethod(); 581 586 break; 582 587 case 15: 583 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())588 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid()) 584 589 return kFALSE; 585 590 val = fBlindPixel->GetMeanFluxInsidePlexiglass()*area; 586 591 break; 587 592 case 16: 588 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())593 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid()) 589 594 return kFALSE; 590 595 val = fBlindPixel->GetMeanFluxErrInsidePlexiglass()*area; 591 596 break; 592 597 case 17: 593 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())598 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid()) 594 599 return kFALSE; 595 600 val = (*this)[idx].GetMeanConversionBlindPixelMethod(); 596 601 break; 597 602 case 18: 598 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())603 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid()) 599 604 return kFALSE; 600 605 val = (*this)[idx].GetConversionBlindPixelMethodErr(); 601 606 break; 602 607 case 19: 603 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())608 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid()) 604 609 return kFALSE; 605 610 val = (*this)[idx].GetTotalFFactorBlindPixelMethod(); 606 611 break; 607 612 case 20: 608 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsBlindPixelMethodValid())613 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsBlindPixelMethodValid()) 609 614 return kFALSE; 610 615 val = (*this)[idx].GetTotalFFactorErrBlindPixelMethod(); 611 616 break; 612 617 case 21: 613 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())618 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid()) 614 619 return kFALSE; 615 620 val = fPINDiode->GetMeanFluxOutsidePlexiglass()*area; 616 621 break; 617 622 case 22: 618 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())623 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid()) 619 624 return kFALSE; 620 625 val = fPINDiode->GetMeanFluxErrOutsidePlexiglass()*area; 621 626 break; 622 627 case 23: 623 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())628 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid()) 624 629 return kFALSE; 625 630 val = (*this)[idx].GetMeanConversionPINDiodeMethod(); 626 631 break; 627 632 case 24: 628 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())633 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid()) 629 634 return kFALSE; 630 635 val = (*this)[idx].GetConversionPINDiodeMethodErr(); 631 636 break; 632 637 case 25: 633 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())638 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid()) 634 639 return kFALSE; 635 640 val = (*this)[idx].GetTotalFFactorPINDiodeMethod(); 636 641 break; 637 642 case 26: 638 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid() || !(*this)[idx].IsPINDiodeMethodValid())643 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK() || !(*this)[idx].IsPINDiodeMethodValid()) 639 644 return kFALSE; 640 645 val = (*this)[idx].GetTotalFFactorErrPINDiodeMethod(); … … 657 662 if ((*this)[idx].IsExcluded()) 658 663 return kFALSE; 659 if (!(* this)[idx].IsChargeValid())664 if (!(*fBadPixels)[idx].IsCalibrationSignalOK()) 660 665 val = 1; 661 666 else … … 665 670 if ((*this)[idx].IsExcluded()) 666 671 return kFALSE; 667 if ((* this)[idx].IsHiGainOscillating())672 if ((*fBadPixels)[idx].IsCalibrationOscillating()) 668 673 val = 1; 669 674 else … … 673 678 if ((*this)[idx].IsExcluded()) 674 679 return kFALSE; 675 if ((* this)[idx].IsLoGainOscillating())680 if ((*fBadPixels)[idx].IsCalibrationOscillating()) 676 681 val = 1; 677 682 else … … 689 694 break; 690 695 case 34: 691 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())696 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 692 697 return kFALSE; 693 698 if ((*this)[idx].IsHiGainSaturation()) … … 741 746 break; 742 747 case 42: 743 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())748 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 744 749 return kFALSE; 745 750 val = (*this)[idx].GetAbsTimeMean(); 746 751 break; 747 752 case 43: 748 if ((*this)[idx].IsExcluded() || !(* this)[idx].IsChargeValid())753 if ((*this)[idx].IsExcluded() || !(*fBadPixels)[idx].IsCalibrationSignalOK()) 749 754 return kFALSE; 750 755 val = (*this)[idx].GetAbsTimeRms(); … … 781 786 { 782 787 783 if( pix->IsChargeValid())788 if((*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK()) 784 789 { 785 790 … … 824 829 { 825 830 826 if (pix->IsChargeValid())831 if((*fBadPixels)[pix->GetPixId()].IsCalibrationResultOK()) 827 832 { 828 833 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
r3350 r3426 16 16 class MCalibrationChargePINDiode; 17 17 class MCalibrationChargePix; 18 class MBadPixelsCam; 18 19 class MCalibrationChargeCam : public MParContainer, public MCamEvent 19 20 { … … 21 22 22 23 Int_t fNumPixels; 23 TClonesArray *fPixels; 24 MCalibrationChargePix *fAverageInnerPix; 25 MCalibrationChargePix *fAverageOuterPix; 24 TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results 25 MCalibrationChargePix *fAverageInnerPix; //-> Average Pixel of all events 26 MCalibrationChargePix *fAverageOuterPix; //-> Average Pixel of all events 26 27 27 const MCalibrationChargeBlindPix *fBlindPixel; 28 const MCalibrationChargePINDiode *fPINDiode; 28 const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results 29 const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results 29 30 30 const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer 31 const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer 32 const MBadPixelsCam *fBadPixels; //! Bad Pixels cam, only for reading 31 33 32 TH1D* fOffsets; 33 TH1D* fSlopes; 34 TH1D* fOffsets; //! 35 TH1D* fSlopes; //! 34 36 35 TH2D* fOffvsSlope; 37 TH2D* fOffvsSlope; //! 36 38 37 39 UInt_t fNumExcludedPixels; … … 52 54 void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; } 53 55 void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; } 56 void SetBadPixelsCam( const MBadPixelsCam *bad) { fBadPixels = bad; } 54 57 55 58 void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r3422 r3426 122 122 kChargeValid, kTimeFitValid, 123 123 kHiGainFitted, kLoGainFitted, 124 kHiGainOscillating, kLoGainOscillating,125 kMeanTimeInFirstBin, kMeanTimeInLastBin,126 124 kBlindPixelMethodValid, kFFactorMethodValid, 127 125 kPINDiodeMethodValid, kCombinedMethodValid }; … … 152 150 void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelErrLimit = f; } 153 151 154 void SetMeanTimeInFirstBin( const Bool_t b = kTRUE );155 void SetMeanTimeInLastBin ( const Bool_t b = kTRUE );156 157 152 // Charges 158 153 void SetHiGainMeanCharge ( const Float_t f ) { fHiGainMeanCharge = f; } … … 192 187 void SetLoGainSaturation ( const Bool_t b = kTRUE ); 193 188 void SetExcluded ( const Bool_t b = kTRUE ); 194 void SetChargeValid ( const Bool_t b = kTRUE );195 189 void SetHiGainFitted ( const Bool_t b = kTRUE ); 196 190 void SetLoGainFitted ( const Bool_t b = kTRUE ); 197 void SetHiGainOscillating ( const Bool_t b = kTRUE );198 void SetLoGainOscillating ( const Bool_t b = kTRUE );199 191 void SetBlindPixelMethodValid( const Bool_t b = kTRUE ); 200 192 void SetFFactorMethodValid ( const Bool_t b = kTRUE ); … … 278 270 Bool_t IsHiGainSaturation() const; 279 271 Bool_t IsLoGainSaturation() const; 280 Bool_t IsChargeValid() const;281 272 Bool_t IsHiGainFitted() const; 282 273 Bool_t IsLoGainFitted() const; 283 274 Bool_t IsFitted() const; 284 Bool_t IsHiGainOscillating() const;285 Bool_t IsLoGainOscillating() const;286 Bool_t IsOscillating() const;287 275 Bool_t IsBlindPixelMethodValid() const; 288 276 Bool_t IsPINDiodeMethodValid() const; … … 290 278 Bool_t IsCombinedMethodValid() const; 291 279 292 Bool_t IsMeanTimeInFirstBin() const;293 Bool_t IsMeanTimeInLastBin() const;294 295 280 void DefinePixId(Int_t i); 296 281 … … 298 283 void ApplyLoGainConversion(); 299 284 300 voidCheckChargeValidity ( MBadPixelsPix *bad=NULL );301 voidCheckTimeValidity ( MBadPixelsPix *bad=NULL );285 Bool_t CheckChargeValidity ( MBadPixelsPix *bad=NULL ); 286 Bool_t CheckTimeValidity ( MBadPixelsPix *bad=NULL ); 302 287 Bool_t CalcReducedSigma(); 303 288 Bool_t CalcFFactorMethod();
Note:
See TracChangeset
for help on using the changeset viewer.