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)
23 #if defined(__clang__) || defined(__INTEL_COMPILER) 29 float mean = BetheHeitlerMean(rl);
30 return unsafe_expf<4>(-rl*l3ol2) - mean*mean;
57 const int correctionFlag) :
60 theCorrectionFlag(correctionFlag)
63 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"1st moment of mixture will be corrected";
66 <<
"1st and 2nd moments of mixture will be corrected";
79 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"Reading GSF parameterization " 80 <<
"of Bethe-Heitler energy loss from " 82 std::ifstream ifs(parFile.
fullPath().c_str());
100 const unsigned int order) {
101 float coeffs[order+1];
102 for (
unsigned int i=0; i<(order+1); ++i ) aStream >> coeffs[
i];
132 if ( rl<0.01
f ) rl = 0.01f;
133 if ( rl>0.20
f ) rl = 0.20f;
188 mixture.
first[
i]=logisticFunction(weight[
i]);
189 mixture.
second[
i]=logisticFunction(z[i]);
190 mixture.
third[
i]=unsafe_expf<4>(vz[
i]);;
229 float mean = BetheHeitlerMean(rl);
247 float var = BetheHeitlerVariance(rl) +
248 BetheHeitlerMean(rl)*BetheHeitlerMean(rl) -
void correctWeights(GSContainer &) const
Correction for weight of component 1.
void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const override
Computation: generates vectors of weights, means and standard deviations.
Polynomial thePolyWeights[MaxSize]
correction of 1st or 1st&2nd moments
void getMixtureParameters(const float, GSContainer &) const
Filling of mixture (in terms of z=E/E0)
LocalVector localMomentum() const
const SurfaceType & surface() const
int theTransformationCode
number of components used for parameterisation
Polynomial readPolynomial(std::ifstream &, const unsigned int)
Read coefficients of one polynomial from file.
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?
float correctedFirstVar(const float, const GSContainer &) const
Correction for variance of component 1.
Polynomial thePolyVars[MaxSize]
parametrisation of mean for each componentP
std::string fullPath() const
void readParameters(const std::string)
Read parametrization from file.
Polynomial thePolyMeans[MaxSize]
parametrisation of weight for each component
const MediumProperties & mediumProperties() const
float correctedFirstMean(const float, const GSContainer &) const
Correction for mean of component 1.