Changeset 1164 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
01/11/02 17:36:00 (23 years ago)
Author:
blanch
Message:
Added funtion members SetFlux and SetIncidentRate.
File:
1 edited

Legend:

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

    r1088 r1164  
    129129// --------------------------------------------------------------------------
    130130//
     131//  set the parameters to compute the incident rate
     132//
     133void MHMcRate:: SetFlux(Float_t flux0, Float_t specindx)
     134{
     135    fFlux0=flux0;
     136    fSpecIndex=specindx;
     137
     138}
     139
     140// --------------------------------------------------------------------------
     141//
     142//  set the incident rate
     143//
     144void MHMcRate:: SetIncidentRate(Float_t showerrate)
     145{
     146    fShowerRate=showerrate;
     147}
     148
     149// --------------------------------------------------------------------------
     150//
    131151//  update the limits for energy, theta, phi and impact parameter
    132152//
     
    163183    const Double_t epowmin = pow(fEnergyMin, specidx);
    164184
    165     fShowerRate = fFlux0/specidx*(epowmax-epowmin);
     185    if (fShowerRate <= 0)
     186        fShowerRate = fFlux0/specidx*(epowmin-epowmax);
    166187
    167188    if (fPartId!=1)
Note: See TracChangeset for help on using the changeset viewer.