Changeset 8158
- Timestamp:
- 10/24/06 13:40:58 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8157 r8158 29 29 * mextralgo/MExtralgoSpline.[h,cc]: 30 30 - removed the random iterator, use a random number instead 31 - removed obsolete variable fResolution 31 32 32 33 * mjobs/MJCalibrateSignal.cc, mjobs/MJCalibration.cc, … … 46 47 - removed memcpy stuff, instead use the output of MExtractPedestal 47 48 - get the window size automatically from a possible extractor 49 - simplified InitBlindPixel 48 50 49 51 * mpedestal/Makefile, mpedestal/PedestalLinkDef.h: … … 87 89 - changed rise-time from 0.5 to 0.7 and fall time from 0.5 to 1.0 88 90 - removed obsolete data members 91 - removed fRandomIter 89 92 90 93 * msignal/MExtractedSignalPix.h: … … 117 120 * msignal/SignalIncl.h: 118 121 - removed obsolete includes 122 123 * msignal/MExtractBlindPixel.[h,cc]: 124 - changed according to the other changes 125 - removed a lot of obsolete variables 126 - changed interface to set blind pixel indices 127 - now directly use the spline extractor class 119 128 120 129 -
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc
r8154 r8158 50 50 #include "MExtralgoSpline.h" 51 51 52 #include <TRandom.h> 53 52 54 #include "../mbase/MMath.h" 53 55 … … 207 209 } 208 210 209 #include <TRandom.h> 210 Float_t MExtralgoSpline::ExtractNoise(Int_t iter) 211 { 211 Float_t MExtralgoSpline::ExtractNoise(/*Int_t iter*/) 212 { 213 // FIXME: Shell we keep the extraction inside one slice 214 // or randomize it along the extraction window? 212 215 const Float_t nsx = gRandom->Uniform(); //iter * fResolution; 213 216 … … 378 381 { 379 382 fTime = maxpos; 380 fTimeDev = fResolution;383 fTimeDev = 0; 381 384 fSignal = maxval; 382 385 fSignalDev = 0; // means: is valid … … 389 392 390 393 fTime = x1; 391 fTimeDev = fResolution;394 fTimeDev = 0; 392 395 fSignal = CalcIntegral(maxpos); 393 396 fSignalDev = 0; // means: is valid -
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h
r8154 r8158 30 30 Float_t fFallTime; 31 31 32 Float_t fResolution;32 // Float_t fResolution; 33 33 34 34 // Result … … 446 446 447 447 void SetRiseFallTime(Float_t rise, Float_t fall) { fRiseTime=rise; fFallTime=fall; } 448 void SetExtra tionType(ExtractionType_t typ){ fExtractionType = typ; }449 void SetResolution(Float_t res) { fResolution=res; }448 void SetExtractionType(ExtractionType_t typ) { fExtractionType = typ; } 449 // void SetResolution(Float_t res) { fResolution=res; } 450 450 451 451 Float_t GetTime() const { return fTime; } … … 458 458 void GetTime(Float_t &sig, Float_t &dsig) const { sig=fTime; dsig=fTimeDev; } 459 459 460 Float_t ExtractNoise( Int_t iter);460 Float_t ExtractNoise(/*Int_t iter*/); 461 461 void Extract(Byte_t sat, Int_t maxpos); 462 462 }; -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r8154 r8158 114 114 115 115 #include "MPedestalCam.h" 116 #include "MPedestalSubtract.h" 116 117 #include "MCalibColorSteer.h" 117 118 … … 1594 1595 MHCalibrationChargeBlindCam &blindcam) 1595 1596 { 1596 1597 Int_t run = fSequence.GetLastRun(); 1598 1599 // 1600 // Initialize the blind pixel. Unfortunately, there is a hardware difference 1601 // in the first blind pixel until run "gkSecondBlindPixelInstallation" and the 1602 // later setup. The first needs to use a filter because of the length of 1603 // spurious NSB photon signals. The latter get better along extracting the amplitude 1604 // from a small window. 1605 // 1606 if (run < gkSecondBlindPixelInstallation) 1607 { 1608 MCalibrationBlindCamOneOldStyle blindresults; 1609 if (IsIntensity()) 1597 const Int_t run = fSequence.GetLastRun(); 1598 1599 // 1600 // Initialize the blind pixel. Unfortunately, there is a hardware 1601 // difference in the first blind pixel until run 1602 // gkSecondBlindPixelInstallation and the later setup. The first 1603 // needs to use a filter because of the length of spurious NSB photon 1604 // signals. The latter get better along extracting the amplitude 1605 // from a small window. 1606 // 1607 const MCalibrationBlindCamOneOldStyle one; 1608 const MCalibrationBlindCamTwoNewStyle two; 1609 const MCalibrationBlindCamThreeNewStyle three; 1610 1611 const MCalibrationBlindCam &blindresults = 1612 run<gkSecondBlindPixelInstallation ? static_cast<MCalibrationBlindCam>(one) : 1613 (run<gkThirdBlindPixelInstallation ? static_cast<MCalibrationBlindCam>(two) : static_cast<MCalibrationBlindCam>(three)); 1614 1615 if (IsIntensity()) 1610 1616 blindresults.Copy(*fIntensBlindCam.GetCam()); 1611 1617 else 1612 1618 blindresults.Copy(fCalibrationBlindCam); 1613 1619 1614 blindext.SetExtractionType(MExtractBlindPixel::kIntegral); 1615 blindext.SetExtractionType(MExtractBlindPixel::kFilter); 1616 blindext.SetRange(10,19,0,6); 1617 blindext.SetNSBFilterLimit(70); 1618 } 1619 else if (run < gkThirdBlindPixelInstallation) 1620 { 1621 1622 MCalibrationBlindCamTwoNewStyle blindresults; 1623 1624 if (IsIntensity()) 1625 blindresults.Copy(*fIntensBlindCam.GetCam()); 1626 else 1627 blindresults.Copy(fCalibrationBlindCam); 1628 1629 blindext.SetNumBlindPixels(blindresults.GetSize()); 1630 for (Int_t i=0;i<blindresults.GetSize();i++) 1631 blindext.SetBlindPixelIdx(blindresults[i].GetPixId(),i); 1632 1633 blindext.SetExtractionType(MExtractBlindPixel::kAmplitude); 1634 blindext.SetExtractionType(MExtractBlindPixel::kFilter); 1635 blindext.SetRange(5,8,0,2); 1636 blindext.SetNSBFilterLimit(38); 1637 1638 } 1639 else 1640 { 1641 1642 MCalibrationBlindCamThreeNewStyle blindresults; 1643 1644 if (IsIntensity()) 1645 blindresults.Copy(*fIntensBlindCam.GetCam()); 1646 else 1647 blindresults.Copy(fCalibrationBlindCam); 1648 1649 blindext.SetNumBlindPixels(blindresults.GetSize()); 1650 1651 for (Int_t i=0;i<blindresults.GetSize();i++) 1652 blindext.SetBlindPixelIdx(blindresults[i].GetPixId(),i); 1653 1654 blindext.SetExtractionType(MExtractBlindPixel::kAmplitude); 1655 blindext.SetExtractionType(MExtractBlindPixel::kFilter); 1656 blindext.SetDataType(MExtractBlindPixel::kRawEvt2); 1657 blindext.SetRange(5,8,0,2); 1658 blindext.SetNSBFilterLimit(38); 1659 1660 } 1661 1620 blindext.SetExtractionType(MExtractBlindPixel::kIntegral); 1621 blindext.SetExtractionType(MExtractBlindPixel::kFilter); 1622 1623 if (run<gkSecondBlindPixelInstallation) 1624 { 1625 blindext.SetRange(10,19,0,6); 1626 blindext.SetNSBFilterLimit(70); 1627 } 1628 else 1629 { 1630 blindext.SetRange(5,8,0,2); 1631 blindext.SetNSBFilterLimit(38); 1632 } 1633 1634 if (run>=gkThirdBlindPixelInstallation) 1635 blindext.SetDataType(MExtractBlindPixel::kRawEvt2); 1662 1636 } 1663 1637 -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc
r8154 r8158 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1. 2 2006-10-24 08:18:07tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.3 2006-10-24 12:39:00 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 144 144 memcpy(sample+numh, pixel.GetLoGainSamples(), numl); 145 145 146 // if no pedestals are given we are finished 146 // start of destination array, end of hi-gain destination array 147 // and start of hi-gain samples 148 Float_t *beg = fSignal->GetSamples(pixidx); 149 Float_t *end = beg + fSignal->GetNumSamples(); 150 151 const Byte_t *src = sample; 152 153 // if no pedestals are given just convert the data into 154 // floats and we are finished 147 155 if (!fPedestals) 156 { 157 while (beg<end) 158 *beg++ = *src++; 148 159 continue; 160 } 149 161 150 162 // get pedestal information for this pixel … … 155 167 const Float_t ped = pedpix.GetPedestal(); 156 168 157 // start of destination array, end of hi-gain destination array158 // and start of hi-gain samples159 Float_t *beg = fSignal->GetSamples(pixidx);160 Float_t *end = beg + fSignal->GetNumSamples();161 162 169 // determine with which pedestal (+/- AB offset) to start 163 170 const Bool_t swap = (ab&1)==1; 164 171 const Float_t offh = swap ? -pedpix.GetPedestalABoffset() : pedpix.GetPedestalABoffset(); 165 172 const Float_t mean[2] = { ped + offh, ped - offh }; 166 167 const Byte_t *src = sample;168 173 169 174 // Copy hi-gains into array and substract pedestal -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h
r8154 r8158 56 56 } 57 57 58 Int_t GetIntegralRaw(Int_t idx, Int_t first, Int_t last) const 59 { 60 Byte_t *ptr = GetSamplesRaw(idx); 61 62 const Byte_t *end = ptr + last - first + 1; 63 64 Int_t sum = 0; 65 while (ptr<end) 66 sum += *ptr++; 67 68 return sum; 69 } 70 58 71 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; } 59 72 void DrawPixelContent(Int_t num) const { } -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r8155 r8158 61 61 #include "MRawEvtPixelIter.h" 62 62 63 #include "MPedestalSubtractedEvt.h" 63 64 #include "MExtractedSignalBlindPixel.h" 64 65 65 66 #include "MPedestalCam.h" 66 67 #include "MPedestalPix.h" 68 69 #include "MCalibrationBlindCam.h" 70 #include "MCalibrationBlindPix.h" 71 72 #include "MExtralgoSpline.h" 67 73 68 74 ClassImp(MExtractBlindPixel); … … 78 84 const Float_t MExtractBlindPixel::fgResolution = 0.003; 79 85 const Float_t MExtractBlindPixel::gkOverflow = 300.; 86 80 87 // -------------------------------------------------------------------------- 81 88 // … … 92 99 // 93 100 MExtractBlindPixel::MExtractBlindPixel(const char *name, const char *title) 94 : fBlindPixel(0), fHiLoLast(0),fDataType(0)101 : fBlindPixel(0), /*fHiLoLast(0),*/ fDataType(0) 95 102 { 96 103 … … 102 109 SetRange(fgHiGainFirst, fgHiGainLast, fgLoGainFirst, fgLoGainLast); 103 110 104 SetNumBlindPixels(); 111 // SetNumBlindPixels(); 112 fBlindPixelIdx.Set(1); 113 fBlindPixelIdx[0] = fgBlindPixelIdx; 105 114 106 115 Clear(); … … 128 137 fExtractionType = 0; 129 138 130 fBlindPixelIdx.Set(0); 131 SetBlindPixelIdx(); 139 fBlindPixelIdx.Set(1); 140 fBlindPixelIdx[0] = fgBlindPixelIdx; 141 } 142 143 void MExtractBlindPixel::SetBlindPixels(const MCalibrationBlindCam &cam) 144 { 145 const Int_t n = cam.GetSize(); 146 147 fBlindPixelIdx.Set(n); 148 for (Int_t i=0; i<n; i++) 149 fBlindPixelIdx[i] = cam[i].GetPixId(); 132 150 } 133 151 … … 138 156 139 157 fNumHiGainSamples = (Float_t)(fHiGainLast-fHiGainFirst+1); 140 if (lolast)141 fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst+1);142 else158 // if (lolast) 159 // fNumLoGainSamples = (Float_t)(fLoGainLast-fLoGainFirst+1); 160 // else 143 161 fNumLoGainSamples = 0.; 144 162 … … 146 164 fSqrtLoGainSamples = TMath::Sqrt(fNumLoGainSamples); 147 165 148 fHiLoFirst = 0;149 fHiLoLast = 0;166 //fHiLoFirst = 0; 167 //fHiLoLast = 0; 150 168 } 151 169 … … 170 188 return kFALSE; 171 189 172 if (IsDataType(kRawEvt2)) 173 fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData2")); 174 else 175 fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData")); 176 190 const TString raw = IsDataType(kRawEvt2) ? "MRawEvtData2" : "MRawEvtData"; 191 const TString sig = IsDataType(kRawEvt2) ? "MPedestalSubtractedEvt2" : "MPedestalSubtractedEvt"; 192 193 fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber(raw), "MRawEvtData"); 177 194 if (!fRawEvt) 178 195 { 179 *fLog << err << GetDescriptor() 180 << Form("%s%s",IsDataType(kRawEvt2) ? "MRawEvtData2" : "MRawEvtData", 181 " not found... aborting.") << endl; 196 *fLog << err << raw << " [MRawEvtData] not found... aborting." << endl; 182 197 return kFALSE; 183 198 } 199 200 fSignal = (MPedestalSubtractedEvt*)pList->FindObject(AddSerialNumber(sig), "MPedestalSubtractedEvt"); 201 if (!fSignal) 202 { 203 *fLog << err << sig << " [MPedestalSubtractedEvt] not found... aborting." << endl; 204 return kFALSE; 205 } 206 184 207 return kTRUE; 185 208 } … … 204 227 { 205 228 206 for ( Int_t i=0;i<fNumBlindPixels;i++)207 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(i),i);229 for (UInt_t i=0;i<fBlindPixelIdx.GetSize();i++) 230 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx[i], i); 208 231 209 232 fBlindPixel->SetExtractionType(fExtractionType); … … 223 246 } 224 247 } 225 248 /* 226 249 const Int_t higainsamples = fRunHeader->GetNumSamplesHiGain(); 227 250 const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain(); … … 265 288 fHiLoLast = logainsamples ? diff : 0; 266 289 } 267 268 const Int_t range = fHi LoFirst ? fHiLoLast - fHiLoFirst + 1 : fHiGainLast - fHiGainFirst + fHiLoLast + 1;269 270 fHiGainSignal.Set(range);271 fHiGainSignal.Reset();290 */ 291 const Int_t range = fHiGainLast-fHiGainFirst+1; //fHiLoFirst ? fHiLoLast - fHiLoFirst + 1 : fHiGainLast - fHiGainFirst + fHiLoLast + 1; 292 293 // fHiGainSignal.Set(range); 294 // fHiGainSignal.Reset(); 272 295 273 296 fHiGainFirstDeriv.Set(range); … … 280 303 *fLog << inf << "Extracting " 281 304 << (IsExtractionType(kAmplitude) ? "Amplitude" : " Integral") 282 << " using " << range << " FADC samples from " 283 << (fHiLoFirst ? "Low Gain slice" : " High Gain slice") 284 << (fHiLoFirst ? (Int_t)fHiLoFirst : (Int_t)fHiGainFirst) 285 << " to (including) " 286 << (fHiLoLast ? "Low Gain slice" : "High Gain slice") 287 << (fHiLoLast ? (Int_t)fHiLoLast-1 : (Int_t)fHiGainLast) 288 << endl; 305 << " using " << range << " FADC samples from slice " 306 << (Int_t)fHiGainFirst << " to " << (Int_t)fHiGainLast << " (incl)" << endl; 289 307 290 308 if (IsExtractionType(kFilter)) 291 309 *fLog << inf << "Will use Filter using " 292 310 << (Int_t)(fLoGainLast-fLoGainFirst+1) << " FADC slices" 293 << " from High Gainslice " << (Int_t)fLoGainFirst294 << " to High Gain slice" << (Int_t)fLoGainLast << endl;311 << " from slice " << (Int_t)fLoGainFirst 312 << " to " << (Int_t)fLoGainLast << endl; 295 313 296 314 fBlindPixel->SetUsedFADCSlices(fHiGainFirst, range); … … 303 321 // 304 322 // FindSignalHiGain: 323 // 324 // - Loop from ptr to (ptr+fHiGainLast-fHiGainFirst) 325 // - Sum up contents of *ptr 326 // - If *ptr is greater than fSaturationLimit, raise sat by 1 327 // - If fHiLoLast is set, loop from logain to (logain+fHiLoLast) 328 // - Add contents of *logain to sum 329 // 330 /* 331 void MExtractBlindPixel::FindIntegral(Byte_t *ptr, Byte_t *logain, Float_t &sum, Byte_t &sat) 332 { 333 const Byte_t *end = ptr + fHiGainLast - fHiGainFirst + 1; 334 335 Int_t summ = 0; 336 while (p<end) 337 { 338 summ += *ptr; 339 340 if (*ptr++ >= fSaturationLimit) 341 sat++; 342 } 343 344 sum = (Float_t)summ; 345 } 346 */ 347 348 // -------------------------------------------------------------------------- 349 // 350 // FindSignalPhe: 305 351 // 306 352 // - Loop from ptr to (ptr+fHiGainLast-fHiGainFirst) … … 310 356 // - Add contents of *logain to sum 311 357 // 312 void MExtractBlindPixel::FindIntegral(Byte_t *ptr, Byte_t *logain, Float_t &sum, Byte_t &sat) 313 { 314 315 Int_t summ = 0; 316 Byte_t *p = ptr; 317 Byte_t *end = ptr + fHiGainLast - fHiGainFirst + 1; 318 319 if (fHiLoFirst == 0) 320 { 321 322 while (p<end) 323 { 324 summ += *ptr; 325 326 if (*p++ >= fSaturationLimit) 327 sat++; 328 } 329 330 } 331 332 p = logain + fHiLoFirst; 333 end = logain + fHiLoLast; 334 while (p<end) 335 { 336 summ += *p; 337 338 if (*p++ >= fSaturationLimit) 339 sat++; 340 } 341 342 sum = (Float_t)summ; 343 } 344 345 // -------------------------------------------------------------------------- 346 // 347 // FindSignalPhe: 348 // 349 // - Loop from ptr to (ptr+fHiGainLast-fHiGainFirst) 350 // - Sum up contents of *ptr 351 // - If *ptr is greater than fSaturationLimit, raise sat by 1 352 // - If fHiLoLast is set, loop from logain to (logain+fHiLoLast) 353 // - Add contents of *logain to sum 354 // 355 void MExtractBlindPixel::FindAmplitude(Byte_t *ptr, Byte_t *logain, Float_t &sum, Byte_t &sat) 356 { 357 358 //void MExtractBlindPixel::FindAmplitude(Float_t *ptr, Byte_t *logain, Float_t &sum, Byte_t &sat) 359 Float_t MExtractBlindPixel::FindAmplitude(Int_t idx, Int_t numsat) const 360 { 361 Int_t sat0 = fHiGainFirst; // First slice to extract and first saturating slice 362 Int_t sat1 = fHiGainLast; // Last slice to extract and last saturating slice 363 364 Int_t maxcont; 365 Int_t maxpos = fSignal->GetMax(idx, sat0, sat1, maxcont); 366 367 // numsat = fSignal->GetSaturation(idx, fSaturationLimit, sat0, sat1); 368 369 const Float_t *ptr = fSignal->GetSamples(idx); 370 const Int_t num = fHiGainLast-fHiGainFirst+1; 371 372 MExtralgoSpline s(ptr, num, fHiGainFirstDeriv.GetArray(), fHiGainSecondDeriv.GetArray()); 373 374 s.SetExtractionType(MExtralgoSpline::kAmplitude); 375 376 s.Extract(numsat, maxpos); 377 378 return s.GetSignal(); 379 /* 358 380 Int_t range = 0; 359 381 Int_t count = 0; … … 586 608 } 587 609 } 588 610 */ 589 611 } 590 612 … … 596 618 // - Sum up contents of *ptr 597 619 // - If *ptr is greater than fSaturationLimit, raise sat by 1 598 // 599 void MExtractBlindPixel::FindSignalFilter(Byte_t *ptr, Int_t &sum, Byte_t &sat) const 600 { 601 602 Byte_t *end = ptr + fLoGainLast - fLoGainFirst + 1; 620 // 621 /* 622 void MExtractBlindPixel::FindSignalFilter(Byte_t *ptr, Int_t range, Int_t &sum, Byte_t &sat) const 623 { 624 625 Byte_t *end = ptr + range; 603 626 604 627 while (ptr<end) … … 610 633 } 611 634 } 635 */ 612 636 613 637 // -------------------------------------------------------------------------- … … 624 648 625 649 for (UInt_t id=0;id<fBlindPixelIdx.GetSize();id++) 626 627 628 pixel.Jump(fBlindPixelIdx[id]);629 630 Int_t sum = 0; 631 Byte_t sat = 0;632 650 { 651 // Be carefull: GetSaturation changed sat0 and sat1 652 Int_t sat0 = fHiGainFirst; // First slice to extract and first saturating slice 653 Int_t sat1 = fHiGainLast; // Last slice to extract and last saturating slice 654 655 const Int_t sat = fSignal->GetSaturation(fBlindPixelIdx[id], fSaturationLimit, sat0, sat1); 656 633 657 if (IsExtractionType(kFilter)) 634 658 { 635 636 FindSignalFilter(pixel.GetHiGainSamples()+fLoGainFirst, sum, sat); 637 659 // FIXME: fLoGain* is used to determine the FILTER/CHECK range 660 const Int_t numh = pixel.GetNumHiGainSamples(); 661 662 const Int_t sum = fSignal->GetIntegralRaw(fBlindPixelIdx[id], fLoGainFirst+numh, fLoGainLast+numh); 638 663 if (sum > fNSBFilterLimit) 639 664 { … … 644 669 } 645 670 671 /* 646 672 sum = 0; 647 673 if (pixel.HasLoGain()) 648 FindSignalFilter(pixel.GetLoGainSamples(), sum, sat); 649 650 /* 674 FindSignalFilter(sl+pixel.GetNumLoGainSamples()+fLoGainFirst, fLoGainLast - fLoGainFirst + 1, sum, sat); 675 651 676 if (fModified) 652 677 { … … 661 686 */ 662 687 } 663 688 689 664 690 Float_t newsum = 0.; 665 sat = 0;666 667 691 if (IsExtractionType(kAmplitude)) 668 FindAmplitude (pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), newsum, sat);692 newsum = FindAmplitude(fBlindPixelIdx[id], sat); 669 693 else 670 FindIntegral (pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), newsum, sat); 671 672 673 fBlindPixel->SetExtractedSignal(newsum,id); 674 fBlindPixel->SetNumSaturated(sat,id); 675 } 676 694 newsum = fSignal->GetIntegralRaw(fBlindPixelIdx[id], fHiGainFirst, fHiGainLast); 695 696 fBlindPixel->SetExtractedSignal(newsum, id); 697 fBlindPixel->SetNumSaturated(sat, id); 698 } 699 677 700 fBlindPixel->SetReadyToSave(); 678 701 return kTRUE; … … 686 709 Bool_t MExtractBlindPixel::IsDataType( const DataType_t typ ) 687 710 { 688 689 711 return TESTBIT( fDataType, typ ); 690 691 712 } 692 713 … … 698 719 Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ ) 699 720 { 700 701 721 return TESTBIT( fExtractionType, typ ); 702 703 722 } 704 723 -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h
r8155 r8158 13 13 #endif 14 14 15 class MCalibrationBlindCam; 15 16 class MExtractedSignalBlindPixel; 16 17 … … 30 31 MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the Blind Pixel 31 32 32 Byte_t fHiLoFirst; // If not zero, start extraction from fHiLoFirst slice of Low-Gain33 Byte_t fHiLoLast;33 // Byte_t fHiLoFirst; // If not zero, start extraction from fHiLoFirst slice of Low-Gain 34 // Byte_t fHiLoLast; 34 35 35 MArrayF fHiGainSignal; //! Need fast access to the signals in a float way36 // MArrayF fHiGainSignal; //! Need fast access to the signals in a float way 36 37 MArrayF fHiGainFirstDeriv; //! First derivative at intersection 37 38 MArrayF fHiGainSecondDeriv; //! Second derivative at intersection … … 43 44 Byte_t fExtractionType; // What extraction type has been chosen? 44 45 Byte_t fDataType; // What data container type is needed? 45 Int_t fNumBlindPixels; // Current number of blind pixels46 // Int_t fNumBlindPixels; // Current number of blind pixels 46 47 47 48 public: … … 50 51 51 52 private: 52 void FindAmplitude (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);53 void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);54 void FindSignalFilter(Byte_t *ptr,Int_t &sum, Byte_t &sat) const;53 Float_t FindAmplitude(Int_t idx, Int_t numsat) const; 54 // void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat); 55 // void FindSignalFilter(Byte_t *ptr, Int_t range, Int_t &sum, Byte_t &sat) const; 55 56 56 57 Int_t PreProcess(MParList *pList); … … 69 70 70 71 // Setters 72 /* 71 73 void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const UInt_t nr=0 ) 72 74 { … … 74 76 fBlindPixelIdx.Set(nr+1); 75 77 fBlindPixelIdx[nr] = idx; 76 } 78 } 79 */ 80 81 void SetBlindPixels(const MCalibrationBlindCam &cam); 82 77 83 void SetExtractionType( const ExtractionType_t typ=kAmplitude ); 78 84 void SetDataType ( const DataType_t typ=kRawEvt ); 79 85 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; } 80 86 81 void SetNumBlindPixels( const Int_t num=1 ) { fNumBlindPixels = num; }87 // void SetNumBlindPixels( const Int_t num=1 ) { fNumBlindPixels = num; } 82 88 83 89 void SetRange ( const Byte_t hifirst=0, const Byte_t hilast=0, -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r8154 r8158 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.6 1 2006-10-24 08:24:52tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.62 2006-10-24 12:39:00 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 182 182 // 183 183 MExtractTimeAndChargeSpline::MExtractTimeAndChargeSpline(const char *name, const char *title) 184 : fRandomIter(0),fExtractionType(kIntegral)184 : /*fRandomIter(0),*/ fExtractionType(kIntegral) 185 185 { 186 186 … … 377 377 378 378 s.SetRiseFallTime(fRiseTimeHiGain, fFallTimeHiGain); 379 s.SetResolution(fResolution);379 // s.SetResolution(fResolution); 380 380 381 381 if (IsNoiseCalculation()) 382 382 { 383 if (fRandomIter == int(1./fResolution))384 fRandomIter = 0;385 386 sum = s.ExtractNoise( fRandomIter);387 fRandomIter++;383 // if (fRandomIter == int(1./fResolution)) 384 // fRandomIter = 0; 385 386 sum = s.ExtractNoise(/*fRandomIter*/); 387 // fRandomIter++; 388 388 return; 389 389 } … … 402 402 403 403 s.SetRiseFallTime(fRiseTimeLoGain, fFallTimeLoGain); 404 s.SetResolution(fResolution);404 // s.SetResolution(fResolution); 405 405 406 406 if (IsNoiseCalculation()) 407 407 { 408 if (fRandomIter == int(1./fResolution))409 fRandomIter = 0;410 411 sum = s.ExtractNoise( fRandomIter);408 // if (fRandomIter == int(1./fResolution)) 409 // fRandomIter = 0; 410 411 sum = s.ExtractNoise(/*fRandomIter*/); 412 412 return; 413 413 }
Note:
See TracChangeset
for help on using the changeset viewer.