Changeset 9229 for trunk/MagicSoft


Ignore:
Timestamp:
01/18/09 14:45:10 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9228 r9229  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2009/01/18 Thomas Bretz
     22
     23   * mbase/BaseLinkDef.h, mbase/Makefile:
     24     - added MSpline3
     25
     26   * mcorsika/MCorsikaEvtHeader.cc:
     27     - some little cosmetics
     28
     29   * mcorsika/MCorsikaEvtHeader.h:
     30     - added some missing getters
     31
     32   * mcorsika/MCorsikaRunHeader.cc:
     33     - removed some obsolete comments
     34     - reordered some comments
     35
     36   * mextralgo/MExtralgoSpline.h:
     37     - changed default in GetIntegral from true to false
     38
     39   * mraw/MRawEvtHeader.h:
     40     - added Setter for DAQEventNumber
     41
     42   * mraw/MRawRunHeader.cc:
     43     - start pixel hardware indices with 1 not with 0
     44
     45
    2046
    2147 2009/01/17 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r9228 r9229  
    55 ;SUGGESTION
    66
    7    * This release doesn't contain a major changed which is expected to
    8      change your result. Nevertheless there are small changes to
     7   * This release doesn't contain a major change which is expected to
     8     change your results. Nevertheless there are small changes to
    99     the calibration which can effect at least the first few hundred
    1010     events in any (mainly MUX and even more SUM) sequence a little bit.
    1111     So it is recommended although not necessary to reset your sequences
    12      in the database before  further processing.
     12     in the database before further processing.
    1313
    1414 ;general
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r9035 r9229  
    2727#pragma link C++ namespace MMath;
    2828#pragma link C++ namespace UTF8;
     29
     30#pragma link C++ class MSpline3+;
    2931
    3032#pragma link C++ class MString+;
  • trunk/MagicSoft/Mars/mbase/Makefile

    r9035 r9229  
    2323           MString.cc \
    2424           MMath.cc \
     25           MSpline3.cc \
    2526           MEnv.cc \
    2627           MLog.cc \
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc

    r9212 r9229  
    1818!   Author(s): Thomas Bretz 11/2008 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: Software Development, 2008
     20!   Copyright: Software Development, 2000-2009
    2121!
    2222!
     
    109109    fMomentumZ = -f[8];
    110110
     111    // FIXME: Correct for direction of magnetic field!
    111112    fZd        = f[9];
    112113    fAz        = TMath::Pi()-f[10];
     
    124125    fX =  f[117];
    125126    fY = -f[97];
    126 /*
    127     if (fEvtNumber==1)
    128     {
    129         header.fZdMin = f[79];
    130         header.fZdMax = f[80];
    131         header.fAzMin = 180-f[81];
    132         header.fAzMax = 180-f[82];
    133127
    134         header.fViewConeInnerAngle = f[151];
    135         header.fViewConeOuterAngle = f[152];
    136 
    137         header.Print();
    138     }
    139  */
    140128    fin.seekg(1088-273*4, ios::cur);
    141129
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h

    r9186 r9229  
    4343    void Print(Option_t * = NULL) const;
    4444
     45    UInt_t GetEvtNumber() const { return fEvtNumber; }
     46    UInt_t GetParticleID() const { return fParticleID; }
     47
    4548    TVector3 GetMomentum() const { return TVector3(fMomentumX, fMomentumY, fMomentumZ); }
    4649    TVector2 GetImpactPos() const { return TVector2(fX, fY); }
     
    5558    Float_t GetY() const { return fY; }
    5659
     60    Double_t GetImpact() const { return TMath::Hypot(fX, fY); }
     61
    5762    Int_t  ReadEvt(istream& fin);    // read in event header block
    5863    Bool_t ReadEvtEnd(istream& fin); // read in event end block
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc

    r9224 r9229  
    1919               Qi Zhe,      06/2007 <mailto:qizhe@astro.uni-wuerzburg.de>
    2020
    21 !   Copyright: MAGIC Software Development, 2000-2004
     21!   Copyright: Software Development, 2000-2009
    2222!
    2323!
     
    2929//
    3030// Root storage container for the RUN HEADER information
    31 //
    32 //
    33 //  RAW DATA FORMAT VERSION
    34 //  =======================
    35 //
    36 //  Format Version 8:
    37 //  -----------------
    38 //   + fNumBytesPerSample;
    39 //   + fFreqSampling;
    40 //   + fNumSignificantBits;
    41 //   * changes in MRawCrateHeader
    42 //
    43 //  Format Version 7:
    44 //  -----------------
    45 //   - unused
    46 //
    47 //  Format Version 6:
    48 //  -----------------
    49 //   + added CameraVersion
    50 //   + added TelescopeNumber
    51 //   + added ObservationMode
    52 //   + added dummies for TelescopeRa/Dec
    53 //
    54 //  Format Version 5:
    55 //  -----------------
    56 //   - now the sub millisecond information of the time is valid and decoded
    57 //     which enhances the precision from 51.2us to 200ns
    58 //
    59 //  Format Version 4:
    60 //  -----------------
    61 //   - added support for pixels with negative IDs
    62 //
    63 //  Format Version 3:
    64 //  -----------------
    65 //   - ???
    66 //
    67 //  Format Version 2:
    68 //  -----------------
    69 //   - removed mjd from data
    70 //   - added start time
    71 //   - added stop  time
    72 //
    73 //
    74 //  MCorsikaRunHeader CLASS VERSION
    75 //  ===========================
    76 //
    77 //  Format Version 6:
    78 //  -----------------
    79 //   - added fNumBytesPerSample;
    80 //   - added fFreqSampling;
    81 //   - added fNumSignificantBits;
    82 //
    83 //  Class Version 5:
    84 //  -----------------
    85 //   - for compatibility with newer camera versions
    86 //
    87 //  Class Version 4:
    88 //  -----------------
    89 //   - added fCameraVersion
    90 //   - added fTelescopeNumber
    91 //   - changed length of fProjectName to 101
    92 //   - changed length of fSourceName  to 81
    93 //
    94 //  Class Version 3:
    95 //  ----------------
    96 //   - enhanced SourceName and ProjectName by one character, because
    97 //     without telling us the guranteed trailing \0-character has
    98 //     skipped
    99 //
    100 //  Class Version 2:
    101 //  ----------------
    102 //   - removed fMJD, fYear, fMonth, fDay
    103 //   - added fRunStart
    104 //   - added fRunStop
    105 //
    106 //  Class Version 1:
    107 //  ----------------
    108 //   - first implementation
    10931//
    11032////////////////////////////////////////////////////////////////////////////
     
    12850//
    12951MCorsikaRunHeader::MCorsikaRunHeader(const char *name, const char *title)
    130     : fNumObsLevel(0),
    131     fZdMin(0), fZdMax(-1), fAzMin(0), fAzMax(0),
    132 fViewConeInnerAngle(0), fViewConeOuterAngle(-1)
     52    : fNumObsLevel(0), fZdMin(0), fZdMax(-1), fAzMin(0), fAzMax(0),
     53    fViewConeInnerAngle(0), fViewConeOuterAngle(-1)
    13354{
    13455    fName  = name  ? name  : "MCorsikaRunHeader";
     
    17192
    17293    // -------------------- Read first event header -------------------
     94
     95    // FIXME: Add sanity checks!
    17396
    17497    // f[76] Cherenkov flag:
     
    177100    //        bit(3) : CEFFIC option compiled in
    178101    //        bit(4) : ATMEXT option compiled in
    179     //        bit(5) : ATMEXT option used with refaction enabled
     102    //        bit(5) : ATMEXT option used with refraction enabled
    180103    //        bit(6) : VOLUMEDET option compiled in
    181104    //        bit(7) : CURVED option compiled in
    182105    //        bit(9) : SLATN option compiled in
    183106    //        11-21  : table number for externam athmosphere (but<1024)
    184     // f[78] Curved athmosphere? (0=flat, 1=curved)
    185 
    186     // f[80] lower edge of theta in °
    187     // f[81] upper edge of theta in °
    188     // f[82] lower edge of phi   in °
    189     // f[83] upper edge of phi   in °
    190     // f[84] cherenkov bunch size
    191 
    192     // f[93] flag for additinal muon information of particle output file
    193 
    194     // f[95] Cherenkov bandwidth lower end in nm
    195     // f[96] Cherenkov bandwidth upper end in nm
    196 
    197     // f[97] Numbr i of uses of each cherenkov event
     107    //
     108    // f[78]  Curved athmosphere? (0=flat, 1=curved)
     109    // f[84]  cherenkov bunch size
     110    // f[93]  flag for additinal muon information of particle output file
    198111    // f[145] Muon multiple scattering flag
    199     // f[152] !! inner angle of view cone (°)
    200     // f[153] !! outer angle of view cone (°)
    201112    // f[156] altitude of horizontal shower axis
    202113
     
    216127    fin.seekg(-274*4, ios::cur);
    217128
    218     const Int_t n = TMath::Nint(g[96]);
     129    const Int_t n = TMath::Nint(g[96]);  // Numbr i of uses of each cherenkov event
    219130    if (n!=1)
    220131    {
     
    225136    //fImpactMax = g[86];
    226137
    227     fZdMin = g[79];
    228     fZdMax = g[80];
    229     fAzMin = 180-g[81];
    230     fAzMax = 180-g[82];
    231 
    232     fWavelengthMin = g[95];
    233     fWavelengthMax = g[96];
    234 
    235     fViewConeInnerAngle = g[151];
    236     fViewConeOuterAngle = g[152];
     138    fZdMin = g[79];                // lower edge of theta in °
     139    fZdMax = g[80];                // upper edge of theta in °
     140    fAzMin = 180-g[81];            // lower edge of phi   in °
     141    fAzMax = 180-g[82];            // upper edge of phi   in °
     142    // FIXME: Correct for direction of magnetic field!
     143
     144    fWavelengthMin = g[95];        // Cherenkov bandwidth lower end in nm
     145    fWavelengthMax = g[96];        // Cherenkov bandwidth upper end in nm
     146
     147    fViewConeInnerAngle = g[151];  // inner angle of view cone (°)
     148    fViewConeOuterAngle = g[152];  // outer angle of view cone (°)
    237149
    238150    return kTRUE;
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h

    r9226 r9229  
    336336    Double_t SearchYup(Float_t y) const { return SearchYup(0,    y); }
    337337
    338     MArrayF GetIntegral(bool norm=true) const;
     338    MArrayF GetIntegral(bool norm=false) const;
    339339};
    340340
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h

    r8944 r9229  
    9292    UInt_t   GetPulserSlotPattern()  const;
    9393
    94     // Setter
     94    // Setter (ONLY for Monte Carlo purpose)
    9595    void FillHeader(UInt_t, Float_t=0);
    9696
    97     void  SetTriggerPattern( const UInt_t pattern )  {  fTrigPattern[0] = pattern; } // Only for MC!
    98     void  SetCalibrationPattern( const UInt_t pattern )  {  fTrigPattern[1] = pattern; } // Only for MC!
     97    void  SetTriggerPattern( const UInt_t pattern )  {  fTrigPattern[0] = pattern; }
     98    void  SetCalibrationPattern( const UInt_t pattern )  {  fTrigPattern[1] = pattern; }
     99    void  SetDAQEvtNumber(const UInt_t n) { fDAQEvtNumber = n; }
    99100
    100101    // TObject
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r9212 r9229  
    11271127        break;
    11281128    case 2:
     1129        fNumSamplesHiGain  =   50;
    11291130        fNumSamplesLoGain  =    0;
    1130         fNumSamplesHiGain  =   50;
    11311131        fNumBytesPerSample =    2;    // number of bytes per sample
    11321132        fSamplingFrequency = 2000;    // Sampling Frequency [MHz]
    11331133        fFadcResolution    =   12;    // number of significant bits
    11341134        break;
     1135    case 3:
     1136        fNumSamplesHiGain  =  150;
     1137        fNumSamplesLoGain  =    0;
     1138        fNumBytesPerSample =    2;    // number of bytes per sample
     1139        fSamplingFrequency = 1000;    // Sampling Frequency [MHz]
     1140        fFadcResolution    =   12;    // number of significant bits
     1141        break;
    11351142    }
    11361143
     
    11521159        fNumPixInCrate = 577;
    11531160        break;
     1161    case 2:
     1162        fNumCrates     =   1;
     1163        fNumPixInCrate = 703;
     1164        break;
    11541165    }
    11551166
     
    11611172
    11621173    for (int i=0; i<n; i++)
    1163         (*fPixAssignment)[i] = i;
     1174        (*fPixAssignment)[i] = i+1;
    11641175}
    11651176
Note: See TracChangeset for help on using the changeset viewer.