Changeset 4450 for trunk/MagicSoft
- Timestamp:
- 08/04/04 11:18:07 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4449 r4450 28 28 29 29 30 30 31 2004/08/04: Thomas Bretz 31 32 … … 36 37 * manalysis/Makefile, manalysis/AnalysisLinkDef.h: 37 38 - removed the MBlind* entries 39 40 * merpp.cc: 41 - moved interpretation of command line options to MLog 42 - added a check for unknown options 43 44 * manalysis/MCameraData.[h,cc]: 45 - added some comments 46 - fixed some errors in the documentation 47 - changed ClassDef to 1 48 - changed the new algorithms such that any number of different pixel- 49 sizes are supported 50 - small modifications to the sanity checks 51 52 * mbadpixels/MBadPixelsTreat.h: 53 - fixed the argument type of SetNumMinNeighbors 54 55 * mbase/MArgs.cc: 56 - comment updated 57 58 * mbase/MEvtLoop.cc: 59 - added reading and writing of fLog environment 60 61 * mbase/MLog.[h,cc]: 62 - added Reading and writing Environment (ReadEnv, WriteEnv) 63 - added a function to setup MLog from command line arguments 64 65 * mbase/MTaskInteractive.[h,cc]: 66 - added an example 67 68 * mbase/MTime.cc: 69 - added a warning for the SetTimeFormat usage 70 71 * mimage/MImgCleanStd.[h,cc]: 72 - some updates to the old comments 73 - NEW COMMENTS FOR SCALED CLEANING STILL MISSING! 74 - implemented scaled image cleaning 75 - replaced usage of MSigmabar by MPedPhotCam for democratic cleaning 38 76 39 77 -
trunk/MagicSoft/Mars/manalysis/MCameraData.cc
r4444 r4450 17 17 ! 18 18 ! Author(s): Thomas Bretz, 10/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 319 ! Author(s): Hendrik Bartko, 08/2004 <mailto:hbartko@mppmu.mpg.de> 20 ! 21 ! Copyright: MAGIC Software Development, 2000-2004 22 22 ! 23 23 ! … … 27 27 // 28 28 // MCameraData 29 // 30 // This is a generalized class storing camera data. For example the cleaning 31 // level for the image cleaning is one possibility. 29 32 // 30 33 ///////////////////////////////////////////////////////////////////////////// … … 56 59 { 57 60 fName = name ? name : "MCameraData"; 58 fTitle = title ? title : " Photons/PedRMS Information";61 fTitle = title ? title : "Generalized storage container for camera contents"; 59 62 } 60 63 … … 91 94 // scales with the inverse square root of the pixel area. 92 95 // 93 96 // FIXME: Should the check noise<=0 be replaced by MBadPixels? 97 // 94 98 void MCameraData::CalcCleaningLevel(const MCerPhotEvt &evt, const MPedPhotCam &cam, 95 99 const MGeomCam &geom) … … 138 142 // inner and outer pixels into account. 139 143 // 140 144 // FIXME: Should the check noise<=0 be replaced by MBadPixels? 145 // 141 146 void MCameraData::CalcCleaningLevel2(const MCerPhotEvt &evt, const MPedPhotCam &cam, 142 const MGeomCam &geom) 143 { 144 const Int_t n = geom.GetNumPixels(); 145 146 fData.Set(n); 147 fData.Reset(); 148 149 fValidity.Set(n); 150 fValidity.Reset(); 151 152 const Int_t entries = evt.GetNumPixels(); 153 154 const Float_t meannoise[2] = {cam.GetArea(0).GetRms(), cam.GetArea(1).GetRms()} ; // mean noise for the inner and the outer pixels 155 156 // 157 // check the number of all pixels against the noise level and 158 // set them to 'unused' state if necessary 159 // 160 for (Int_t i=0; i<entries; i++) 161 { 162 const MCerPhotPix &pix = evt[i]; 163 164 const Int_t idx = pix.GetPixId(); 165 const Float_t noise = cam[idx].GetRms(); 147 const MGeomCam &geom) 148 { 149 const Int_t n = geom.GetNumPixels(); 150 151 fData.Set(n); 152 fData.Reset(); 153 154 fValidity.Set(n); 155 fValidity.Reset(); 156 157 const Int_t entries = evt.GetNumPixels(); 158 const Float_t anoise0 = cam.GetArea(0).GetRms(); 159 if (anoise0<=0) 160 return; 161 162 // 163 // check the number of all pixels against the noise level and 164 // set them to 'unused' state if necessary 165 // 166 for (Int_t i=0; i<entries; i++) 167 { 168 const MCerPhotPix &pix = evt[i]; 169 170 const Int_t idx = pix.GetPixId(); 171 const Float_t noide = cam[idx].GetRms(); 166 172 167 173 if (noise<=0) // fData[idx]=0, fValidity[idx]=0 … … 174 180 // with the square root of the pixel area. 175 181 // 176 177 const UInt_t aidx = geom[idx].GetAidx(); 178 179 180 if (meannoise[0] > 0 && meannoise[1] > 0) 181 { 182 fData[idx] = pix.GetNumPhotons() * geom.GetPixRatio(idx) * meannoise[aidx] / meannoise[0] / noise; 183 184 } 185 else fData[idx] = pix.GetNumPhotons() * geom.GetPixRatioSqrt(idx) / noise; 186 182 const UInt_t aidx = geom[idx].GetAidx(); 183 const Float_t ratio = cam.GetArea(aidx).GetRms()/noise0; 184 185 fData[idx] = pix.GetNumPhotons() * geom.GetPixRatio(idx) * ratio / noise; 187 186 fValidity[idx] = 1; 188 187 } … … 231 230 } 232 231 233 234 232 // -------------------------------------------------------------------------- 235 233 // … … 238 236 // inner pixel and the average pedestal RMS of the inner pixels (democratic 239 237 // image cleaning, see TDAS 02-14). 240 241 238 // 239 // FIXME: Should the check noise<=0 be replaced by MBadPixels? 240 // 242 241 void MCameraData::CalcCleaningLevelDemocratic(const MCerPhotEvt &evt, const MPedPhotCam &cam, 243 242 const MGeomCam &geom) … … 251 250 fValidity.Reset(); 252 251 253 const Int_t entries = evt.GetNumPixels(); 254 255 const Float_t meannoise[2] = {cam.GetArea(0).GetRms(), cam.GetArea(1).GetRms()} ; // mean noise for the inner and the outer pixels 256 257 258 // 259 // check the number of all pixels against the noise level and 260 // set them to 'unused' state if necessary 261 // 262 for (Int_t i=0; i<entries; i++) 263 { 264 const MCerPhotPix &pix = evt[i]; 265 266 const Int_t idx = pix.GetPixId(); 267 const Float_t noise = cam[idx].GetRms(); 268 269 if (noise<=0) 270 continue; 271 272 // 273 // We calculate a correction factor which accounts for the 274 // fact that pixels have different size (see TDAS 02-14). 275 // 276 277 278 if (meannoise[0]>0) // fData[idx]=0, fValidity[idx]=0 279 { 280 fData[idx] = pix.GetNumPhotons() * geom.GetPixRatio(idx) / meannoise[0]; 281 fValidity[idx] = 1; 282 } 283 else 284 fValidity[idx] = 0; 285 } 286 287 } 288 289 290 291 // -------------------------------------------------------------------------- 292 // 293 // Returns, depending on the type flag: 294 // 295 // 0: Number of Photons*PixRatio 296 // 1: Error*sqrt(PixRatio) 297 // 2: Cleaning level = Num Photons*sqrt(PixRatio)/Error 298 // 3: Number of Photons 299 // 4: Error 252 const Int_t entries = evt.GetNumPixels(); 253 const Float_t noise0 = cam.GetArea(0).GetRms(); 254 if (noise0<=0) 255 return; 256 257 // 258 // check the number of all pixels against the noise level and 259 // set them to 'unused' state if necessary 260 // 261 for (Int_t i=0; i<entries; i++) 262 { 263 const MCerPhotPix &pix = evt[i]; 264 265 const Int_t idx = pix.GetPixId(); 266 const Float_t noise = cam[idx].GetRms(); 267 268 if (noise<=0) 269 continue; 270 271 // 272 // We calculate a correction factor which accounts for the 273 // fact that pixels have different size (see TDAS 02-14). 274 // 275 fData[idx] = pix.GetNumPhotons() * geom.GetPixRatio(idx) / noise0; 276 fValidity[idx] = 1; 277 } 278 } 279 280 // -------------------------------------------------------------------------- 281 // 282 // Returns the contents of the pixel. 300 283 // 301 284 Bool_t MCameraData::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
Note:
See TracChangeset
for help on using the changeset viewer.