1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#ifndef RadialInterval_H
#define RadialInterval_H
// Created 1/11/04. F. Beaudette (CERN)
// This class is used to ease the lateral development with
// different spot fractions in FamosShower.
#include <vector>
class RandomEngineAndDistribution;
class RadialInterval {
public:
/// Standard constructor Rc: mean Radius
RadialInterval(double RC, unsigned nSpots, double energy, const RandomEngineAndDistribution* engine);
~RadialInterval() { ; }
/// Add an interval : first argument is the radius, the second is the
/// fraction of spots in this interval R>10 <-> infinity
void addInterval(double, double);
/// Most of the calculation are made in addInterval
/// but the normal number of spots has to be set
void compute();
/// Number of intervals
inline unsigned nIntervals() const { return nInter; }
/// Spot energy in a given interval
inline double getSpotEnergy(unsigned i) const {
// std::cout << " getSpotEnergy " << i << " " << spotE.size() << std::endl;
return spotE[i];
}
/// Number of spots in a given interval
inline unsigned getNumberOfSpots(unsigned i) const {
// std::cout << " getNumberOfSpots " << i << " " << nspots.size() << std::endl;
return nspots[i];
}
/// Lower limit of the argument in the radius generator
inline double getUmin(unsigned i) const {
// std::cout << " getUmin " << i << " " << uMin.size() << std::endl;
return uMin[i];
}
/// Upper limit of the argument in the radius generator
inline double getUmax(unsigned i) const {
// std::cout << " getUmax " << i << " " << uMax.size() << std::endl;
return uMax[i];
}
private:
double currentRad;
double currentEnergyFraction;
double currentUlim;
double theR;
unsigned theNumberOfSpots;
double theSpotEnergy;
unsigned nInter;
std::vector<double> uMin;
std::vector<double> uMax;
std::vector<unsigned> nspots;
std::vector<double> spotE;
std::vector<double> dspotsunscaled;
std::vector<double> spotfraction;
private:
// Fraction of the energy in rm Moliere radius
double energyFractionInRadius(double rm);
// Famos Random Engine
const RandomEngineAndDistribution* random;
};
#endif
|