#include <TrackingTools/GsfTracking/interface/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 |
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().
00025 : 00026 GsfMaterialEffectsUpdator(mass), 00027 theLastDz(0.), 00028 theLastP(0.), 00029 theLastPropDir(alongMomentum), 00030 theLastRadLength(0.) {}
virtual GsfMultipleScatteringUpdator* GsfMultipleScatteringUpdator::clone | ( | void | ) | const [inline, virtual] |
Implements GsfMaterialEffectsUpdator.
Definition at line 32 of file GsfMultipleScatteringUpdator.h.
References GsfMultipleScatteringUpdator().
00033 { 00034 return new GsfMultipleScatteringUpdator(*this); 00035 }
void GsfMultipleScatteringUpdator::compute | ( | const TrajectoryStateOnSurface & | TSoS, | |
const | PropagationDirection | |||
) | 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(), p, PV3DBase< T, PVType, FrameType >::perp(), funct::pow(), MediumProperties::radLen(), sl, funct::sqrt(), storeArguments(), TrajectoryStateOnSurface::surface(), GsfMaterialEffectsUpdator::theDeltaCovs, GsfMaterialEffectsUpdator::theDeltaPs, GsfMaterialEffectsUpdator::theWeights, w1, w2, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and z.
00012 { 00013 // 00014 // clear cache 00015 // 00016 theWeights.clear(); 00017 theDeltaPs.clear(); 00018 theDeltaCovs.clear(); 00019 // 00020 // Get surface and check presence of medium properties 00021 // 00022 const Surface& surface = TSoS.surface(); 00023 // 00024 // calculate components 00025 // 00026 if ( surface.mediumProperties() ) { 00027 LocalVector pvec = TSoS.localMomentum(); 00028 double p = TSoS.localMomentum().mag(); 00029 pvec *= 1./p; 00030 // thickness in radiation lengths 00031 double rl = surface.mediumProperties()->radLen()/fabs(pvec.z()); 00032 // auxiliary variables for modified X0 00033 const double z = 14; // atomic number of silicon 00034 const double logz = log(z); 00035 const double h = (z+1)/z*log(287*sqrt(z))/log(159*pow(z,-1./3.)); 00036 double beta2 = 1./(1.+mass()*mass()/p/p); 00037 // reduced thickness 00038 double dp1 = rl/beta2/h; 00039 double logdp1 = log(dp1); 00040 double logdp2 = 2./3.*logz + logdp1; 00041 // means are always 0 00042 theDeltaPs.push_back(0.); 00043 theDeltaPs.push_back(0.); 00044 // weights 00045 double w2; 00046 if ( logdp2<log(0.5) ) 00047 w2 = 0.05283+0.0077*logdp2+0.00069*logdp2*logdp2; 00048 else 00049 w2 =-0.01517+0.1151*logdp2-0.00653*logdp2*logdp2; 00050 double w1 = 1.-w2; 00051 theWeights.push_back(w1); 00052 theWeights.push_back(w2); 00053 // reduced variances 00054 double var1 = 0.8510+0.03314*logdp1-0.001825*logdp1*logdp1; 00055 double var2 = (1.-w1*var1)/w2; 00056 for ( int ic=0; ic<2; ic++ ) { 00057 // choose component and multiply with total variance 00058 double var = ic==0 ? var1 : var2; 00059 var *= 225.e-6*dp1/p/p; 00060 AlgebraicSymMatrix55 cov; 00061 // transform from orthogonal planes containing the 00062 // momentum vector to local parameters 00063 double sl = pvec.perp(); 00064 double cl = pvec.z(); 00065 double cf = pvec.x()/sl; 00066 double sf = pvec.y()/sl; 00067 cov(1,1) = var*(sf*sf*cl*cl + cf*cf)/(cl*cl*cl*cl); 00068 cov(1,2) = var*(cf*sf*sl*sl )/(cl*cl*cl*cl); 00069 cov(2,2) = var*(cf*cf*cl*cl + sf*sf)/(cl*cl*cl*cl); 00070 theDeltaCovs.push_back(cov); 00071 } 00072 } 00073 else { 00074 theWeights.push_back(1.); 00075 theDeltaPs.push_back(0.); 00076 theDeltaCovs.push_back(AlgebraicSymMatrix55()); 00077 } 00078 // 00079 // Save arguments to avoid duplication of computation 00080 // 00081 storeArguments(TSoS,propDir); 00082 }
bool GsfMultipleScatteringUpdator::newArguments | ( | const TrajectoryStateOnSurface & | TSoS, | |
const | PropagationDirection | |||
) | 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().
00089 { 00090 return TSoS.localMomentum().unit().z()!=theLastDz || 00091 TSoS.localMomentum().mag()!=theLastP || propDir!=theLastPropDir || 00092 TSoS.surface().mediumProperties()->radLen()!=theLastRadLength; 00093 }
void GsfMultipleScatteringUpdator::storeArguments | ( | const TrajectoryStateOnSurface & | TSoS, | |
const | PropagationDirection | |||
) | 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().
00098 { 00099 theLastDz = TSoS.localMomentum().unit().z(); 00100 theLastP = TSoS.localMomentum().mag(); 00101 theLastPropDir = propDir; 00102 theLastRadLength = TSoS.surface().mediumProperties()->radLen(); 00103 }
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().