Changeset 4150 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 05/24/04 17:16:02 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r4133 r4150 228 228 const Float_t MCalibrationChargeCalc::fgLambdaErrLimit = 0.2; 229 229 const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit = 0.2; 230 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 8.;230 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 3.; 231 231 const Float_t MCalibrationChargeCalc::fgFFactorErrLimit = 3.; 232 232 // -------------------------------------------------------------------------- … … 932 932 933 933 const Float_t nphe = pix.GetPheFFactorMethod(); 934 const Float_t nvar = pix.GetPheFFactorMethod Var();934 const Float_t nvar = pix.GetPheFFactorMethod()*pix.GetPheFFactorMethod(); 935 935 const Int_t aidx = (*fGeom)[i].GetAidx(); 936 936 937 if (nvar > 0.) 938 { 939 areaphes [aidx] += nphe; 940 areavars [aidx] += nvar; 941 numareavalid[aidx] ++; 942 } 937 areaphes [aidx] += nphe; 938 areavars [aidx] += nvar; 939 numareavalid[aidx] ++; 943 940 } 944 941 … … 953 950 954 951 areaphes[i] = areaphes[i] / numareavalid[i]; 955 areavars[i] = areavars[i] / numareavalid[i]; 952 areavars[i] = (areavars[i] - areaphes[i]*areaphes[i]/numareavalid[i]) / (numareavalid[i]-1.); 953 954 if (areavars[i] > 0.) 955 areavars[i] = TMath::Sqrt(areavars[i]); 956 else 957 { 958 *fLog << warn << GetDescriptor() << ": No pixels with valid variance of photo-electrons found " 959 << "in area index: " << i << endl; 960 continue; 961 } 962 956 963 lowlim [i] = areaphes[i] - fPheErrLimit*TMath::Sqrt(areavars[i]); 957 964 upplim [i] = areaphes[i] + fPheErrLimit*TMath::Sqrt(areavars[i]); … … 1216 1223 const UInt_t nareas = fGeom->GetNumAreas(); 1217 1224 1225 // 1226 // Set the results in the MCalibrationChargeCam 1227 // 1228 fCam->SetNumPhotonsFFactorMethod (avphotons); 1229 if (avphotrelvar > 0.) 1230 fCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1231 1218 1232 Float_t lowlim [nareas]; 1219 1233 Float_t upplim [nareas];
Note:
See TracChangeset
for help on using the changeset viewer.