- Timestamp:
- 03/15/06 16:39:37 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7609 r7611 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2006/03/15 Stefan Ruegamer 22 23 * manalysis/MCameraData.cc 24 - inserted an image cleaning based on the time information 25 of the shower (CalcCleaningArrivalTime) 26 * manalysis/MCameraData.h 27 - made entry for "CalcCleaningArrivalTime" 28 * mimage/MImgCleanStd.cc 29 - created entries for the new image cleaning named "Time" 30 * mimage/MImgCleanStd.h 31 - inserted entry "kTime" 32 33 20 34 21 35 2006/03/14 Daniela Dorner -
trunk/MagicSoft/Mars/NEWS
r7603 r7611 2 2 3 3 *** Version <cvs> 4 5 - star: Added new image cleaning based on the arrival time of the shower. 6 The new cleaning can be accessed using the parameter "Time" instead of 7 the the old one (like "Absolute) in the star.rc-file. 8 Recommended parameters: 9 MImgCleanStd.CleanLevel1: 8.2 10 MImgCleanStd.CleanLevel2: 5 11 MImgCleanStd.CleanRings: 2 12 MImgCleanStd.KeepSinglePixels: No 4 13 5 14 - star: Simplified the calculation of the effective on time. By letting -
trunk/MagicSoft/Mars/manalysis/MCameraData.cc
r7082 r7611 18 18 ! Author(s): Thomas Bretz, 10/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! Author(s): Hendrik Bartko, 08/2004 <mailto:hbartko@mppmu.mpg.de> 20 ! 21 ! Copyright: MAGIC Software Development, 2000-2004 20 ! Author(s): Stefan Ruegamer, 03/2006 <mailto:snruegam@astro.uni-wuerzburg.de> 21 ! 22 ! Copyright: MAGIC Software Development, 2000-2006 22 23 ! 23 24 ! … … 380 381 } 381 382 383 void MCameraData::CalcCleaningArrivalTime(const MSignalCam &evt, const MGeomCam &geom) 384 { 385 const Int_t n = geom.GetNumPixels(); 386 387 // Reset arrays 388 fData.Set(n); 389 fData.Reset(); 390 391 fValidity.Set(n); 392 fValidity.Reset(); 393 394 // check validity of noise 395 const Int_t entries = evt.GetNumPixels(); 396 TArrayD u(6), w(6); 397 TArrayI ii(6); 398 399 for (int i=0; i<entries; i++) 400 { 401 if (evt[i].IsPixelUnmapped()) 402 continue; 403 404 const Double_t t0 = evt[i].GetArrivalTime(); 405 const Double_t s0 = evt[i].GetNumPhotons(); 406 const Double_t r0 = geom.GetPixRatio(i); 407 const Double_t x0 = geom[i].GetX(); 408 const Double_t y0 = geom[i].GetY(); 409 410 const Double_t e0 = s0<0.01 ? 100 : 1./s0; 411 412 const Int_t n2 = geom[i].GetNumNeighbors(); 413 414 Int_t cnt2=0; 415 for (int j=0; j<n2; j++) 416 { 417 Int_t idx = geom[i].GetNeighbor(j); 418 419 if (evt[idx].IsPixelUnmapped()) 420 continue; 421 422 const Double_t tj = evt[idx].GetArrivalTime()-t0; 423 const Double_t sj = evt[idx].GetNumPhotons(); 424 const Double_t rj = geom.GetPixRatio(idx)+r0; 425 const Double_t xj = geom[idx].GetX()-x0; 426 const Double_t yj = geom[idx].GetY()-y0; 427 428 const Double_t d2 = xj*xj+yj*yj; 429 430 const Double_t ej = sj<0.01 ? 100 : 1./sj; 431 432 u[cnt2] = tj*tj/rj; 433 w[cnt2] = 1./(e0+ej)/d2; // TYPE I+II 434 cnt2++; 435 } 436 437 TMath::Sort(cnt2, u.GetArray(), ii.GetArray(), kFALSE); 438 439 Double_t sumt = 0; 440 Double_t sumw = 0; 441 for (int j=0; j<TMath::Min(cnt2, 3); j++) 442 { 443 sumt += u[ii[j]]*w[ii[j]]; 444 sumw += w[ii[j]]; 445 } 446 447 const Double_t wuz = TMath::Sqrt(sumt/sumw); 448 449 if (TMath::IsNaN(wuz)) 450 *fLog << warn << "WARNING - MCameraData " << sumt << " " << sumw << endl; 451 452 Double_t val = s0<0 || TMath::IsNaN(wuz) || wuz<1e-200 ? 0 : s0*r0/wuz; 453 454 if ((s0>0 && wuz<1e-200) || val>100) 455 val=100; 456 457 fData[i] = TMath::Log10(val+1)*5; 458 459 if (TMath::IsNaN(fData[i])) 460 // 0 1e-6 0 NaN 461 *fLog << warn << "WARNING - MCameraData " << sumt << " " << sumw << " " << wuz << " " << val << endl; 462 463 fValidity[i] = 1; 464 } 465 } 466 382 467 // -------------------------------------------------------------------------- 383 468 // -
trunk/MagicSoft/Mars/manalysis/MCameraData.h
r7082 r7611 42 42 const MGeomCam &geom); 43 43 void CalcCleaningAbsolute(const MSignalCam &evt, const MGeomCam &geom); 44 void CalcCleaningArrivalTime(const MSignalCam &evt, const MGeomCam &geom); 44 45 45 46 const TArrayD &GetData() const { return fData; } -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r7358 r7611 19 19 ! Author(s): Harald Kornmayer, 1/2001 20 20 ! Author(s): Nadia Tonello, 4/2003 <mailto:tonello@mppmu.mpg.de> 21 ! Author(s): Stefan Ruegamer, 03/2006 <mailto:snruegam@astro.uni-wuerzburg.de> 21 22 ! 22 ! Copyright: MAGIC Software Development, 2000-200 323 ! Copyright: MAGIC Software Development, 2000-2006 23 24 ! 24 25 ! … … 580 581 581 582 fPed=0; 582 if (fCleaningMethod!=kAbsolute )583 if (fCleaningMethod!=kAbsolute && fCleaningMethod!=kTime) 583 584 { 584 585 fPed = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam"); … … 622 623 fData->CalcCleaningAbsolute(*fEvt, *fCam); 623 624 break; 625 case kTime: 626 fData->CalcCleaningArrivalTime(*fEvt, *fCam); 627 break; 624 628 default: 625 629 break; … … 686 690 *fLog << "absolute"; 687 691 break; 692 case kTime: 693 *fLog << "time"; 694 break; 695 688 696 } 689 697 *fLog << " cleaning" << endl; … … 822 830 case kProbability: out << "Probability"; break; 823 831 case kAbsolute: out << "Absolute"; break; 832 case kTime : out << "Time"; break; 824 833 default: 825 834 break; … … 889 898 if (s.BeginsWith("absolute")) 890 899 SetMethod(kAbsolute); 900 if (s.BeginsWith("time")) 901 SetMethod(kTime); 891 902 } 892 903 -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.h
r6855 r7611 23 23 kDemocratic, 24 24 kProbability, 25 kAbsolute 25 kAbsolute, 26 kTime, 26 27 } CleaningMethod_t; 27 28 … … 32 33 33 34 const MGeomCam *fCam; //! 34 MSignalCam *fEvt; //!35 MSignalCam *fEvt; //! 35 36 MPedPhotCam *fPed; //! 36 37 MCameraData *fData; //!
Note:
See TracChangeset
for help on using the changeset viewer.