Changeset 5507 for trunk/MagicSoft


Ignore:
Timestamp:
11/29/04 20:58:20 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpedestal
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r5504 r5507  
    151151#include "MExtractPedestal.h"
    152152#include "MExtractTimeAndCharge.h"
     153#include "MExtractTimeAndChargeDigitalFilter.h"
    153154
    154155#include "MParList.h"
     
    420421 
    421422  if (fExtractor)
    422     fExtractor->InitArrays();
    423  
     423    {
     424      fExtractor->InitArrays();
     425      SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples());
     426      if (fExtractor->InheritsFrom("MExtractTimeAndChargeDigitalFilter"))
     427        {
     428          MExtractTimeAndChargeDigitalFilter* df = (MExtractTimeAndChargeDigitalFilter*)fExtractor;
     429          if (!df->IsWeightsSet())
     430            if (!df->ReadWeightsFile(df->GetNameWeightsFile()))
     431              return kFALSE;
     432        }
     433    }
     434
    424435  Print();
    425436
     
    510521
    511522  // 4. Scale the mean, variance and AB-noise to the number of slices:
    512   ped    /= fExtractWinSize;
    513   var    /= fExtractWinSize;
    514   abOffs /= fExtractWinSize;
     523  ped    /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
     524  var    /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
     525  abOffs /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
    515526 
    516527  // 5. Calculate the RMS from the Variance:
     
    549560  // 4. Scale the mean, variance and AB-noise to the number of slices:
    550561  //
    551   ped    /= fExtractWinSize;
    552   var    /= fExtractWinSize;
    553   abOffs /= fExtractWinSize;
     562  ped    /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
     563  var    /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
     564  abOffs /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
    554565  //
    555566  // 5. Scale the mean, variance and AB-noise to the number of pixels:
     
    596607  // 4. Scale the mean, variance and AB-noise to the number of slices:
    597608  //
    598   ped    /= fExtractWinSize;
    599   var    /= fExtractWinSize;
    600   abOffs /= fExtractWinSize;
     609  ped    /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
     610  var    /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
     611  abOffs /= fExtractor ? fExtractor->GetNumHiGainSamples() : fExtractWinSize;
    601612  //
    602613  // 5. Scale the mean, variance and AB-noise to the number of pixels:
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc

    r5505 r5507  
    137137
    138138#include "MExtractTimeAndCharge.h"
    139 #include "MExtractTimeAndChargeDigitalFilter.h"
    140139
    141140#include "MParList.h"
     
    243242
    244243  if (fExtractor)
    245     {
    246       SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples());
    247       lastavailable = losamples-1;
    248       if (fExtractor->InheritsFrom("MExtractTimeAndChargeDigitalFilter"))
    249         {
    250           MExtractTimeAndChargeDigitalFilter* df = (MExtractTimeAndChargeDigitalFilter*)fExtractor;
    251           if (!df->IsWeightsSet())
    252             if (!df->ReadWeightsFile(df->GetNameWeightsFile()))
    253               return kFALSE;
    254         }
    255     }
     244    lastavailable = losamples-1;
    256245
    257246  // If the size is not yet set, set the size
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc

    r5505 r5507  
    122122
    123123#include "MExtractTimeAndCharge.h"
    124 #include "MExtractTimeAndChargeDigitalFilter.h"
    125124
    126125#include "MParList.h"
     
    204203{
    205204
    206   if (fExtractor)
    207     {
    208       SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples());
    209       if (fExtractor->InheritsFrom("MExtractTimeAndChargeDigitalFilter"))
    210         {
    211           MExtractTimeAndChargeDigitalFilter* df = (MExtractTimeAndChargeDigitalFilter*)fExtractor;
    212           if (!df->IsWeightsSet())
    213             if (!df->ReadWeightsFile(df->GetNameWeightsFile()))
    214               return kFALSE;
    215         }
    216     }
    217  
    218205  MExtractPedestal::ReInit(pList);
    219206
     
    470457{
    471458
     459  if (fRunHeader->GetRunNumber() == 38996)
     460    return kTRUE;
     461 
    472462  if (fRunHeader->GetRunNumber() < gkFirstRunWithFinalBits)
    473463    return kFALSE;
Note: See TracChangeset for help on using the changeset viewer.