#include <GsfMultipleScatteringUpdator.h>
Public Member Functions | |
virtual GsfMultipleScatteringUpdator * | clone () const |
GsfMultipleScatteringUpdator (float mass) | |
constructor with explicit mass | |
Protected Member Functions | |
virtual bool | newArguments (const TrajectoryStateOnSurface &, const PropagationDirection) const |
virtual void | storeArguments (const TrajectoryStateOnSurface &, const PropagationDirection) const |
Private Member Functions | |
virtual void | compute (const TrajectoryStateOnSurface &, const PropagationDirection) const |
Computation: generates vectors of weights, means and standard deviations. | |
Private Attributes | |
float | theLastDz |
float | theLastP |
PropagationDirection | theLastPropDir |
float | theLastRadLength |
Description of multiple scattering with two Gaussian components as described in HEPHY-PUB 724-99. Gaussians as a function of x/X0 are parametrized as polynomials. The mixture is parametrized as a function of the thickness, velocity and Xs=X0*h(Z).
Definition at line 14 of file GsfMultipleScatteringUpdator.h.
GsfMultipleScatteringUpdator::GsfMultipleScatteringUpdator | ( | float | mass | ) | [inline] |
constructor with explicit mass
Definition at line 25 of file GsfMultipleScatteringUpdator.h.
Referenced by clone().
: GsfMaterialEffectsUpdator(mass), theLastDz(0.), theLastP(0.), theLastPropDir(alongMomentum), theLastRadLength(0.) {}
virtual GsfMultipleScatteringUpdator* GsfMultipleScatteringUpdator::clone | ( | void | ) | const [inline, virtual] |
Implements GsfMaterialEffectsUpdator.
Definition at line 32 of file GsfMultipleScatteringUpdator.h.
References GsfMultipleScatteringUpdator().
{ return new GsfMultipleScatteringUpdator(*this); }
void GsfMultipleScatteringUpdator::compute | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [private, virtual] |
Computation: generates vectors of weights, means and standard deviations.
Implements GsfMaterialEffectsUpdator.
Definition at line 10 of file GsfMultipleScatteringUpdator.cc.
References h, TrajectoryStateOnSurface::localMomentum(), funct::log(), PV3DBase< T, PVType, FrameType >::mag(), GsfMaterialEffectsUpdator::mass(), Surface::mediumProperties(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), funct::pow(), MediumProperties::radLen(), mathSSE::sqrt(), storeArguments(), TrajectoryStateOnSurface::surface(), GsfMaterialEffectsUpdator::theDeltaCovs, GsfMaterialEffectsUpdator::theDeltaPs, GsfMaterialEffectsUpdator::theWeights, w2, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and z.
{ // // clear cache // theWeights.clear(); theDeltaPs.clear(); theDeltaCovs.clear(); // // Get surface and check presence of medium properties // const Surface& surface = TSoS.surface(); // // calculate components // if ( surface.mediumProperties() ) { LocalVector pvec = TSoS.localMomentum(); double p = TSoS.localMomentum().mag(); pvec *= 1./p; // thickness in radiation lengths double rl = surface.mediumProperties()->radLen()/fabs(pvec.z()); // auxiliary variables for modified X0 const double z = 14; // atomic number of silicon const double logz = log(z); const double h = (z+1)/z*log(287*sqrt(z))/log(159*pow(z,-1./3.)); double beta2 = 1./(1.+mass()*mass()/p/p); // reduced thickness double dp1 = rl/beta2/h; double logdp1 = log(dp1); double logdp2 = 2./3.*logz + logdp1; // means are always 0 theDeltaPs.push_back(0.); theDeltaPs.push_back(0.); // weights double w2; if ( logdp2<log(0.5) ) w2 = 0.05283+0.0077*logdp2+0.00069*logdp2*logdp2; else w2 =-0.01517+0.1151*logdp2-0.00653*logdp2*logdp2; double w1 = 1.-w2; theWeights.push_back(w1); theWeights.push_back(w2); // reduced variances double var1 = 0.8510+0.03314*logdp1-0.001825*logdp1*logdp1; double var2 = (1.-w1*var1)/w2; for ( int ic=0; ic<2; ic++ ) { // choose component and multiply with total variance double var = ic==0 ? var1 : var2; var *= 225.e-6*dp1/p/p; AlgebraicSymMatrix55 cov; // transform from orthogonal planes containing the // momentum vector to local parameters double sl = pvec.perp(); double cl = pvec.z(); double cf = pvec.x()/sl; double sf = pvec.y()/sl; cov(1,1) = var*(sf*sf*cl*cl + cf*cf)/(cl*cl*cl*cl); cov(1,2) = var*(cf*sf*sl*sl )/(cl*cl*cl*cl); cov(2,2) = var*(cf*cf*cl*cl + sf*sf)/(cl*cl*cl*cl); theDeltaCovs.push_back(cov); } } else { theWeights.push_back(1.); theDeltaPs.push_back(0.); theDeltaCovs.push_back(AlgebraicSymMatrix55()); } // // Save arguments to avoid duplication of computation // storeArguments(TSoS,propDir); }
bool GsfMultipleScatteringUpdator::newArguments | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [protected, virtual] |
Reimplemented from GsfMaterialEffectsUpdator.
Definition at line 88 of file GsfMultipleScatteringUpdator.cc.
References TrajectoryStateOnSurface::localMomentum(), PV3DBase< T, PVType, FrameType >::mag(), Surface::mediumProperties(), MediumProperties::radLen(), TrajectoryStateOnSurface::surface(), theLastDz, theLastP, theLastPropDir, theLastRadLength, Vector3DBase< T, FrameTag >::unit(), and PV3DBase< T, PVType, FrameType >::z().
{ return TSoS.localMomentum().unit().z()!=theLastDz || TSoS.localMomentum().mag()!=theLastP || propDir!=theLastPropDir || TSoS.surface().mediumProperties()->radLen()!=theLastRadLength; }
void GsfMultipleScatteringUpdator::storeArguments | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [protected, virtual] |
Reimplemented from GsfMaterialEffectsUpdator.
Definition at line 97 of file GsfMultipleScatteringUpdator.cc.
References TrajectoryStateOnSurface::localMomentum(), PV3DBase< T, PVType, FrameType >::mag(), Surface::mediumProperties(), MediumProperties::radLen(), TrajectoryStateOnSurface::surface(), theLastDz, theLastP, theLastPropDir, theLastRadLength, Vector3DBase< T, FrameTag >::unit(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by compute().
{ theLastDz = TSoS.localMomentum().unit().z(); theLastP = TSoS.localMomentum().mag(); theLastPropDir = propDir; theLastRadLength = TSoS.surface().mediumProperties()->radLen(); }
float GsfMultipleScatteringUpdator::theLastDz [mutable, private] |
Definition at line 49 of file GsfMultipleScatteringUpdator.h.
Referenced by newArguments(), and storeArguments().
float GsfMultipleScatteringUpdator::theLastP [mutable, private] |
Definition at line 50 of file GsfMultipleScatteringUpdator.h.
Referenced by newArguments(), and storeArguments().
PropagationDirection GsfMultipleScatteringUpdator::theLastPropDir [mutable, private] |
Definition at line 51 of file GsfMultipleScatteringUpdator.h.
Referenced by newArguments(), and storeArguments().
float GsfMultipleScatteringUpdator::theLastRadLength [mutable, private] |
Definition at line 52 of file GsfMultipleScatteringUpdator.h.
Referenced by newArguments(), and storeArguments().