Changeset 6489 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 02/15/05 16:18:28 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r4702 r6489 31 31 // risk! 32 32 // 33 // Class Version 4: 34 // ---------------- 35 // - added Short_t fNumSinglePixels; 36 // - added Float_t fSizeSinglePixels; 37 // - added Float_t fSizeSubIslands; 38 // - added Float_t fSizeMainIsland; 39 // 33 40 // Class Version 3: 34 41 // ---------------- … … 102 109 void MCerPhotEvt::Reset() 103 110 { 104 fNumPixels = 0; 105 fMaxIndex = -1; 106 fNumIslands = -1; 111 fNumPixels = 0; 112 fNumSinglePixels = 0; 113 fSizeSinglePixels = 0; 114 fSizeSubIslands = 0; 115 fSizeMainIsland = 0; 116 fMaxIndex = -1; 117 fNumIslands = -1; 107 118 fLut.Set(0); 108 119 // fPixels->Delete(); … … 516 527 517 528 // Create a list to hold the sizes of the islands (The maximum 518 // number of islands possible is roug ly fNumPixels/4)529 // number of islands possible is roughly fNumPixels/4) 519 530 TArrayD size(fNumPixels/3); 520 531 521 532 // Calculate Islands 522 Int_t n=0; 533 Int_t n=0; 534 Float_t totsize = 0; 523 535 524 536 // We could loop over all indices which looks more straight … … 535 547 if (pix->GetIdxIsland()<0) 536 548 { 537 Double_t sz = CalcIsland(geom, pix->GetPixId(), n); 549 // Don't put this in one line! n is used twice... 550 const Double_t sz = CalcIsland(geom, pix->GetPixId(), n); 538 551 size[n++] = sz; 552 totsize += sz; 539 553 } 540 554 } … … 563 577 564 578 // Now assign number of islands found 565 fNumIslands = n; 579 fNumIslands = n; 580 fSizeSubIslands = n>0 ? totsize-size[idx[0]] : 0; 581 fSizeMainIsland = n>0 ? size[idx[0]] : 0; 566 582 567 583 // return number of island -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r4732 r6489 25 25 UInt_t fNumPixels; 26 26 Short_t fNumIslands; 27 Short_t fNumSinglePixels; 28 Float_t fSizeSinglePixels; 29 Float_t fSizeSubIslands; 30 Float_t fSizeMainIsland; 27 31 Int_t fMaxIndex; 28 32 TArrayI fLut; // Lookup tabel to lookup pixel by index … … 58 62 UInt_t GetNumPixels() const { return fNumPixels; } 59 63 Short_t GetNumIslands() const { return fNumIslands; }; 64 Short_t GetNumSinglePixels() const { return fNumSinglePixels; } 65 Float_t GetSizeSinglePixels() const { return fSizeSinglePixels; } 66 Float_t GetSizeSubIslands() const { return fSizeSubIslands; } 67 Float_t GetSizeMainIsland() const { return fSizeMainIsland; } 68 69 // Setter functions for use in image cleaning classes only 70 void SetSinglePixels(Short_t num, Float_t size) { fNumSinglePixels=num; fSizeSinglePixels=size; } 60 71 61 72 Bool_t IsPixelExisting(Int_t id) const; … … 103 114 operator TIterator*() const; 104 115 105 ClassDef(MCerPhotEvt, 3) // class for an event containing cerenkov photons116 ClassDef(MCerPhotEvt, 4) // class for an event containing cerenkov photons 106 117 }; 107 118
Note:
See TracChangeset
for help on using the changeset viewer.