Changeset 6855 for trunk/MagicSoft/Mars/mimage
- Timestamp:
- 03/18/05 17:21:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/ImageLinkDef.h
r6848 r6855 10 10 #pragma link C++ class MHillas+; 11 11 #pragma link C++ class MHillasSrc+; 12 #pragma link C++ class MHillasSrcCalc+;13 12 #pragma link C++ class MHillasExt+; 14 13 #pragma link C++ class MHillasCalc+; -
trunk/MagicSoft/Mars/mimage/MCameraSmooth.cc
r4512 r6855 41 41 #include "MGeomPix.h" 42 42 #include "MGeomCam.h" 43 #include "M CerPhotPix.h"44 #include "M CerPhotEvt.h"43 #include "MSignalPix.h" 44 #include "MSignalCam.h" 45 45 46 46 ClassImp(MCameraSmooth); … … 62 62 // -------------------------------------------------------------------------- 63 63 // 64 // - get the M CerPhotEvtfrom the parlist (abort if missing)64 // - get the MSignalCam from the parlist (abort if missing) 65 65 // - get MGeomCam from the parameter list 66 66 // 67 67 Int_t MCameraSmooth::PreProcess (MParList *pList) 68 68 { 69 fEvt = (M CerPhotEvt*)pList->FindObject("MCerPhotEvt");69 fEvt = (MSignalCam*)pList->FindObject("MSignalCam"); 70 70 if (!fEvt) 71 71 { 72 *fLog << err << dbginf << "M CerPhotEvtnot found... aborting." << endl;72 *fLog << err << dbginf << "MSignalCam not found... aborting." << endl; 73 73 return kFALSE; 74 74 } … … 104 104 for (UShort_t i=0; i<entries; i++) 105 105 { 106 M CerPhotPix &pix = (*fEvt)[i];106 MSignalPix &pix = (*fEvt)[i]; 107 107 108 const Int_t id = pix.GetPixId();108 //const Int_t id = pix.GetPixId(); 109 109 110 const MGeomPix &gpix = (*fGeomCam)[i d];110 const MGeomPix &gpix = (*fGeomCam)[i]; 111 111 112 112 const Int_t n = gpix.GetNumNeighbors(); … … 120 120 const UShort_t nid = gpix.GetNeighbor(j); 121 121 122 const M CerPhotPix *evtpix = fEvt->GetPixById(nid);122 const MSignalPix *evtpix = fEvt->GetPixById(nid); 123 123 if (evtpix) 124 124 { -
trunk/MagicSoft/Mars/mimage/MCameraSmooth.h
r4512 r6855 11 11 12 12 class MGeomCam; 13 class M CerPhotEvt;13 class MSignalCam; 14 14 15 15 class MCameraSmooth : public MTask 16 16 { 17 17 private: 18 M CerPhotEvt*fEvt; //! Pointer to data to smooth19 MGeomCam 18 MSignalCam *fEvt; //! Pointer to data to smooth 19 MGeomCam *fGeomCam; //! Camera geometry 20 20 21 21 Byte_t fCounts; // number of smoothing loops -
trunk/MagicSoft/Mars/mimage/MConcentration.cc
r5142 r6855 50 50 #include "MGeomCam.h" 51 51 52 #include "M CerPhotPix.h"53 #include "M CerPhotEvt.h"52 #include "MSignalPix.h" 53 #include "MSignalCam.h" 54 54 55 55 #include "MLog.h" … … 106 106 // Nothing. 107 107 // 108 Int_t MConcentration::Calc(const MGeomCam &geom, const M CerPhotEvt&evt, const MHillas &hillas)108 Int_t MConcentration::Calc(const MGeomCam &geom, const MSignalCam &evt, const MHillas &hillas) 109 109 { 110 110 Float_t maxpix[9] = {0,0,0,0,0,0,0,0,0}; // [#phot] 111 111 112 TIter Next(evt); 113 MCerPhotPix *pix = 0; 114 while ((pix=(MCerPhotPix*)Next())) 115 { 116 const Int_t pixid = pix->GetPixId(); 117 const Double_t nphot = pix->GetNumPhotons()* geom.GetPixRatio(pixid); 112 const UInt_t npix = evt.GetNumPixels(); 113 for (UInt_t i=0; i<npix; i++) 114 { 115 const MSignalPix &pix = evt[i]; 116 if (!pix.IsPixelUsed()) 117 continue; 118 119 const Double_t nphot = pix.GetNumPhotons()* geom.GetPixRatio(i); 118 120 119 121 // Get number of photons in the 8 most populated pixels -
trunk/MagicSoft/Mars/mimage/MConcentration.h
r4710 r6855 8 8 class MHillas; 9 9 class MGeomCam; 10 class M CerPhotEvt;10 class MSignalCam; 11 11 12 12 class MConcentration : public MParContainer … … 20 20 void Reset(); 21 21 22 Int_t Calc(const MGeomCam &geom, const M CerPhotEvt&pix, const MHillas &hil);22 Int_t Calc(const MGeomCam &geom, const MSignalCam &pix, const MHillas &hil); 23 23 24 24 void Print(Option_t *opt=NULL) const; -
trunk/MagicSoft/Mars/mimage/MHillas.cc
r6292 r6855 69 69 #include "MGeomCam.h" 70 70 71 #include "M CerPhotPix.h"72 #include "M CerPhotEvt.h"71 #include "MSignalPix.h" 72 #include "MSignalCam.h" 73 73 74 74 #include "MLog.h" … … 203 203 // Returns: 204 204 // 0 no error 205 // 1 number of pixels < 3205 // 1 number of pixels in event == 0 (special MC events) 206 206 // 2 size==0 207 207 // 3 number of used pixel < 3 208 208 // 4 CorrXY == 0 209 209 // 210 Int_t MHillas::Calc(const MGeomCam &geom, const MCerPhotEvt &evt, Int_t island) 211 { 212 // 213 // sanity check 1 214 // 215 if (evt.GetNumPixels()<3) 210 Int_t MHillas::Calc(const MGeomCam &geom, const MSignalCam &evt, Int_t island) 211 { 212 const UInt_t numpix = evt.GetNumPixels(); 213 214 // 215 // sanity check 1 (special MC events) 216 // 217 if (numpix==0) 216 218 return 1; 217 219 … … 229 231 fSize = 0; 230 232 231 MCerPhotPix *pix = 0; 233 UInt_t numused = 0; 234 /* 235 MSignalPix *pix = 0; 232 236 233 237 TIter Next(evt); 234 UInt_t numused = 0;235 while ((pix=(MCerPhotPix*)Next()))238 while ((pix=(MSignalPix*)Next()))*/ 239 for (UInt_t i=0; i<numpix; i++) 236 240 { 237 if (island>=0 && pix->GetIdxIsland()!=island) 241 MSignalPix &pix = evt[i]; 242 if (!pix.IsPixelUsed()) 238 243 continue; 239 244 240 const MGeomPix &gpix = geom[pix->GetPixId()]; 241 242 const Float_t nphot = pix->GetNumPhotons(); 245 if (island>=0 && pix.GetIdxIsland()!=island) 246 continue; 247 248 const MGeomPix &gpix = geom[i/*pix->GetPixId()*/]; 249 250 const Float_t nphot = pix.GetNumPhotons(); 243 251 244 252 fSize += nphot; // [counter] … … 277 285 Double_t corryy=0; // [m^2] 278 286 279 Next.Reset(); 280 while ((pix=(MCerPhotPix*)Next())) 287 //Next.Reset(); 288 //while ((pix=(MSignalPix*)Next())) 289 //{ 290 for (UInt_t i=0; i<numpix; i++) 281 291 { 282 if (island>=0 && pix->GetIdxIsland()!=island) 292 MSignalPix &pix = evt[i]; 293 if (!pix.IsPixelUsed()) 283 294 continue; 284 295 285 const MGeomPix &gpix = geom[pix->GetPixId()]; 296 if (island>=0 && pix.GetIdxIsland()!=island) 297 continue; 298 299 const MGeomPix &gpix = geom[i/*pix->GetPixId()*/]; 286 300 287 301 const Float_t dx = gpix.GetX() - fMeanX; // [mm] 288 302 const Float_t dy = gpix.GetY() - fMeanY; // [mm] 289 303 290 const Float_t nphot = pix ->GetNumPhotons();// [#phot]304 const Float_t nphot = pix.GetNumPhotons(); // [#phot] 291 305 292 306 corrxx += nphot * dx*dx; // [mm^2] -
trunk/MagicSoft/Mars/mimage/MHillas.h
r6350 r6855 10 10 11 11 class MGeomCam; 12 class M CerPhotEvt;12 class MSignalCam; 13 13 14 14 class MHillas : public MParContainer … … 31 31 void Reset(); 32 32 33 Int_t Calc(const MGeomCam &geom, const M CerPhotEvt&pix, Int_t island=-1);33 Int_t Calc(const MGeomCam &geom, const MSignalCam &pix, Int_t island=-1); 34 34 35 35 void Print(const MGeomCam &geom) const; -
trunk/MagicSoft/Mars/mimage/MHillasCalc.cc
r5352 r6855 117 117 // 118 118 // 1) MGeomCam 5) MHillas 8) MImagePar 119 // 2) M CerPhotEvt6) MHillasSrc 9) MNewImagePar119 // 2) MSignalCam 6) MHillasSrc 9) MNewImagePar 120 120 // 3) MSrcPosCam 7) MHillasExt 10) MConcentration 121 121 // 4) fIdxIslands … … 138 138 #include "MParList.h" 139 139 140 #include "M CerPhotEvt.h"140 #include "MSignalCam.h" 141 141 142 142 #include "MHillas.h" … … 189 189 if (TestFlags(~kCalcHillasSrc)) 190 190 { 191 fCerPhotEvt = (M CerPhotEvt*)pList->FindObject(AddSerialNumber("MCerPhotEvt"));191 fCerPhotEvt = (MSignalCam*)pList->FindObject(AddSerialNumber("MSignalCam")); 192 192 if (!fCerPhotEvt) 193 193 { 194 *fLog << err << "M CerPhotEvtnot found... aborting." << endl;194 *fLog << err << "MSignalCam not found... aborting." << endl; 195 195 return kFALSE; 196 196 } … … 355 355 if (TestFlag(kCalcHillas)) 356 356 { 357 PrintSkipped(fErrors[1], " Less than 3 pixels (before cleaning)");357 PrintSkipped(fErrors[1], "0-Pixel Event (before cleaning, MC event?)"); 358 358 PrintSkipped(fErrors[2], "Calculated Size == 0 (after cleaning)"); 359 359 PrintSkipped(fErrors[3], "Number of used pixels < 3"); … … 379 379 *fLog << inf << GetDescriptor() << " calculating:" << endl; 380 380 if (TestFlag(kCalcHillas)) 381 *fLog << " - " << fNameHillas << " from MGeomCam, M CerPhotEvtand fIdxIsland=" << fIdxIsland << endl;381 *fLog << " - " << fNameHillas << " from MGeomCam, MSignalCam and fIdxIsland=" << fIdxIsland << endl; 382 382 if (TestFlag(kCalcHillasSrc)) 383 383 *fLog << " - " << fNameHillasSrc << " from " << fNameSrcPosCam << ", " << fNameHillas << " and fIdxIsland=" << fIdxIsland << endl; 384 384 if (TestFlag(kCalcHillasExt)) 385 *fLog << " - " << fNameHillasExt << " from MGeomCam, M CerPhotEvt, " << fNameHillas << " and fIdxIsland=" << fIdxIsland << endl;385 *fLog << " - " << fNameHillasExt << " from MGeomCam, MSignalCam, " << fNameHillas << " and fIdxIsland=" << fIdxIsland << endl; 386 386 if (TestFlag(kCalcImagePar)) 387 *fLog << " - " << fNameImagePar << " from M CerPhotEvt" << endl;387 *fLog << " - " << fNameImagePar << " from MSignalCam" << endl; 388 388 if (TestFlag(kCalcNewImagePar)) 389 *fLog << " - " << fNameNewImagePar << " from MGeomCam, M CerPhotEvt, " << fNameHillas << " and fIdxIsland=" << fIdxIsland << endl;389 *fLog << " - " << fNameNewImagePar << " from MGeomCam, MSignalCam, " << fNameHillas << " and fIdxIsland=" << fIdxIsland << endl; 390 390 if (TestFlag(kCalcConc)) 391 *fLog << " - " << fNameConc << " from MGeomCam, M CerPhotEvtand " << fNameHillas << endl;391 *fLog << " - " << fNameConc << " from MGeomCam, MSignalCam and " << fNameHillas << endl; 392 392 } 393 393 -
trunk/MagicSoft/Mars/mimage/MHillasCalc.h
r5059 r6855 18 18 19 19 class MGeomCam; 20 class M CerPhotEvt;20 class MSignalCam; 21 21 class MHillas; 22 22 class MHillasExt; … … 41 41 42 42 const MGeomCam *fGeomCam; //! Camera Geometry used to calculate Hillas 43 const M CerPhotEvt*fCerPhotEvt; //! Cerenkov Photon Event used for calculation43 const MSignalCam *fCerPhotEvt; //! Cerenkov Photon Event used for calculation 44 44 45 45 MHillas *fHillas; //! output container to store result -
trunk/MagicSoft/Mars/mimage/MHillasExt.cc
r4826 r6855 68 68 #include "MGeomCam.h" 69 69 70 #include "M CerPhotPix.h"71 #include "M CerPhotEvt.h"70 #include "MSignalPix.h" 71 #include "MSignalCam.h" 72 72 73 73 #include "MLog.h" … … 137 137 // and the cerenkov photon event 138 138 // 139 Int_t MHillasExt::Calc(const MGeomCam &geom, const M CerPhotEvt&evt, const MHillas &hil, Int_t island)139 Int_t MHillasExt::Calc(const MGeomCam &geom, const MSignalCam &evt, const MHillas &hil, Int_t island) 140 140 { 141 141 // … … 155 155 Float_t maxdist = 0; 156 156 157 MCerPhotPix *pix = 0; 158 159 TIter Next(evt); 160 while ((pix=(MCerPhotPix*)Next())) 157 // MSignalPix *pix = 0; 158 // TIter Next(evt); 159 // while ((pix=(MSignalPix*)Next())) 160 161 const UInt_t npix = evt.GetNumPixels(); 162 for (UInt_t i=0; i<npix; i++) 161 163 { 162 if (island>=0 && pix->GetIdxIsland()!=island) 164 const MSignalPix &pix = evt[i]; 165 if (!pix.IsPixelUsed()) 163 166 continue; 164 167 165 const Int_t pixid = pix->GetPixId(); 166 167 const MGeomPix &gpix = geom[pixid]; 168 if (island>=0 && pix.GetIdxIsland()!=island) 169 continue; 170 171 //const Int_t pixid = pix->GetPixId(); 172 173 const MGeomPix &gpix = geom[i/*pixid*/]; 168 174 const Double_t dx = gpix.GetX() - hil.GetMeanX(); // [mm] 169 175 const Double_t dy = gpix.GetY() - hil.GetMeanY(); // [mm] 170 176 171 Double_t nphot = pix ->GetNumPhotons(); // [1]177 Double_t nphot = pix.GetNumPhotons(); // [1] 172 178 173 179 const Double_t dzx = hil.GetCosDelta()*dx + hil.GetSinDelta()*dy; // [mm] … … 185 191 // must take pixel size into account 186 192 // 187 nphot *= geom.GetPixRatio( pixid);193 nphot *= geom.GetPixRatio(i/*pixid*/); 188 194 189 195 if (nphot>maxpix) 190 196 { 191 197 maxpix = nphot; // [1] 192 maxpixid = pixid;198 maxpixid = i;//pixid; 193 199 continue; // [1] 194 200 } -
trunk/MagicSoft/Mars/mimage/MHillasExt.h
r4710 r6855 10 10 class MHillas; 11 11 class MGeomCam; 12 class M CerPhotEvt;12 class MSignalCam; 13 13 14 14 class MHillasExt : public MParContainer … … 33 33 Float_t GetMaxDist() const { return fMaxDist; } 34 34 35 Int_t Calc(const MGeomCam &geom, const M CerPhotEvt&pix,35 Int_t Calc(const MGeomCam &geom, const MSignalCam &pix, 36 36 const MHillas &hil, Int_t island=-1); 37 37 -
trunk/MagicSoft/Mars/mimage/MImagePar.cc
r6489 r6855 48 48 #include "MLogManip.h" 49 49 50 #include "MCerPhotEvt.h" 51 #include "MCerPhotPix.h" 50 #include "MSignalCam.h" 52 51 53 52 ClassImp(MImagePar); … … 86 85 // Calculation of new image parameters 87 86 // 88 void MImagePar::Calc(const M CerPhotEvt&evt)87 void MImagePar::Calc(const MSignalCam &evt) 89 88 { 90 89 // Get number of saturating pixels 91 fNumSatPixelsHG = 0; 92 fNumSatPixelsLG = 0; 93 94 const UInt_t npixevt = evt.GetNumPixels(); 95 for (UInt_t i=0; i<npixevt; i++) 96 { 97 const MCerPhotPix &pix = evt[i]; 98 99 if (pix.IsPixelHGSaturated()) 100 fNumSatPixelsHG++; 101 if (pix.IsPixelSaturated()) 102 fNumSatPixelsLG++; 103 } 90 fNumSatPixelsHG = evt.GetNumPixelsSaturatedHiGain(); 91 fNumSatPixelsLG = evt.GetNumPixelsSaturatedLoGain(); 104 92 105 93 // Get number of islands -
trunk/MagicSoft/Mars/mimage/MImagePar.h
r6489 r6855 8 8 class MHillas; 9 9 class MGeomCam; 10 class M CerPhotEvt;10 class MSignalCam; 11 11 12 12 class MImagePar : public MParContainer … … 39 39 void Print(Option_t *opt=NULL) const; 40 40 41 void Calc(const M CerPhotEvt&evt);41 void Calc(const MSignalCam &evt); 42 42 43 43 ClassDef(MImagePar, 2) // Container to hold (geometry and island independant) image parameters -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r6489 r6855 61 61 // 62 62 // When an event is read, before the image cleaning, all the pixels that 63 // are in M CerPhotEvtare set as USED and NOT CORE. All the pixels belong63 // are in MSignalCam are set as USED and NOT CORE. All the pixels belong 64 64 // to RING number 1 (like USED pixels). 65 // Look at M CerPhotPix.h to see how these informations of the pixel are65 // Look at MSignalPix.h to see how these informations of the pixel are 66 66 // stored. 67 67 // The default cleaning METHOD is the STANDARD one and the number of the … … 84 84 // This avoids problems of deformations of the shower images. 85 85 // The signal S_i and the pedestal RMS Prms_i of the pixel are called from 86 // the object M CerPhotPix.86 // the object MSignalPix. 87 87 // If (default method = kStandard) 88 88 //Begin_Html … … 281 281 // MGeomCam 282 282 // MPedPhotCam 283 // M CerPhotEvt283 // MSignalCam 284 284 // 285 285 // Output Containers: 286 // M CerPhotEvt286 // MSignalCam 287 287 // 288 288 ///////////////////////////////////////////////////////////////////////////// … … 307 307 #include "MGeomCam.h" 308 308 309 #include "M CerPhotPix.h"310 #include "M CerPhotEvt.h"309 #include "MSignalPix.h" 310 #include "MSignalCam.h" 311 311 312 312 #include "MGGroupFrame.h" // MGGroupFrame … … 325 325 326 326 const TString MImgCleanStd::gsNamePedPhotCam="MPedPhotCam"; // default name of the 'MPedPhotCam' container 327 const TString MImgCleanStd::gsName CerPhotEvt="MCerPhotEvt"; // default name of the 'MCerPhotEvt' container327 const TString MImgCleanStd::gsNameSignalCam ="MSignalCam"; // default name of the 'MSignalCam' container 328 328 const TString MImgCleanStd::gsNameGeomCam ="MGeomCam"; // default name of the 'MGeomCam' container 329 329 … … 341 341 fCleanLvl2(lvl2), fCleanRings(1), fKeepSinglePixels(kFALSE), 342 342 fNamePedPhotCam(gsNamePedPhotCam), fNameGeomCam(gsNameGeomCam), 343 fName CerPhotEvt(gsNameCerPhotEvt)343 fNameSignalCam(gsNameSignalCam) 344 344 { 345 345 fName = name ? name : gsDefName.Data(); … … 374 374 // set them to 'unused' state if necessary 375 375 // 376 MCerPhotPix *pix; 377 378 // Loop over all pixels 379 MCerPhotEvtIter Next(fEvt, kFALSE); 380 while ((pix=static_cast<MCerPhotPix*>(Next()))) 381 if (!pix->IsPixelUnmapped() && data[pix->GetPixId()] <= fCleanLvl1) 382 pix->SetPixelUnused(); 376 const UInt_t npixevt = fEvt->GetNumPixels(); 377 for (UInt_t idx=0; idx<npixevt; idx++) 378 { 379 if (data[idx]>fCleanLvl1) 380 continue; 381 382 MSignalPix &pix = (*fEvt)[idx]; 383 if (!pix.IsPixelUnmapped()) 384 pix.SetPixelUnused(); 385 } 383 386 } 384 387 … … 395 398 size = 0; 396 399 397 MCerPhotPix *pix; 398 399 // Loop over used pixels only 400 TIter Next(*fEvt); 401 402 while ((pix=static_cast<MCerPhotPix*>(Next()))) 403 { 404 // get pixel id of this entry 405 const Int_t idx = pix->GetPixId(); 400 const UInt_t npixevt = fEvt->GetNumPixels(); 401 for (UInt_t idx=0; idx<npixevt; idx++) 402 { 403 MSignalPix &pix = (*fEvt)[idx]; 404 if (!pix.IsPixelUsed()) 405 continue; 406 406 407 407 // check for 'used' neighbors of this pixel … … 427 427 { 428 428 if (!fKeepSinglePixels) 429 pix ->SetPixelUnused();430 size += pix ->GetNumPhotons();429 pix.SetPixelUnused(); 430 size += pix.GetNumPhotons(); 431 431 n++; 432 432 } 433 433 } 434 434 435 Next.Reset();436 while ((pix=static_cast<MCerPhotPix*>(Next())))437 {438 if (pix ->IsPixelUsed())439 pix ->SetPixelCore();435 for (UInt_t idx=0; idx<npixevt; idx++) 436 { 437 MSignalPix &pix = (*fEvt)[idx]; 438 if (pix.IsPixelUsed()) 439 pix.SetPixelCore(); 440 440 } 441 441 … … 443 443 } 444 444 445 void MImgCleanStd::CleanStep3b( MCerPhotPix &pix)446 { 447 const Int_t idx = pix.GetPixId();445 void MImgCleanStd::CleanStep3b(Int_t idx) 446 { 447 MSignalPix &pix = (*fEvt)[idx]; 448 448 449 449 // … … 475 475 // If a value<2 for fCleanRings is used, no CleanStep4 is done. 476 476 // 477 void MImgCleanStd::CleanStep4(UShort_t r, MCerPhotPix &pix) 478 { 477 void MImgCleanStd::CleanStep4(UShort_t r, Int_t idx/*MSignalPix &pix*/) 478 { 479 MSignalPix &pix = (*fEvt)[idx]; 480 479 481 // 480 482 // Skip events that have already a defined status; … … 488 490 // and tell to which ring it belongs to. 489 491 // 490 const Int_t idx = pix.GetPixId();491 492 492 MGeomPix &gpix = (*fCam)[idx]; 493 493 … … 498 498 const Int_t idx2 = gpix.GetNeighbor(j); 499 499 500 M CerPhotPix *npix = fEvt->GetPixById(idx2);500 MSignalPix *npix = fEvt->GetPixById(idx2); 501 501 if (!npix || !npix->IsPixelUsed() || npix->GetRing()>r-1 ) 502 502 continue; … … 519 519 for (UShort_t r=1; r<fCleanRings+1; r++) 520 520 { 521 MCerPhotPix *pix;522 523 521 // Loop over all pixels 524 525 MCerPhotEvtIter NextAll(fEvt, kFALSE); 526 while ((pix=static_cast<MCerPhotPix*>(NextAll()))) 522 const UInt_t npixevt = fEvt->GetNumPixels(); 523 for (UInt_t idx=0; idx<npixevt; idx++) 527 524 { 525 MSignalPix &pix = (*fEvt)[idx]; 526 528 527 // 529 528 // if pixel is a core pixel or unmapped, go to the next pixel 530 529 // 531 if (pix ->IsPixelCore() || pix->IsPixelUnmapped())530 if (pix.IsPixelCore() || pix.IsPixelUnmapped()) 532 531 continue; 533 532 534 if (data[ pix->GetPixId()] <= fCleanLvl2)533 if (data[idx] <= fCleanLvl2) 535 534 continue; 536 535 537 536 if (r==1) 538 CleanStep3b( *pix);537 CleanStep3b(idx); 539 538 else 540 CleanStep4(r, *pix);539 CleanStep4(r, idx); 541 540 } 542 541 } … … 557 556 } 558 557 559 fEvt = (M CerPhotEvt*)pList->FindObject(AddSerialNumber(fNameCerPhotEvt), "MCerPhotEvt");558 fEvt = (MSignalCam*)pList->FindObject(AddSerialNumber(fNameSignalCam), "MSignalCam"); 560 559 if (!fEvt) 561 560 { 562 *fLog << err << fName CerPhotEvt << " [MCerPhotEvt] not found... aborting." << endl;561 *fLog << err << fNameSignalCam << " [MSignalCam] not found... aborting." << endl; 563 562 return kFALSE; 564 563 } … … 570 569 return kFALSE; 571 570 } 572 573 fTime = (MArrivalTime*)pList->FindObject(AddSerialNumber("MArrivalTime"));574 if (!fTime && fCleaningMethod==kProbability)575 *fLog << warn << "MArrivalTime not found... probability cleaning done with signal only!" << endl;576 571 577 572 fData = (MCameraData*)pList->FindCreateObj(AddSerialNumber("MCameraData")); … … 602 597 break; 603 598 case kProbability: 604 fData->CalcCleaningProbability(*fEvt, *fPed, *fCam , fTime);599 fData->CalcCleaningProbability(*fEvt, *fPed, *fCam); 605 600 break; 606 601 case kAbsolute: … … 819 814 if (gsNameGeomCam!=fNameGeomCam) 820 815 out << " " << GetUniqueName() << ".SetNameGeomCam(\"" << fNameGeomCam << "\");" << endl; 821 if (gsName CerPhotEvt!=fNameCerPhotEvt)822 out << " " << GetUniqueName() << ".SetName CerPhotEvt(\"" << fNameCerPhotEvt<< "\");" << endl;816 if (gsNameSignalCam!=fNameSignalCam) 817 out << " " << GetUniqueName() << ".SetNameSignalCam(\"" << fNameSignalCam << "\");" << endl; 823 818 if (fKeepSinglePixels) 824 819 out << " " << GetUniqueName() << ".SetKeepSinglePixels();" << endl; -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.h
r6489 r6855 8 8 class MGeomCam; 9 9 class MSigmabar; 10 class MCerPhotPix; 11 class MCerPhotEvt; 10 class MSignalCam; 12 11 class MPedPhotCam; 13 12 class MArrivalTime; … … 30 29 static const TString gsNamePedPhotCam; // default name of the 'MPedPhotCam' container 31 30 static const TString gsNameGeomCam; // default name of the 'MGeomCam' container 32 static const TString gsName CerPhotEvt; // default name of the 'MCerPhotEvt' container31 static const TString gsNameSignalCam; // default name of the 'MSignalCam' container 33 32 34 33 const MGeomCam *fCam; //! 35 M CerPhotEvt*fEvt; //!34 MSignalCam *fEvt; //! 36 35 MPedPhotCam *fPed; //! 37 MArrivalTime *fTime; //!38 36 MCameraData *fData; //! 39 37 … … 48 46 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container 49 47 TString fNameGeomCam; // name of the 'MGeomCam' container 50 TString fName CerPhotEvt; // name of the 'MCerPhotEvt' container48 TString fNameSignalCam; // name of the 'MSignalCam' container 51 49 52 50 // MImgCleanStd … … 54 52 Short_t CleanStep2(Float_t &size); 55 53 void CleanStep3(); 56 void CleanStep3b( MCerPhotPix &pix);57 void CleanStep4(UShort_t r, MCerPhotPix &pix);54 void CleanStep3b(Int_t idx); 55 void CleanStep4(UShort_t r, Int_t idx); 58 56 59 57 // MGTask, MTask, MParContainer … … 81 79 82 80 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; } 83 void SetName CerPhotEvt(const char *name) { fNameCerPhotEvt= name; }81 void SetNameSignalCam(const char *name) { fNameSignalCam = name; } 84 82 void SetNameGeomCam(const char *name) { fNameGeomCam = name; } 85 83 -
trunk/MagicSoft/Mars/mimage/MNewImagePar.cc
r4826 r6855 77 77 #include "MGeomPix.h" 78 78 79 #include "M CerPhotEvt.h"80 #include "M CerPhotPix.h"79 #include "MSignalCam.h" 80 #include "MSignalPix.h" 81 81 82 82 ClassImp(MNewImagePar); … … 121 121 // Calculation of new image parameters 122 122 // 123 void MNewImagePar::Calc(const MGeomCam &geom, const M CerPhotEvt&evt,123 void MNewImagePar::Calc(const MGeomCam &geom, const MSignalCam &evt, 124 124 const MHillas &hillas, Int_t island) 125 125 { … … 141 141 Float_t maxpix2 = 0; // [#phot] 142 142 143 MCerPhotPix *pix = 0;144 143 /* 144 MSignalPix *pix = 0; 145 145 TIter Next(evt); 146 while ((pix=(MCerPhotPix*)Next())) 146 while ((pix=(MSignalPix*)Next())) 147 */ 148 UInt_t npix = evt.GetNumPixels(); 149 for (UInt_t i=0; i<npix; i++) 147 150 { 151 const MSignalPix &pix = evt[i]; 152 if (!pix.IsPixelUsed()) 153 continue; 154 148 155 // Check for requested islands 149 if (island>=0 && pix ->GetIdxIsland()!=island)156 if (island>=0 && pix.GetIdxIsland()!=island) 150 157 continue; 151 158 152 159 // Get geometry of pixel 153 const Int_t pixid = pix->GetPixId();154 const MGeomPix &gpix = geom[ pixid];160 //const Int_t pixid = pix->GetPixId(); 161 const MGeomPix &gpix = geom[i/*pixid*/]; 155 162 156 163 // count used and core pixels 157 if (pix ->IsPixelCore())164 if (pix.IsPixelCore()) 158 165 { 159 166 fNumCorePixels++; … … 165 172 fUsedArea += gpix.GetA(); 166 173 167 Double_t nphot = pix ->GetNumPhotons();174 Double_t nphot = pix.GetNumPhotons(); 168 175 169 176 // … … 179 186 // must take pixel size into account 180 187 // 181 nphot *= geom.GetPixRatio( pixid);188 nphot *= geom.GetPixRatio(i/*pixid*/); 182 189 183 190 // count inner pixels: To dependent on MAGIC Camera --> FIXME 184 191 185 if ( pixid<397){192 if (i<397){ 186 193 fInnerSize += nphot; 187 if( pixid>270){194 if(i>270){ 188 195 edgepixin2 += nphot; 189 if( pixid>330)196 if(i>330) 190 197 edgepixin1 += nphot; 191 198 } -
trunk/MagicSoft/Mars/mimage/MNewImagePar.h
r4710 r6855 8 8 class MHillas; 9 9 class MGeomCam; 10 class M CerPhotEvt;10 class MSignalCam; 11 11 12 12 class MNewImagePar : public MParContainer … … 53 53 void Print(const MGeomCam &geom) const; 54 54 55 void Calc(const MGeomCam &geom, const M CerPhotEvt&evt,55 void Calc(const MGeomCam &geom, const MSignalCam &evt, 56 56 const MHillas &hillas, Int_t island=-1); 57 57 -
trunk/MagicSoft/Mars/mimage/Makefile
r6848 r6855 19 19 # connect the include files defined in the config.mk file 20 20 # 21 INCLUDES = -I. -I../mbase -I../mhbase -I../mgeom -I../m analysis\21 INCLUDES = -I. -I../mbase -I../mhbase -I../mgeom -I../msignal \ 22 22 -I../mgui -I../mmc -I../mpointing -I../mpedestal \ 23 -I../mhist 23 -I../mhist -I../manalysis 24 24 25 25 # mhist: MHHillas (MHCamera) … … 32 32 MHillasExt.cc \ 33 33 MHillasCalc.cc \ 34 MHillasSrcCalc.cc \35 34 MImagePar.cc \ 36 35 MNewImagePar.cc \
Note:
See TracChangeset
for help on using the changeset viewer.