Ignore:
Timestamp:
02/09/09 11:30:54 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcorsika
Files:
4 edited

Legend:

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

    r9252 r9308  
    2626//
    2727// MCorsikaEvtHeader
    28 //   
     28//
     29// Class Version 2:
     30// ----------------
     31//  - UInt_t fParticleID
     32//
     33//
    2934/////////////////////////////////////////////////////////////////////////////
    3035#include "MCorsikaEvtHeader.h"
     
    3843#include "MLogManip.h"
    3944
    40 #include "MMcEvt.hxx"
     45//#include "MMcEvt.hxx"
    4146
    4247ClassImp(MCorsikaEvtHeader);
     
    7176    *fLog << all;
    7277    *fLog << "Event Number:              " << dec << fEvtNumber << endl;
    73     *fLog << "Particle ID:               " << MMcEvt::GetParticleName(fParticleID) << endl;
     78//    *fLog << "Particle ID:               " << MMcEvt::GetParticleName(fParticleID) << endl;
    7479    *fLog << "Energy:                    " << fTotalEnergy << "GeV" << endl;
    7580    *fLog << "Starting Altitude:         " << fStartAltitude << "g/cm²" << endl;
     
    102107
    103108    fEvtNumber  = TMath::Nint(f[0]);
    104     fParticleID = TMath::Nint(f[1]);
     109//    fParticleID = TMath::Nint(f[1]);
    105110
    106111    fTotalEnergy            = f[2];
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h

    r9292 r9308  
    1818private:
    1919    UInt_t   fEvtNumber;              // Event number
    20     UInt_t   fParticleID;             // Particle ID (see MMcEvtBasic or CORSIKA manual)
     20//    UInt_t   fParticleID;             // Particle ID (see MMcEvtBasic or CORSIKA manual)
    2121    Float_t  fTotalEnergy;            // [GeV]
    2222
     
    4444
    4545    UInt_t GetEvtNumber() const { return fEvtNumber; }
    46     UInt_t GetParticleID() const { return fParticleID; }
     46//    UInt_t GetParticleID() const { return fParticleID; }
    4747
    4848    TVector3 GetMomentum() const { return TVector3(fMomentumX, fMomentumY, fMomentumZ); }
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc

    r9229 r9308  
    3030// Root storage container for the RUN HEADER information
    3131//
     32// Class Version 2:
     33// ----------------
     34//  + UInt_t fParticleID
     35//
    3236////////////////////////////////////////////////////////////////////////////
    3337
     
    3943#include "MLog.h"
    4044#include "MLogManip.h"
     45
     46#include "MMcEvt.hxx"
    4147
    4248ClassImp(MCorsikaRunHeader);
     
    8187    fProgramVersion = f[2];          //FIXME: INT???
    8288    fNumObsLevel    = TMath::Nint(f[3]);
     89
     90    if (fNumObsLevel!=1)
     91    {
     92        *fLog << err << "ERROR - Currently only one observation level is allowed." << endl;
     93        return kFALSE;
     94    }
    8395
    8496    memset(fObsLevel, 0, 10*4);
     
    127139    fin.seekg(-274*4, ios::cur);
    128140
    129     const Int_t n = TMath::Nint(g[96]);  // Numbr i of uses of each cherenkov event
     141    const Int_t n = TMath::Nint(g[96]);  // Number i of uses of each cherenkov event
    130142    if (n!=1)
    131143    {
     
    133145        return kFALSE;
    134146    }
     147
     148    fParticleID = TMath::Nint(g[1]);
    135149
    136150    //fImpactMax = g[86];
     
    208222    *fLog << all << endl;
    209223    *fLog << "Run Number:  " << fRunNumber << "  (" << fRunStart.GetStringFmt("%d.%m.%Y") << ", V" << fProgramVersion << ")" << endl;
     224    *fLog << "Particle ID: " << MMcEvt::GetParticleName(fParticleID) << endl;
    210225    if (fNumEvents>0)
    211226        *fLog << "Num Events:  " << fNumEvents << endl;
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h

    r9212 r9308  
    1717private:
    1818    UInt_t    fRunNumber;         // Run number
     19    UInt_t    fParticleID;        // Particle ID (see MMcEvtBasic or CORSIKA manual)
    1920    UInt_t    fNumEvents;         // Number of events
    2021    MTime     fRunStart;          // Date of begin (yymmdd)
     
    2223
    2324    Byte_t    fNumObsLevel;       // Number of observation levels
    24     Float_t   fObsLevel[10];      //[fNumObsLevel] Observation levels [cm]
     25    Float_t   fObsLevel[10];      // Observation levels [cm]
    2526
    2627    Float_t   fSlopeSpectrum;     // Slope of energy spectrum
     
    5657    Float_t GetWavelengthMax() const { return fWavelengthMax; }
    5758
     59    UInt_t GetParticleID() const { return fParticleID; }
     60
    5861    //Float_t GetImpactMax() const { return fImpactMax; }
    5962
     
    6871    Bool_t SeekEvtEnd(istream &fin);
    6972
    70     ClassDef(MCorsikaRunHeader, 1)      // storage container for general info
     73    ClassDef(MCorsikaRunHeader, 2)      // storage container for general info
    7174};
    7275#endif
Note: See TracChangeset for help on using the changeset viewer.