Changeset 603 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 02/21/01 14:41:54 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r601 r603 18 18 fPixId = pix ; 19 19 fIsUsed = kTRUE ; 20 fIsCore = kFALSE ; 20 21 fPhot = phot ; 21 22 fErrPhot = errphot ; … … 26 27 fPixId = pix ; 27 28 fIsUsed = kTRUE ; 29 fIsUsed = kFALSE ; 28 30 fPhot = phot ; 29 31 fErrPhot = errphot ; … … 41 43 cout << " UnUsed " ; 42 44 45 if ( fIsCore == kTRUE ) 46 cout << " Core " ; 47 else 48 if ( fIsCore == kFALSE ) 49 cout << " " ; 50 43 51 cout << " Nphot= " << fPhot 44 52 << " Error(Nphot) = " << fErrPhot … … 127 135 { 128 136 entry = ((MCerPhotPix *) fPixels->At(il))->GetPhotons() ; 129 noise = 3 *((MCerPhotPix *) fPixels->At(il))->GetErrorPhot() ;137 noise = ((MCerPhotPix *) fPixels->At(il))->GetErrorPhot() ; 130 138 131 139 if (entry < 3 * noise ) … … 154 162 id2 = fNN->GetNN(id, in ) ; 155 163 156 if ( PixelIsUsed(id2) == kTRUE ) 157 cout << " hulibu " << id << "/" << id2 << endl ; 158 159 164 if (id2 >=0 ) { 165 if ( PixelIsUsed(id2) == kTRUE ) 166 itest++ ; 167 } 168 } 169 170 // 171 // check if no neighbor, then set unused 172 // 173 if ( itest == 0 ) 174 { 175 ((MCerPhotPix *) fPixels->At(il))->SetPixelUnused() ; 176 } 177 178 } 179 } 180 181 // now we declare all pixels that survive as CorePixels 182 183 for (Int_t il=0; il<fPixels->GetEntries(); il++ ) 184 { 185 if ( ((MCerPhotPix *) fPixels->At(il))->IsPixelUsed() == kTRUE ) 186 { 187 ((MCerPhotPix *) fPixels->At(il))->SetCorePixel() ; 188 } 189 } 190 191 } 192 193 void MCerPhotEvt::CleanLevel3() 194 { 195 // Look for the boundary pixels around the core pixels 196 // if a pixel has more than 2.5 sigma, and a core neigbor 197 // it is declared as used. 198 199 Float_t entry, noise ; 200 Int_t id, id2 ; 201 for (Int_t il=0; il<fPixels->GetEntries(); il++ ) 202 { 203 if ( ((MCerPhotPix *) fPixels->At(il))->IsCorePixel() == kFALSE ) 204 { 205 entry = ((MCerPhotPix *) fPixels->At(il))->GetPhotons() ; 206 noise = ((MCerPhotPix *) fPixels->At(il))->GetErrorPhot() ; 207 208 if (entry > 2.5 * noise ) { 209 id = ((MCerPhotPix *) fPixels->At(il))->GetPixId() ; 210 for (Int_t in=0 ; in < 6 ; in++ ) 211 { 212 id2 = fNN->GetNN(id, in ) ; 213 if (id2 >=0 ) 214 { 215 if ( PixelIsCore(id2) == kTRUE ) { 216 ((MCerPhotPix *) fPixels->At(il))->SetPixelUsed() ; 217 break ; 218 } 219 } 220 } 160 221 } 161 222 } … … 163 224 } 164 225 226 227 228 165 229 Bool_t MCerPhotEvt::PixelExist(Int_t id ) 166 230 { … … 171 235 if ( id == ((MCerPhotPix *) fPixels->At(il))->GetPixId() ) { 172 236 173 cout << " PixelExist " << il ;237 // cout << " PixelExist " << il ; 174 238 return kTRUE ; 175 239 } … … 189 253 ((MCerPhotPix *) fPixels->At(il))->IsPixelUsed() == kTRUE ) { 190 254 191 cout << " PixelIsUsed " << il ; 255 // cout << " PixelIsUsed " << il ; 256 return kTRUE ; 257 } 258 } 259 260 return kFALSE ; 261 262 } 263 264 Bool_t MCerPhotEvt::PixelIsCore(Int_t id ) 265 { 266 // Checks if in the pixel list is an entry with pixel id 267 268 for (Int_t il=0; il<fPixels->GetEntries(); il++ ) 269 { 270 if ( id == ((MCerPhotPix *) fPixels->At(il))->GetPixId() && 271 ((MCerPhotPix *) fPixels->At(il))->IsCorePixel() == kTRUE ) { 272 192 273 return kTRUE ; 193 274 } -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r601 r603 18 18 Int_t fPixId ; // the pixel Id 19 19 Bool_t fIsUsed ; // the pixel is used for calculations --> kTRUE 20 Bool_t fIsCore ; // the pixel is a Core pixel --> kTRUE 20 21 Float_t fPhot ; // The number of Cerenkov photons 21 22 Float_t fErrPhot ; // the error of fPhot … … 59 60 } 60 61 62 void SetCorePixel() 63 { 64 fIsCore = kTRUE ; 65 } 66 67 Bool_t IsCorePixel() 68 { 69 return fIsCore ; 70 } 61 71 62 72 … … 96 106 void CleanLevel1() ; 97 107 void CleanLevel2() ; 108 void CleanLevel3() ; 98 109 99 110 Bool_t PixelExist( Int_t id ) ; 100 111 Bool_t PixelIsUsed( Int_t id ) ; 112 Bool_t PixelIsCore( Int_t id ) ; 101 113 102 114 Int_t GetPixelId(Int_t i ) ;
Note:
See TracChangeset
for help on using the changeset viewer.