Ignore:
Timestamp:
04/29/03 09:18:03 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mmontecarlo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc

    r1715 r2036  
    2828//  MHMcCollectionAreaCalc
    2929//
    30 //  Remark: The initialization is maily done in the ReInit function.
     30//  Remark: The initialization is mainly done in the ReInit function.
    3131//          Please make sure, that you don't use MReadTree when processing
    3232//          a file. Use a 'ReInit'-calling task like MReadMarsFile
     
    4444#include "MMcTrig.hxx"
    4545#include "MMcRunHeader.hxx"
     46#include "MMcCorsikaRunHeader.h"
    4647
    4748#include "MHMcCollectionArea.h"
     
    7778        return kFALSE;
    7879
    79     fTheta                    = -1;
     80    fTheta                    =  -1;
     81    fEmin                     =  -1;
     82    fEmax                     =  -1;
     83    fSlope                    =   0;
    8084    fTotalNumSimulatedShowers =  0;
    8185    fCorsikaVersion           =  0;
     
    9195    {
    9296        *fLog << err << dbginf << "Error - MMcRunHeader not found... exit." << endl;
     97        return kFALSE;
     98    }
     99
     100    MMcCorsikaRunHeader *corrunheader  = (MMcCorsikaRunHeader*)plist->FindObject("MMcCorsikaRunHeader");
     101    if (!corrunheader)
     102    {
     103        *fLog << err << dbginf << "Error - MMcCorsikaRunHeader not found... exit." << endl;
    93104        return kFALSE;
    94105    }
     
    110121
    111122    fCorsikaVersion = runheader->GetCorsikaVersion();
     123
     124    if ( fEmin > 0 &&
     125         (fEmin  != corrunheader->GetELowLim() ||
     126          fEmax  != corrunheader->GetEUppLim() ||
     127          fSlope != corrunheader->GetSlopeSpec()) )
     128      *fLog << warn << dbginf << "Warning - Read files have different energy distribution..." << endl;
     129
     130    fEmin  = corrunheader->GetELowLim();
     131    fEmax  = corrunheader->GetEUppLim();
     132    fSlope = corrunheader->GetSlopeSpec();
    112133
    113134    fAllEvtsTriggered |= runheader->GetAllEvtsTriggered();
     
    167188    {
    168189        *fLog << inf << "Total number of showers: " << fTotalNumSimulatedShowers << endl;
    169         fCollArea->CalcEfficiency(fTotalNumSimulatedShowers,
    170                                   fCorsikaVersion == 5200 ? fTheta : 0);
     190        fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, fEmin, fEmax, fSlope);
    171191    }
    172192
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h

    r1300 r2036  
    2424    UInt_t fCorsikaVersion;
    2525    Float_t fTheta;
     26    Float_t fEmin;
     27    Float_t fEmax;
     28    Float_t fSlope;
    2629
    2730    Bool_t fAllEvtsTriggered;
Note: See TracChangeset for help on using the changeset viewer.