Changeset 8500 for trunk/MagicSoft/Mars/mextralgo
- Timestamp:
- 05/11/07 19:30:04 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mextralgo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.cc
r8218 r8500 31 31 #include "MExtralgoDigitalFilter.h" 32 32 33 #include <TRandom.h> 34 33 35 using namespace std; 34 36 35 Float_t MExtralgoDigitalFilter::ExtractNoise( Int_t iter) const37 Float_t MExtralgoDigitalFilter::ExtractNoise() const 36 38 { 37 return Eval(fWeightsAmp, 0, iter-fWeightsPerBin/2); 39 const Int_t pos = gRandom->Integer(fNum-fWindowSize+1); 40 const Int_t frac = gRandom->Integer(fWeightsPerBin); 41 42 return Eval(fWeightsAmp, pos, frac-fWeightsPerBin/2); 38 43 } 39 44 -
trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.h
r8154 r8500 161 161 void GetTime(Float_t &sig, Float_t &dsig) const { sig=fTime; dsig=fTimeDev; } 162 162 163 Float_t ExtractNoise( Int_t iter) const;163 Float_t ExtractNoise() const; 164 164 void Extract(Int_t maxpos=-1); 165 165 -
trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc
r8480 r8500 225 225 } 226 226 227 Float_t MExtralgoSpline::ExtractNoise( /*Int_t iter*/)227 Float_t MExtralgoSpline::ExtractNoise() 228 228 { 229 229 if (fNum<5) 230 230 return 0; 231 231 232 // FIXME: Shell we keep the extraction inside one slice233 // or randomize it along the extraction window?234 const Float_t nsx = gRandom->Uniform(); //iter * fResolution;235 236 232 if (fExtractionType == kAmplitude) 237 return Eval(2, nsx); 233 { 234 const Int_t pos = gRandom->Integer(fNum-1); 235 const Float_t nsx = gRandom->Uniform(); 236 return Eval(pos, nsx); 237 } 238 238 else 239 return CalcIntegral(2 + nsx); 239 { 240 const Float_t pos = gRandom->Uniform(fNum-1-fRiseTime-fFallTime)+fRiseTime; 241 return CalcIntegral(pos); 242 } 240 243 } 241 244
Note:
See TracChangeset
for help on using the changeset viewer.