Action #391
Feature #34: Implement MC methods for all spectral models
Implement MC method for GModelSpectralConst
Status: | Closed | Start date: | 02/20/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | Estimated time: | 2.00 hours | |
Target version: | 00-08-00 | |||
Duration: |
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 12 years ago
- Target version deleted (
00-06-00)
#2 Updated by Knödlseder Jürgen over 12 years ago
- Target version set to 00-07-00
#3 Updated by Knödlseder Jürgen about 12 years ago
- Status changed from New to Feedback
- Remaining (hours) changed from 2.0 to 0.0
#4 Updated by Knödlseder Jürgen about 12 years ago
- % Done changed from 0 to 100
Implemented the following code in the mc()
method:
// Allocate energy
GEnergy energy;
// Get uniform value between 0 and 1
double u = ran.uniform();
// Map into [emin,emax] range
energy.MeV((emax.MeV() - emin.MeV()) * u + emin.MeV());
// Return energy
return energy;
#5 Updated by Knödlseder Jürgen about 12 years ago
- Target version changed from 00-07-00 to 00-08-00
#6 Updated by Knödlseder Jürgen almost 12 years ago
- Target version deleted (
00-08-00)
#7 Updated by Knödlseder Jürgen almost 12 years ago
- Target version set to 00-08-00
#8 Updated by Knödlseder Jürgen almost 12 years ago
- Status changed from Feedback to Closed