Changeset 2298 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 08/01/03 14:44:13 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
r2296 r2298 78 78 #include "MCerPhotPix.h" 79 79 #include "MCerPhotEvt.h" 80 #include "MPedestalPix.h" 81 #include "MPedestalCam.h" 80 82 #include "MBlindPixels.h" 81 83 … … 122 124 return kFALSE; 123 125 } 126 fPed = (MPedestalCam*)pList->FindObject("MPedestalCam"); 127 if (!fEvt) 128 { 129 *fLog << err << dbginf << "MPedestalCam not found... aborting." << endl; 130 return kFALSE; 131 } 124 132 125 133 fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam"); … … 165 173 Double_t *nphot = new Double_t[entries]; 166 174 Double_t *perr = new Double_t[entries]; 175 Double_t *ped = new Double_t[entries]; 167 176 168 177 // … … 185 194 186 195 nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetNumPhotons() : 0; 187 perr[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetErrorPhot() : 0; 196 perr[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fPed)[idx].GetPedestalRms() : 0; 197 ped[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fPed)[idx].GetPedestal() : 0; 188 198 189 199 nphot[i] *= fGeomCam->GetPixRatio(idx); 190 // FIXME: perr[i] ??? 200 // FIXME? perr 201 // FIXME? ped 191 202 192 203 const Int_t n = gpix.GetNumNeighbors(); … … 199 210 200 211 const MCerPhotPix *evtpix = fEvt->GetPixById(nidx); 201 if (evtpix) 202 { 203 nphot[i] += evtpix->GetNumPhotons()*fGeomCam->GetPixRatio(nidx); 204 perr[i] += evtpix->GetErrorPhot(); 205 // FIXME: perr[i] ??? 206 num++; 207 } 212 if (!evtpix) 213 continue; 214 215 nphot[i] += evtpix->GetNumPhotons()*fGeomCam->GetPixRatio(nidx); 216 perr[i] += (*fPed)[nidx].GetPedestalRms(); 217 ped[i] += (*fPed)[nidx].GetPedestal(); 218 // FIXME? perr 219 // FIXME? ped 220 221 num++; 208 222 } 209 223 210 224 nphot[i] /= num*fGeomCam->GetPixRatio(idx); 211 225 perr[i] /= num/*FIXME:???*/; 226 ped[i] /= num/*FIXME:???*/; 212 227 } 213 228 … … 218 233 219 234 if (fPixels->IsBlind(pix.GetPixId())) 220 pix.Set(nphot[i], perr[i]); 235 { 236 pix.Set(nphot[i], -1); 237 (*fPed)[pix.GetPixId()].Set(ped[i], perr[i]); 238 } 221 239 } 222 240 223 241 delete nphot; 224 242 delete perr; 243 delete ped; 225 244 } 226 245 -
trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h
r2274 r2298 11 11 12 12 class MGeomCam; 13 class MPedestal; 13 14 class MCerPhotEvt; 14 15 class MBlindPixels; 16 class MPedestalCam; 15 17 16 18 class MBlindPixelCalc : public MTask … … 20 22 MBlindPixels *fPixels; //! 21 23 MGeomCam *fGeomCam; //! 24 MPedestalCam *fPed; //! 22 25 23 26 TArrayS fPixelsIdx; // Pixel Indices for blind pixels, which are entered by the user.
Note:
See TracChangeset
for help on using the changeset viewer.