Changeset 1574 for trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
- Timestamp:
- 11/04/02 10:06:08 (22 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.