Changeset 7091


Ignore:
Timestamp:
05/25/05 16:18:11 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7090 r7091  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 INPREP Markus Gaug (2005/05/21)
     24
     25   * mcalib/MCalibrationChargePix.[h,cc]
     26     - allow setting of extractor resolution in CalcReducedSigma()
     27
     28   * mcalib/MCalibrationChargeCalc.[h,cc]
     29     - implement usage of extractor resolution (only if UseExtractorRes
     30       is set).
     31
     32
     33
     34 2005/05/25 Thomas Bretz
     35
     36   * callisto.cc, ganymed.cc, mars.cc, merpp.cc, readdaq.cc,
     37     readraw.cc, sponde.cc, star.cc:
     38     - made the output about the root version clearer
     39
     40   * mbase/MEvtLoop.cc:
     41     - call CallProcess instead of Process for the mail tasklist
     42       (this makes sure that all counters are correct) This should
     43       NOT be done for Pre/PostProcess
     44
     45   * mbase/MStatusDisplay.cc:
     46     - fixed a possible crash if padsave==NULL
     47
     48   * mbase/MTask.cc:
     49     - initialize fNumExec0 with 0 (this was the reason why the
     50       missing CallProcess in MEvtLoop didn't seem to have any effect
     51       on the possible printing of the statistics
     52
     53   * mhflux/MAlphaFitter.cc:
     54     - improved output
     55
     56   * mhflux/MHEffectiveOnTime.cc:
     57     - added some eMail from Wolfgang about treating the calibration
     58       events to the class description
     59     - removed some debug output in Paint()
     60
     61   * mhflux/MHThetaSq.cc:
     62     - replaced \\theta by \\vartheta
     63
     64   * mhvstime/MHPixVsTime.cc:
     65     - fixed a bug found by marcos: the error bars weren't retrieved
     66       correctly (instead of fTypeErr fType was requested)
     67
     68   * mjobs/MJStar.cc:
     69     - do not use calibration events for rate and effective-on-time
     70       calculation
     71
     72   * mjobs/MJob.cc:
     73     - added some debug output to ExpandPath
     74
     75   * msignal/MExtractTime.h, msignal/MExtractTimeAndCharge.h,
     76     msignal/MExtractor.h:
     77     - added Print() to //*MENU*
     78
     79
     80
    2381 2005/05/25 Daniela Dorner
    2482
  • trunk/MagicSoft/Mars/callisto.cc

    r7001 r7091  
    3333    gLog << "                 Callisto - MARS V" << MARSVER            << endl;
    3434    gLog << "    MARS -- CALibrate LIght Signals and Time Offsets"     << endl;
    35     gLog << "               Compiled on <" << __DATE__ << ">"          << endl;
    36     gLog << "                  Using ROOT v" << ROOTVER                << endl;
     35    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    3736    gLog << "========================================================" << endl;
    3837    gLog << endl;
  • trunk/MagicSoft/Mars/ganymed.cc

    r7004 r7091  
    3030    gLog << "                  Ganymed - MARS V" << MARSVER            << endl;
    3131    gLog << "   MARS -- Gammas Are Now Your Most Exciting Discovery"   << endl;
    32     gLog << "               Compiled on <" << __DATE__ << ">"          << endl;
    33     gLog << "                  Using ROOT v" << ROOTVER                << endl;
     32    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    3433    gLog << "========================================================" << endl;
    3534    gLog << endl;
  • trunk/MagicSoft/Mars/mars.cc

    r7001 r7091  
    1616
    1717using namespace std;
    18 /*
    19 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,02)
    20 #include <TRootGuiFactory.h>
    21 #include <TPluginManager.h>
    22 void InitGuiFactory()
    23 {
    24     if (gROOT->IsBatch())
    25         gROOT->SetBatch(kFALSE);
    26 
    27     //
    28     // Must be loaded by hand, because it is not loaded by TGApplication.
    29     // We could also use TApplication instead, but TApplication doesn't
    30     // deal with the DISPLAY variable in a convient way.
    31     //
    32     TPluginHandler *h;
    33     if ((h = gROOT->GetPluginManager()->FindHandler("TGuiFactory", "root")))
    34     {
    35         if (h->LoadPlugin() == -1)
    36             return;
    37         gGuiFactory = (TGuiFactory*)h->ExecPlugin(0);
    38     }
    39 }
    40 #endif
    41 */
    4218
    4319// **********************************************************************
     
    5834    gLog << "                    MARS V" << MARSVER              << endl;
    5935    gLog << "    Magic Analysis and Reconstruction Software"     << endl;
    60     gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
    61     gLog << "               Using ROOT v" << ROOTVER             << endl;
     36    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    6237    gLog << "==================================================" << endl;
    6338    gLog << endl;
     
    6843    gLog << all << endl;
    6944    gLog << "Sorry the usage is:" << endl;
    70     gLog << "   mars [-h] [-?] [-a0] [-vn]" << endl << endl;
     45    gLog << " mars [options]" << endl << endl;
     46    gLog << " Options:" << endl;
    7147    gLog.Usage();
    7248    gLog << "     -?/-h: This help" << endl << endl;
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r7071 r7091  
    475475        while (1)
    476476        {
    477             rc=fTaskList->Process();
     477            rc=fTaskList->CallProcess();
    478478            if (rc!=kTRUE && rc!=kCONTINUE)
    479479                break;
     
    487487        while (dummy--)
    488488        {
    489             rc=fTaskList->Process();
     489            rc=fTaskList->CallProcess();
    490490            if (rc!=kTRUE && rc!=kCONTINUE)
    491491                break;
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r7012 r7091  
    26732673    }
    26742674
    2675     padsav->cd();
     2675    if (padsave)
     2676        padsav->cd();
    26762677
    26772678    *fLog << inf << "done." << endl;
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r6502 r7091  
    115115MTask::MTask(const char *name, const char *title)
    116116    : fFilter(NULL), fSerialNumber(0), fIsPreprocessed(kFALSE),
    117     fStopwatch(0)
     117    fStopwatch(0), fNumExec0(0)
    118118{
    119119    fName  = name  ? name  : "MTask";
  • trunk/MagicSoft/Mars/merpp.cc

    r7001 r7091  
    5353    gLog << "                MERPP - MARS V" << MARSVER          << endl;
    5454    gLog << "     MARS - Merging and Preprocessing Program"      << endl;
    55     gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
    56     gLog << "               Using ROOT v" << ROOTVER             << endl;
     55    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    5756    gLog << "==================================================" << endl;
    5857    gLog << endl;
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7066 r7091  
    357357    case kEntries:     *fLog << "entries.";      break;
    358358    case kIntegral:    *fLog << "integral.";     break;
    359     case kOffRegion:   *fLog << "off region.";  break;
    360     case kBackground:  *fLog << "background.";  break;
    361     case kLeastSquare: *fLog << "least square."; break;
     359    case kOffRegion:   *fLog << "off region (intgeral between " << fScaleMin << " and " << fScaleMax << ")"; break;
     360    case kBackground:  *fLog << "background (integral between " << fBgMin    << " and " << fBgMax    << ")"; break;
     361    case kLeastSquare: *fLog << "least square (N/A)"; break;
    362362    case kUserScale:   *fLog << "user def (" << fScaleUser << ")"; break;
    363363    }
  • trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc

    r7000 r7091  
    7575//    MTimeEffectiveOnTime [MTime]
    7676//
     77//
     78// ==========================================================================
     79// Dear Colleagues,
     80//
     81// for the case that we are taking calibration events interleaved with
     82// cosmics events the calculation of the effective observation time has to
     83// be modified. I have summarized the proposed procedures in the note at the
     84// end of this message. The formulas have been checked by a simulation.
     85//
     86// Comments are welcome.
     87//
     88// Regards,  Wolfgang
     89// --------------------------------------------------------------------------
     90//                                                       Wolfgang Wittek
     91//                                                         2 Dec. 2004
     92//
     93// Calculation of the effective observation time when cosmics and calibration
     94// events are taken simultaneously.
     95// --------------------------------
     96//
     97// I. Introduction
     98// ---------------
     99// It is planned to take light calibration events (at a certain fixed frequency
     100// lambda_calib) interlaced with cosmics events. The advantages of this
     101// procedure are :
     102//
     103// - the pedestals, which would be determined from the cosmics, could be
     104//   used for both the calibration and the cosmics events
     105//
     106// - because calibration and cosmics events are taken quasi simultaneously,
     107//   rapid variations (in the order of a few minutes) of base lines and of the
     108//   photon/ADC conversion factors could be recognized and taken into account
     109//
     110// The effective observation time T_eff is defined as that time range, within
     111// which the recorded number of events N_cosmics would be obtained under ideal
     112// conditions (only cosmics, no dead time, no calibration events, ...).
     113//
     114// In the absence of calibration events the effective observation time can
     115// be determined from the distribution of time differences 'dt' between
     116// successive cosmics events (see first figure in the attached ps file).
     117// The exponential slope 'lambda' of this distribution is the ideal cosmics
     118// event rate. If 'N_cosmics' is the total number of recorded cosmics events,
     119// T_eff is obtained by
     120//
     121//    T_eff = N_cosmics / lambda
     122//
     123// In the case of a finite dead time 'dead', the distribution (for dt > dead) is
     124// still exponential with the same slope 'lambda'. 'lambda' should be determined
     125// in a region of 'dt' which is not affected by the dead time, i.e. at not too
     126// low 'dt'.
     127//
     128//
     129//
     130// II. Problems in the presence of calibration events
     131// --------------------------------------------------
     132// If calibration events are taken interlaced with cosmics, and if the dead time
     133// is negligible, the distribution of time differences 'dt' between cosmics can
     134// be used for calculating the effective observation time, as if the calibration
     135// events were not present.
     136//
     137// In the case of a non-negligible dead time 'dead', however, the distribution of
     138// time differences between cosmics is distorted, because a cosmics event may be
     139// lost due to the dead time after a calibration event. Even if the time
     140// intervals are ignored which contain a calibration event,
     141//
     142//
     143//        ---|---------o--------|--------->  t
     144//
     145//        cosmics    calib    cosmics
     146//
     147//            <---------------->           <==== time interval to be ignored
     148//
     149//
     150// the distribution of 'dt' is still distorted, because there would be no
     151// 'dt' with dt > tau_calib = 1/lambda_calib. The distribution would also be
     152// distorted in the region dt < tau_calib, due to calibration events occuring
     153// shortly after cosmics events. As a result, the slope of the distribution of
     154// 'dt' would not reflect the ideal cosmics event rate (see second figure; the
     155// values assumed in the simulation are lambda = 200 Hz, lambda_calib = 50
     156// Hz, dead = 0.001 sec, total time = 500 sec, number of generated cosmics
     157// events = 100 000).
     158//
     159//
     160// Note also that some calibration events will not be recorded due to the dead
     161// time after a cosmics event.
     162//
     163//
     164// III. Proposed procedures
     165// ------------------------
     166//
     167// A) The ideal event rate 'lambda' may be calculated from the distribution of
     168// the time difference 'dt_first' between a calibration event and the first
     169// recorded cosmics event after the calibration event. In the region
     170//
     171//     dead < dt_first < tau_calib
     172//
     173// the probability distribution of dt_first is given by
     174//
     175//     p(dt_first) = c * exp(-lambda*dt_first)
     176//
     177// where c is a normalization constant. 'lambda' can be obtained by a simple
     178// exponential fit to the experimental distribution of dt_first (see third
     179// figure). The fit range should start well above the average value of the dead
     180// time 'dead'.
     181//
     182//
     183// B) One may consider those time intervals between recorded cosmics events, which
     184// are completely contained in the region
     185//
     186//    t_calib < t < t_calib + tau_calib
     187//
     188// where t_calib is the time of a recorded calibration event.
     189//
     190//
     191//          <--------------- tau_calib ----------->
     192//
     193//
     194//           0   1  2   3 4  5   6  7    8  9   10
     195//      --|-o---|-|---|--|-|----|--|---|---|-|----o-|---|-|--------->  t
     196//          ^                                     ^
     197//          |                                     |
     198//        t_calib                               t_calib + tau_calib
     199//
     200//
     201// In this example, of the time intervals 0 to 10 only the intervals 1 to 9
     202// should be retained and plotted. The distribution of the length 'dt' of these
     203// intervals in the region
     204//
     205//     dead < dt < tau_calib
     206//
     207// is given by
     208//
     209//     p(dt) = c * (tau_calib-dt-dead) * exp(-lambda*dt)
     210//
     211// A fit of this expression to the experimental distribution of 'dt' yields
     212// 'lambda' (see fourth figure). For 'dead' an average value of the dead time
     213// should be chosen, and the fit range should end well before dt = tau_calib-dead.
     214//
     215//
     216// Method A has the advantage that the p(dt_first) does not depend on 'dead'.
     217// 'dead' has to be considered when defining the fit range, both in method A and
     218// in method B. In method B the event statistics is larger leading to a smaller
     219// fitted error of 'lambda' than method A (see the figures).
     220//
     221//
     222// The effective observation time is again obtained by
     223//
     224//    T_eff = N_cosmics / lambda
     225//
     226// where N_cosmics is the total number of recorded cosmics events. Note that
     227// N_cosmics is equal to
     228//
     229//    N_cosmics = N_tot - N_calib
     230//
     231// where N_tot is the total number of recorded events (including the calibration
     232// events) and N_calib is the number of recorded calibration events.
     233//
     234// Note that if time intervals are discarded for the determination of lambda,
     235// the corresponding cosmics events need not and should not be discarded.
     236//
     237//
     238// IV. Procedure if the calibration events are taken in bunches
     239// ------------------------------------------------------------
     240// In November 2004 the rate of calibration events is not constant. The events
     241// are taken in 200 Hz bunches every second, such that the rate is 200 Hz for
     242// 0.25 sec, followed by a gap of 0.75 sec. Then follows the next 200 Hz bunch.
     243//
     244// In this case it is proposed to consider for the calculation of 'lambda' only
     245// the cosmics events within the gaps of 0.75 sec. For these cosmics events one
     246// of the methods described in III. can be applied.
     247//
     248//
     249// V. Alternative pocedure
     250// -----------------------
     251// The effective observation time can also be determined from the total
     252// observation time and the total dead time. The latter is written out by the DAQ.
     253// In this case it has to be made sure that the dead time is available in Mars
     254// when the effective observation time is calculated.
     255//
    77256//////////////////////////////////////////////////////////////////////////////
    78257#include "MHEffectiveOnTime.h"
     
    646825void MHEffectiveOnTime::Paint(Option_t *opt)
    647826{
    648     *fLog << all << "Paint: '" << opt << "'" << endl;
    649 
    650827    TH1D *h=0;
    651828    TPaveStats *st=0;
  • trunk/MagicSoft/Mars/mhflux/MHThetaSq.cc

    r7064 r7091  
    6969    fHist.SetName("Theta");
    7070    fHist.SetTitle("Theta");
    71     fHist.SetZTitle("\\theta^{2} [deg^{2}]");
     71    fHist.SetZTitle("\\vartheta^{2} [deg^{2}]");
    7272    fHist.SetDirectory(NULL);
    7373
    7474    // Main histogram
    7575    fHistTime.SetName("Theta");
    76     fHistTime.SetXTitle("\\theta^{2} [deg^{2}]");
     76    fHistTime.SetXTitle("\\vartheta^{2} [deg^{2}]");
    7777    fHistTime.SetDirectory(NULL);
    7878
  • trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc

    r6977 r7091  
    193193    if (fTypeErr>=0)
    194194    {
    195         evt->GetPixelContent(rms, fIndex, *fCam, fType);
     195        evt->GetPixelContent(rms, fIndex, *fCam, fTypeErr);
    196196        if (TMath::IsNaN(rms))
    197197            return kCONTINUE;
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r7071 r7091  
    368368    if (!ismc)
    369369    {
    370         tlist2.AddToList(&rate);
    371         //tlist2.AddToList(&rate1);
    372         tlist2.AddToList(&fillvs);
    373         //tlist2.AddToList(&cont1);
    374         //tlist2.AddToList(&cont2);
    375         tlist2.AddToList(&fill8);
    376         tlist2.AddToList(&fill9);
     370        tlist2.AddToList(&rate,   "Events");
     371        tlist2.AddToList(&fillvs, "Events");
     372        tlist2.AddToList(&fill8,  "Events");
     373        tlist2.AddToList(&fill9,  "Events");
    377374    }
    378375    //tlist2.AddToList(&fillb);
  • trunk/MagicSoft/Mars/mjobs/MJob.cc

    r7013 r7091  
    304304    // empty
    305305    if (fname.IsNull())
    306         return fname;
     306        return "";
    307307
    308308    // Expand path using environment
     
    311311    // Absolute path
    312312    if (fname[0]=='/')
     313    {
     314        gLog << dbg << "MJob::ExpandPath - Path " << fname << " is absolute." << endl;
    313315        return fname;
     316    }
    314317
    315318    // relative path to file and file could be found
    316319    if (!gSystem->AccessPathName(fname, kFileExists))
     320    {
     321        gLog << dbg << "MJob::ExpandPath - Relative path " << fname << " found..." << endl;
    317322        return fname;
     323    }
    318324
    319325    // Now check gEnv and MARSSYS. gEnv can overwrite MARSSYS
     
    330336    path += fname;
    331337
     338    gLog << dbg << "MJob::ExpandPath - Filename expanded to " << path << endl;
     339
    332340    // return new path
    333341    return path;
  • trunk/MagicSoft/Mars/msignal/MExtractTime.h

    r5734 r7091  
    3131  MExtractTime(const char *name=NULL, const char *title=NULL);
    3232
    33   void Print(Option_t *o) const;
     33  void Print(Option_t *o) const; //*MENU*
    3434
    3535  void SetNameTimeCam   ( const char *name=fgNameTimeCam.Data()) { fNameTimeCam = name; }
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r6117 r7091  
    4040  Byte_t GetLoGainSwitch      () const { return fLoGainSwitch;     }
    4141
    42   void Print(Option_t *o="") const;
     42  void Print(Option_t *o="") const; //*MENU*
    4343 
    4444  void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain;  }
  • trunk/MagicSoft/Mars/msignal/MExtractor.h

    r7043 r7091  
    8989  Float_t GetNumLoGainSamples() const { return fNumLoGainSamples; }
    9090  Float_t GetOffsetLoGain()     const { return fOffsetLoGain;     }
     91  Float_t GetResolutionPerPheHiGain() const { return fResolutionPerPheHiGain; }
     92  Float_t GetResolutionPerPheLoGain() const { return fResolutionPerPheLoGain; }
    9193
    9294  Bool_t  IsNoiseCalculation () const { return fNoiseCalculation; }
     
    112114    }
    113115
    114   void Print(Option_t *o="") const;
     116  void Print(Option_t *o="") const; //*MENU*
    115117
    116118  ClassDef(MExtractor, 6) // Signal Extractor Base Class
  • trunk/MagicSoft/Mars/readdaq.cc

    r7001 r7091  
    3939    gLog << "              ReadDaq - MARS V" << MARSVER          << endl;
    4040    gLog << "       MARS - Read and print daq data files"        << endl;
    41     gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
    42     gLog << "               Using ROOT v" << ROOTVER             << endl;
     41    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    4342    gLog << "==================================================" << endl;
    4443    gLog << endl;
  • trunk/MagicSoft/Mars/readraw.cc

    r7001 r7091  
    4242    gLog << "              ReadRaw - MARS V" << MARSVER          << endl;
    4343    gLog << "       MARS - Read and print raw data files"        << endl;
    44     gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
    45     gLog << "               Using ROOT v" << ROOTVER             << endl;
     44    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    4645    gLog << "==================================================" << endl;
    4746    gLog << endl;
  • trunk/MagicSoft/Mars/sponde.cc

    r7001 r7091  
    3030    gLog << "                  Sponde - MARS V" << MARSVER             << endl;
    3131    gLog << "               MARS -- SPectrum ON DEmand"                << endl;
    32     gLog << "               Compiled on <" << __DATE__ << ">"          << endl;
    33     gLog << "                  Using ROOT v" << ROOTVER                << endl;
     32    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    3433    gLog << "========================================================" << endl;
    3534    gLog << endl;
  • trunk/MagicSoft/Mars/star.cc

    r7001 r7091  
    3030    gLog << "                   Star - MARS V" << MARSVER              << endl;
    3131    gLog << "      MARS -- STandard Analysis and Reconstruction"       << endl;
    32     gLog << "               Compiled on <" << __DATE__ << ">"          << endl;
    33     gLog << "                  Using ROOT v" << ROOTVER                << endl;
     32    gLog << "   Compiled with ROOT v" << ROOTVER << " on <" << __DATE__ ">" << endl;
    3433    gLog << "========================================================" << endl;
    3534    gLog << endl;
Note: See TracChangeset for help on using the changeset viewer.