Changeset 13001 for trunk/Mars
- Timestamp:
- 03/07/12 16:25:53 (13 years ago)
- Location:
- trunk/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mhist/MHCamera.cc
r12921 r13001 1359 1359 // Call this function to add a MCamEvent on top of the present contents. 1360 1360 // 1361 void MHCamera::AddMeanShift(const MCamEvent &event, Int_t type )1361 void MHCamera::AddMeanShift(const MCamEvent &event, Int_t type, Stat_t w) 1362 1362 { 1363 1363 if (fNcells<=1 || IsFreezed()) … … 1373 1373 { 1374 1374 SetUsed(idx); 1375 Fill(idx, val-mean); // FIXME: Slow!1375 Fill(idx, (val-mean)*w); // FIXME: Slow! 1376 1376 } 1377 1377 } … … 1383 1383 // Call this function to add a MCamEvent on top of the present contents. 1384 1384 // 1385 void MHCamera::AddMedianShift(const MCamEvent &event, Int_t type )1385 void MHCamera::AddMedianShift(const MCamEvent &event, Int_t type, Stat_t w) 1386 1386 { 1387 1387 if (fNcells<=1 || IsFreezed()) … … 1397 1397 { 1398 1398 SetUsed(idx); 1399 Fill(idx, val-median); // FIXME: Slow!1399 Fill(idx, (val-median)*w); // FIXME: Slow! 1400 1400 } 1401 1401 } … … 1407 1407 // Call this function to add a MCamEvent on top of the present contents. 1408 1408 // 1409 void MHCamera::AddCamContent(const MCamEvent &event, Int_t type )1409 void MHCamera::AddCamContent(const MCamEvent &event, Int_t type, Stat_t w) 1410 1410 { 1411 1411 if (fNcells<=1 || IsFreezed()) … … 1419 1419 { 1420 1420 SetUsed(idx); 1421 Fill(idx, val ); // FIXME: Slow!1421 Fill(idx, val*w); // FIXME: Slow! 1422 1422 } 1423 } 1424 fEntries++; 1425 } 1426 1427 // ------------------------------------------------------------------------ 1428 // 1429 void MHCamera::AddCamDifference(const MCamEvent &event1, const MCamEvent &event2, Int_t type) 1430 { 1431 if (fNcells<=1 || IsFreezed()) 1432 return; 1433 1434 // FIXME: Security check missing! 1435 for (Int_t idx=0; idx<fNcells-2; idx++) 1436 { 1437 Double_t val1=0; 1438 if (!event1.GetPixelContent(val1, idx, *fGeomCam, type)) 1439 continue; 1440 1441 Double_t val2=0; 1442 if (!event2.GetPixelContent(val2, idx, *fGeomCam, type)) 1443 continue; 1444 1445 SetUsed(idx); 1446 Fill(idx, val1-val2); // FIXME: Slow! 1423 1447 } 1424 1448 fEntries++; -
trunk/Mars/mhist/MHCamera.h
r12921 r13001 163 163 164 164 virtual Double_t GetPixContent(Int_t idx) const { return GetBinContent(idx+1); } 165 virtual void AddCamContent(const MCamEvent &evt, Int_t type=0); 165 virtual void AddCamDifference(const MCamEvent &evt, const MCamEvent &evt2, Int_t type=0); 166 virtual void AddCamContent(const MCamEvent &evt, Int_t type=0, Stat_t weight=1); 166 167 virtual void AddCamContent(const MHCamera &evt, Int_t type=0); 167 168 virtual void AddCamContent(const TArrayD &arr, const TArrayC *used=NULL); … … 175 176 virtual void SetUsed(const TArrayC &arr); 176 177 177 virtual void AddMedianShift(const MCamEvent &evt, Int_t type=0 );178 virtual void AddMeanShift(const MCamEvent &evt, Int_t type=0 );178 virtual void AddMedianShift(const MCamEvent &evt, Int_t type=0, Stat_t weight=1); 179 virtual void AddMeanShift(const MCamEvent &evt, Int_t type=0, Stat_t weight=1); 179 180 180 181 virtual void CntCamContent(const MCamEvent &evt, Double_t threshold, Int_t type=0, Bool_t isabove=kTRUE);
Note:
See TracChangeset
for help on using the changeset viewer.