Changeset 9367


Ignore:
Timestamp:
03/01/09 12:51:04 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9366 r9367  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2009/03/01 Thomas Bretz
     21
     22   * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc:
     23     - added pointing model 328198
     24
     25   * mbase/MSpline3.h:
     26     - added a cast to make it compile with root 5.18
     27
     28   * melectronics/MPulseShape.cc:
     29     - included TH1 to make it compile with root 5.18
     30
     31   * mhflux/MAlphaFitter.[h,cc]:
     32     - convert MString::Format to Data()
     33     - added type SignificanceSqrtExcess
     34
     35   * mhflux/MHFalseSource.cc, mjobs/MJSpectrum.cc:
     36     - convert MString::Format to Data()
     37
     38   * mhist/MHCamera.cc:
     39     - changed some const TString to const char to resolve
     40       ambiguity in root 5.18 in TF1 constructor
     41
     42   * msim/MHPhotonEvent.cc:
     43     - use TMath::Abs instead of abs
     44
     45   * msim/MSimPointingPos.[h,cc]:
     46     - moved getter and setter to source file to avoid including of
     47       TMath
     48
     49
     50
    2051 2009/02/26 Daniel Hoehne-Moench
    2152
  • trunk/MagicSoft/Mars/NEWS

    r9359 r9367  
    9393
    9494   * Now outputs MSrcPosCam for Monte Carlos in the Events tree.
     95
     96 ;ganymed
     97 
     98   * added pointing model 328198
    9599
    96100 ;sponde
  • trunk/MagicSoft/Mars/ganymed.rc

    r9078 r9367  
    5656#MPointingDevCalc.MaxAge       1.0
    5757
    58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104
     58MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 328198
    5959
    6060# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/ganymed_onoff.rc

    r9078 r9367  
    5656#MPointingDevCalc.MaxAge       1.0
    5757
    58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104
     58MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 328198
    5959
    6060# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/ganymed_wobble.rc

    r9078 r9367  
    5656#MPointingDevCalc.MaxAge       1.0
    5757
    58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104
     58MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 328198
    5959
    6060# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MSpline3.h

    r9312 r9367  
    5454   Int_t GetNp() const { return fNp; }
    5555
    56    TH1 *GetHistogram() const { return fHistogram; }
     56   TH1 *GetHistogram() const { return (TH1*)fHistogram; }
    5757
    5858   ClassDef(MSpline3, 1) // An extension of the TSpline3
  • trunk/MagicSoft/Mars/melectronics/MPulseShape.cc

    r9312 r9367  
    3333
    3434#include <TF1.h>
     35#include <TH1.h>
    3536
    3637#include "MLog.h"
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r9302 r9367  
    115115    {
    116116    case kGauss:
    117         fFunc=new TF1("", MString::Format("gaus(0) + pol%d(3)", fPolynomOrder));
     117        fFunc=new TF1("", MString::Format("gaus(0) + pol%d(3)", fPolynomOrder).Data());
    118118        break;
    119119    case kThetaSq:
     
    417417    /*
    418418     cout << MMath::SignificanceLiMaSigned(hon.Integral(1, bin), fit.GetEventsBackground()/sc, sc) << " ";
    419      cout << sc << " ";
     419     cout << sc << " " << fit.GetEventsBackground() << " ";
    420420     cout << fit.fChiSqBg << endl;
    421421     */
     
    847847            return 0;
    848848        return -GetSignificance()*TMath::Log10(GetEventsExcess());
     849    case kSignificanceSqrtExcess:
     850        if (GetEventsExcess()<1)
     851            return 0;
     852        return -GetSignificance()*TMath::Sqrt(GetEventsExcess());
    849853    case kSignificanceExcess:
    850854        return -GetSignificance()*GetEventsExcess();
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h

    r9302 r9367  
    3030        kSignificanceChi2,
    3131        kSignificanceLogExcess,
     32        kSignificanceSqrtExcess,
    3233        kSignificanceExcess,
    3334        kExcess,
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r9303 r9367  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.25 2009-02-07 20:47:33 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.26 2009-03-01 12:51:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    11891189        }
    11901190
    1191         TF1 f1("f1", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);
    1192         TF1 f2("f2", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);
     1191        TF1 f1("f1", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom).Data(), 0, 90);
     1192        TF1 f2("f2", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom).Data(), 0, 90);
    11931193        f1.SetParameters(maxpar.GetArray());
    11941194        f2.SetParameters(maxpar.GetArray());
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r9328 r9367  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.117 2009-02-12 20:05:06 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.118 2009-03-01 12:51:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    22452245    const Double_t width = xmax-xmin;
    22462246
    2247     const TString dgausformula = "([0]-[3])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"
     2247    const char *dgausformula = "([0]-[3])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"
    22482248        "+[3]/[5]*exp(-0.5*(x-[4])*(x-[4])/[5]/[5])";
    22492249
    2250     const TString tgausformula = "([0]-[3]-[6])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"
     2250    const char *tgausformula = "([0]-[3]-[6])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"
    22512251        "+[3]/[5]*exp(-0.5*(x-[4])*(x-[4])/[5]/[5])"
    22522252        "+[6]/[8]*exp(-0.5*(x-[7])*(x-[7])/[8]/[8])";
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r9345 r9367  
    19361936
    19371937    // Spectrum fitted (convert res[1] from TeV to GeV)
    1938     TF1 flx("flx", MString::Format("%e*pow(x/500, %f)", res[1]/500, res[0]));
     1938    TF1 flx("flx", MString::Format("%e*pow(x/500, %f)", res[1]/500, res[0]).Data());
    19391939
    19401940    // Number of events this spectrum would produce per s and m^2
  • trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc

    r9348 r9367  
    266266    MH::FindGoodLimits(num, num, xmin, xmax, kTRUE);
    267267
    268     MBinning(abs(num), xmin-.5, xmax-.5).Apply(fHistWL);
     268    MBinning(TMath::Abs(num), xmin-.5, xmax-.5).Apply(fHistWL);
    269269
    270270    return kTRUE;
  • trunk/MagicSoft/Mars/msim/MSimPointingPos.cc

    r9362 r9367  
    9292}
    9393
     94// --------------------------------------------------------------------------
     95//
     96// Get the distance from the real source to the poitning position.
     97//
     98Double_t MSimPointingPos::GetOffTargetDistance() const
     99{
     100    return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg();
     101}
     102
     103// --------------------------------------------------------------------------
     104//
     105// Get the phi angle counted from the upward direction the source position
     106// is rotated. distance from the real source to the pointing position.
     107// A negative value refers to a random distribution.
     108//
     109Double_t MSimPointingPos::GetOffTargetPhi() const
     110{
     111    return fOffTargetPhi<0 ? -1 : fOffTargetPhi*TMath::RadToDeg();
     112}
     113
     114// --------------------------------------------------------------------------
     115//
     116// Set fOffTargetDistance, see also GetOffTargetDistance
     117//
     118void MSimPointingPos::SetOffTargetDistance(Double_t d)
     119{
     120    fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad();
     121}
     122
     123// --------------------------------------------------------------------------
     124//
     125// Set fOffTargetPhi, see also GetOffTargetPhi
     126//
     127void MSimPointingPos::SetOffTargetPhi(Double_t p)
     128{
     129    fOffTargetPhi = p<0 ? -1 : p*TMath::DegToRad();
     130}
     131
     132
    94133
    95134// --------------------------------------------------------------------------
     
    153192    {
    154193        dtheta = fOffTargetDistance;
    155         dphi   = fOffTargetPhi>0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi());
     194        dphi   = fOffTargetPhi>=0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi());
    156195    }
    157196    else
  • trunk/MagicSoft/Mars/msim/MSimPointingPos.h

    r9362 r9367  
    3636
    3737    // Getter
    38     Double_t GetOffTargetDistance() const { return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg(); }
    39     Double_t GetOffTargetPhi() const { return fOffTargetPhi*TMath::RadToDeg(); }
     38    Double_t GetOffTargetDistance() const;
     39    Double_t GetOffTargetPhi() const;
    4040
    4141    // Setter
    42     void SetOffTargetDistance(Double_t d=0) { fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad(); }
    43     void SetOffTargetPhi(Double_t p=0) { fOffTargetPhi = p*TMath::DegToRad(); }
     42    void SetOffTargetDistance(Double_t d=0);
     43    void SetOffTargetPhi(Double_t p=-1);
    4444
    4545    // MSimPointingPos
Note: See TracChangeset for help on using the changeset viewer.