Changeset 8106 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 10/17/06 18:18:40 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r8022 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.95 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 361 363 // entries with match the given sector are taken into account. 362 364 // 363 Stat_t MHCamera::GetMeanSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const365 Stat_t MHCamera::GetMeanSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 364 366 { 365 367 if (fNcells<=1) … … 371 373 for (int i=0; i<fNcells-2; i++) 372 374 { 373 if (( all || IsUsed(i)) && MatchSector(i, sector, aidx))375 if ((ball || IsUsed(i)) && MatchSector(i, sector, aidx)) 374 376 { 375 377 if (TestBit(kProfile) && fBinEntries[i+1]==0) … … 390 392 // entries with match the given sector are taken into account. 391 393 // 392 Stat_t MHCamera::GetRmsSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const394 Stat_t MHCamera::GetRmsSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 393 395 { 394 396 if (fNcells<=1) … … 401 403 for (int i=0; i<fNcells-2; i++) 402 404 { 403 if (( all || IsUsed(i)) && MatchSector(i, sector, aidx))405 if ((ball || IsUsed(i)) && MatchSector(i, sector, aidx)) 404 406 { 405 407 if (TestBit(kProfile) && fBinEntries[i+1]==0) … … 429 431 // only pixels with matching sector number are taken into account. 430 432 // 431 Double_t MHCamera::GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const433 Double_t MHCamera::GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 432 434 { 433 435 if (fMinimum != -1111) … … 445 447 446 448 const Double_t val = TestBit(kProfile) ? fArray[i+1]/fBinEntries[i+1] : fArray[i+1]; 447 if (MatchSector(i, sector, aidx) && ( all || IsUsed(i)) && val<minimum)449 if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val<minimum) 448 450 minimum = val; 449 451 } … … 458 460 // only pixels with matching sector number are taken into account. 459 461 // 460 Double_t MHCamera::GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const462 Double_t MHCamera::GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 461 463 { 462 464 if (fMaximum!=-1111) … … 473 475 474 476 const Double_t val = TestBit(kProfile) ? fArray[i+1]/fBinEntries[i+1] : fArray[i+1]; 475 if (MatchSector(i, sector, aidx) && ( all || IsUsed(i)) && val>maximum)477 if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val>maximum) 476 478 maximum = val; 477 479 } -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r8066 r8106 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.60 2006-10-17 17:16:00 tbretz Exp $ 3 \* ======================================================================== */ 1 4 #ifndef MARS_MHCamera 2 5 #define MARS_MHCamera … … 172 175 Stat_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(binx); } 173 176 174 Double_t GetMinimum(Bool_t all) const { return GetMinimumSectors(TArrayI(), TArrayI(),all); }175 Double_t GetMaximum(Bool_t all) const { return GetMaximumSectors(TArrayI(), TArrayI(),all); }177 Double_t GetMinimum(Bool_t ball) const { return GetMinimumSectors(TArrayI(), TArrayI(), ball); } 178 Double_t GetMaximum(Bool_t ball) const { return GetMaximumSectors(TArrayI(), TArrayI(), ball); } 176 179 177 180 Double_t GetMinimum(Double_t gt) const { return GetMinimumSectors(TArrayI(), TArrayI(), kFALSE); } // FIXME: To be done: Minimum greater than … … 181 184 Double_t GetMaximum() const { return GetMaximum(0.0); } // FIXME: To be done: Maximum lower than 182 185 183 Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const184 { 185 return GetMinimumSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);186 } 187 Double_t GetMaximumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const188 { 189 return GetMaximumSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);190 } 191 Double_t GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const;192 Double_t GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const;186 Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 187 { 188 return GetMinimumSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 189 } 190 Double_t GetMaximumSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 191 { 192 return GetMaximumSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 193 } 194 Double_t GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball=kFALSE) const; 195 Double_t GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball=kFALSE) const; 193 196 194 197 void SetLevels(const TArrayF &arr); … … 236 239 void AddNotify(TObject *event); 237 240 238 Stat_t GetMean(Bool_t all) const { return GetMeanSectors(TArrayI(), TArrayI(),all); }239 Stat_t GetRMS(Bool_t all) const { return GetRmsSectors(TArrayI(), TArrayI(),all); }241 Stat_t GetMean(Bool_t ball) const { return GetMeanSectors(TArrayI(), TArrayI(), ball); } 242 Stat_t GetRMS(Bool_t ball) const { return GetRmsSectors(TArrayI(), TArrayI(), ball); } 240 243 241 244 Stat_t GetMean(Int_t=0) const { return GetMeanSectors(TArrayI(), TArrayI(), kFALSE); } … … 245 248 Stat_t GetMedianDev() const; 246 249 247 Stat_t GetMeanSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const248 { 249 return GetMeanSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);250 } 251 Stat_t GetRmsSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const252 { 253 return GetRmsSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);250 Stat_t GetMeanSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 251 { 252 return GetMeanSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 253 } 254 Stat_t GetRmsSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 255 { 256 return GetRmsSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 254 257 } 255 258
Note:
See TracChangeset
for help on using the changeset viewer.