Changeset 8484 for trunk/MagicSoft


Ignore:
Timestamp:
05/10/07 13:16:56 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8483 r8484  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/05/10 Thomas Bretz
     22
     23   * callisto.rc, callisto_Dec04Jan05.rc, callisto_MarApr05.rc:
     24     - cleanup of some comments
     25
     26   * mbase/MMath.cc:
     27     - removed the usage of a storage space for the index in
     28       GetMedianDev because the index is reacalculated anyhow
     29
     30   * mbase/MStatusArray.cc:
     31     - if several objects of the same name (but different class
     32       types) are in a pad we don't stop searching if an object
     33       with the right name has been found
     34
     35   * mcalib/MCalibrateData.cc, mcalib/MCalibrationChargeCalc.cc,
     36     mcalib/MCalibrationRelTimeCalc.cc:
     37     - updated output
     38
     39   * mhist/MHCamera.[h,cc]
     40     - added two new member functions to count the number of bins
     41       above or below a threshold
     42
     43   * mjobs/MJCalibrateSignal.cc:
     44     - added a new Tab to show the time development of the unsuitable
     45       pixels
     46
     47   * mjobs/MJCalibration.cc:
     48     - updated texts in bad pixel display
     49
     50
    2051
    2152 2007/05/09 Daniela Dorner
  • trunk/MagicSoft/Mars/NEWS

    r8481 r8484  
    1313     properly because the callisto output was currupted
    1414
     15   - general: a script called scripts/makemovie has been added which
     16     simplified the process of producing several movies from a single
     17     sequence with different setup.
     18
    1519   - callisto: the ArrTimeRmsLimit is now is a check of the deviation from
    1620     the median rms of the absolute arrival time and expressed in significance
     
    1923     all arrival times are shifted at the same time (in fact it might be
    2024     a shift of the artificial trigger w.r.t. to the light flash).
     25
     26   - callisto: Added a new tab "BadPixTm" which shows the time evolution
     27     of the number of unsuitable pixels over the whole sequence. This
     28     is usefull mainly to judge if an intermediate calibration had
     29     problems.
    2130
    2231   - callisto: It is now possible to use the position of the maximum
  • trunk/MagicSoft/Mars/callisto.rc

    r8478 r8484  
    384384#MJCalibrateSignal.MCalibrateData.CalibConvMaxLimit: 5.
    385385#MJCalibrateSignal.Interlaced: yes
    386 #MJCalibrateSignal.RelTimesUpdate: no
    387 #MJCalibrateSignal.PulsePosCheck: yes
     386#MJCalibrateSignal.RelTimesUpdate: yes
    388387
    389388# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc

    r8478 r8484  
    409409#MJCalibrateSignal.MCalibrateData.CalibConvMaxLimit: 5.
    410410#MJCalibrateSignal.Interlaced: yes
    411 #MJCalibrateSignal.RelTimesUpdate: no
    412 #MJCalibrateSignal.PulsePosCheck: yes
     411#MJCalibrateSignal.RelTimesUpdate: yes
    413412
    414413# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/callisto_MarApr05.rc

    r8478 r8484  
    323323# -------------------------------------------------------------------------
    324324#MJPedestalY2.PulsePosCheck: yes
    325 MJPedestalY2.ExtractWinLeft:  4.0
    326 MJPedestalY2.ExtractWinRight: 4.5
     325#MJPedestalY2.ExtractWinLeft:  0.0
     326#MJPedestalY2.ExtractWinRight: 0.5
    327327
    328328# -------------------------------------------------------------------------
     
    403403#MJCalibrateSignal.MCalibrateData.CalibConvMaxLimit: 5.
    404404#MJCalibrateSignal.Interlaced: yes
    405 #MJCalibrateSignal.RelTimesUpdate: no
    406 #MJCalibrateSignal.HiLoCalibration: no
    407 #MJCalibrateSignal.PulsePosCheck: yes
     405#MJCalibrateSignal.RelTimesUpdate: yes
    408406
    409407# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r8178 r8484  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.30 2006-10-30 12:46:12 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.31 2007-05-10 12:14:54 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    196196        arr[i] = TMath::Abs(a[i]-med);
    197197
    198     // FIXME: GausProb() is a workaround. It should be taken into account in Median!
    199     //return TMath::Median(n, arr);
    200    
    201     // Sort distribution
    202     Long64_t idx[n];
    203     TMath::SortImp(n, arr, idx, kTRUE);
    204 
    205     // Define where to divide
    206     const Int_t div = TMath::Nint(n*prob);
     198    // Define where to divide (floor because the highest possible is n-1)
     199    const Int_t div = TMath::FloorNint(n*prob);
    207200
    208201    // Calculate result
    209     Double_t dev = TMath::KOrdStat(n, arr, div, idx);
     202    Double_t dev = TMath::KOrdStat(n, arr, div);
    210203    if (n%2 == 0)
    211204    {
    212         dev += TMath::KOrdStat(n, arr, div-1, idx);
     205        dev += TMath::KOrdStat(n, arr, div-1);
    213206        dev /= 2;
    214207    }
  • trunk/MagicSoft/Mars/mbase/MStatusArray.cc

    r8299 r8484  
    9393TObject *MStatusArray::FindObjectInPad(TVirtualPad *pad, const char *object, TClass *cls) const
    9494{
    95     TObject *o = pad->FindObject(object);
    96     if (o && o->InheritsFrom(cls))
    97         return o;
     95    TObject *o = NULL;//pad->FindObject(object);
     96//    if (o && o->InheritsFrom(cls))
     97//        return o;
    9898
    9999    TIter Next(pad->GetListOfPrimitives());
    100100    while ((o=Next()))
    101101    {
     102        if (o->GetName()==(TString)object && o->InheritsFrom(cls))
     103            return o;
     104
    102105        if (o==pad || !o->InheritsFrom(TVirtualPad::Class()))
    103106            continue;
    104107
    105108        if ((o = FindObjectInPad((TVirtualPad*)o, object, cls)))
    106             if (o->InheritsFrom(cls))
    107                 return o;
     109            return o;
     110//            if (o->InheritsFrom(cls))
     111//                return o;
    108112    }
    109113    return 0;
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r8452 r8484  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.68 2007-04-27 10:04:46 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.69 2007-05-10 12:14:54 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    666666            calibConv    = -1.;
    667667            calibFFactor = -1.;
    668             *fLog << warn << GetDescriptor() << ": WARNING - ";
    669             *fLog << "Conversion factor " << calibConv << " of Pixel " << pixidx << " out of range ]";
     668            *fLog << warn << GetDescriptor() << ": ";
     669            *fLog << "Conv.factor " << calibConv << " of Pixel " << pixidx << " out of range ]";
    670670            *fLog << fCalibConvMinLimit << "," << fCalibConvMaxLimit << "[... set to 0. " << endl;
    671671          }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r8478 r8484  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.178 2007-05-09 12:15:52 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.179 2007-05-10 12:14:54 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    745745            if (res<0) //FIXME!!! How does this happen?
    746746            {
    747                 *fLog << warn << "Pixel  " << setw(4) << i << ": Abs-time resolution could not be calculated." << endl;
     747                *fLog << warn << "Pixel  " << setw(4) << i << ": Abs-time rms could not be calculated." << endl;
    748748                (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingTimeResolution);
    749749                continue;
     
    753753            if (res<=lolim || res>=hilim)
    754754            {
    755                 *fLog << warn << "Pixel  " << setw(4) << i << ": Deviating abs-time resolution: "
     755                *fLog << warn << "Pixel  " << setw(4) << i << ": Deviation from abs-time rms: "
    756756                    << Form("%5.2f", res) << " out of range "
    757757                    << Form("[%4.2f,%4.2f]", lolim, hilim) << endl;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r8478 r8484  
    228228
    229229  PrintUncalibrated(MBadPixelsPix::kDeviatingTimeResolution,   
    230                     Form("%s%2.1f%s","Time resol. less than ", fRelTimeResolutionLimit, " med-dev from median:"));
     230                    Form("%s%2.1f%s","Rel.time rms more than ", fRelTimeResolutionLimit, " dev from median:"));
    231231  PrintUncalibrated(MBadPixelsPix::kRelTimeOscillating,   
    232232                    "Pixels with changing Rel. Times over time:");
     
    308308            if (res<0) //FIXME!!! How does this happen?
    309309            {
    310                 *fLog << warn << "Pixel  " << setw(4) << i << ": Rel-time resolution could not be calculated." << endl;
     310                *fLog << warn << "Pixel  " << setw(4) << i << ": Rel-time rms could not be calculated." << endl;
    311311                (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingTimeResolution);
    312312                continue;
     
    316316            if (res<=lolim || res>=hilim)
    317317            {
    318                 *fLog << warn << "Pixel  " << setw(4) << i << ": Deviating rel-time resolution: "
     318                *fLog << warn << "Pixel  " << setw(4) << i << ": Deviation from rel-time rms: "
    319319                    << Form("%5.2f", res) << " out of range "
    320320                    << Form("[%4.2f,%4.2f]", lolim, hilim) << endl;
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r8423 r8484  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.103 2007-04-20 08:55:19 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.104 2007-05-10 12:14:54 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    514514// ------------------------------------------------------------------------
    515515//
     516// Return the number of bins (excluding under- and overflow) for which
     517// GetBinContent returns a value > t
     518//
     519Int_t MHCamera::GetNumBinsAboveThreshold(Double_t t) const
     520{
     521    Int_t n = 0;
     522    for (Int_t i=0; i<fNcells-2; i++)
     523        if (GetBinContent(i+1)>t)
     524            n++;
     525
     526    return n;
     527}
     528
     529// ------------------------------------------------------------------------
     530//
     531// Return the number of bins (excluding under- and overflow) for which
     532// GetBinContent returns a value < t
     533//
     534Int_t MHCamera::GetNumBinsBelowThreshold(Double_t t) const
     535{
     536    Int_t n = 0;
     537    for (Int_t i=0; i<fNcells-2; i++)
     538        if (GetBinContent(i+1)>t)
     539            n++;
     540
     541    return n;
     542}
     543
     544// ------------------------------------------------------------------------
     545//
    516546// Call this function to draw the camera layout into your canvas.
    517547// Setup a drawing canvas. Add this object and all child objects
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r8284 r8484  
    11/* ======================================================================== *\
    2 !  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.63 2007-02-01 14:42:02 tbretz Exp $
     2!  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.64 2007-05-10 12:14:54 tbretz Exp $
    33\* ======================================================================== */
    44#ifndef MARS_MHCamera
     
    4040public:
    4141    enum {
     42        // DO NOT USE BIT(14) (MStatusArray WORKAROUND!)
     43        // BIT(15)/BIT(16)/BIT(17) used by TH1
    4244        kProfile            = BIT(18), // FIXME: When changing change max/min!
    4345        kFreezed            = BIT(19),
     
    4547        kNoScale            = BIT(21),
    4648        kNoUnused           = BIT(22),
    47         kErrorMean          = BIT(23)/*,
     49        kErrorMean          = BIT(23)/*,  // NO MORE BITS ALLOWED!
    4850        kSqrtVariance       = BIT(21),
    4951        kSinglePixelProfile = BIT(22)*/
     
    197199    Double_t GetMinimumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball=kFALSE) const;
    198200    Double_t GetMaximumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball=kFALSE) const;
     201
     202    Int_t    GetNumBinsAboveThreshold(Double_t t=0) const;
     203    Int_t    GetNumBinsBelowThreshold(Double_t t=0) const;
    199204
    200205    void     SetLevels(const TArrayF &arr);
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8474 r8484  
    7575#include "MHCalibrationRelTimeCam.h"
    7676#include "MHCalibrationPulseTimeCam.h"
     77#include "MHVsTime.h"
    7778#include "MHCamera.h"
    7879
     
    121122// - fIsRelTimesUpdate to kFALSE
    122123// - fIsHiLoCalibration to kFALSE
    123 // - fPulsePosCheck to kTRUE
    124124//
    125125MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title)
     
    128128    fName  = name  ? name  : "MJCalibrateSignal";
    129129    fTitle = title ? title : "Tool to calibrate data";
    130 
    131     SetPulsePosCheck();
    132     //fCruns = NULL;
    133130}
    134131
     
    600597    MFillH fillR(&evtR, "MExtractedSignalCam",           "FillHiLoCal");
    601598    MFillH fillO(&evtO, "MArrivalTimeCam",               "FillHiLoOff");
     599
     600    MHVsTime histbp("MBadPixelsCam.GetNumUnsuitable");
     601    histbp.SetName("BadPixTm");
     602    histbp.SetTitle("Number of unsuitable pixels;;N");
     603    histbp.SetMinimum(0);
     604
     605    // Task to fill the histogram
     606    MFillH fillB(&histbp, "MTime", "FillBadTime");
     607    fillB.SetNameTab("BadPixTm");
    602608
    603609    /*
     
    758764    //    tlist2.AddToList(&fill7);
    759765    tlist2.AddToList(&fill9);
     766    tlist2.AddToList(&fillB);
    760767    if (extractor1->HasLoGain())
    761768    {
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r8478 r8484  
    854854      DrawBadPixel(*pave, disp24,  5, f, "Presumably dead from Ped. Rms:              ");
    855855      DrawBadPixel(*pave, disp24,  6, f, "Deviating Number of Photo-electrons:       ");
    856       DrawBadPixel(*pave, disp24,  7, f, "Fluctuating Pulse Arrival Times:                 ");
    857       DrawBadPixel(*pave, disp24,  8, f, "Deviating Rel. Arrival Time RMS:                ");
     856      DrawBadPixel(*pave, disp24,  7, f, "Deviation from median abs.arr-time rms:   ");
     857      DrawBadPixel(*pave, disp24,  8, f, "Deviation from median rel.arr-time rms:     ");
    858858      DrawBadPixel(*pave, disp24,  9, f, "Too many Low-Gain Blackout Events:       ");
    859859      DrawBadPixel(*pave, disp24, 10, f, "Previously Excluded:                                   ");
Note: See TracChangeset for help on using the changeset viewer.