- Timestamp:
- 08/17/05 17:36:32 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7287 r7288 18 18 19 19 -*-*- END OF LINE -*-*- 20 2005/08/17 Thomas Bretz 21 22 * mcalib/MCalibCalcFromPast.[h,cc]: 23 - reset the number of events fNumEvents in ReInit, because 24 the corresponding histograms get also reset. This prevents 25 the calibration from analysing partly filled histograms 26 - the number of cases in which the fChargeCalc->Finalize fails 27 are counted and written to the console 28 - In PostProcess all histograms and fChargeCalc are reset to 29 prevent the finalization of the histograms to fit partly filled 30 histograms and fail. 31 32 * mcalib/MCalibrationChargeCalc.h: 33 - added a member function ResetNumProcessed so that MCalibCalcFromPast 34 can 'switch off' the finalization in PostProcess 35 36 * mhcalib/MHCalibrationCam.cc, mhcalib/MHCalibrationChargeCam.cc, 37 mhcalib/MHCalibrationPulseTimeCam.cc: 38 - shortened some console output 39 40 41 20 42 2005/08/16 Thomas Bretz 21 43 -
trunk/MagicSoft/Mars/NEWS
r7267 r7288 3 3 *** Version <cvs> 4 4 5 - callisto: fixed some problems with the calibration in case of 6 inteleaved events. Therefor the final and some intermediate 7 fits are skipped which would take place on partly filled # 8 histograms and gave wrong results or failed completely. 9 10 - callisto: If the intermediate finalization of the histograms 11 calculating the mean charge of the calibration signal fails 12 it is counted now and printed in PostProcess of MCalibCalcFromPast. 13 14 - ganymed: Fixed some bugs which caused problems in On-only mode. 15 Still the false source plot doesn't give reasonable results. 5 16 6 17 … … 22 33 - general: MHillas - the case of CorrXY==0 is now handled properly 23 34 24 - general: implem netd the possibility to change the line and35 - general: implemented the possibility to change the line and 25 36 marker style of a sky-grid drawn by MAstroCatalog 26 37 -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r7190 r7288 93 93 fIntensBad(NULL), 94 94 fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL), 95 fNumCam(0), fNumEvents(0), fUpdateWithFFactorMethod(kTRUE), fUpdateNumPhes(kTRUE) 95 fNumCam(0), fNumEvents(0), fUpdateWithFFactorMethod(kTRUE), fUpdateNumPhes(kTRUE), 96 fNumFails(0) 96 97 { 97 98 … … 252 253 } 253 254 255 fNumFails = 0; 256 254 257 return kTRUE; 258 } 259 260 // -------------------------------------------------------------------------- 261 // 262 // Set fNumEvents=0 263 // 264 // This is necessary because the calibration histograms do reset themself 265 // if ReInit is called, so they are empty. MCalibCalcFromPast errornously 266 // ignores how many events are in the histograms but count the number 267 // itself. 268 // 269 Bool_t MCalibCalcFromPast::ReInit(MParList *pList) 270 { 271 if (fNumEvents>0) 272 *fLog << inf << fNumEvents << " calibration events at the end of the last file have been skipped." << endl; 273 274 fNumEvents = 0; 275 276 return kTRUE; 255 277 } 256 278 … … 288 310 if (fChargeCalc) 289 311 { 290 if (!fChargeCalc->Finalize()) 291 return kERROR; 292 293 if (fUpdateNumPhes) 312 if (!fChargeCalc->Finalize()) 313 { 314 fNumFails++; 315 *fLog << warn << "WARNING - Finalization of charges failed the " << fNumFails << " time..." << endl; 316 } 317 318 if (fUpdateNumPhes) 294 319 { 295 320 MCalibrationChargePix &avpix =(MCalibrationChargePix&)fIntensCharge->GetCam()->GetAverageArea(0); … … 336 361 // - MHCalibrationCam::ResetHists() 337 362 // 338 Bool_t MCalibCalcFromPast::Finalize(const char* name) 339 { 340 341 MHCalibrationCam *hist = (MHCalibrationCam*)fParList->FindObject(name); 342 if (hist) 343 { 344 hist->Finalize(); 345 hist->ResetHists(); 346 return kTRUE; 347 } 348 349 return kFALSE; 350 363 Bool_t MCalibCalcFromPast::Finalize(const char* name, Bool_t finalize) 364 { 365 MHCalibrationCam *hist = (MHCalibrationCam*)fParList->FindObject(name, "MHCalibrationCam"); 366 if (!hist) 367 return kFALSE; 368 369 if (finalize) 370 hist->Finalize(); 371 372 hist->ResetHists(); 373 return kTRUE; 351 374 } 352 375 … … 398 421 Int_t MCalibCalcFromPast::PostProcess() 399 422 { 400 *fLog << inf << "Number of Calibration Cams: " << fNumCam << endl; 401 return kTRUE; 402 423 if (GetNumExecutions()==0) 424 return kTRUE; 425 426 // Now we reset all histograms to make sure that the PostProcess 427 // of the following tasks doesn't try to finalize a partly empty 428 // histogram! 429 Finalize("MHCalibrationChargeCam", kFALSE); 430 Finalize("MHCalibrationChargeBlindCam", kFALSE); 431 Finalize("MHCalibrationRelTimeCam", kFALSE); 432 433 if (fChargeCalc) 434 fChargeCalc->ResetNumProcessed(); 435 436 if (fNumCam==0) 437 return kTRUE; 438 439 *fLog << inf << endl; 440 *fLog << GetDescriptor() << " execution statistics:" << endl; 441 *fLog << " " << setw(7) << fNumFails << " (" << Form("%5.1f", 100.*fNumFails/fNumCam) << "%) updates failed." << endl; 442 *fLog << endl; 443 444 return kTRUE; 403 445 } 404 446 … … 468 510 } 469 511 470 471 472 512 return rc; 473 513 } -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h
r7189 r7288 59 59 TArrayF fPhesVar; 60 60 61 Int_t fNumFails; //! How often got the update skipped? 62 61 63 // MTask 62 64 Int_t PreProcess(MParList *pList); 63 65 Int_t Process(); 64 Int_t PostProcess(); 66 Int_t PostProcess(); 67 Bool_t ReInit(MParList *pList); 65 68 66 69 // MCalibCalcFromPast 67 70 Bool_t ReInitialize(); 68 Bool_t Finalize(const char* name );71 Bool_t Finalize(const char* name, Bool_t finalize=kTRUE); 69 72 70 73 Bool_t UpdateMeanPhes(); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r7189 r7288 183 183 void Clear(const Option_t *o=""); 184 184 185 void ResetNumProcessed() { fNumProcessed=0; } 186 185 187 Int_t Finalize(); 186 188 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r7188 r7288 1261 1261 { 1262 1262 *fLog << warn << GetDescriptor() 1263 << ": Only over flowor underflow in hi-gain pixel: " << pix.GetPixId() << endl;1263 << ": Only over- or underflow in hi-gain pixel: " << pix.GetPixId() << endl; 1264 1264 return; 1265 1265 } … … 1353 1353 { 1354 1354 *fLog << warn << GetDescriptor() 1355 << ": Only over flowor underflow in lo-gain pixel: " << pix.GetPixId() << endl;1355 << ": Only over- or underflow in lo-gain pixel: " << pix.GetPixId() << endl; 1356 1356 return; 1357 1357 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r7188 r7288 1119 1119 Byte_t first, Byte_t last) 1120 1120 { 1121 1122 const Float_t mean = hist.GetAbsTimeMean(); 1123 const Float_t rms = hist.GetAbsTimeRms(); 1124 1125 pix.SetAbsTimeMean ( mean ); 1126 pix.SetAbsTimeRms ( rms ); 1127 1128 const Float_t lowerlimit = (Float_t)first + fTimeLowerLimit; 1129 const Float_t upperlimit = (Float_t)last - fTimeUpperLimit; 1130 1131 if ( mean < lowerlimit) 1132 { 1133 *fLog << warn 1134 << Form("Mean ArrivalTime: %3.1f < %2.1f slices from lower edge: %2i in pixel %s", 1135 mean,fTimeLowerLimit,(Int_t)first,hist.GetName()) << endl; 1136 bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin ); 1137 } 1138 1139 if ( mean > upperlimit ) 1140 { 1141 *fLog << warn 1142 << Form("Mean ArrivalTime: %3.1f > %2.1f slices from upper edge: %2i in pixel %s", 1143 mean,fTimeUpperLimit,(Int_t)last,hist.GetName()) << endl; 1144 bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins ); 1121 const Float_t mean = hist.GetAbsTimeMean(); 1122 const Float_t rms = hist.GetAbsTimeRms(); 1123 1124 pix.SetAbsTimeMean(mean); 1125 pix.SetAbsTimeRms(rms); 1126 1127 const Float_t lowerlimit = (Float_t)first + fTimeLowerLimit; 1128 const Float_t upperlimit = (Float_t)last - fTimeUpperLimit; 1129 1130 if (mean<lowerlimit) 1131 { 1132 *fLog << warn << "Mean Arr.Time: " 1133 << Form("%4.1f < %4.1f, %3.1f", mean, TMath::Floor(first)+fTimeLowerLimit, fTimeLowerLimit) 1134 << " slices below " << Form("%2i", (Int_t)first) << " in " 1135 << hist.GetName() << endl; 1136 bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin ); 1137 } 1138 1139 if (mean>upperlimit) 1140 { 1141 *fLog << warn << "Mean Arr.Time: " 1142 << Form("%4.1f > %4.1f, %3.1f", mean, TMath::Floor(last)-fTimeUpperLimit, fTimeUpperLimit) 1143 << " slices above " << Form("%2i", (Int_t)last) << " in " 1144 << hist.GetName() << endl; 1145 bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins ); 1145 1146 } 1146 1147 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
r7189 r7288 555 555 if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow()) 556 556 { 557 *fLog << warn << GetDescriptor() 558 << ": Only overflow or underflow in hi-gain pixel: " << hist.GetName() << endl; 557 *fLog << warn << GetDescriptor() << ": Only over- or underflow in " << hist.GetName() << endl; 559 558 return; 560 559 }
Note:
See TracChangeset
for help on using the changeset viewer.