Ignore:
Timestamp:
01/11/05 16:46:58 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

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

    r5760 r5803  
    6464#include "MReadMarsFile.h"
    6565#include "MRawFileRead.h"
     66#include "MContinue.h"
     67#include "MTriggerPatternDecode.h"
     68#include "MFTriggerPattern.h"
    6669#include "MGeomApply.h"
    6770#include "MMcPedestalCopy.h"
     
    6972#include "MPedCalcFromLoGain.h"
    7073#include "MExtractor.h"
     74#include "MFCosmics.h"
    7175#include "MTaskEnv.h"
    7276#include "MCalibrateData.h"
     
    180184}
    181185
    182 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcamab, MPedestalCam &pedcam2/*, MPedestalCam &pedcam*/)
     186Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcamab, MPedestalCam &pedcam2, MPedestalCam &pedcam)
    183187{
    184188    if (!fSequence.IsValid())
     
    324328    // Make sure that pedcamab has the correct name
    325329    pedcamab.SetName("MPedestalFundamental");
    326     //pedcam.SetName("MPedestalFromExtractorRndm");
     330    pedcam.SetName("MPedestalFromExtractorRndm");
    327331    pedcam2.SetName("MPedestalFromExtractor");
    328     //plist.AddToList(&pedcam);
     332    plist.AddToList(&pedcam);
    329333    plist.AddToList(&pedcam2);
    330334    plist.AddToList(&pedcamab);
    331335
     336    // Check for interleaved events
     337    MTriggerPatternDecode decode;
     338
     339    MFTriggerPattern ftp;
     340    ftp.DenyCalibration();
     341    ftp.DenyPedestal();
     342    ftp.DenyPinDiode();
     343
     344    MContinue conttp(&ftp, "ContTrigPattern");
     345    // --> tlist2
     346
     347    // Do signal and pedestal calculation
    332348    MPedCalcFromLoGain     pedlo1("MPedCalcFundamental");
    333349    pedlo1.SetPedestalUpdate(kTRUE);
    334350    pedlo1.SetNamePedestalCamOut("MPedestalFundamental");
    335     /*
    336      MPedCalcFromLoGain     pedlo2("MPedCalcWithExtractorRndm");
    337      pedlo2.SetPedestalUpdate(kTRUE);
    338      pedlo2.SetRandomCalculation(kTRUE);
    339      pedlo2.SetNamePedestalCamIn("MPedestalFundamental");
    340      pedlo2.SetNamePedestalCamOut("MPedestalFromExtractorRndm");
    341      */
     351
     352    MPedCalcFromLoGain     pedlo2("MPedCalcWithExtractorRndm");
     353    pedlo2.SetPedestalUpdate(kTRUE);
     354    pedlo2.SetRandomCalculation(kTRUE);
     355    pedlo2.SetNamePedestalCamIn("MPedestalFundamental");
     356    pedlo2.SetNamePedestalCamOut("MPedestalFromExtractorRndm");
    342357
    343358    MPedCalcFromLoGain     pedlo3("MPedCalcWithExtractor");
     
    352367        const Float_t win = extractor1->GetNumHiGainSamples();
    353368        pedlo1.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
    354         //pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
     369        pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
    355370        pedlo3.SetExtractWindow(15, (UShort_t)TMath::Nint(win));
    356371
    357372        if (extractor1->InheritsFrom("MExtractTimeAndCharge"))
    358373        {
    359             //pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
     374            pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
    360375            pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1);
    361376            extractor1->SetPedestals(&pedcamab);
     
    363378    }
    364379
    365     MMcPedestalCopy        pcopy;
     380    MFCosmics fcosmics;
     381    fcosmics.SetNamePedestalCam("MPedestalFundamental");
     382    MContinue contcos(&fcosmics, "ContTrigEvts");
     383    contcos.SetInverted();
     384
     385    MMcPedestalCopy pcopy;
    366386    MTaskEnv taskenv1("ExtractSignal");
    367387    MTaskEnv taskenv2("ExtractTime");
     
    376396        calib.AddPedestal("MPedestalCam", "MPedPhotFundamental");
    377397        calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractor");
    378         //calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractorRndm");
     398        calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractorRndm");
    379399    }
    380400    else
     
    382402        calib.AddPedestal("Fundamental");
    383403        calib.AddPedestal("FromExtractor");
    384         //calib.AddPedestal("FromExtractorRndm");
     404        calib.AddPedestal("FromExtractorRndm");
    385405        calib.SetPedestalFlag(MCalibrateData::kEvent);
    386406    }
     
    393413    treat.AddNamePedPhotCam("MPedPhotFundamental");
    394414    treat.AddNamePedPhotCam("MPedPhotFromExtractor");
    395     //treat.AddNamePedPhotCam("MPedPhotFromExtractorRndm");
     415    treat.AddNamePedPhotCam("MPedPhotFromExtractorRndm");
    396416
    397417
     
    438458    write.AddContainer("MPedPhotFundamental",       "Events");
    439459    write.AddContainer("MPedPhotFromExtractor",     "Events");
    440     //write.AddContainer("MPedPhotFromExtractorRndm", "Events");
     460    write.AddContainer("MPedPhotFromExtractorRndm", "Events");
    441461    write.AddContainer("MTime",                     "Events",     kFALSE);
    442462    write.AddContainer("MRawEvtHeader",             "Events");
     
    468488    // Now setup tasklist for events
    469489    MTaskList tlist2;
     490    tlist2.AddToList(&decode);
     491    tlist2.AddToList(&conttp);
    470492    tlist2.AddToList(&apply);
    471493    tlist2.AddToList(&merge);
     
    475497    {
    476498        tlist2.AddToList(&pedlo1);
    477         //tlist2.AddToList(&pedlo2);
     499        tlist2.AddToList(&pedlo2);
    478500        tlist2.AddToList(&pedlo3);
    479501    }
     
    484506    if (extractor2)
    485507        tlist2.AddToList(&taskenv2);
     508    tlist2.AddToList(&contcos);
    486509    tlist2.AddToList(&fill2);
    487510    tlist2.AddToList(&calib);
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h

    r5760 r5803  
    3434    MJCalibrateSignal(const char *name=NULL, const char *title=NULL);
    3535
    36     Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam2/*, MPedestalCam &cam2*/);
     36    Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam1, MPedestalCam &cam2);
    3737
    3838    ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam)
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r5760 r5803  
    537537      {
    538538           
    539         TCanvas &c3 = fDisplay->AddTab("PedExtrd");
    540         c3.Divide(2,3);
    541        
    542         disp0.CamDraw(c3, 1, 2, 1);
    543         disp1.CamDraw(c3, 2, 2, 6);
    544        
    545         TCanvas &c13 = fDisplay->AddTab("PedDiff");
    546         c13.Divide(2,3);
    547        
    548         disp9.CamDraw(c13, 1, 2, 5);
    549         disp10.CamDraw(c13, 2, 2, 5);
    550         return;
     539          TCanvas &c3 = fDisplay->AddTab(fExtractionType==kWithExtractor?"PedExtrd":"PedRndm");
     540          c3.Divide(2,3);
     541
     542          disp0.CamDraw(c3, 1, 2, 1);
     543          disp1.CamDraw(c3, 2, 2, 6);
     544
     545          TCanvas &c13 = fDisplay->AddTab(fExtractionType==kWithExtractor?"PedDiff":"DiffRndm");
     546          c13.Divide(2,3);
     547
     548          disp9.CamDraw(c13, 1, 2, 5);
     549          disp10.CamDraw(c13, 2, 2, 5);
     550          return;
    551551      }
    552552}
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r5760 r5803  
    186186    //MBadPixelsMerge        merge(&badpix);
    187187    MImgCleanStd           clean;
    188     clean.SetNamePedPhotCam("MPedPhotFromExtractor");
     188    clean.SetNamePedPhotCam("MPedPhotFromExtractorRndm");
    189189
    190190    MHillasCalc            hcalc;
Note: See TracChangeset for help on using the changeset viewer.