Changeset 4838
- Timestamp:
- 09/03/04 09:33:43 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4836 r4838 19 19 20 20 -*-*- END OF LINE -*-*- 21 2004/09/03: Thomas Bretz 22 23 * manalysis/MCameraData.[h,cc], mimage/MImgCleanStd.[h,cc]: 24 - implemeted cleaning in absolute number of photons 25 26 27 21 28 2004/09/02: Thomas Bretz 22 29 -
trunk/MagicSoft/Mars/manalysis/MCameraData.cc
r4716 r4838 374 374 // -------------------------------------------------------------------------- 375 375 // 376 // Function to calculate the cleaning level for all pixels in a given event. 377 // The level is the absolute number of photons times the area-ratio. 378 // 379 void MCameraData::CalcCleaningAbsolute(const MCerPhotEvt &evt, const MGeomCam &geom) 380 { 381 const Int_t n = geom.GetNumPixels(); 382 383 // Reset arrays 384 fData.Set(n); 385 fData.Reset(); 386 387 fValidity.Set(n); 388 fValidity.Reset(); 389 390 const Int_t entries = evt.GetNumPixels(); 391 392 // calculate cleaning levels 393 for (Int_t i=0; i<entries; i++) 394 { 395 const MCerPhotPix &spix = evt[i]; 396 397 const Int_t idx = spix.GetPixId(); 398 399 // Set probability 400 fData[idx] = spix.GetNumPhotons() * geom.GetPixRatio(idx); 401 fValidity[idx] = 1; 402 } 403 } 404 405 // -------------------------------------------------------------------------- 406 // 376 407 // Returns the contents of the pixel. 377 408 // -
trunk/MagicSoft/Mars/manalysis/MCameraData.h
r4716 r4838 45 45 void CalcCleaningProbability(const MCerPhotEvt &evt, const MPedPhotCam &pcam, 46 46 const MGeomCam &geom, const MArrivalTime *tcam); 47 void CalcCleaningAbsolute(const MCerPhotEvt &evt, const MGeomCam &geom); 47 48 48 49 const TArrayD &GetData() const { return fData; } -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r4826 r4838 211 211 // 212 212 // 213 // ABSOLUTE CLEANING 214 // ================= 215 // This method takes signal height (photons) times area ratio 216 // ad the cleaning levels. 217 // 218 // The cleaning now is done in these levels (eg. 16, 20) 219 // The meaning of the cleaning levels is essentially the same (the same cleaning 220 // algorithm is used) but the cleaning is not done in different 'units' 221 // 222 // Example: 223 // 224 // MImgCleanStd clean(20, 16); 225 // clean.SetMethod(MImgCleanStd::kAbsolulte); 226 // 227 // 213 228 // Member Function: SetMethod() 214 229 // ============================ … … 579 594 fData->CalcCleaningProbability(*fEvt, *fPed, *fCam, fTime); 580 595 break; 596 case kAbsolute: 597 fData->CalcCleaningAbsolute(*fEvt, *fCam); 598 break; 581 599 default: 582 600 break; … … 637 655 case kProbability: 638 656 *fLog << "probability"; 657 break; 658 case kAbsolute: 659 *fLog << "absolute"; 639 660 break; 640 661 } … … 769 790 case kDemocratic: out << "Democratic"; break; 770 791 case kProbability: out << "Probability"; break; 792 case kAbsolute: out << "Absolute"; break; 771 793 default: 772 794 break; … … 786 808 // MImgCleanStd.CleanLevel1: 3.0 787 809 // MImgCleanStd.CleanLevel2: 2.5 788 // MImgCleanStd.CleanMethod: Standard, Scaled, Democratic, Probability 810 // MImgCleanStd.CleanMethod: Standard, Scaled, Democratic, Probability, Absolute 789 811 // MImgCleanStd.CleanRings: 1 790 812 // … … 821 843 if (s.BeginsWith("probability")) 822 844 SetMethod(kProbability); 845 if (s.BeginsWith("absolute")) 846 SetMethod(kAbsolute); 823 847 } 824 848 -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.h
r4702 r4838 23 23 kScaled, 24 24 kDemocratic, 25 kProbability 25 kProbability, 26 kAbsolute 26 27 } CleaningMethod_t; 27 28
Note:
See TracChangeset
for help on using the changeset viewer.