12 const int correctionFlag) :
16 theCorrectionFlag(correctionFlag),
23 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"1st moment of mixture will be corrected";
26 <<
"1st and 2nd moments of mixture will be corrected";
33 std::string
name =
"TrackingTools/GsfTracking/data/";
37 edm::LogInfo(
"GsfBetheHeitlerUpdator") <<
"Reading GSF parameterization "
38 <<
"of Bethe-Heitler energy loss from "
40 std::ifstream ifs(parFile.
fullPath().c_str());
56 std::vector<double> coeffs(order+1);
57 for (
int i=0; i<(order+1); i++ ) aStream >> coeffs[
i];
93 if ( rl<0.01 ) rl = 0.01;
94 if ( rl>0.20 ) rl = 0.20;
115 double f = 1./p/mixture[
i].second;
116 varPinv = f*f*mixture[
i].third;
124 varPinv = mixture[
i].third/p/
p;
173 if ( mixture.empty() )
return;
178 for ( GSContainer::const_iterator
i=mixture.begin();
179 i!=mixture.end();
i++ ) wsum += (*i).first;
183 for ( GSContainer::iterator
i=mixture.begin();
184 i!=mixture.end();
i++ ) (*i).first /= wsum;
193 if ( mixture.empty() )
return 0.;
198 for ( GSContainer::const_iterator
i=mixture.begin()+1;
199 i!=mixture.end();
i++ ) mean -= (*i).first*(*i).second;
212 if ( mixture.empty() )
return 0.;
218 mixture[0].first*mixture[0].second*mixture[0].second;
219 for ( GSContainer::const_iterator
i=mixture.begin()+1;
220 i!=mixture.end();
i++ )
221 var -= (*i).first*((*i).second*(*i).second+(*i).third);
virtual void storeArguments(const TrajectoryStateOnSurface &, const PropagationDirection) const
storage of arguments for later use of
std::vector< Polynomial > thePolyVars
parametrisation of mean for each component
std::vector< double > theWeights
std::vector< AlgebraicSymMatrix55 > theDeltaCovs
std::vector< Polynomial > thePolyMeans
parametrisation of weight for each component
Polynomial readPolynomial(std::ifstream &, const int)
Read coefficients of one polynomial from file.
float theLastDz
correction of 1st or 1st&2nd moments
void correctWeights(GSContainer &) const
Correction for weight of component 1.
double correctedFirstVar(const double, const GSContainer &) const
Correction for variance of component 1.
std::vector< Polynomial > thePolyWeights
values to be transformed by logistic / exp. function?
void getMixtureParameters(const double, GSContainer &) const
Filling of mixture (in terms of z=E/E0)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection) const
Computation: generates vectors of weights, means and standard deviations.
virtual bool newArguments(const TrajectoryStateOnSurface &, const PropagationDirection) const
check of arguments for use with cached values
double BetheHeitlerMean(const double rl) const
First moment of the Bethe-Heitler distribution (in z=E/E0)
const MediumProperties * mediumProperties() const
LocalVector localMomentum() const
U second(std::pair< T, U > const &p)
std::vector< double > theDeltaPs
std::vector< Triplet< double, double, double > > GSContainer
double BetheHeitlerVariance(const double rl) const
Second moment of the Bethe-Heitler distribution (in z=E/E0)
const T & max(const T &a, const T &b)
double logisticFunction(const double x) const
Logistic function (needed for transformation of weight and mean)
int theTransformationCode
number of components used for parameterisation
PropagationDirection theLastPropDir
Vector3DBase unit() const
GsfBetheHeitlerUpdator(const std::string fileName, const int correctionFlag)
constructor with explicit filename and correction flag
int theCorrectionFlag
parametrisation of variance for each component
double correctedFirstMean(const double, const GSContainer &) const
Correction for mean of component 1.
const Surface & surface() const
void readParameters(const std::string)
Read parametrization from file.
std::string fullPath() const