Changeset 7870 for trunk


Ignore:
Timestamp:
08/09/06 11:01:30 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7869 r7870  
    2222   * mbase/MMath.cc:
    2323     - changed MedianDev to support 68% division instead of 0.5%
     24
     25   * datacenter/macros/fillsignal.C:
     26     - adapted to use Median for Pulse Offset and Gain
    2427
    2528
  • trunk/MagicSoft/Mars/NEWS

    r7867 r7870  
    1010
    1111   - general: Added a function to MMath which returns the Median of
    12      the distribution abs(y[i]-median), which is somehow the median
    13      counterpart of the rms.
     12     the distribution abs(y[i]-median) but at 68:32 division instead
     13     of 50:50, which is somehow the mediani counterpart of the rms.
    1414
    1515   - showplot:
  • trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C

    r7858 r7870  
    213213    Double_t meanoff = TMath::Nint(pullo->GetMean()*100.)/100.;
    214214    Double_t rmsoff  = TMath::Nint(pullo->GetRMS() *100.)/100.;
    215  */
    216     Double_t meanoff = TMath::Nint(hilooff->GetMean()*100.)/100.;
    217     Double_t rmsoff  = TMath::Nint(hilooff->GetRMS() *100.)/100.;
    218 
    219     Double_t meancal = TMath::Nint(hilocal->GetMean()*100.)/100.;
    220     Double_t rmscal  = TMath::Nint(hilocal->GetRMS() *100.)/100.;
     215    */
     216
     217    // USE MEDIAN INSTEAD? GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
     218
     219    Double_t medoff = TMath::Nint(hilooff->GetMedian()   *10000)/10000.;
     220    Double_t devoff = TMath::Nint(hilooff->GetMedianDev()*10000)/10000.;
     221
     222    Double_t medcal = TMath::Nint(hilocal->GetMedian()   *100)/100.;
     223    Double_t devcal = TMath::Nint(hilocal->GetMedianDev()*100)/100.;
    221224
    222225    //get sequence number from the filename
     
    245248    TString rmspullo     =Form("%6.2f", rmslo);
    246249    */
    247     TString meanpuloff   =Form("%6.2f", meanoff);
    248     TString rmspuloff    =Form("%6.2f", rmsoff);
    249     TString meanhilocal  =Form("%6.2f", meancal);
    250     TString rmshilocal   =Form("%6.2f", rmscal);
     250    TString medpuloff    =Form("%7.4f", medoff);
     251    TString devpuloff    =Form("%7.4f", devoff);
     252    TString medhilocal   =Form("%6.2f", medcal);
     253    TString devhilocal   =Form("%6.2f", devcal);
    251254
    252255    if (meanextpul<0 && rmsextpul<0)
     
    270273//    cout << "  Mean ext.HiGain PulsePos " << meanpulhi     << " +- " << rmspulhi     << endl;
    271274//    cout << "  Mean ext.LoGain PulsePos " << meanpullo     << " +- " << rmspullo     << endl;
    272     cout << "  Lo-Hi gain offset:       " << meanpuloff    << " +- " << rmspuloff    << endl;
    273     cout << "  Hi/Lo gain ratio:        " << meanhilocal   << " +- " << rmshilocal   << endl;
     275    cout << "  Lo-Hi gain offset:      " << medpuloff    << " +-  " << devpuloff    << endl;
     276    cout << "  Hi/Lo gain ratio:        " << medhilocal   << " +- " << devhilocal   << endl;
    274277    cout << endl;
    275278
     
    285288                         //" fPulsePosHiMean=%s,    fPulsePosHiRms=%s,    "
    286289                         //" fPulsePosLoMean=%s,    fPulsePosLoRms=%s,    "
    287                          " fPulsePosOffMean=%s,   fPulsePosOffRms=%s,   "
    288                          " fHiLoGainRatioMean=%s, fHiLoGainRatioRms=%s "
     290                         " fPulsePosOffMed=%s,    fPulsePosOffDev=%s,   "
     291                         " fHiLoGainRatioMed=%s,  fHiLoGainRatioDev=%s "
    289292                         " WHERE fSequenceFirst='%d' ",
    290293                         meanrmsinner.Data(),  meanrmsouter.Data(),
     
    294297                         //meanpulhi.Data(),     rmspulhi.Data(),
    295298                         //meanpullo.Data(),     rmspullo.Data(),
    296                          meanpuloff.Data(),    rmspuloff.Data(),
    297                          meanhilocal.Data(),   rmshilocal.Data(),
     299                         medpuloff.Data(),    devpuloff.Data(),
     300                         medhilocal.Data(),   devhilocal.Data(),
    298301                         seq);
    299302
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r7868 r7870  
    181181
    182182    // FIXME: GausProb() is a workaround. It should be taken into account in Median!
    183     return TMath::Median(n, arr);
    184     /*
     183    //return TMath::Median(n, arr);
     184   
    185185    // Sort distribution
    186186    Long64_t idx[n];
     
    199199
    200200    return dev;
    201 */
    202201}
    203202
Note: See TracChangeset for help on using the changeset viewer.