Ignore:
Timestamp:
01/17/05 14:03:02 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r5869 r5872  
    7272#include "MPedCalcFromLoGain.h"
    7373#include "MExtractor.h"
     74#include "MExtractTimeAndCharge.h"
    7475#include "MFCosmics.h"
    7576#include "MTaskEnv.h"
     
    365366            pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
    366367            pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1);
    367             pedlo1.SetExtractWindow(15, 0/*obsolete*/);
    368             pedlo2.SetExtractWindow(15, 0/*obsolete*/);
    369             pedlo3.SetExtractWindow(15, 0/*obsolete*/);
     368            const Int_t win = ((MExtractTimeAndCharge*)extractor1)->GetWindowSizeHiGain();
     369            pedlo1.SetExtractWindow(15, win);
     370            pedlo2.SetExtractWindow(15, win/*obsolete*/);
     371            pedlo3.SetExtractWindow(15, win/*obsolete*/);
    370372        }
    371373        else
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r5871 r5872  
    5858// Other basic classes
    5959#include "MExtractor.h"
     60#include "MExtractTimeAndCharge.h"
    6061
    6162// parameter containers
     
    901902    case kUsePedRun:
    902903        // In case  other than 'fundamental' second argument is obsolete
    903         pedcalc.SetExtractWindow(0,14);  // kUsePedRun
     904        // pedcalc.SetExtractWindow(0,14);  // kUsePedRun (take default from class)
    904905        taskenv.SetDefault(&pedcalc);
    905906        tlist.AddToList(&taskenv);
     
    908909    case kUseData:
    909910        // In case  other than 'fundamental' second argument is obsolete
    910         pedlogain.SetExtractWindow(15,14); // kUseData
     911        // pedlogain.SetExtractWindow(15,14); // kUseData (take default from class)
    911912        taskenv.SetDefault(&pedlogain);
    912913        tlist.AddToList(&taskenv);
     
    932933    if (fExtractor)
    933934    {
    934       const Float_t f = 0.5+fExtractor->GetHiGainFirst();
    935       const Float_t n = 0.5+fExtractor->GetNumHiGainSamples();
    936       pedcalc.SetExtractWindow((Int_t)f, (Int_t)n);
    937       pedlogain.SetExtractWindow((Int_t)(15+f), (Int_t)n);
    938            
     935
    939936      if (!fExtractor->InheritsFrom("MExtractTimeAndCharge"))
    940937        {
     938
     939          const Float_t f = 0.5+fExtractor->GetHiGainFirst();
     940          const Int_t win = ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain();
     941          pedcalc.SetExtractWindow((Int_t)f, win);
     942          pedlogain.SetExtractWindow((Int_t)(15+f), win);
     943
    941944          if (fExtractionType!=kFundamental)
    942945            {
     
    947950            }
    948951        }
     952      else
     953        {
     954          const Float_t f = 0.5+fExtractor->GetHiGainFirst();
     955          const Float_t n = 0.5+fExtractor->GetNumHiGainSamples();
     956          pedcalc.SetExtractWindow((Int_t)f, (Int_t)n);
     957          pedlogain.SetExtractWindow((Int_t)(15+f), (Int_t)n);
     958        }
     959     
    949960     
    950961      if (fExtractionType!=kFundamental)
     
    957968        }
    958969    }
    959 
     970    else
     971      {
     972        *fLog << warn << GetDescriptor()
     973              << ": WARNING: No extractor has been handed over! " << endl;
     974        *fLog << warn << GetDescriptor()
     975              << ": WARNING: Taking default window for pedestal extraction. The calculated pedestal RMS will probably not match with future pedestal RMSs from different extraction windows." << endl;
     976      }
     977   
    960978    /*
    961979    switch (fExtractType)
Note: See TracChangeset for help on using the changeset viewer.