Changeset 1574 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 11/04/02 10:06:08 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
r1496 r1574 93 93 Bool_t MBlindPixelCalc::PreProcess (MParList *pList) 94 94 { 95 fPixels = (MBlindPixels*)pList->FindCreateObj("MBlindPixels"); 95 if (TESTBIT(fFlags, kUseBlindPixels)) 96 fPixels = (MBlindPixels*)pList->FindObject("MBlindPixels"); 97 else 98 fPixels = (MBlindPixels*)pList->FindCreateObj("MBlindPixels"); 96 99 if (!fPixels) 97 100 return kFALSE; … … 106 109 fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam"); 107 110 if (!fGeomCam) 108 *fLog << warn << dbginf << "No camera geometry available... can't ude interpolation." << endl; 111 *fLog << warn << dbginf << "No camera geometry available... can't use interpolation." << endl; 112 113 if (TESTBIT(fFlags, kUseBlindPixels)) 114 return kTRUE; 109 115 110 116 const UShort_t size = fPixelsID.GetSize(); … … 162 168 Int_t num = TESTBIT(fFlags, kUseCentralPixel) ? 1 : 0; 163 169 164 nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fEvt)[id].GetNumPhotons() : 0;165 perr[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fEvt)[id].GetErrorPhot() : 0;170 nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetNumPhotons() : 0; 171 perr[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetErrorPhot() : 0; 166 172 for (int j=0; j<n; j++) 167 173 { … … 171 177 continue; 172 178 173 nphot[i] += (*fEvt)[nid].GetNumPhotons(); 174 perr[i] += (*fEvt)[nid].GetErrorPhot(); 175 179 const MCerPhotPix *evtpix = fEvt->GetPixById(nid); 180 if (evtpix) 181 { 182 nphot[i] += evtpix->GetNumPhotons(); 183 perr[i] += evtpix->GetErrorPhot(); 184 } 176 185 num++; 177 186 } … … 253 262 Bool_t MBlindPixelCalc::ReInit(MParList *pList) 254 263 { 264 if (TESTBIT(fFlags, kUseBlindPixels)) 265 return kTRUE; 266 255 267 // 256 268 // If pixels are given by the user, we are already done -
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h
r1572 r1574 28 28 { 29 29 kUseInterpolation = 1, 30 kUseCentralPixel = 2 30 kUseCentralPixel = 2, 31 kUseBlindPixels = 3 31 32 }; 32 33 … … 46 47 b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel); 47 48 } 49 void SetUseBlindPixels(Bool_t b=kTRUE) 50 { 51 b ? SETBIT(fFlags, kUseBlindPixels) : CLRBIT(fFlags, kUseBlindPixels); 52 } 48 53 49 54 Bool_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/manalysis/MCameraSmooth.cc
r1568 r1574 111 111 const Int_t n = gpix.GetNumNeighbors(); 112 112 113 photons[i] = fUseCentralPixel ? (*fEvt)[id].GetNumPhotons() : 0; 114 errors[i] = fUseCentralPixel ? (*fEvt)[id].GetErrorPhot() : 0; 113 Int_t num = fUseCentralPixel ? 1 : 0; 114 photons[i] = fUseCentralPixel ? pix.GetNumPhotons() : 0; 115 errors[i] = fUseCentralPixel ? pix.GetErrorPhot() : 0; 116 115 117 for (int j=0; j<n; j++) 116 118 { 117 119 const UShort_t nid = gpix.GetNeighbor(j); 118 120 119 photons[i] += (*fEvt)[nid].GetNumPhotons(); 120 errors[i] += (*fEvt)[nid].GetErrorPhot(); 121 const MCerPhotPix *evtpix = fEvt->GetPixById(nid); 122 if (evtpix) 123 { 124 photons[i] += evtpix->GetNumPhotons(); 125 errors[i] += evtpix->GetErrorPhot(); 126 } 127 num++; 121 128 } 122 129 123 photons[i] /= fUseCentralPixel ? n+1 : n;124 errors[i] /= fUseCentralPixel ? n+1 : n;130 photons[i] /= num; 131 errors[i] /= num; 125 132 } 126 133 -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r1540 r1574 306 306 } 307 307 308 // -------------------------------------------------------------------------- 309 // 310 // Return a pointer to the pixel with the requested id. NULL if it doesn't 311 // exist. 312 // 313 MCerPhotPix *MCerPhotEvt::GetPixById(int id) const 314 { 315 TIter Next(fPixels); 316 MCerPhotPix *pix = NULL; 317 318 while ((pix=(MCerPhotPix*)Next())) 319 if (pix->GetPixId()==id) 320 return pix; 321 322 return NULL; 323 } -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r1540 r1574 47 47 MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); } 48 48 49 MCerPhotPix *GetPixById(int id) const; 50 49 51 void Reset(); 50 52 -
trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc
r1571 r1574 77 77 // - MHCompProb 78 78 // - all data values which were used to build the MHCompProb 79 // - MHadron ess79 // - MHadronness 80 80 // 81 81 Bool_t MCompProbCalc::PreProcess(MParList *plist) … … 136 136 // - For all data members multiply the probabilities. 137 137 // - For normalization take the n-th root of the result. 138 // - This is the hadroness stored in the MHadron ess container138 // - This is the hadroness stored in the MHadronness container 139 139 // 140 140 Bool_t MCompProbCalc::Process() -
trunk/MagicSoft/Mars/manalysis/MCompProbCalc.h
r1571 r1574 13 13 { 14 14 private: 15 MHadronness *fHadronness; //! Output container (Hadron ess)15 MHadronness *fHadronness; //! Output container (Hadronness) 16 16 17 17 TList *fData; //! List of MDataChains to be used -
trunk/MagicSoft/Mars/manalysis/MHillasExt.cc
r1540 r1574 39 39 // 40 40 // WARNING: Before you can use fAsym, fM3Long and fM3Trans you must 41 // multiply by the sign of MHillasSrc::fCos AlphaDelta41 // multiply by the sign of MHillasSrc::fCosDeltaAlpha 42 42 // 43 43 ////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.