Changeset 4905
- Timestamp:
- 09/09/04 17:43:22 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4904 r4905 21 21 22 22 2004/09/09: Markus Gaug 23 24 * mcalib/MCalibrationCam.[h,cc] 25 - make default for GetNumUnsuitable and GetNumUnreliable 23 26 24 27 * mcalib/MCalibrationIntensityCam.[h,cc] -
trunk/MagicSoft/Mars/manalysis/MHPedestalCam.cc
r4317 r4905 29 29 // 30 30 // Fills the extracted pedestals of MExtractedSignalCam into 31 // the MH GausEvents-classes MHPedestalPix for every:31 // the MHCalibrationPix-classes MHPedestalPix for every: 32 32 // 33 33 // - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray … … 55 55 // the fit is declared valid. 56 56 // Otherwise, the fit is repeated within ranges of the previous mean 57 // +- MH GausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit())57 // +- MHCalibrationPix::fPickupLimit (default: 5) sigma (see MHCalibrationPix::RepeatFit()) 58 58 // In case this does not make the fit valid, the histogram means and RMS's are 59 // taken directly (see MH GausEvents::BypassFit()).60 // 61 // Outliers of more than MH GausEvents::fPickupLimit (default: 5) sigmas62 // from the mean are counted as Pickup events (stored in MH GausEvents::fPickup)59 // taken directly (see MHCalibrationPix::BypassFit()). 60 // 61 // Outliers of more than MHCalibrationPix::fPickupLimit (default: 5) sigmas 62 // from the mean are counted as Pickup events (stored in MHCalibrationPix::fPickup) 63 63 // 64 64 // The number of summed FADC slices is taken to re-normalize … … 341 341 // 342 342 // If MBadPixelsPix::IsBad(): 343 // - calls MH GausEvents::SetExcluded()343 // - calls MHCalibrationPix::SetExcluded() 344 344 // 345 345 // Calls: 346 346 // - MHGausEvents::InitBins() 347 // - MH GausEvents::ChangeHistId(i)348 // - MH GausEvents::SetEventFrequency(fPulserFrequency)347 // - MHCalibrationPix::ChangeHistId(i) 348 // - MHCalibrationPix::SetEventFrequency(fPulserFrequency) 349 349 // - MHPedestalPix::SetNSlices(nslices) 350 350 // … … 401 401 for (UInt_t i=0; i<npixels; i++) 402 402 { 403 MH GausEvents&histhi = (*this)[i];404 MH GausEvents&histlo = (*this)(i);403 MHCalibrationPix &histhi = (*this)[i]; 404 MHCalibrationPix &histlo = (*this)(i); 405 405 406 406 if (histhi.IsExcluded()) … … 431 431 for (UInt_t j=0; j<nareas; j++) 432 432 { 433 MH GausEvents&histhi = GetAverageHiGainArea(j);433 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 434 434 histhi.FillHistAndArray(numareahi[j] == 0 ? 0. : sumareahi[j]/numareahi[j]); 435 435 436 MH GausEvents&histlo = GetAverageLoGainArea(j);436 MHCalibrationPix &histlo = GetAverageLoGainArea(j); 437 437 histlo.FillHistAndArray(numarealo[j] == 0 ? 0. : sumarealo[j]/numarealo[j]); 438 438 } … … 440 440 for (UInt_t j=0; j<nsectors; j++) 441 441 { 442 MH GausEvents&histhi = GetAverageHiGainSector(j);442 MHCalibrationPix &histhi = GetAverageHiGainSector(j); 443 443 histhi.FillHistAndArray(numsectorhi[j] == 0 ? 0. : sumsectorhi[j]/numsectorhi[j]); 444 444 445 MH GausEvents&histlo = GetAverageLoGainSector(j);445 MHCalibrationPix &histlo = GetAverageLoGainSector(j); 446 446 histlo.FillHistAndArray(numsectorlo[j] == 0 ? 0. : sumsectorlo[j]/numsectorlo[j]); 447 447 } -
trunk/MagicSoft/Mars/manalysis/MHPedestalPix.cc
r4317 r4905 36 36 // - Sigma Pedestal Error / slice = Sigma Pedestal Error / Sqrt (Number slices) 37 37 // 38 // Derives from MH GausEvents, fits the pedestals to a Gaussian and performs38 // Derives from MHCalibrationPix, fits the pedestals to a Gaussian and performs 39 39 // a Fourier analysis. 40 40 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r4855 r4905 266 266 // the area index exceeds the initialized array. 267 267 // 268 const Int_t MCalibrationCam::GetNumUnsuitable( Int_t aidx ) const 269 { 270 if (aidx < 0) 271 return -1; 272 268 const Int_t MCalibrationCam::GetNumUnsuitable( const Int_t aidx ) const 269 { 270 if (aidx < 0) 271 { 272 Int_t num = 0; 273 for (Int_t i=0;i<fNumUnsuitable.GetSize();i++) 274 num += fNumUnsuitable[i]; 275 return num; 276 } 277 273 278 return aidx > fNumUnsuitable.GetSize() ? -1 : fNumUnsuitable[aidx]; 274 279 } … … 279 284 // the area index exceeds the initialized array. 280 285 // 281 const Int_t MCalibrationCam::GetNumUnreliable( Int_t aidx ) const 282 { 283 if (aidx < 0) 284 return -1; 286 const Int_t MCalibrationCam::GetNumUnreliable( const Int_t aidx ) const 287 { 288 if (aidx < 0) 289 { 290 Int_t num = 0; 291 for (Int_t i=0;i<fNumUnreliable.GetSize();i++) 292 num += fNumUnreliable[i]; 293 return num; 294 } 285 295 286 296 return aidx > fNumUnreliable.GetSize() ? -1 : fNumUnreliable[aidx]; … … 292 302 // the area index exceeds the initialized array. 293 303 // 294 const Float_t MCalibrationCam::GetNumHiGainFADCSlices( Int_taidx ) const304 const Float_t MCalibrationCam::GetNumHiGainFADCSlices( const Int_t aidx ) const 295 305 { 296 306 if (aidx < 0) … … 305 315 // the area index exceeds the initialized array. 306 316 // 307 const Float_t MCalibrationCam::GetNumLoGainFADCSlices( Int_taidx ) const317 const Float_t MCalibrationCam::GetNumLoGainFADCSlices( const Int_t aidx ) const 308 318 { 309 319 if (aidx < 0) … … 368 378 // Get i-th average pixel (area number) 369 379 // 370 MCalibrationPix &MCalibrationCam::GetAverageArea( UInt_t i)380 MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) 371 381 { 372 382 return *static_cast<MCalibrationPix*>(fAverageAreas->UncheckedAt(i)); … … 377 387 // Get i-th average pixel (area number) 378 388 // 379 const MCalibrationPix &MCalibrationCam::GetAverageArea( UInt_t i) const389 const MCalibrationPix &MCalibrationCam::GetAverageArea(const UInt_t i) const 380 390 { 381 391 return *static_cast<MCalibrationPix*>(fAverageAreas->UncheckedAt(i)); … … 386 396 // Get i-th average pixel (sector number) 387 397 // 388 MCalibrationPix &MCalibrationCam::GetAverageSector( UInt_t i)398 MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) 389 399 { 390 400 return *static_cast<MCalibrationPix*>(fAverageSectors->UncheckedAt(i)); … … 395 405 // Get i-th average pixel (sector number) 396 406 // 397 const MCalibrationPix &MCalibrationCam::GetAverageSector( UInt_t i) const407 const MCalibrationPix &MCalibrationCam::GetAverageSector(const UInt_t i) const 398 408 { 399 409 return *static_cast<MCalibrationPix*>(fAverageSectors->UncheckedAt(i)); … … 404 414 // Get i-th average pixel (area number) 405 415 // 406 MBadPixelsPix &MCalibrationCam::GetAverageBadArea( UInt_t i)416 MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) 407 417 { 408 418 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i)); … … 413 423 // Get i-th average pixel (area number) 414 424 // 415 const MBadPixelsPix &MCalibrationCam::GetAverageBadArea( UInt_t i) const425 const MBadPixelsPix &MCalibrationCam::GetAverageBadArea(const UInt_t i) const 416 426 { 417 427 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i)); … … 422 432 // Get i-th average pixel (sector number) 423 433 // 424 MBadPixelsPix &MCalibrationCam::GetAverageBadSector( UInt_t i)434 MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) 425 435 { 426 436 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i)); … … 431 441 // Get i-th average pixel (sector number) 432 442 // 433 const MBadPixelsPix &MCalibrationCam::GetAverageBadSector( UInt_t i) const443 const MBadPixelsPix &MCalibrationCam::GetAverageBadSector(const UInt_t i) const 434 444 { 435 445 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i)); -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
r4882 r4905 56 56 57 57 void Clear ( Option_t *o=""); 58 void DrawPixelContent( Int_t num) const;59 58 void Copy(TObject& object) const; 60 59 60 void DrawPixelContent( Int_t num) const; 61 61 62 // Getters 62 const Int_t GetAverageAreas () const;63 MCalibrationPix &GetAverageArea ( UInt_t i);64 const MCalibrationPix &GetAverageArea ( UInt_t i )const;65 MBadPixelsPix &GetAverageBadArea ( UInt_t i);66 const MBadPixelsPix &GetAverageBadArea ( UInt_t i )const;67 MBadPixelsPix &GetAverageBadSector ( UInt_t i );68 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const;69 MCalibrationPix &GetAverageSector ( UInt_t i );70 const Int_t GetAverageSectors () const;71 const M CalibrationPix &GetAverageSector ( UInt_t i) const;72 const Float_t GetNumHiGainFADCSlices ( Int_t aidx=0 ) const;73 const Float_t GetNumLoGainFADCSlices ( Int_t aidx=0 ) const;74 const Int_t GetNumUnsuitable ( Int_t aidx) const;75 const Int_t GetNumUnreliable ( Int_t aidx) const;63 const Int_t GetAverageAreas () const; 64 MCalibrationPix &GetAverageArea ( const UInt_t i ); 65 const MCalibrationPix &GetAverageArea ( const UInt_t i ) const; 66 MBadPixelsPix &GetAverageBadArea ( const UInt_t i ); 67 const MBadPixelsPix &GetAverageBadArea ( const UInt_t i ) const; 68 const Int_t GetAverageSectors () const; 69 MCalibrationPix &GetAverageSector ( const UInt_t i ); 70 const MCalibrationPix &GetAverageSector ( const UInt_t i ) const; 71 MBadPixelsPix &GetAverageBadSector ( const UInt_t i ); 72 const MBadPixelsPix &GetAverageBadSector ( const UInt_t i ) const; 73 const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const; 74 const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const; 75 const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const; 76 const Int_t GetNumUnreliable ( const Int_t aidx=-1) const; 76 77 77 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 78 const PulserColor_t GetPulserColor() const { return fPulserColor; } 79 const Int_t GetSize() const; 78 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, 79 Int_t type=0 ) const; 80 const PulserColor_t GetPulserColor () const { return fPulserColor; } 81 const Int_t GetSize () const; 80 82 81 MCalibrationPix &operator[] ( UInt_t i );82 const MCalibrationPix &operator[] ( UInt_t i )const;83 MCalibrationPix &operator[] ( UInt_t i ); 84 const MCalibrationPix &operator[] ( UInt_t i ) const; 83 85 84 86 // Inits 85 void Init ( const MGeomCam &geom );87 void Init ( const MGeomCam &geom ); 86 88 void InitSize ( const UInt_t i ); 87 89 void InitAverageAreas ( const UInt_t i ); … … 91 93 void SetNumHiGainFADCSlices ( const Float_t f, const Int_t aidx=0 ); 92 94 void SetNumLoGainFADCSlices ( const Float_t f, const Int_t aidx=0 ); 93 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx );94 void SetNumUnreliable ( const UInt_t i, const Int_t aidx );95 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx ); 96 void SetNumUnreliable ( const UInt_t i, const Int_t aidx ); 95 97 void SetPulserColor ( const PulserColor_t col=kCT1 ) { fPulserColor = col; } 96 98
Note:
See TracChangeset
for help on using the changeset viewer.