Changeset 8765


Ignore:
Timestamp:
10/27/07 21:59:05 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8762 r8765  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2007/10/27 Thomas Bretz
     22
     23   * mastro/MAstro.[h,cc]:
     24     - added new member functio Mjd2Yymmdd and Yymmmdd2Mjd
     25
     26   * mastro/MAstroSky2Local.cc:
     27     - fixed a typo within a comment
     28
     29   * mbase/MTime.[h,cc]:
     30     - added a member function to set a corsika time
     31
     32   * mimage/MImgCleanStd.h:
     33     - added a setter to set post-clean type
     34
     35   * mmc/MMcEvtBasic.[h,cc]:
     36     - made GetParticleName a static member function usable from
     37       the outside
     38
     39   * mpointing/MPointingDevCalc.cc:
     40     - added another comment
     41
     42   * mreflector/MRflEvtHeader.[h,cc]:
     43     - added Print function
     44
     45   * resources/starguider00000001.txt:
     46     - fixed comment
     47
     48   * resources/starguider00089180.txt:
     49     - added comment
     50
     51
     52
    2153 2007/10/17 Daniel Hoehne
    2254
    2355   * datacenter/scripts/mcsequences:
    24      - included sql query and update/insert sequence information in MCDB
     56     - included sql query and update/insert sequence information
     57       in MCDB
    2558     - small bugfixes: corrected grep for epoch and mode
    2659
     
    3063
    3164   * datacenter/scripts/mcsequences:
    32      - bugfix: Now a sequence is written for every folder and particle mode
     65     - bugfix: Now a sequence is written for every folder and
     66       particle mode
    3367
    3468
     
    4579
    4680   * datacenter/scripts/mcsequences:
    47      - included handling of more than two P/C runs per rawfile directory
     81     - included handling of more than two P/C runs per rawfile
     82       directory
    4883     - building sequences based on rawfile dirs and MC epochs
    4984
     
    5287
    5388   * mmc/MMcCorsikaRunHeader.h:
    54    - included GetViewConeAngle[Inner,Outer], GetAtmosphericModel
     89     - included GetViewConeAngle[Inner,Outer],
     90       GetAtmosphericModel
    5591
    5692
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r8324 r8765  
    323323    // Perform the conversion
    324324    return 1461L*lm10/4 + (306*((m+9)%12)+5)/10 - (3*((lm10+188)/100))/4 + d - 2399904;
     325}
     326
     327// --------------------------------------------------------------------------
     328//
     329// Convert a mjd to a number yymmdd. The century is just cuts away, e.g.
     330//   54393 -->  71020   (2007/10/20)
     331//   50741 --> 971020   (1997/10/20)
     332//   17868 -->  71020   (1907/10/20)
     333//
     334UInt_t MAstro::Mjd2Yymmdd(UInt_t mjd)
     335{
     336    UShort_t y;
     337    Byte_t m, d;
     338    Mjd2Ymd(mjd, y, m, d);
     339
     340    return d + m*100 + (y%100)*10000;
     341}
     342
     343// --------------------------------------------------------------------------
     344//
     345// Convert a yymmdd number to mjd. The century is defined as 2000 for
     346// yy<70, 1900 elsewise.
     347//    71020 --> 54393 (2007/10/20)
     348//   971020 --> 50741 (1997/10/20)
     349//
     350UInt_t MAstro::Yymmdd2Mjd(UInt_t yymmdd)
     351{
     352    const Byte_t   dd =  yymmdd%100;
     353    const Byte_t   mm = (yymmdd/100)%100;
     354    const UShort_t yy = (yymmdd/10000)%100;
     355
     356    return Ymd2Mjd(yy + (yy<70 ? 2000 : 1900), mm, dd);
    325357}
    326358
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r8324 r8765  
    7474    static Int_t Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d);
    7575
     76    static UInt_t Mjd2Yymmdd(UInt_t mjd);
     77    static UInt_t Yymmdd2Mjd(UInt_t yymmdd);
     78
    7679    static Double_t UT2GMST(Double_t ut1);
    7780
  • trunk/MagicSoft/Mars/mastro/MAstroSky2Local.cc

    r7217 r8765  
    8787//   C = RotY(r2)     (Make zenith and sky pole the same point)
    8888//
    89 //   D = RotZ(180deg) (Align rottaion angle to N=0, E=90)
     89//   D = RotZ(180deg) (Align rotation angle to N=0, E=90)
    9090//
    9191// with
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r8551 r8765  
    426426
    427427    fMjd = mjd+1;
     428}
     429
     430// --------------------------------------------------------------------------
     431//
     432// Set MTime to time expressed as float (yymmdd.ffff)
     433//  for details see MAstro::Yymmdd2Mjd
     434//
     435void MTime::SetCorsikaTime(Float_t t)
     436{
     437    const UInt_t   yymmdd = (UInt_t)TMath::Floor(t);
     438    const UInt_t   mjd    = MAstro::Yymmdd2Mjd(yymmdd);
     439    const Double_t frac   = fmod(t, 1)*kDay; // [ms] Fraction of day
     440    const UInt_t   ns     = (UInt_t)fmod(frac*1e6, 1000000);
     441
     442    SetMjd(mjd, (ULong_t)TMath::Floor(frac), ns);
    428443}
    429444
  • trunk/MagicSoft/Mars/mbase/MTime.h

    r8551 r8765  
    9494    Bool_t   SetSqlTimeStamp(const char *str);
    9595    void     SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0);
     96    void     SetCorsikaTime(Float_t time);
    9697    Bool_t   SetStringFmt(const char *time, const char *fmt, const char *loc=0);
    9798    Bool_t   UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns);
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.h

    r8646 r8765  
    9999    UShort_t GetCleanRings() const { return fCleanRings;}
    100100
     101    void SetPostCleanType(Int_t t) { fPostCleanType=t; }
     102
    101103    void SetMethod(CleaningMethod_t m) { fCleaningMethod = m; }
    102104    void SetKeepIsolatedPixels(Bool_t b=kTRUE) { fKeepIsolatedPixels=b; }
  • trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc

    r8750 r8765  
    156156//   17. Oct. 2006   ~103130
    157157//   17. Jun. 2007   ~248193
     158//   18. Oct. 2007
    158159//
    159160// From 2.2.2006 beginnig of the night (21:05h, run >=81855) to 24.2.2006
     
    166167// Lid is closed. (< run 84980)
    167168//
     169// Mirror refocussing around 23.Apr.2006, from the Runbook.
     170//
     171// 25./26.4.2006: Run 89180
     172//
     173// (Note: The year here is not a typo!)
    168174// [2007-04-25 23:50:39]
    169175// Markus is performing AMC focussing.
  • trunk/MagicSoft/Mars/mreflector/MRflEvtHeader.cc

    r7430 r8765  
    3030#include "MRflEvtHeader.h"
    3131
     32#include "MLog.h"
     33#include "MLogManip.h"
     34
    3235ClassImp(MRflEvtHeader);
     36
     37using namespace std;
    3338
    3439// --------------------------------------------------------------------------
     
    4045}
    4146
     47void MRflEvtHeader::Print(Option_t *) const
     48{
     49    *fLog << all;
     50    *fLog << "Event Number:                " << fEvtNumber << endl;
     51    *fLog << "Energy:                      " << fEnergy << "GeV" << endl;
     52    *fLog << "Height of first intercation: " << fHeightFirstInt << "cm" << endl;
     53    *fLog << "Momentum X/Y/Z:              " << fMomentum.X() << "/" << fMomentum.Y() << "/" << fMomentum.Z() << endl;
     54    *fLog << "Zenith/Azimuth angle:        " << fTheta*TMath::RadToDeg() << "/" << fPhi*TMath::RadToDeg() << endl;
     55    *fLog << endl;
     56}
  • trunk/MagicSoft/Mars/mreflector/MRflEvtHeader.h

    r7430 r8765  
    7272    void SetPhi(Float_t x)   { fPhi = x; }
    7373    void SetTheta(Float_t x) { fTheta = x; }
    74      
     74
    7575    void SetNmax(Float_t x)  { fNmax = x ; }
    7676    void SetT0(Float_t x)    { fT0 = x; }
    7777    void SetTmax(Float_t x)  { fTmax = x ; }
    7878    void SetChi2(Float_t x)  { fChi2 = x ; }
    79      
     79
    8080    void SetEFraction(Float_t x) { fEFraction = x ; }
    8181    void SetMFraction(Float_t x) { fMFraction = x ; }
    8282    void SetOFraction(Float_t x) { fOFraction = x ; }
    83      
     83
     84    // TObject
     85    void Print(Option_t *o="") const;
     86
    8487    ClassDef(MRflEvtHeader, 1) // Header of an event from the reflector program
    8588};
  • trunk/MagicSoft/Mars/resources/starguider00000001.txt

    r8730 r8765  
    2424# This is identical with the later pointing model applied since
    2525# run 85420, which is done with TPoints taken after 18.3.2006 and
    26 # in April 2006. It seems that is already valid earlier.
    27 # (For unknown reasons that pointing model made from the TPoints
    28 #  before 18.3.2006 doesn't seem to givbe a reasonable pointing model)
     26# in April 2006. It seems that it is already valid earlier.
     27# (For unknown reasons the pointing model made from the TPoints
     28# before 18.3.2006 doesn't seem to give a reasonable pointing model)
  • trunk/MagicSoft/Mars/resources/starguider00089180.txt

    r8730 r8765  
    2121 MAGIC2             0             0
    2222END
     23
     24# Made from the TPoints between: 6/2006 and 4/2007
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.h

    r8315 r8765  
    4949  Float_t GetTelescopeTheta() const { return fTelescopeTheta; }
    5050
    51   TString GetParticleName() const
     51  static TString GetParticleName(Int_t id)
    5252  {
    53       switch (fPartId)
     53      switch (id)
    5454      {
    5555      case kUNDEFINED:return "Undefined";
     
    6767      }
    6868
    69       return Form("Id:%d", fPartId);
     69      return Form("Id:%d", id);
    7070  }
    7171
    72   TString GetParticleSymbol() const
     72  static TString GetParticleSymbol(Int_t id)
    7373  {
    74       switch (fPartId)
     74      switch (id)
    7575      {
    7676      case kUNDEFINED:return "N/A";
     
    8888      }
    8989
    90       return Form("Id:%d", fPartId);
     90      return Form("Id:%d", id);
    9191  }
    9292
     
    103103
    104104      return Form("%dMeV", (Int_t)(e*1000+.5));
     105  }
     106
     107  TString GetParticleSymbol() const
     108  {
     109      return GetParticleSymbol(fPartId);
     110  }
     111
     112  TString GetParticleName() const
     113  {
     114      return GetParticleName(fPartId);
    105115  }
    106116
Note: See TracChangeset for help on using the changeset viewer.