CMS 3D CMS Logo

RadialInterval.h
Go to the documentation of this file.
1 #ifndef RadialInterval_H
2 #define RadialInterval_H
3 
4 // Created 1/11/04. F. Beaudette (CERN)
5 // This class is used to ease the lateral development with
6 // different spot fractions in FamosShower.
7 
8 #include <vector>
9 
11 
13 public:
15  RadialInterval(double RC, unsigned nSpots, double energy, const RandomEngineAndDistribution* engine);
17 
20  void addInterval(double, double);
23  void compute();
25  inline unsigned nIntervals() const { return nInter; }
27  inline double getSpotEnergy(unsigned i) const {
28  // std::cout << " getSpotEnergy " << i << " " << spotE.size() << std::endl;
29  return spotE[i];
30  }
32  inline unsigned getNumberOfSpots(unsigned i) const {
33  // std::cout << " getNumberOfSpots " << i << " " << nspots.size() << std::endl;
34  return nspots[i];
35  }
37  inline double getUmin(unsigned i) const {
38  // std::cout << " getUmin " << i << " " << uMin.size() << std::endl;
39  return uMin[i];
40  }
42  inline double getUmax(unsigned i) const {
43  // std::cout << " getUmax " << i << " " << uMax.size() << std::endl;
44  return uMax[i];
45  }
46 
47 private:
48  double currentRad;
50  double currentUlim;
51  double theR;
52  unsigned theNumberOfSpots;
53  double theSpotEnergy;
54  unsigned nInter;
55 
56  std::vector<double> uMin;
57  std::vector<double> uMax;
58  std::vector<unsigned> nspots;
59  std::vector<double> spotE;
60  std::vector<double> dspotsunscaled;
61  std::vector<double> spotfraction;
62 
63 private:
64  // Fraction of the energy in rm Moliere radius
65  double energyFractionInRadius(double rm);
66 
67  // Famos Random Engine
69 };
70 #endif
def rm(path, rec=False)
Definition: eostools.py:363
double getUmin(unsigned i) const
Lower limit of the argument in the radius generator.
std::vector< double > spotE
const RandomEngineAndDistribution * random
unsigned nIntervals() const
Number of intervals.
RadialInterval(double RC, unsigned nSpots, double energy, const RandomEngineAndDistribution *engine)
Standard constructor Rc: mean Radius.
double getSpotEnergy(unsigned i) const
Spot energy in a given interval.
double currentEnergyFraction
std::vector< double > uMin
std::vector< double > spotfraction
std::vector< double > uMax
std::vector< unsigned > nspots
unsigned theNumberOfSpots
double energyFractionInRadius(double rm)
std::vector< double > dspotsunscaled
unsigned getNumberOfSpots(unsigned i) const
Number of spots in a given interval.
double theSpotEnergy
double getUmax(unsigned i) const
Upper limit of the argument in the radius generator.
void addInterval(double, double)