Changeset 7251


Ignore:
Timestamp:
08/02/05 10:04:19 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7249 r7251  
    1 
    2  
    31Please  do  not write behind the end of line tag so that it is  possible
    42to   send  a   Changelog   file  to  a  line  printer  directly.  Thanks.
     
    2018
    2119                                                 -*-*- END OF LINE -*-*-
     20
     21 2005/08/02 Thomas Bretz
     22
     23   * callisto.rc, callisto_Dec04Jan05.rc:
     24     - new ScaleFactor (1% difference)
     25
     26   * callisto_MarApr05.rc:
     27     - new file, identical to callisto.rc but scale factor 5% different
     28
     29   * mhflux/MHPhi.[h,cc]:
     30     - some small improvements
     31     - commented code for further improvement
     32
     33   * mjobs/MJCut.cc:
     34     - implemented MHPhi for wobble mode
     35
     36   * mjobs/MJStar.cc:
     37     - repleced maximum deviation (45) in first muon cut by 35
     38       it is done anyhow in a later step and doesn't change in between
     39
     40
    2241
    2342 2005/07/31 Daniela Dorner
  • trunk/MagicSoft/Mars/NEWS

    r7250 r7251  
    5454       - 1.40 (MExtractTimeAndChargeDigitalFilter)
    5555     This is important mainly for timing studies.
    56 
    57    - callisto: added new plot (MHPhi) as described in
    58      http://www.astro.uni-wuerzburg.de/results/ringmethod/
    5956
    6057   - callisto: Changed limits in MHCalibrationChargeCalc from
     
    7269     for Monte Carlo calibrations.
    7370
     71   - callisto: Updated Muon scale with latest results (1% difference
     72     for most data, 5% for Mar/Apr'05)
     73
    7474   - callisto: use a new criterium to exclude bad pixels: If the high-gain
    7575     was saturated and the blackout-events in the low-gain exceed the
     
    134134           plot was a histogram instead of a profile the resulting psf
    135135           became pedestal rms dependant
     136
     137   - ganymed: added new plot (MHPhi) for wobble mode as described in
     138     http://www.astro.uni-wuerzburg.de/results/ringmethod/
    136139
    137140   - ganymed: corrects now (correctly?) for the misspointing in
  • trunk/MagicSoft/Mars/callisto.rc

    r7189 r7251  
    399399#MJCalibrateSignal.MCalibColorSet.ExpicitColor: green,blue,uv,ct1
    400400#MJCalibrateSignal.MCalibrateData.PedestalFlag: Event
    401 MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.956937799
     401MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.9633911368
    402402#MJCalibrateSignal.MCalibrateData.CalibrationMode: Default
    403403#MJCalibrateSignal.MCalibrateData.CalibConvMinLimit: 0.01
  • trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc

    r7189 r7251  
    410410#MJCalibrateSignal.MCalibColorSet.ExpicitColor: green,blue,uv,ct1
    411411#MJCalibrateSignal.MCalibrateData.PedestalFlag: Event
    412 MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.904159132
     412MJCalibrateSignal.MCalibrateData.ScaleFactor: 0.919117647
    413413#MJCalibrateSignal.MCalibrateData.CalibrationMode: Default
    414414#MJCalibrateSignal.MCalibrateData.CalibConvMinLimit: 0.01
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r7181 r7251  
    1010namespace MMath
    1111{
     12    inline Double_t DegToHor() { return 1./15; }
     13    inline Double_t HorToDeg() { return 15;    }
     14
     15    inline Double_t RadToHor() { return TMath::RadToDeg()/15; }
     16    inline Double_t HorToRad() { return 15/TMath::RadToDeg(); }
     17
    1218    Double_t GaussProb(Double_t x, Double_t sigma, Double_t mean=0);
    1319
     
    2430    Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x);
    2531
    26     Double_t Sgn(Double_t d);
     32    inline Double_t Sgn(Double_t d) { return d<0 ? -1 : 1; }
    2733}
    2834
    29 inline Double_t MMath::Sgn(Double_t d) { return d<0 ? -1 : 1; }
    30 
    3135#endif
  • trunk/MagicSoft/Mars/mhflux/MHPhi.cc

    r7250 r7251  
    3030// the source position.
    3131//
     32// More detail can be found at:
     33// http://www.astro.uni-wuerzburg.de/results/ringmethod/
     34//
    3235////////////////////////////////////////////////////////////////////////////
    3336#include "MHPhi.h"
     
    6063//
    6164MHPhi::MHPhi(const char *name, const char *title)
    62 : fHillas(0), fSrcPos(0), fDisp(0)
     65: fHillas(0), fSrcPos(0), fDisp(0)//, fOnOffMode(kTRUE), fIsOffLoop(kFALSE)
    6366{
    6467    fName  = name  ? name  : "MHPhi";
     
    6669
    6770    // Init Graphs
    68     fHPhi.SetNameTitle("Phi", "Distribution of \\Delta\\Phi");
     71    fHPhi.SetNameTitle("Phi", "\\Delta\\Phi-Distribution");
    6972
    7073    fHPhi.SetXTitle("\\Delta\\Phi [\\circ]");
     
    7881
    7982    fHPhi.GetYaxis()->SetTitleOffset(1.2);
    80 }
     83
     84    /*
     85    fNameParameter = "Disp";
     86
     87    fHist.SetNameTitle("Phi", "\\Delta\\Phi-Distribution");
     88    fHist.SetZTitle("\\Delta\\Phi [\\circ]");
     89    fHist.SetDirectory(NULL);
     90
     91    // Main histogram
     92    fHistTime.SetName("Phi");
     93    fHistTime.SetXTitle("\\Delta\\Phi [\\circ]");
     94    fHistTime.SetDirectory(NULL);
     95
     96    MBinning binsa, binse, binst;
     97    //binsa.SetEdges(75, 0, 1.5);
     98    //binsa.SetEdges(arr);
     99    binse.SetEdgesLog(15, 10, 100000);
     100    binst.SetEdgesASin(67, -0.005, 0.665);
     101    //binsa.Apply(fHistTime);
     102
     103    MH::SetBinning(&fHist, &binst, &binse, &binsa);
     104     */
     105}
     106
     107/*
     108Double_t MHPhi::GetVal() const
     109{
     110    const Dopuble_t disp = static_cast<const MParameterD*>(fParameter)->GetVal();
     111
     112    const TVector2 pos = fHillas->GetMean()*fConvMm2Deg + fHillas->GetNormAxis()*disp;
     113    const TVector2 src = fSrcPos->GetXY()*fConvMm2Deg;
     114
     115    // Calculate radial distance.
     116    const Double_t d = pos.Mod() - src.Mod();
     117
     118    if (d<-fThetaCut*0.913 || d>fThetaCut)
     119        return kTRUE;
     120
     121    const Double_t delta = src.DeltaPhi(pos)*TMath::RadToDeg();
     122    const Double_t absd  = TMath::Abs(delta)
     123
     124    return fHistOff ? absd : 180-absd;
     125}
     126*/
    81127
    82128// --------------------------------------------------------------------------
     
    118164    fThetaCut      = 0.21/1.2;
    119165    fDistSrc       = 0.4;
     166    //fIsOffLoop = !fIsOffLoop;
    120167
    121168    const Double_t w  = TMath::ATan(fThetaCut/fDistSrc);
     
    124171
    125172    MBinning(n, 0, n*sz).Apply(fHPhi);
    126 
     173    /*
     174
     175    // Get Histogram binnings
     176    MBinning binst, binse;
     177    binst.SetEdges(fHist, 'x');
     178    binse.SetEdges(fHist, 'y');
     179
     180    MBinning binsa(n, 0, n*sz);
     181
     182    // Apply binning
     183    binsa.Apply(fHistTime);
     184    MH::SetBinning(&fHist, &binst, &binse, &binsa);
     185
     186    // Remark: Binnings might be overwritten in MHAlpha::SetupFill
     187    return MHAlpha::SetupFill(pl);
     188     */
    127189    return kTRUE;
    128190}
     
    135197Bool_t MHPhi::Fill(const MParContainer *par, const Stat_t weight)
    136198{
    137     const TVector2 pos = fHillas->GetMean()*fConvMm2Deg - fHillas->GetNormAxis()*fDisp->GetVal();
     199    const TVector2 pos = fHillas->GetMean()*fConvMm2Deg + fHillas->GetNormAxis()*fDisp->GetVal();
    138200    const TVector2 src = fSrcPos->GetXY()*fConvMm2Deg;
    139201
     202    // Calculate radial distance.
    140203    const Double_t d = pos.Mod() - src.Mod();
    141204
     
    146209
    147210    fHPhi.Fill(TMath::Abs(delta), weight);
     211
     212    // const Double_t absd = TMath::Abs(delta)
     213    // fHPhi.Fill(fHistOff ? absd : 180-absd, weight);
    148214
    149215    return kTRUE;
     
    161227    pad->SetBorderMode(0);
    162228
     229    AppendPad("combine");
     230
    163231    fHPhi.Draw();
    164232
    165     AppendPad();
     233    AppendPad(opt);
    166234}
    167235
    168236void MHPhi::Paint(Option_t *o)
    169237{
    170     const Double_t sig = fHPhi.Integral(1, fNumBinsSignal);
    171     const Double_t bg  = fHPhi.Integral(1+fNumBinsSignal, fHPhi.GetNbinsX());
    172 
    173     const Double_t cut = fHPhi.GetBinLowEdge(fNumBinsSignal+1);
    174 
    175     const Double_t f   = cut/(180-cut);
    176 
    177     const Double_t S0  = MMath::SignificanceLiMaSigned(sig, bg*f);
    178     const Double_t S   = MMath::SignificanceLiMaSigned(sig, bg, f);
    179 
    180     const TString  fmt = Form("\\sigma_{L/M}=%.1f (\\sigma_{0}=%.1f)  \\Delta\\Phi<%.1f\\circ  E=%.0f  B=%.0f  f=%.2f",
    181                               S, S0, cut, sig-bg*f, bg*f, f);
     238    //TString opt(o);
     239    //opt.ToLower();
     240
     241    // if (opt=="combine" && fHistOff)
     242    // {
     243    //    fHPhi.Add(fHist, fHistOff);
     244    //    return;
     245    // }
     246
     247    const Bool_t wobble = TString(o).Contains("anticut", TString::kIgnoreCase);
     248
     249    const Double_t cut  = fHPhi.GetBinLowEdge(fNumBinsSignal+1);
     250
     251    const Int_t maxbin  = wobble ? fHPhi.GetXaxis()->FindFixBin(180-cut)-1 : fHPhi.GetNbinsX();
     252    const Double_t cut2 = wobble ? fHPhi.GetBinLowEdge(maxbin+1) : 180;
     253
     254    const Double_t sig  = fHPhi.Integral(1, fNumBinsSignal);
     255    const Double_t bg   = fHPhi.Integral(1+fNumBinsSignal, maxbin);
     256
     257    const Double_t f    = cut/(cut2-cut);
     258
     259    const Double_t S0   = MMath::SignificanceLiMaSigned(sig, bg*f);
     260    const Double_t S    = MMath::SignificanceLiMaSigned(sig, bg, f);
     261
     262    const TString  fmt  = Form("\\sigma_{L/M}=%.1f (\\sigma_{0}=%.1f)  \\Delta\\Phi_{on}<%.1f\\circ  \\Delta\\Phi_{off}<%.1f\\circ  E=%.0f  B=%.0f  f=%.2f",
     263                               S, S0, cut, cut2, sig-bg*f, bg*f, f);
    182264
    183265    const Double_t b = bg             *f/fNumBinsSignal;
    184266    const Double_t e = TMath::Sqrt(bg)*f/fNumBinsSignal;
    185267
    186     TLatex text(0.33, 0.94, fmt);
     268    TLatex text(0.27, 0.94, fmt);
    187269    text.SetBit(TLatex::kTextNDC);
    188270    text.SetTextSize(0.035);
     
    192274    line.SetLineColor(14);
    193275    line.PaintLine(cut, gPad->GetUymin(), cut, gPad->GetUymax());
     276    if (maxbin<fHPhi.GetNbinsX())
     277        line.PaintLine(cut2, gPad->GetUymin(), cut2, gPad->GetUymax());
    194278    line.SetLineColor(kBlue);
    195279    line.PaintLine(0, b, cut, b);
     
    202286    m.SetMarkerStyle(kFullDotMedium);
    203287    m.PaintMarker(cut/2, b);
    204 
    205 }
     288}
  • trunk/MagicSoft/Mars/mhflux/MHPhi.h

    r7250 r7251  
    2727    Float_t fThetaCut;
    2828    Float_t fDistSrc;
     29    //Bool_t  fOnOffMode;
     30
     31    //Bool_t  fIsOffLoop; //!
    2932
    3033public:
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7214 r7251  
    727727    MH *hfs=CreateNewHistFS(plist);
    728728    MFillH ffs2(hfs, "MHillas", "FillFS");
     729    MFillH fillphi("MHPhi", "", "FillPhi");
     730    fillphi.SetDrawOption("anticut");
    729731
    730732    tlist.Replace(&readon);
     
    751753        if (!fIsWobble || !fNameHist.IsNull())
    752754            tlist2.Replace(&ffs2);
    753         if (fIsWobble && !fNameHist.IsNull())
    754             tlist2.RemoveFromList(&ffs);
     755        if (fIsWobble)
     756        {
     757            tlist2.AddToListAfter(&fillphi, &falpha2);
     758            if (!fNameHist.IsNull())
     759                tlist2.RemoveFromList(&ffs);
     760        }
    755761
    756762        if (!fIsMonteCarlo)
Note: See TracChangeset for help on using the changeset viewer.