00001 #ifndef RadialInterval_H 00002 #define RadialInterval_H 00003 00004 // Created 1/11/04. F. Beaudette (CERN) 00005 // This class is used to ease the lateral development with 00006 // different spot fractions in FamosShower. 00007 00008 00009 #include <vector> 00010 00011 class RandomEngine; 00012 00013 class RadialInterval 00014 { 00015 public: 00017 RadialInterval(double RC,unsigned nSpots, double energy, 00018 const RandomEngine* engine); 00019 ~RadialInterval(){;} 00020 00023 void addInterval(double,double); 00026 void compute(); 00028 inline unsigned nIntervals() const { return nInter;} 00030 inline double getSpotEnergy(unsigned i) const { 00031 // std::cout << " getSpotEnergy " << i << " " << spotE.size() << std::endl; 00032 return spotE[i];} 00034 inline unsigned getNumberOfSpots(unsigned i) const { 00035 // std::cout << " getNumberOfSpots " << i << " " << nspots.size() << std::endl; 00036 return nspots[i]; 00037 } 00039 inline double getUmin(unsigned i) const { 00040 // std::cout << " getUmin " << i << " " << uMin.size() << std::endl; 00041 return uMin[i]; 00042 } 00044 inline double getUmax(unsigned i) const { 00045 // std::cout << " getUmax " << i << " " << uMax.size() << std::endl; 00046 return uMax[i]; 00047 } 00048 00049 private: 00050 double currentRad; 00051 double currentEnergyFraction; 00052 double currentUlim; 00053 double theR; 00054 unsigned theNumberOfSpots; 00055 double theSpotEnergy; 00056 unsigned nInter; 00057 00058 std::vector<double> uMin; 00059 std::vector<double> uMax; 00060 std::vector<unsigned> nspots; 00061 std::vector<double> spotE; 00062 std::vector<double> dspotsunscaled; 00063 std::vector<double> spotfraction; 00064 00065 private: 00066 // Fraction of the energy in rm Moliere radius 00067 double energyFractionInRadius(double rm); 00068 00069 // Famos Random Engine 00070 const RandomEngine* random; 00071 00072 }; 00073 #endif