Ignore:
Timestamp:
10/24/06 09:26:10 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8141 r8154  
    9494#include "MFTriggerPattern.h"
    9595#include "MGeomApply.h"
     96#include "MPedestalSubtract.h"
    9697//#include "MMcPedestalCopy.h"
    9798#include "MPointingPosCalc.h"
     
    450451    MContinue conttp(&ftp, "ContTrigPattern");
    451452
     453    // Create the pedestal subtracted raw-data
     454    MPedestalSubtract pedsub;
     455    pedsub.SetPedestalCam(&pedcamab);
     456
    452457    // Do signal and pedestal calculation
    453458    MPedCalcFromLoGain     pedlo1("MPedCalcFundamental");
     
    471476        extractor1->SetPedestals(&pedcamab);
    472477
     478        // Setup to use the hi-gain extraction window in the lo-gain
     479        // range (the start of the lo-gain range is added automatically
     480        // by MPedCalcFromLoGain)
     481        //
     482        // The window size of the extractor is not yet initialized,
     483        // so we have to stick to the extraction range
     484        const Int_t f = extractor1->GetHiGainFirst();
     485        const Int_t l = extractor1->GetHiGainLast();
     486        const Int_t w = (l-f+1)&~1;
     487
     488        pedlo1.SetExtractWindow(f, w);
     489
    473490        if (extractor1->InheritsFrom("MExtractTimeAndCharge"))
    474491        {
    475492            pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
    476493            pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1);
     494            /*
    477495            const Int_t win = ((MExtractTimeAndCharge*)extractor1)->GetWindowSizeHiGain();
    478496            pedlo1.SetExtractWindow(15, win);
    479             pedlo2.SetExtractWindow(15, win/*obsolete*/);
    480             pedlo3.SetExtractWindow(15, win/*obsolete*/);
     497            pedlo2.SetExtractWindow(15, win//obsolete//);
     498            pedlo3.SetExtractWindow(15, win//obsolete//);
     499            */
    481500        }
    482501        else
    483502        {
     503            /*
    484504            // FIXME: How to get the fixed value 15 automatically?
    485505            const Int_t f = (Int_t)(15.5+extractor1->GetHiGainFirst());
     
    488508            pedlo2.SetExtractWindow(f, n);
    489509            pedlo3.SetExtractWindow(f, n);
     510            */
     511            pedlo2.SetExtractWindow(f, w);
     512            pedlo3.SetExtractWindow(f, w);
     513
    490514        }
    491515    }
     
    657681    tlist2.AddToList(&apply);
    658682    tlist2.AddToList(&merge);
     683    tlist2.AddToList(&pedsub);
    659684    tlist2.AddToList(&pedlo1);
    660685    tlist2.AddToList(&pedlo2);
Note: See TracChangeset for help on using the changeset viewer.