Changeset 3526
- Timestamp:
- 03/16/04 18:50:24 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/ImageLinkDef.h
r2567 r3526 16 16 17 17 #pragma link C++ class MNewImagePar+; 18 #pragma link C++ class MConcentration+; 18 19 19 20 #pragma link C++ class MHHillas+; -
trunk/MagicSoft/Mars/mimage/MHillasCalc.cc
r3474 r3526 65 65 #include "MHillasExt.h" 66 66 #include "MNewImagePar.h" 67 67 #include "MConcentration.h" 68 68 #include "MCerPhotEvt.h" 69 69 … … 81 81 MHillasCalc::MHillasCalc(const char *name, const char *title) 82 82 : fHilName("MHillas"), fHilExtName("MHillasExt"), 83 fImgParName("MNewImagePar"), fFlags(0xff), fErrors(5) 83 fImgParName("MNewImagePar"), fConcName("MConcentration"), 84 fFlags(0xff), fErrors(5) 84 85 { 85 86 fName = name ? name : "MHillasCalc"; … … 139 140 } 140 141 141 memset(fErrors.GetArray(), 0, sizeof(Char_t)*fErrors.GetSize()); 142 // if enabled 143 if (TestFlag(kCalcConc)) 144 { 145 fConc = (MConcentration*)pList->FindCreateObj("MConcentration", fConcName); 146 if (!fConc) 147 return kFALSE; 148 } 149 150 memset(fErrors.GetArray(), 0, sizeof(Char_t)*fErrors.GetSize()); 142 151 143 152 return kTRUE; … … 171 180 if (TestFlag(kCalcNewImagePar)) 172 181 fNewImgPar->Calc(*fGeomCam, *fCerPhotEvt, *fHillas); 182 183 if (TestFlag(kCalcConc)) 184 fConc->Calc(*fGeomCam, *fCerPhotEvt, *fHillas); 173 185 174 186 return kTRUE; -
trunk/MagicSoft/Mars/mimage/MHillasCalc.h
r2455 r3526 22 22 class MHillasExt; 23 23 class MNewImagePar; 24 class MConcentration; 24 25 25 26 class MHillasCalc : public MTask … … 31 32 MHillasExt *fHillasExt; //! output container to store result 32 33 MNewImagePar *fNewImgPar; //! output container to store result 34 MConcentration *fConc; //! output container to store result 33 35 34 36 TString fHilName; // name of the 'MHillas' container 35 37 TString fHilExtName; // name of the 'MHillasExt' container 36 38 TString fImgParName; // name of the 'MNewImagePar' container 39 TString fConcName; // name of the 'MConcentration' container 37 40 38 41 Int_t fFlags; // Flags defining the behaviour of MHillasCalc … … 51 54 kCalcHillasExt = BIT(1), 52 55 //kCalcHillasSrc = BIT(2), 53 kCalcNewImagePar = BIT(3) 56 kCalcNewImagePar = BIT(3), 57 kCalcConc = BIT(4) 54 58 }; 55 59 … … 59 63 void SetNameHillasExt(const char *name) { fHilExtName = name; } 60 64 void SetNameNewImgPar(const char *name) { fImgParName = name; } 65 void SetNameConc(const char *name) { fConcName = name; } 61 66 62 67 void SetFlags(Int_t f) { fFlags = f; } -
trunk/MagicSoft/Mars/mimage/MNewImagePar.cc
r3520 r3526 116 116 Double_t edgepixin2 = 0; 117 117 118 Float_t maxpix[9] = {0,0,0,0,0,0,0,0,0}; // [#phot]119 118 Float_t maxpix1 = 0; // [#phot] 120 119 Float_t maxpix2 = 0; // [#phot] … … 171 170 } 172 171 } 173 174 // Compute Concentrations 1-8175 176 if(maxpix[0]<=nphot) {177 for(int i=0;i<8;i++)178 maxpix[8-i]=maxpix[7-i];179 maxpix[0]=nphot;180 }181 else182 for(int i=0;i<8;i++){183 if (nphot<maxpix[7-i]){184 for(int j=0;j<i-1;j++){185 maxpix[7-j]=maxpix[6-j]; // [1]186 }187 maxpix[8-i]=nphot;188 break;189 }190 }191 172 192 173 // Compute Concetration 1 -2 … … 211 192 fConc1 = maxpix1/hillas.GetSize(); // [ratio] 212 193 213 fConc3 = (maxpix[0]+maxpix[1]+maxpix[2]);214 fConc4 = (fConc3+maxpix[3]);215 fConc5 = (fConc4+maxpix[4]);216 fConc6 = (fConc5+maxpix[5]);217 fConc7 = (fConc6+maxpix[6]);218 fConc8 = (fConc7+maxpix[7]);219 220 fConc3/=hillas.GetSize(); // [ratio]221 fConc4/=hillas.GetSize(); // [ratio]222 fConc5/=hillas.GetSize(); // [ratio]223 fConc6/=hillas.GetSize(); // [ratio]224 fConc7/=hillas.GetSize(); // [ratio]225 fConc8/=hillas.GetSize(); // [ratio]226 227 194 SetReadyToSave(); 228 195 } -
trunk/MagicSoft/Mars/mimage/MNewImagePar.h
r3520 r3526 21 21 Float_t fConc; // [ratio] concentration ratio: sum of the two highest pixels / fSize 22 22 Float_t fConc1; // [ratio] concentration ratio: sum of the highest pixel / fSize 23 Float_t fConc3; // [ratio] concentration ratio: sum of the 3 highest pixel / fSize24 Float_t fConc4; // [ratio] concentration ratio: sum of the 4 highest pixel / fSize25 Float_t fConc5; // [ratio] concentration ratio: sum of the 5 highest pixel / fSize26 Float_t fConc6; // [ratio] concentration ratio: sum of the 6 highest pixel / fSize27 Float_t fConc7; // [ratio] concentration ratio: sum of the 7 highest pixel / fSize28 Float_t fConc8; // [ratio] concentration ratio: sum of the 8 highest pixel / fSize29 23 30 24 Short_t fNumUsedPixels; // Number of pixels which survived the image cleaning -
trunk/MagicSoft/Mars/mimage/Makefile
r2800 r3526 37 37 MHillasSrcCalc.cc \ 38 38 MNewImagePar.cc \ 39 MConcentration.cc \ 39 40 MHHillas.cc \ 40 41 MHHillasSrc.cc \
Note:
See TracChangeset
for help on using the changeset viewer.