Ignore:
Timestamp:
02/21/03 18:09:36 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHMcRate.cc

    r1534 r1783  
    1818!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    1919!   Author(s): Harald Kornmayer 1/2001
     20!   Author(s): Abelardo Moralejo 2/2003
     21!
     22!   Explanations on the rate calculation can be found in
     23!   chapter 7 of the following diploma thesis:
     24!   http://www.pd.infn.it/magic/tesi2.ps.gz (in Italian)
    2025!
    2126!   Copyright: MAGIC Software Development, 2000-2001
     
    3843    fPartId=0;               // Type of particle
    3944
    40     fEnergyMax=0.0;          // Maximum Energy in GeV
    41     fEnergyMin=1000000.0;    // Minimum Energy in GeV
    42 
     45    fEnergyMax=0.0;          // Maximum Energy (TeV)
     46    fEnergyMin=1000000.0;    // Minimum Energy (TeV)
     47
     48    fSolidAngle = -1.;       // Solid angle within which incident directions
     49                             // are distributed
    4350    fThetaMax=0.0;           // Maximum theta angle of run
    4451    fThetaMin=370.0;         // Minimum theta angle of run
     
    119126// --------------------------------------------------------------------------
    120127//
    121 //  Set the information about trigger due only to the background conditions
     128//  Set the information about trigger due only to the Night Sky Background:
    122129//
    123130void MHMcRate::SetBackground (Float_t showers, Float_t triggers)
     
    184191
    185192    if (fShowerRate <= 0)
    186         fShowerRate = fFlux0/specidx*(epowmin-epowmax);
     193      fShowerRate = fFlux0/specidx*(epowmax-epowmin);
     194
     195    if (fSolidAngle < 0.)
     196      fSolidAngle = (fPhiMax-fPhiMin)*(cos(fThetaMin)-cos(fThetaMax));
    187197
    188198    if (fPartId!=1)
    189         fShowerRate *= (fPhiMax-fPhiMin)*(cos(fThetaMax)-cos(fThetaMin));
    190 
    191     const Double_t impactdiff = fImpactMax-fImpactMin;
    192 
    193     fShowerRate *= TMath::Pi()*(impactdiff/100.0*impactdiff/100.0);
     199      fShowerRate *= fSolidAngle;
     200
     201    fShowerRate *= TMath::Pi()*(fImpactMax/100.0*fImpactMax/100.0 -
     202                                fImpactMin/100.0*fImpactMin/100.0);
    194203
    195204    fShowerRateError = sqrt(fShowerRate);
Note: See TracChangeset for help on using the changeset viewer.