Changeset 8500


Ignore:
Timestamp:
05/11/07 19:30:04 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8499 r8500  
    8989     - removed data members fPedestal and fPedestalsIn respectively,
    9090       and all referencing functions because it was never used at all
     91
     92   * mextralgo/MExtralgoDigitalFilter.[h,cc],
     93     mextralgo/MExtralgoSpline.cc
     94     msignal/MExtractTimeAndChargeDigitalFilter.cc:
     95     - made the noise extraction completely random and automatic
     96     - gave the noise extraction completely into the hand of
     97       the extractors
    9198
    9299
  • trunk/MagicSoft/Mars/NEWS

    r8490 r8500  
    2323     simplified the process of producing several movies from a single
    2424     sequence with different setup.
     25
     26   - callisto: The extraction of the pedestal with the extractor was
     27     not random. It seems that extracting at one position is still biased
     28     (for example in the first or last slices we could still suffer from
     29     switching noise) Now it is completely random.
    2530
    2631   - callisto: In MPedCalcPedRun (which is the pedestal extraction from
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.cc

    r8218 r8500  
    3131#include "MExtralgoDigitalFilter.h"
    3232
     33#include <TRandom.h>
     34
    3335using namespace std;
    3436
    35 Float_t MExtralgoDigitalFilter::ExtractNoise(Int_t iter) const
     37Float_t MExtralgoDigitalFilter::ExtractNoise() const
    3638{
    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);
    3843}
    3944
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.h

    r8154 r8500  
    161161    void GetTime(Float_t &sig, Float_t &dsig) const   { sig=fTime; dsig=fTimeDev; }
    162162
    163     Float_t ExtractNoise(Int_t iter) const;
     163    Float_t ExtractNoise() const;
    164164    void Extract(Int_t maxpos=-1);
    165165
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc

    r8480 r8500  
    225225}
    226226
    227 Float_t MExtralgoSpline::ExtractNoise(/*Int_t iter*/)
     227Float_t MExtralgoSpline::ExtractNoise()
    228228{
    229229    if (fNum<5)
    230230        return 0;
    231231
    232     // FIXME: Shell we keep the extraction inside one slice
    233     // or randomize it along the extraction window?
    234     const Float_t nsx = gRandom->Uniform(); //iter * fResolution;
    235 
    236232    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    }
    238238    else
    239         return CalcIntegral(2 + nsx);
     239    {
     240        const Float_t pos = gRandom->Uniform(fNum-1-fRiseTime-fFallTime)+fRiseTime;
     241        return CalcIntegral(pos);
     242    }
    240243}
    241244
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r8304 r8500  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeDigitalFilter.cc,v 1.77 2007-02-04 15:30:16 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeDigitalFilter.cc,v 1.78 2007-05-11 18:29:42 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    305305    if (IsNoiseCalculation())
    306306    {
    307         sum = df.ExtractNoise(gRandom->Integer(fBinningResolutionHiGain));
     307        sum = df.ExtractNoise();
    308308        return;
    309309    }
     
    328328    if (IsNoiseCalculation())
    329329    {
    330         sum = df.ExtractNoise(gRandom->Integer(fBinningResolutionHiGain));
     330        sum = df.ExtractNoise();
    331331        return;
    332332    }
Note: See TracChangeset for help on using the changeset viewer.