Changeset 5957 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
01/24/05 11:08:09 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5956 r5957  
    6666 2005/01/24 Markus Gaug
    6767
    68   * msignal/MExtractTimeAndCharge.cc
    69     - call Clear() for two results containers at beginning of Process()
    70 
    71   * msignal/MExtractedSignalPix.cc
    72     - change sign of default initializer to negative.
     68   * msignal/MExtractTimeAndCharge.cc
     69     - call Clear() for two results containers at beginning of Process()
     70
     71   * msignal/MExtractedSignalPix.cc
     72     - change sign of default initializer to negative.
    7373
    7474
     
    7676 2005/01/23 Markus Gaug
    7777 
    78   * mhcalib/MHCalibrationHiLoCam.[h,cc]
    79     - updated to new logain switch setting in MExtractTimeAndCharge
    80     - extract also high-gain vs. low-gain time difference
    81 
    82   * mhcalib/MHCalibrationCam.[h,cc]
    83   * mhcalib/MHCalibrationChargeCam.[h,cc]
    84     - updated reading of conf. values in ReadEnv
    85 
    86   * mhcalib/MCalibrationHiLoCam.[h,cc]
    87   * mhcalib/MCalibrationHiLoPix.[h,cc]
    88   * mhcalib/MCalibrationIntensityHiLoCam.[h,cc]
    89     - updated accordingly
    90 
    91   * mbadpixels/MBadPixelsCam.cc
    92     - removed some bugs in the Print() function
     78   * mhcalib/MHCalibrationHiLoCam.[h,cc]
     79     - updated to new logain switch setting in MExtractTimeAndCharge
     80     - extract also high-gain vs. low-gain time difference
     81
     82   * mhcalib/MHCalibrationCam.[h,cc]
     83   * mhcalib/MHCalibrationChargeCam.[h,cc]
     84     - updated reading of conf. values in ReadEnv
     85
     86   * mhcalib/MCalibrationHiLoCam.[h,cc]
     87   * mhcalib/MCalibrationHiLoPix.[h,cc]
     88   * mhcalib/MCalibrationIntensityHiLoCam.[h,cc]
     89     - updated accordingly
     90
     91   * mbadpixels/MBadPixelsCam.cc
     92     - removed some bugs in the Print() function
    9393
    9494
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r5901 r5957  
    220220// --------------------------------------------------------------------------
    221221//
    222 // Calculate Significance as
    223 // significance = (s-b)/sqrt(s+k*k*b) mit k=s/b
    224 //
    225 // s: total number of events in signal region
    226 // b: number of background events in signal region
    227 //
    228 Double_t MHFalseSource::Significance(Double_t s, Double_t b)
    229 {
    230     return MMath::SignificanceSym(s, b);
    231 }
    232 
    233 // --------------------------------------------------------------------------
    234 //
    235 //  calculates the significance according to Li & Ma
    236 //  ApJ 272 (1983) 317, Formula 17
    237 //
    238 //  s                    // s: number of on events
    239 //  b                    // b: number of off events
    240 //  alpha = t_on/t_off;  // t: observation time
    241 //
    242 Double_t MHFalseSource::SignificanceLiMa(Double_t s, Double_t b, Double_t alpha)
    243 {
    244     return MMath::SignificanceLiMaSigned(s, b);
    245 }
    246 
    247 // --------------------------------------------------------------------------
    248 //
    249222// Set binnings (takes BinningFalseSource) and prepare filling of the
    250223// histogram.
     
    599572                const Double_t b = h2->GetBinContent(n);
    600573
    601                 const Double_t sig = SignificanceLiMa(s, b);
     574                const Double_t sig = MMath::SignificanceLiMaSigned(s, b);
    602575
    603576                h4->SetBinContent(n, sig);
     
    825798    gPad->Modified();
    826799    gPad->cd();
     800}
     801
     802// --------------------------------------------------------------------------
     803//
     804// The following resources are available:
     805//
     806//    MHFalseSource.DistMin: 0.5
     807//    MHFalseSource.DistMax: 1.4
     808//    MHFalseSource.DWMin:   0.1
     809//    MHFalseSource.DWMax:   0.3
     810//
     811Int_t MHFalseSource::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     812{
     813    Bool_t rc = kFALSE;
     814    if (IsEnvDefined(env, prefix, "DistMin", print))
     815    {
     816        rc = kTRUE;
     817        SetMinDist(GetEnvValue(env, prefix, "DistMin", fMinDist));
     818    }
     819    if (IsEnvDefined(env, prefix, "DistMax", print))
     820    {
     821        rc = kTRUE;
     822        SetMaxDist(GetEnvValue(env, prefix, "DistMax", fMaxDist));
     823    }
     824
     825    if (IsEnvDefined(env, prefix, "DWMin", print))
     826    {
     827        rc = kTRUE;
     828        SetMinDW(GetEnvValue(env, prefix, "DWMin", fMinDist));
     829    }
     830    if (IsEnvDefined(env, prefix, "DWMax", print))
     831    {
     832        rc = kTRUE;
     833        SetMaxDW(GetEnvValue(env, prefix, "DWMax", fMaxDist));
     834    }
     835
     836    return rc;
    827837}
    828838
     
    965975                continue;
    966976
     977            // This is a quick hack to correct for the lower acceptance at
     978            // the edge of the camera
    967979            h->Scale(entries/h->GetEntries());
    968980
     
    970982            {
    971983                hoff = fHistOff->ProjectionZ("AlphaFitOff", ix, ix, iy, iy);
     984                // This is a quick hack to correct for the lower acceptance at
     985                // the edge of the camera
    972986                hoff->Scale(entries/h->GetEntries());
    973987                scale = fit.Scale(*hoff, *h);
     
    982996 
    983997            // Fill results into some histograms
    984             h0a.Fill(fit.GetGausA()); // gaus-A
     998            h0a.Fill(fit.GetGausA());        // gaus-A
    985999            h0b.Fill(fit.GetCoefficient(3)); // 3
    986             h1.Fill(fit.GetGausMu());  // mu
    987             h2.Fill(fit.GetGausSigma());  // sigma-gaus
     1000            h1.Fill(fit.GetGausMu());        // mu
     1001            h2.Fill(fit.GetGausSigma());     // sigma-gaus
    9881002            if (polynom>1 && !fHistOff)
    9891003                h3.Fill(fit.GetCoefficient(5));
     
    11931207            const Double_t b = f2.Integral(0, (float)i)/w;
    11941208
    1195             const Double_t sig = SignificanceLiMa(s, b);
     1209            const Double_t sig = MMath::SignificanceLiMaSigned(s, b);
    11961210
    11971211            g->SetPoint(g->GetN(), i, sig);
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.h

    r5776 r5957  
    5959    MHFalseSource(const char *name=NULL, const char *title=NULL);
    6060
    61     Bool_t SetupFill(const MParList *pList);
    62     Bool_t Fill(const MParContainer *par, const Stat_t w=1);
    63 
    6461    TH1 *GetHistByName(const TString name) { return &fHist; }
    6562
     
    9087    }
    9188
     89    // MParContainer
     90    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
     91
     92    // MH
     93    Bool_t SetupFill(const MParList *pList);
     94    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     95
     96    // TObject
    9297    void Paint(Option_t *opt="");
    9398    void Draw(Option_t *option="");
    94 
    95     static Double_t Significance(Double_t s, Double_t b);
    96     static Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);
    9799
    98100    ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r5872 r5957  
    113113
    114114    TFile file(oname, "RECREATE");
     115    if (!file.IsOpen())
     116    {
     117        *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
     118        return kFALSE;
     119    }
    115120
    116121    *fLog << inf << " - MStatusDisplay..." << flush;
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r5940 r5957  
    15631563    // Input containers
    15641564    //
    1565     pedcam.SetName("MPedestalCam");
     1565    pedcam.SetName("MPedestalCam"); // MPedestalFundamental
    15661566    plist.AddToList(&pedcam);
    15671567    plist.AddToList(&fBadPixels);
     
    19621962{
    19631963    if (fPathOut.IsNull())
     1964    {
     1965        *fLog << inf << "No output path specified via SetPathOut - no output written." << endl;
    19641966        return kTRUE;
     1967    }
    19651968
    19661969    const TString oname(GetOutputFile());
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r5902 r5957  
    752752
    753753    if (fPathOut.IsNull())
     754    {
     755        *fLog << inf << "No output path specified via SetPathOut - no output written." << endl;
    754756        return kTRUE;
     757    }
    755758
    756759    const TString oname(GetOutputFile());
  • trunk/MagicSoft/Mars/mjobs/MJob.h

    r5557 r5957  
    4949    ~MJob();
    5050
     51    // Setter
    5152    void   SetPathOut(const char *path=".");
    5253    void   SetPathIn(const char *path=".");
     
    6061    void   SetSequence(const MSequence &seq) { fSequence = seq; }
    6162
     63    // Getter
     64    TString GetPathOut() const  { return fPathOut; }
     65    TString GetPathIn() const   { return fPathIn; }
     66    TString GetPathData() const { return fPathData; }
     67
     68    // Others
    6269    MStatusDisplay *GetDisplay() { return fDisplay; }
    6370
Note: See TracChangeset for help on using the changeset viewer.