Changeset 7125


Ignore:
Timestamp:
06/02/05 15:24:33 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7124 r7125  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 2005/06/02 Thomas Bretz
     24
     25   * callisto.cc:
     26     - made "-raw" the default
     27     - switched bad pixel check on for MJPedestalC2
     28
     29   * callisto_Dec04Jan05.rc:
     30     - reduced MJPedestalY2.ExtractWinRight from 4.0 to 2.0
     31
     32   * mhflux/MHThetaSq.[h,cc]:
     33     - added missing InitMapping
     34
     35   * mjobs/MJCalib.cc:
     36     - set default for fDataFlag to kIsUseRawData
     37
     38   * mjobs/MJOptimizeCuts.cc:
     39     - added some sanity checks if CreateHistNew couldn't create
     40       the histogram
     41
     42   * mjobs/MJPedestal.[h,cc]:
     43     - implemented a possible deadpixel check
     44
     45
     46
    2347 2005/06/01 Thomas Bretz
    2448
  • trunk/MagicSoft/Mars/NEWS

    r7122 r7125  
    5050     pixel sizes or sectors also kUnsuitableEvt is now taken into
    5151     account - not only kUnsuitableRun
     52
     53   - callisto: '-raw' option is now the default
     54   
     55   - callisto: A dead pixel check has been implemented in MJPedestalC2.
     56     This has the advantage that mean values in the calibration (eg
     57     arrival times) are calculated more accuratly.
     58
     59   - callisto: In the resource file callisto_Dec04Jan05.rc
     60     MJPedestalY2.ExtractWinRight has been reduced from 4.0 to 2.0
    5261
    5362   - star: fixed a bug which caused the first bin of the histograms
  • trunk/MagicSoft/Mars/callisto.cc

    r7091 r7125  
    5454    gLog << "   -y                        Extract and calibrate signal" << endl << endl;
    5555    gLog << " Data Type (exclusive):" << endl;
    56     gLog << "   -raw                      Read input from raw-data" << endl;
     56    gLog << "   -raw                      Read input from raw-data <default>" << endl;
    5757    gLog << "   -mc                       Input root-files are monte carlo files" << endl;
    58     gLog << "   -root                     Read input from root-files (merpped) <default>" << endl << endl;
     58    gLog << "   -root                     Read input from root-files (merpped)" << endl << endl;
    5959    gLog << " Options:" << endl;
    6060    gLog.Usage();
     
    184184          Bool_t  kModeY      = arg.HasOnlyAndRemove("-y");
    185185
    186     MJCalib::DataType_t kDataType = MJCalib::kIsUseRootData; // root
     186    MJCalib::DataType_t kDataType = MJCalib::kIsUseRawData; // root
     187    if (arg.HasOnlyAndRemove("-root"))
     188        kDataType = MJCalib::kIsUseRootData; // root
    187189    if (arg.HasOnlyAndRemove("-raw"))
    188190        kDataType = MJCalib::kIsUseRawData;  // raw
     
    383385        job2.SetDataType(kDataType);
    384386        job2.SetUseHists(kMoon);
     387        job2.SetDeadPixelCheck();
    385388        // job1.SetPathOut(kOutpathC); // not yet needed
    386389        // job1.SetPathIn(kInpathC);   // not yet needed
  • trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc

    r7071 r7125  
    339339#MJPedestalY2.PulsePosCheck: yes
    340340MJPedestalY2.ExtractWinLeft:  3.0
    341 MJPedestalY2.ExtractWinRight: 4.0
     341MJPedestalY2.ExtractWinRight: 2.0
    342342#MJCalibrateSignal.ModifiedExtractWin: yes
    343343# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhflux/MHThetaSq.cc

    r7091 r7125  
    158158    return static_cast<const MParameterD*>(fParameter)->GetVal();
    159159}
     160
     161// --------------------------------------------------------------------------
     162//
     163// You can use this function if you want to use a MHMatrix instead of
     164// MMcEvt. This function adds all necessary columns to the
     165// given matrix. Afterward you should fill the matrix with the corresponding
     166// data (eg from a file by using MHMatrix::Fill). If you now loop
     167// through the matrix (eg using MMatrixLoop) MHHadronness::Fill
     168// will take the values from the matrix instead of the containers.
     169//
     170// It takes fSkipHist* into account!
     171//
     172void MHThetaSq::InitMapping(MHMatrix *mat, Int_t type)
     173{
     174    if (fMatrix)
     175        return;
     176
     177    fMatrix = mat;
     178
     179    fMap[0] = -1;
     180    fMap[1] = -1;
     181    fMap[2] = -1;
     182    fMap[3] = -1;
     183    fMap[4] = -1;
     184
     185    if (!fSkipHistEnergy)
     186        if (type==0)
     187        {
     188            fMap[1] = fMatrix->AddColumn("MEnergyEst.fVal");
     189            fMap[2] = -1;
     190        }
     191        else
     192        {
     193            fMap[1] = -1;
     194            fMap[2] = fMatrix->AddColumn("MHillas.fSize");
     195        }
     196
     197    if (!fSkipHistTheta)
     198        fMap[3] = fMatrix->AddColumn("MPointingPos.fZd");
     199
     200   // if (!fSkipHistTime)
     201   //     fMap[4] = fMatrix->AddColumn("MTime.GetAxisTime");
     202}
  • trunk/MagicSoft/Mars/mhflux/MHThetaSq.h

    r7064 r7125  
    2121
    2222    Bool_t SetupFill(const MParList *pl);
     23    void InitMapping(MHMatrix *mat, Int_t type=0);
    2324
    2425public:
  • trunk/MagicSoft/Mars/mjobs/MJCalib.cc

    r7115 r7125  
    4848// - fPulsePosCheck to kFALSE
    4949//
    50 MJCalib::MJCalib() : fDataFlag(kIsUseRootData), fStorage(0),
     50MJCalib::MJCalib() : fDataFlag(kIsUseRawData), fStorage(0),
    5151                     fIsPixelCheck(kFALSE), fIsPulsePosCheck(kFALSE),
    5252                     fIsHiLoCalibration(kFALSE)
  • trunk/MagicSoft/Mars/mjobs/MJOptimizeCuts.cc

    r7122 r7125  
    318318    MHAlpha *histof = CreateNewHist("HistOff");
    319319
     320    if (!histon || !histof)
     321        return kFALSE;
     322
    320323    const Bool_t rc = RunOnOffCore(*histon, *histof, fname, filter, fit, tree);
    321324
     
    332335    MHAlpha *histon = CreateNewHist();
    333336
     337    if (!histon)
     338        return kFALSE;
     339
    334340    const Bool_t rc = RunOnCore(*histon, fname, filter, fit);
    335341
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r7099 r7125  
    8989#include "MPedCalcFromLoGain.h"
    9090#include "MFTriggerPattern.h"
     91#include "MBadPixelsCalc.h"
     92
     93#include "MPedPhotCam.h"
     94#include "MPedPhotPix.h"
     95#include "MPedestalCam.h"
     96#include "MPedestalPix.h"
    9197
    9298ClassImp(MJPedestal);
     
    111117MJPedestal::MJPedestal(const char *name, const char *title)
    112118    : fExtractor(NULL), fDisplayType(kDisplayDataCheck),
    113       fExtractType(kUsePedRun), fExtractionType(kFundamental), fIsUseHists(kFALSE)
     119    fExtractType(kUsePedRun), fExtractionType(kFundamental),
     120    fIsUseHists(kFALSE), fDeadPixelCheck(kFALSE)
    114121{
    115122    fName  = name  ? name  : "MJPedestal";
     
    777784    SetNoStorage(GetEnv("DisableOutput", IsNoStorage()));
    778785
     786    fDeadPixelCheck = GetEnv("DeadPixelsCheck", fDeadPixelCheck);
     787
    779788    // Setup an environment task
    780789    MTaskEnv tenv("ExtractSignal");
     
    12351244    }
    12361245
     1246    if (fDeadPixelCheck)
     1247    {
     1248        MBadPixelsCalc calc;
     1249        calc.SetPedestalLevelVarianceLo(4.5);
     1250        calc.SetPedestalLevelVarianceHi();
     1251        calc.SetPedestalLevel();
     1252        if (!CheckEnv(calc))
     1253            return kFALSE;
     1254        calc.SetGeomCam(dynamic_cast<MGeomCam*>(plist.FindObject("MGeomCam")));
     1255        if (!calc.CheckPedestalRms(fBadPixels, fPedestalCamOut))
     1256        {
     1257            *fLog << err << "ERROR - Checking PedestalRMS via MBadPixelsCalc failed...." << endl;
     1258            return kFALSE;
     1259        }
     1260    }
     1261
    12371262    if (fDisplayType!=kDisplayNone)
    12381263        DisplayResult(plist);
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r7069 r7125  
    7272
    7373    Bool_t fIsUseHists;                      // Switch on histogramming or not
     74    Bool_t fDeadPixelCheck;                  // Should the dead pixel check be done?
    7475
    7576    MExtractor *ReadCalibration();
     
    110111    void SetUseData()                           { fExtractType = kUseData;   }
    111112    void SetUseHists( const Bool_t b=kTRUE)     { fIsUseHists = b;  }
     113    void SetDeadPixelCheck(const Bool_t b=kTRUE) { fDeadPixelCheck = b; }
    112114    void SetUsePedRun()                         { fExtractType = kUsePedRun; }
    113115    void SetDataCheckDisplay()                  { fDisplayType = kDisplayDataCheck; }
Note: See TracChangeset for help on using the changeset viewer.