Changeset 1783 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 02/21/03 18:09:36 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMcRate.cc
r1534 r1783 18 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de> 19 19 ! 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) 20 25 ! 21 26 ! Copyright: MAGIC Software Development, 2000-2001 … … 38 43 fPartId=0; // Type of particle 39 44 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 43 50 fThetaMax=0.0; // Maximum theta angle of run 44 51 fThetaMin=370.0; // Minimum theta angle of run … … 119 126 // -------------------------------------------------------------------------- 120 127 // 121 // Set the information about trigger due only to the background conditions128 // Set the information about trigger due only to the Night Sky Background: 122 129 // 123 130 void MHMcRate::SetBackground (Float_t showers, Float_t triggers) … … 184 191 185 192 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)); 187 197 188 198 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); 194 203 195 204 fShowerRateError = sqrt(fShowerRate); -
trunk/MagicSoft/Mars/mhist/MHMcRate.h
r1663 r1783 12 12 UShort_t fPartId; // Type of particle 13 13 14 Float_t fEnergyMax; // Maximum Energy in GeV15 Float_t fEnergyMin; // Minimum Energy in GeV14 Float_t fEnergyMax; // Maximum Energy in TeV 15 Float_t fEnergyMin; // Minimum Energy in TeV 16 16 17 17 Float_t fThetaMax; // Maximum theta angle of run … … 20 20 Float_t fPhiMin; // Minimum phi angle of run 21 21 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) 24 27 25 28 Float_t fBackTrig; // Number of triggers from background … … 50 53 void SetIncidentRate(Float_t showerrate); 51 54 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 52 67 void UpdateBoundaries(Float_t energy, Float_t theta, Float_t phi, Float_t impact); 53 68
Note:
See TracChangeset
for help on using the changeset viewer.