CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfBetheHeitlerUpdator.h
Go to the documentation of this file.
1 #ifndef GsfBetheHeitlerUpdator_h_
2 #define GsfBetheHeitlerUpdator_h_
3 
5 
8 
9 
10 
12 
13 #include <iosfwd>
14 #include <string>
15 
16 
17 
27 
28 private:
29  static constexpr int MaxSize=6;
30  static constexpr int MaxOrder=6;
31 
34  class Polynomial {
35  public:
37  Polynomial () {}
41  Polynomial (float coefficients[], int is) :
42  m_size(is) {
43  for (int i=0; i!=m_size; ++i)
44  theCoeffs[i]=coefficients[i];
45  }
47  float operator() (float x) const {
48  float sum=theCoeffs[0];
49  for (int i=1; i!=m_size; ++i)
50  sum = x*sum + theCoeffs[i];
51  return sum;
52  }
53  private:
54  float theCoeffs[MaxOrder] ={0};
55  int m_size=0;
56  };
57 
58 public:
59  enum CorrectionFlag { NoCorrection=0, MeanCorrection=1, FullCorrection=2 };
60 
61 public:
62  virtual GsfBetheHeitlerUpdator* clone() const
63  {
64  return new GsfBetheHeitlerUpdator(*this);
65  }
66 
67 public:
69  GsfBetheHeitlerUpdator (const std::string fileName, const int correctionFlag);
70 
71 private:
73 
75  virtual void compute (const TrajectoryStateOnSurface&, const PropagationDirection, Effect[]) const;
76 
77 private:
78 
80  void readParameters (const std::string);
82  Polynomial readPolynomial (std::ifstream&,const int);
83 
84 
86  void getMixtureParameters (const float, GSContainer[]) const;
88  void correctWeights (GSContainer[]) const;
90  float correctedFirstMean (const float, const GSContainer[]) const;
92  float correctedFirstVar (const float,const GSContainer[]) const;
93 
94 
95 private:
99 
100  Polynomial thePolyWeights[MaxSize];
101  Polynomial thePolyMeans[MaxSize];
102  Polynomial thePolyVars[MaxSize];
103 
104 };
105 
106 #endif
int i
Definition: DBlmapReader.cc:9
Polynomial()
Default constructor (needed for construction of a vector)
int theTransformationCode
number of components used for parameterisation
virtual GsfBetheHeitlerUpdator * clone() const
PropagationDirection
Definition: Triplet.h:9
int theCorrectionFlag
values to be transformed by logistic / exp. function?
Polynomial(float coefficients[], int is)
Triplet< float, float, float > GSContainer
Definition: DDAxes.h:10
#define constexpr
Unlimited (trivial) bounds.