Changeset 715 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 04/02/01 11:53:16 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/AnalysisIncl.h
r695 r715 1 1 #ifndef __CINT__ 2 2 3 #include <TClonesArray.h>4 5 #include "MParContainer.h"6 #include "MCamNeighbor.h"7 8 3 #endif // __CINT__ -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r698 r715 8 8 9 9 #include "MLog.h" 10 #include "MCamNeighbor.h"11 #include "MCamDisplay.h"12 10 #include "MHexagon.h" 11 #include "MCerPhotPix.h" 13 12 14 13 ClassImp(MCerPhotEvt) … … 29 28 fPixels->Clear(); 30 29 } 31 32 #include "MGeomCamMagic.h"33 #include "MGeomCamCT1.h"34 30 35 31 void MCerPhotEvt::Draw(Option_t* option) … … 79 75 (*this)[il].Print(); 80 76 } 81 82 /*83 void MCerPhotEvt::CleanLevel1()84 {85 //86 // This method looks for all pixels with an entry (photons)87 // that is three times bigger than the noise of the pixel88 //89 90 const Int_t entries = fPixels->GetEntries();91 92 //93 // check the number of all pixels against the noise level and94 // set them to 'unused' state if necessary95 //96 for (Int_t il=0; il<entries; il++ )97 {98 MCerPhotPix &pix = (*this)[il];99 100 const Float_t entry = pix.GetNumPhotons();101 const Float_t noise = pix.GetErrorPhot();102 103 if (entry < 3 * noise )104 pix.SetPixelUnused();105 }106 }107 108 void MCerPhotEvt::CleanLevel2()109 {110 //111 // check if the survived pixel have a neighbor, that also112 // survived113 //114 115 const Int_t entries = fPixels->GetEntries();116 117 for (Int_t il=0; il<entries; il++)118 {119 //120 // get entry il from list121 //122 MCerPhotPix &pix = (*this)[il];123 124 //125 // check if pixel is in use, if not goto next pixel in list126 //127 if (!pix.IsPixelUsed())128 continue;129 130 //131 // get pixel id of this entry132 //133 const Int_t id = pix.GetPixId() ;134 135 //136 // count number of next neighbors of this pixel which137 // state is 'used'138 //139 Int_t itest = 0 ;140 for (Int_t in=0 ; in < 6; in++ )141 {142 const Int_t id2 = fNN.GetNN(id, in) ;143 144 if (id2 < 0)145 continue;146 147 if (IsPixelUsed(id2))148 itest++ ;149 }150 151 //152 // check if no next neighbor has the state 'used'153 // set this pixel to 'unused', too.154 //155 if (itest==0)156 pix.SetPixelUnused();157 }158 159 //160 // now we declare all pixels that survive as CorePixels161 //162 for (Int_t il=0; il<entries; il++)163 {164 MCerPhotPix &pix = (*this)[il];165 166 if (pix.IsPixelUsed())167 pix.SetCorePixel();168 }169 170 }171 172 void MCerPhotEvt::CleanLevel3()173 {174 //175 // Look for the boundary pixels around the core pixels176 // if a pixel has more than 2.5 sigma, and a core neigbor177 // it is declared as used.178 //179 const Int_t entries = fPixels->GetEntries();180 181 for (Int_t il=0; il<entries; il++)182 {183 //184 // get pixel as entry il from list185 //186 MCerPhotPix &pix = (*this)[il];187 188 //189 // if pixel is a core pixel go to the next pixel190 //191 if (pix.IsCorePixel())192 continue;193 194 //195 // check the num of photons against the noise level196 //197 const Float_t entry = pix.GetNumPhotons();198 const Float_t noise = pix.GetErrorPhot();199 200 if (entry <= 2.5 * noise )201 continue;202 203 //204 // get pixel id of this entry205 //206 const Int_t id = pix.GetPixId();207 208 //209 // check if the pixel's next neighbor is a core pixel.210 // if it is a core pixel set pixel state to: used.211 //212 for (Int_t in=0; in<6 ; in++)213 {214 const Int_t id2 = fNN.GetNN(id, in);215 216 if (id2 <0)217 continue;218 219 if (!IsPixelCore(id2))220 continue;221 222 pix.SetPixelUsed();223 224 break ;225 }226 }227 }228 */229 77 230 78 Bool_t MCerPhotEvt::IsPixelExisting(Int_t id) -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r698 r715 11 11 #include "MParContainer.h" 12 12 #endif 13 #ifndef MCAMNEIGHBOR_H14 #include "MCamNeighbor.h"15 #endif16 13 17 14 class MCerPhotPix; … … 20 17 { 21 18 private: 22 23 UInt_t fNumPixels; 19 UInt_t fNumPixels; 24 20 TClonesArray *fPixels; 25 26 MCamNeighbor fNN; //! the class with the information about neighbors27 21 28 22 public: -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
r698 r715 5 5 6 6 #include "MParList.h" 7 #include "MGeomCam.h" 7 8 #include "MCerPhotPix.h" 8 9 #include "MCerPhotEvt.h" 9 #include "MCamNeighbor.h"10 10 11 11 ClassImp(MImgCleanStd) … … 34 34 // set them to 'unused' state if necessary 35 35 // 36 for (Int_t i l=0; il<entries; il++ )37 { 38 MCerPhotPix &pix = (*fEvt)[i l];36 for (Int_t i=0; i<entries; i++ ) 37 { 38 MCerPhotPix &pix = (*fEvt)[i]; 39 39 40 40 const Float_t entry = pix.GetNumPhotons(); … … 55 55 const Int_t entries = fEvt->GetNumPixels(); 56 56 57 for (Int_t i l=0; il<entries; il++)57 for (Int_t i=0; i<entries; i++) 58 58 { 59 59 // 60 60 // get entry il from list 61 61 // 62 MCerPhotPix &pix = (*fEvt)[i l];62 MCerPhotPix &pix = (*fEvt)[i]; 63 63 64 64 // … … 71 71 // get pixel id of this entry 72 72 // 73 const Int_t id = pix.GetPixId() 73 const Int_t id = pix.GetPixId(); 74 74 75 75 // … … 77 77 // state is 'used' 78 78 // 79 Int_t itest = 0 ; 80 for (Int_t in=0 ; in < 6; in++ ) 79 MGeomPix &gpix = (*fCam)[id]; 80 const Int_t nnmax = gpix.GetNumNeighbors(); 81 82 Int_t cnt = 0; 83 for (Int_t j=0; j<nnmax; j++) 81 84 { 82 const Int_t id2 = fNN.GetNN(id, in) ;85 const Int_t id2 = gpix.GetNeighbor(j); //GetNN(id, in) ; 83 86 84 87 if (id2 < 0) … … 86 89 87 90 if (fEvt->IsPixelUsed(id2)) 88 itest++;91 cnt++; 89 92 } 90 93 … … 93 96 // set this pixel to 'unused', too. 94 97 // 95 if ( itest==0)98 if (cnt==0) 96 99 pix.SetPixelUnused(); 97 100 } … … 100 103 // now we declare all pixels that survive as CorePixels 101 104 // 102 for (Int_t i l=0; il<entries; il++)103 { 104 MCerPhotPix &pix = (*fEvt)[i l];105 for (Int_t i=0; i<entries; i++) 106 { 107 MCerPhotPix &pix = (*fEvt)[i]; 105 108 106 109 if (pix.IsPixelUsed()) … … 119 122 const Int_t entries = fEvt->GetNumPixels(); 120 123 121 for (Int_t i l=0; il<entries; il++)124 for (Int_t i=0; i<entries; i++) 122 125 { 123 126 // 124 127 // get pixel as entry il from list 125 128 // 126 MCerPhotPix &pix = (*fEvt)[i l];129 MCerPhotPix &pix = (*fEvt)[i]; 127 130 128 131 // … … 150 153 // if it is a core pixel set pixel state to: used. 151 154 // 152 for (Int_t in=0; in<6 ; in++) 155 MGeomPix &gpix = (*fCam)[id]; 156 const Int_t nnmax = gpix.GetNumNeighbors(); 157 158 for (Int_t j=0; j<nnmax; j++) 153 159 { 154 const Int_t id2 = fNN.GetNN(id, in);160 const Int_t id2 = gpix.GetNeighbor(j); 155 161 156 162 if (id2 <0) … … 173 179 // if not create one and add them to the list 174 180 // 181 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 182 if (!fCam) 183 { 184 *fLog << dbginf << "MGeomCam not found (no geometry information available)... aborting." << endl; 185 return kFALSE; 186 } 187 175 188 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); 176 if (fEvt) 177 return kTRUE; 178 179 *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; 180 return kFALSE; 189 if (!fEvt) 190 { 191 *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl; 192 return kFALSE; 193 } 194 195 return kTRUE; 181 196 } 182 197 -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h
r698 r715 8 8 #include "MTask.h" 9 9 #endif 10 #ifndef MCAMNEIGHBOR_H11 #include "MCamNeighbor.h"12 #endif13 10 11 class MGeomCam; 14 12 class MCerPhotEvt; 15 13 … … 17 15 { 18 16 private: 19 MCamNeighbor fNN; //! the class with the information about neighbors 20 17 MGeomCam *fCam; 21 18 MCerPhotEvt *fEvt; 22 19
Note:
See TracChangeset
for help on using the changeset viewer.