15 inline float logisticFunction (
const float x) {
return 1./(1.+unsafe_expf<4>(-
x));}
17 inline float BetheHeitlerMean (
const float rl) {
18 return unsafe_expf<4>(-rl);
21 inline float BetheHeitlerVariance (
const float rl)
24 float mean = BetheHeitlerMean(rl);
25 return unsafe_expf<4>(-rl*l3ol2) - mean*mean;
47 const int correctionFlag) :
50 theCorrectionFlag(correctionFlag)
53 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"1st moment of mixture will be corrected";
56 <<
"1st and 2nd moments of mixture will be corrected";
69 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"Reading GSF parameterization "
70 <<
"of Bethe-Heitler energy loss from "
72 std::ifstream ifs(parFile.
fullPath().c_str());
91 float coeffs[order+1];
92 for (
int i=0; i<(order+1); ++i ) aStream >> coeffs[
i];
122 if ( rl<0.01
f ) rl = 0.01f;
123 if ( rl>0.20
f ) rl = 0.20f;
145 varPinv = f*f*mixture[
i].
third;
153 varPinv = mixture[
i].
third/p/
p;
155 using namespace materialEffect;
178 vz = unsafe_expf<4>(vz);
213 float mean = BetheHeitlerMean(rl);
231 float var = BetheHeitlerVariance(rl) +
232 BetheHeitlerMean(rl)*BetheHeitlerMean(rl) -
Polynomial readPolynomial(std::ifstream &, const int)
Read coefficients of one polynomial from file.
Polynomial thePolyWeights[MaxSize]
correction of 1st or 1st&2nd moments
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const
Computation: generates vectors of weights, means and standard deviations.
LocalVector localMomentum() const
U second(std::pair< T, U > const &p)
void getMixtureParameters(const float, GSContainer[]) const
Filling of mixture (in terms of z=E/E0)
const SurfaceType & surface() const
void correctWeights(GSContainer[]) const
Correction for weight of component 1.
float correctedFirstVar(const float, const GSContainer[]) const
Correction for variance of component 1.
int theTransformationCode
number of components used for parameterisation
GsfBetheHeitlerUpdator(const std::string fileName, const int correctionFlag)
constructor with explicit filename and correction flag
int theCorrectionFlag
values to be transformed by logistic / exp. function?
Polynomial thePolyVars[MaxSize]
parametrisation of mean for each componentP
void readParameters(const std::string)
Read parametrization from file.
Polynomial thePolyMeans[MaxSize]
parametrisation of weight for each component
std::string fullPath() const
const MediumProperties & mediumProperties() const
float correctedFirstMean(const float, const GSContainer[]) const
Correction for mean of component 1.