Ignore:
Timestamp:
02/15/09 13:24:59 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcorsika
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc

    r9308 r9336  
    121121    // Pointing along particle direction
    122122    // (x=east, y=north, z=upwards)
    123     fMomentumX = -f[7];
    124     fMomentumY =  f[6];
     123    fMomentumX =  f[7];
     124    fMomentumY = -f[6];
    125125    fMomentumZ = -f[8];
    126126
     
    136136    }
    137137
    138     //fX = f[97];
    139     //fY = f[117];
    140 
    141     fX =  f[117];
    142     fY = -f[97];
     138    fX =  f[117];   //fX = f[97];
     139    fY = -f[97];    //fY = f[117];
    143140
    144141    fin.seekg(1088-273*4, ios::cur);
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc

    r9312 r9336  
    3434//  + UInt_t fParticleID
    3535//  + Float_t fImpactMax
     36//  + Float_t fMagneticFieldX
     37//  + Float_t fMagneticFieldZ
     38//  + Float_t fMagneticFieldAz
    3639//
    3740////////////////////////////////////////////////////////////////////////////
     
    8689    fRunStart.SetCorsikaTime(f[1]);
    8790
    88     fProgramVersion = f[2];          //FIXME: INT???
     91    fProgramVersion = f[2];
    8992    fNumObsLevel    = TMath::Nint(f[3]);
    9093
     
    149152    fParticleID = TMath::Nint(g[1]);
    150153
    151     fImpactMax = g[86];
     154    // MAGNETIC FIELD: x/z-component of earth magnetic field in muT
     155    fMagneticFieldX  =  g[69];  // x-component ( BX)
     156    fMagneticFieldZ  = -g[70];  // z-component (-BZ)
     157    fMagneticFieldAz =  g[91];  // Azimuth angle of magnetic north expressed in telescope coordinates
    152158
    153159    fZdMin = g[79];                // lower edge of theta in °
     
    157163    // FIXME: Correct for direction of magnetic field!
    158164
     165    // Number of cherenkov detectors in x
     166    // Number of cherenkov detectors in y
     167    // Grid spacing x
     168    // Grid spacing y
     169
     170    // g[93] angle between array x-direction and magnetic north
     171
     172
     173    fImpactMax = g[86];
     174
    159175    fWavelengthMin = g[95];        // Cherenkov bandwidth lower end in nm
    160176    fWavelengthMax = g[96];        // Cherenkov bandwidth upper end in nm
     
    222238{
    223239    *fLog << all << endl;
    224     *fLog << "Run Number:  " << fRunNumber << "  (" << fRunStart.GetStringFmt("%d.%m.%Y") << ", V" << fProgramVersion << ")" << endl;
    225     *fLog << "Particle ID: " << MMcEvt::GetParticleName(fParticleID) << endl;
     240    *fLog << "Run Number:    " << fRunNumber << "  (" << fRunStart.GetStringFmt("%d.%m.%Y") << ", V" << fProgramVersion << ")" << endl;
     241    *fLog << "Particle ID:   " << MMcEvt::GetParticleName(fParticleID) << endl;
    226242    if (fNumEvents>0)
    227         *fLog << "Num Events:  " << fNumEvents << endl;
    228     *fLog << "Obs Level:  ";
     243        *fLog << "Num Events:    " << fNumEvents << endl;
     244    *fLog << "Obs Level:    ";
    229245    for (Byte_t i=0; i<fNumObsLevel; i++)
    230246        *fLog << " " << fObsLevel[i]/100. << "m";
    231247    *fLog << endl;
    232     *fLog << "Spectrum:    Slope=" << fSlopeSpectrum << "  (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" <<  endl;
     248
     249    *fLog << "MagneticField: X/Z=(" << fMagneticFieldX << "/";
     250    *fLog << fMagneticFieldZ << ")  Az=" << fMagneticFieldAz*TMath::RadToDeg() << "deg" << endl;
     251
     252    *fLog << "Spectrum:      Slope=" << fSlopeSpectrum << "  (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" <<  endl;
    233253
    234254    if (fViewConeOuterAngle>0)
    235         *fLog << "ViewCone:    " << fViewConeInnerAngle << "deg-" << fViewConeOuterAngle << "deg" << endl;
     255        *fLog << "ViewCone:      " << fViewConeInnerAngle << "deg-" << fViewConeOuterAngle << "deg" << endl;
    236256
    237257    if (fZdMax>=0)
    238258    {
    239         *fLog << "Zd/Az:       " << fZdMin << "deg";
     259        *fLog << "Zd/Az:         " << fZdMin << "deg";
    240260        if (fZdMin==fZdMax)
    241261            *fLog << " (fixed)";
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h

    r9332 r9336  
    1616
    1717private:
    18     UInt_t   fRunNumber;              // Run number
    19     UInt_t   fParticleID;             // Particle ID (see MMcEvtBasic or CORSIKA manual)
    20     UInt_t   fNumEvents;              // Number of events
    21     MTime    fRunStart;               // Date of begin (yymmdd)
    22     Float_t  fProgramVersion;         // Version of program
     18    UInt_t  fRunNumber;               // Run number
     19    UInt_t  fParticleID;              // Particle ID (see MMcEvtBasic or CORSIKA manual)
     20    UInt_t  fNumEvents;               // Number of events
     21    MTime   fRunStart;                // Date of begin (yymmdd)
     22    Float_t fProgramVersion;          // Version of program
    2323
    24     Byte_t   fNumObsLevel;            // Number of observation levels
    25     Float_t  fObsLevel[10];           // Observation levels [cm]
     24    Byte_t  fNumObsLevel;             // Number of observation levels
     25    Float_t fObsLevel[10];            // Observation levels [cm]
    2626
    27     Float_t  fImpactMax;              // [cm] Maximum simulated impact
     27    Float_t fImpactMax;               // [cm] Maximum simulated impact
    2828
    29     Float_t  fSlopeSpectrum;          // Slope of energy spectrum
    30     Float_t  fEnergyMin;              // Lower limit of energy range
    31     Float_t  fEnergyMax;              // Upper limit of energy range
     29    Float_t fSlopeSpectrum;           // Slope of energy spectrum
     30    Float_t fEnergyMin;               // Lower limit of energy range
     31    Float_t fEnergyMax;               // Upper limit of energy range
    3232
    33     Float_t  fZdMin;                  // [rad] Zenith distance
    34     Float_t  fZdMax;                  // [rad] Zenith distance
    35     Float_t  fAzMin;                  // [rad] Azimuth (north=0; east=90)
    36     Float_t  fAzMax;                  // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!)
     33    Float_t fZdMin;                   // [rad] Zenith distance
     34    Float_t fZdMax;                   // [rad] Zenith distance
     35    Float_t fAzMin;                   // [rad] Azimuth (north=0; east=90)
     36    Float_t fAzMax;                   // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!)
     37
     38    Float_t fMagneticFieldX;          // [muT] x-component of earth magnetic field (ceres coordinate system)
     39    Float_t fMagneticFieldZ;          // [muT] z-component of earth magnetic field (ceres coordinate system)
     40    Float_t fMagneticFieldAz;         // [rad] Azimuth angle of magnetic north expressed in telescope coordinates
    3741
    3842    Float_t fWavelengthMin;           // [nm] Wavelength bandwidth lo edge
     
    5054    UInt_t GetNumEvents() const { return fNumEvents; }
    5155
    52     UInt_t GetFormatVersion() const { return (UInt_t)fProgramVersion; }
     56    const MTime &GetRunStart() const { return fRunStart; }
     57
     58    Float_t GetProgramVersion() const { return fProgramVersion; }
    5359
    5460    Float_t GetZdMin() const { return fZdMin; }
     
    6773    Float_t GetImpactMax() const { return fImpactMax; }
    6874
     75    Float_t GetMagneticFieldX() const  { return fMagneticFieldX; }
     76    Float_t GetMagneticFieldZ() const  { return fMagneticFieldZ; }
     77    Float_t GetMagneticFieldAz() const { return fMagneticFieldAz; }
     78
    6979    Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; }
    7080    Bool_t HasViewCone() const { return fViewConeOuterAngle>0; }
Note: See TracChangeset for help on using the changeset viewer.