Ignore:
Timestamp:
02/21/03 18:09:36 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 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);
  • trunk/MagicSoft/Mars/mhist/MHMcRate.h

    r1663 r1783  
    1212    UShort_t fPartId;           // Type of particle
    1313
    14     Float_t fEnergyMax;         // Maximum Energy in GeV
    15     Float_t fEnergyMin;         // Minimum Energy in GeV
     14    Float_t fEnergyMax;         // Maximum Energy in TeV
     15    Float_t fEnergyMin;         // Minimum Energy in TeV
    1616
    1717    Float_t fThetaMax;          // Maximum theta angle of run
     
    2020    Float_t fPhiMin;            // Minimum phi angle of run
    2121
    22     Float_t fImpactMax;         // Maximum impact parameter
    23     Float_t fImpactMin;         // Minimum impact parameter
     22    Float_t fSolidAngle;        // Solid angle within which incident directions
     23                                // are distributed (sr)
     24
     25    Float_t fImpactMax;         // Maximum impact parameter (cm)
     26    Float_t fImpactMin;         // Minimum impact parameter (cm)
    2427
    2528    Float_t fBackTrig;          // Number of triggers from background
     
    5053    void SetIncidentRate(Float_t showerrate);
    5154
     55    void SetImpactMax(Float_t Impact) {fImpactMax=Impact;}
     56    void SetImpactMin(Float_t Impact) {fImpactMin=Impact;}
     57
     58    void SetThetaMax(Float_t Theta) {fThetaMax=Theta;}
     59    void SetThetaMin(Float_t Theta) {fThetaMin=Theta;}
     60    void SetPhiMax(Float_t Phi) {fPhiMax=Phi;}
     61    void SetPhiMin(Float_t Phi) {fPhiMin=Phi;}
     62
     63    void SetSolidAngle(Float_t Solid) {fSolidAngle=Solid;}
     64    void SetEnergyMax(Float_t Energy) {fEnergyMax=Energy;}
     65    void SetEnergyMin(Float_t Energy) {fEnergyMin=Energy;}
     66
    5267    void UpdateBoundaries(Float_t energy, Float_t theta, Float_t phi, Float_t impact);
    5368
Note: See TracChangeset for help on using the changeset viewer.