15 inline float logisticFunction(
const float x) {
return 1. / (1. + unsafe_expf<4>(-
x)); }
17 inline float BetheHeitlerMean(
const float rl) {
return unsafe_expf<4>(-rl); }
19 inline float BetheHeitlerVariance(
const float rl) {
20 #if defined(__clang__) || defined(__INTEL_COMPILER)
26 float mean = BetheHeitlerMean(rl);
27 return unsafe_expf<4>(-rl * l3ol2) - mean * mean;
56 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"1st moment of mixture will be corrected";
58 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"1st and 2nd moments of mixture will be corrected";
70 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"Reading GSF parameterization "
71 <<
"of Bethe-Heitler energy loss from " << parFile.
fullPath();
72 std::ifstream ifs(parFile.
fullPath().c_str());
89 const unsigned int order) {
90 float coeffs[order + 1];
91 for (
unsigned int i = 0;
i < (order + 1); ++
i)
127 GSContainer mixture{mixtureData[0], mixtureData[1], mixtureData[2]};
138 effects[
i].
weight *= mixture.first[
i];
144 effects[
i].
deltaP += p * (mixture.second[
i] - 1.f);
147 float f = 1.f / (p * mixture.second[
i]);
148 varPinv = f * f * mixture.third[
i];
154 effects[
i].
deltaP += p * (1.f / mixture.second[
i] - 1.f);
155 varPinv = mixture.third[
i] / (p *
p);
157 using namespace materialEffect;
174 mixture.
first[
i] = logisticFunction(weight[
i]);
175 mixture.
second[
i] = logisticFunction(z[i]);
176 mixture.
third[
i] = unsafe_expf<4>(vz[
i]);
211 float mean = BetheHeitlerMean(rl);
226 float var = BetheHeitlerVariance(rl) + BetheHeitlerMean(rl) * BetheHeitlerMean(rl) -
static std::vector< std::string > checklist log
void correctWeights(GSContainer &) const
Correction for weight of component 1.
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
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
uint16_t const *__restrict__ x
int theTransformationCode
number of components used for parameterisation
for(Iditer=Id.begin();Iditer!=Id.end();Iditer++)
Log< level::Info, false > LogInfo
void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const override
Computation: generates vectors of weights, means and standard deviations.
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.
static constexpr int MaxOrder
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.