Changeset 3679 for trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
- Timestamp:
- 04/08/04 18:07:14 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3678 r3679 571 571 if (cal.GetMeanErr() < fChargeErrLimit) 572 572 { 573 *fLog << warn << GetDes riptor() << ": Sigma of Fitted Charge: " << cal.GetMeanErr() << " is smaller than "574 << fChargeErrLimit << " in Pixel " << cal.GetPixId() << endl;573 *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge: " << cal.GetMeanErr() 574 << " is smaller than " << fChargeErrLimit << " in Pixel " << cal.GetPixId() << endl; 575 575 bad.SetUncalibrated( MBadPixelsPix::kChargeErrNotValid ); 576 576 } … … 578 578 if (cal.GetMean() < fChargeRelErrLimit*cal.GetMeanErr()) 579 579 { 580 *fLog << warn << GetDes riptor() << ": Fitted Charge: " << cal.GetMean() << " is smaller than "580 *fLog << warn << GetDescriptor() << ": Fitted Charge: " << cal.GetMean() << " is smaller than " 581 581 << fChargeRelErrLimit << "* its error: " << cal.GetMeanErr() 582 582 << " in Pixel " << cal.GetPixId() << endl; … … 586 586 if (cal.GetSigma() < cal.GetPedRms()) 587 587 { 588 *fLog << warn << GetDes riptor() << ": Sigma of Fitted Charge: " << cal.GetSigma()588 *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge: " << cal.GetSigma() 589 589 << " smaller than Pedestal RMS: " << cal.GetPedRms() << " in Pixel " << cal.GetPixId() << endl; 590 590 bad.SetUncalibrated( MBadPixelsPix::kChargeSigmaNotValid ); … … 607 607 if ( cal.GetAbsTimeMean() < lowerlimit) 608 608 { 609 *fLog << warn << GetDes riptor() << ": Mean ArrivalTime in first " << fTimeLowerLimit609 *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in first " << fTimeLowerLimit 610 610 << " extraction bin of the Pixel " << cal.GetPixId() << endl; 611 611 *fLog << cal.GetAbsTimeMean() << " " << lowerlimit << endl; … … 615 615 if ( cal.GetAbsTimeMean() > upperlimit ) 616 616 { 617 *fLog << warn << GetDes riptor() << ": Mean ArrivalTime in last " << fTimeUpperLimit617 *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in last " << fTimeUpperLimit 618 618 << " two extraction bins of the Pixel " << cal.GetPixId() << endl; 619 619 *fLog << cal.GetAbsTimeMean() << " " << upperlimit << endl; … … 670 670 if (fPINDiode->GetMean() < fChargeLimit*fPINDiode->GetPedRms()) 671 671 { 672 *fLog << warn << GetDes riptor() << ": Fitted Charge is smaller than "672 *fLog << warn << GetDescriptor() << ": Fitted Charge is smaller than " 673 673 << fChargeLimit << " Pedestal RMS in PINDiode " << endl; 674 674 return kFALSE; … … 677 677 if (fPINDiode->GetMeanErr() < fChargeErrLimit) 678 678 { 679 *fLog << warn << GetDes riptor() << ": Error of Fitted Charge is smaller than "679 *fLog << warn << GetDescriptor() << ": Error of Fitted Charge is smaller than " 680 680 << fChargeErrLimit << " in PINDiode " << endl; 681 681 return kFALSE; … … 684 684 if (fPINDiode->GetMean() < fChargeRelErrLimit*fPINDiode->GetMeanErr()) 685 685 { 686 *fLog << warn << GetDes riptor() << ": Fitted Charge is smaller than "686 *fLog << warn << GetDescriptor() << ": Fitted Charge is smaller than " 687 687 << fChargeRelErrLimit << "* its error in PINDiode " << endl; 688 688 return kFALSE; … … 691 691 if (fPINDiode->GetSigma() < fPINDiode->GetPedRms()) 692 692 { 693 *fLog << warn << GetDes riptor() << ": Sigma of Fitted Charge smaller than Pedestal RMS in PINDiode " << endl;693 *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge smaller than Pedestal RMS in PINDiode " << endl; 694 694 return kFALSE; 695 695 } … … 702 702 if (fPINDiode->GetAbsTimeMean() < lowerlimit) 703 703 { 704 *fLog << warn << GetDes riptor() << ": Mean ArrivalTime in first " << fTimeLowerLimit704 *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in first " << fTimeLowerLimit 705 705 << " extraction bin in PIN Diode " << endl; 706 706 *fLog << fPINDiode->GetAbsTimeMean() << " " << lowerlimit << endl; … … 710 710 if ( fPINDiode->GetAbsTimeMean() > upperlimit ) 711 711 { 712 *fLog << warn << GetDes riptor() << ": Mean ArrivalTime in last " << fTimeUpperLimit712 *fLog << warn << GetDescriptor() << ": Mean ArrivalTime in last " << fTimeUpperLimit 713 713 << " two extraction bins in PIN Diode " << endl; 714 714 *fLog << fPINDiode->GetAbsTimeMean() << " " << upperlimit << endl; … … 754 754 if (2.*(lambdacheck-lambda)/(lambdacheck+lambda) < fLambdaCheckLimit) 755 755 { 756 *fLog << warn << GetDes riptor() << ": Lambda and Lambda-Check differ by more than "756 *fLog << warn << GetDescriptor() << ": Lambda and Lambda-Check differ by more than " 757 757 << fLambdaCheckLimit << " in the Blind Pixel " << endl; 758 758 return kFALSE; … … 761 761 if (lambdaerr < fLambdaErrLimit) 762 762 { 763 *fLog << warn << GetDes riptor() << ": Error of Fitted Lambda is greater than "763 *fLog << warn << GetDescriptor() << ": Error of Fitted Lambda is greater than " 764 764 << fLambdaErrLimit << " in Blind Pixel " << endl; 765 765 return kFALSE; … … 952 952 } 953 953 954 MCalibrationChargePix &avpix = (MCalibrationChargePix&)fCam->GetAverageArea(0);955 MCalibrationQEPix &qepix = (MCalibrationQEPix&) fQECam->GetAverageArea(0);956 957 const Float_t avphotonflux = avpix.GetPheFFactorMethod()958 / qepix.GetQEFFactor(fPulserColor)959 / fQECam->GetPlexiglassQE();960 961 const Float_t avfluxrelvar = avpix.GetPheFFactorMethodRelVar()962 + qepix.GetQEFFactorRelVar(fPulserColor)963 + fQECam->GetPlexiglassQERelVar();964 //965 // Third loop: With the knowledge of the overall photon flux, calculate the total966 // F-Factor of the whole readout per pixel and set the quantum efficiencies967 // after the F-Factor method.968 //969 for (UInt_t i=0; i<npixels; i++)970 {971 972 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i];973 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i];974 975 if (!pix.IsFFactorMethodValid())976 {977 qepix.SetFFactorMethodValid(kFALSE,fPulserColor);978 continue;979 }980 981 const Float_t photons = avphotonflux / fGeom->GetPixRatio(i);982 const Float_t conv = photons / pix.GetPheFFactorMethod();983 984 if (!pix.CalcMeanFFactor( photons , avfluxrelvar ))985 {986 pix.SetFFactorMethodValid(kFALSE);987 qepix.SetFFactorMethodValid(kFALSE, fPulserColor);988 (*fBadPixels)[i].SetUncalibrated( MBadPixelsPix::kDeviatingNumPhes );989 }990 991 const Float_t convrelvar = avfluxrelvar + pix.GetPheFFactorMethodRelVar();992 993 qepix.SetQEFFactor ( conv , fPulserColor );994 qepix.SetQEFFactorVar ( convrelvar * conv * conv, fPulserColor );995 }996 997 998 954 return kTRUE; 999 955 } 956 1000 957 1001 958 // ---------------------------------------------------------------------- … … 1046 1003 // 1047 1004 // 1005 void MCalibrationChargeCalc::FinalizeFFactorQECam() 1006 { 1007 1008 MCalibrationChargePix &avpix = (MCalibrationChargePix&)fCam->GetAverageArea(0); 1009 MCalibrationQEPix &qepix = (MCalibrationQEPix&) fQECam->GetAverageArea(0); 1010 1011 const Float_t avphotonflux = avpix.GetPheFFactorMethod() 1012 / qepix.GetQEFFactor(fPulserColor) 1013 / fQECam->GetPlexiglassQE(); 1014 1015 const Float_t avfluxrelvar = avpix.GetPheFFactorMethodRelVar() 1016 + qepix.GetQEFFactorRelVar(fPulserColor) 1017 + fQECam->GetPlexiglassQERelVar(); 1018 1019 const UInt_t npixels = fGeom->GetNumPixels(); 1020 1021 for (UInt_t i=0; i<npixels; i++) 1022 { 1023 1024 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1025 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i]; 1026 1027 if (!pix.IsFFactorMethodValid()) 1028 { 1029 qepix.SetFFactorMethodValid(kFALSE,fPulserColor); 1030 continue; 1031 } 1032 1033 const Float_t photons = avphotonflux / fGeom->GetPixRatio(i); 1034 const Float_t conv = photons / pix.GetPheFFactorMethod(); 1035 1036 if (!pix.CalcMeanFFactor( photons , avfluxrelvar )) 1037 { 1038 pix.SetFFactorMethodValid(kFALSE); 1039 qepix.SetFFactorMethodValid(kFALSE, fPulserColor); 1040 (*fBadPixels)[i].SetUncalibrated( MBadPixelsPix::kDeviatingNumPhes ); 1041 } 1042 1043 const Float_t convrelvar = avfluxrelvar + pix.GetPheFFactorMethodRelVar(); 1044 1045 qepix.SetQEFFactor ( conv , fPulserColor ); 1046 qepix.SetQEFFactorVar ( convrelvar * conv * conv, fPulserColor ); 1047 qepix.UpdateFFactorMethod(); 1048 } 1049 } 1050 1051 // ------------------------------------------------------------------------ 1052 // 1053 // 1048 1054 void MCalibrationChargeCalc::FinalizeBlindPixelQECam() 1049 1055 { … … 1094 1100 qepix.SetQEBlindPixel ( conv , fPulserColor ); 1095 1101 qepix.SetQEBlindPixelVar ( convrelvar * conv * conv, fPulserColor ); 1102 qepix.UpdateBlindPixelMethod(); 1096 1103 } 1097 1104 } … … 1142 1149 qepix.SetQEPINDiode ( conv , fPulserColor ); 1143 1150 qepix.SetQEPINDiodeVar ( convrelvar * conv * conv, fPulserColor ); 1151 qepix.UpdateBlindPixelMethod(); 1144 1152 } 1145 1153 } … … 1265 1273 // Finalize QE Cam 1266 1274 // 1275 FinalizeFFactorQECam(); 1267 1276 FinalizeBlindPixelQECam(); 1268 1277 FinalizePINDiodeQECam();
Note:
See TracChangeset
for help on using the changeset viewer.