Changeset 8544 for trunk


Ignore:
Timestamp:
06/11/07 16:36:14 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r8378 r8544  
    11                                                                  -*-*- END -*-*-
     2
     3 2007/06/06 Markus Meyer
     4
     5   * tpoint/:
     6     - added tpoint files from Jan. 2007 to June 2007
     7
     8
    29
    310 2007/03/14 Thomas Bretz
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r8484 r8544  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.31 2007-05-10 12:14:54 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.32 2007-06-11 15:35:14 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    567567    if (r==0)
    568568    {
    569         x1 = -a/2;
     569        x1 = x2 = -a/2;
    570570        return 1;
    571571    }
     
    710710        const Double_t rq    = R/TMath::Abs(Q);
    711711
     712        const Double_t t = TMath::ACos(rq/sqrtq)/3;
     713
     714        static const Double_t sqrt3 = TMath::Sqrt(3.);
     715
     716        const Double_t s = TMath::Sin(t)*sqrt3;
     717        const Double_t c = TMath::Cos(t);
     718
     719        x1 = 2*sqrtq *      c  - a/3;
     720        x2 =  -sqrtq * (s + c) - a/3;
     721        x3 =   sqrtq * (s - c) - a/3;
     722
     723        /* --- Easier to understand but slower ---
    712724        const Double_t th1 = TMath::ACos(rq/sqrtq);
    713725        const Double_t th2 = th1 + TMath::TwoPi();
     
    717729        x2 = 2.*sqrtq * TMath::Cos(th2/3.) - a/3.;
    718730        x3 = 2.*sqrtq * TMath::Cos(th3/3.) - a/3.;
    719 
     731        */
    720732        return 3;
    721733    }
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r8324 r8544  
    7070    inline Int_t ModF(Double_t dbl, Double_t &frac) { Double_t rc; frac = modf(dbl, &rc); return TMath::Nint(rc); }
    7171
    72     inline Double_t Sqrt3(Double_t x) { return TMath::Sign(TMath::Power(TMath::Abs(x), 1./3), x); }
     72    inline Double_t Sqrt3(Double_t x) { return cbrt(x); }
    7373
    7474    inline Double_t Sgn(Double_t d) { return d<0 ? -1 : 1; }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r8490 r8544  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.180 2007-05-11 10:25:44 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.181 2007-06-11 15:35:14 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    750750            }
    751751
     752            if (res==0)
     753            {
     754                *fLog << warn << "Pixel  " << setw(4) << i << ": Abs-time rms==0." << endl;
     755                (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingTimeResolution);
     756                continue;
     757            }
     758
    752759            // Now compare to a lower and upper limit
    753760            if (res<=lolim || res>=hilim)
  • trunk/MagicSoft/Mars/sponde.cc

    r8442 r8544  
    209209    //
    210210    MEnv env(kConfig);
     211    if (!env.IsValid())
     212    {
     213        gLog << err << "Configuration file " << kConfig << " not found." << endl;
     214        return 0xfe;
     215    }
    211216
    212217    MJSpectrum job(Form("MJSpectrum #%d", seq.GetNumAnalysis()));
Note: See TracChangeset for help on using the changeset viewer.