CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
GsfMultipleScatteringUpdator Class Reference

#include <GsfMultipleScatteringUpdator.h>

Inheritance diagram for GsfMultipleScatteringUpdator:
GsfMaterialEffectsUpdator

Public Member Functions

virtual
GsfMultipleScatteringUpdator
clone () const
 
 GsfMultipleScatteringUpdator (float mass)
 constructor with explicit mass More...
 
- Public Member Functions inherited from GsfMaterialEffectsUpdator
virtual std::vector
< AlgebraicSymMatrix55
deltaLocalErrors (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual std::vector< double > deltaPs (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
 GsfMaterialEffectsUpdator (float mass)
 
float mass () const
 
virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual std::vector< double > weights (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual ~GsfMaterialEffectsUpdator ()
 

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. More...
 

Private Attributes

float theLastDz
 
float theLastP
 
PropagationDirection theLastPropDir
 
float theLastRadLength
 

Additional Inherited Members

- Protected Attributes inherited from GsfMaterialEffectsUpdator
std::vector< AlgebraicSymMatrix55theDeltaCovs
 
std::vector< double > theDeltaPs
 
std::vector< double > theWeights
 

Detailed Description

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.

Constructor & Destructor Documentation

GsfMultipleScatteringUpdator::GsfMultipleScatteringUpdator ( float  mass)
inline

Member Function Documentation

virtual GsfMultipleScatteringUpdator* GsfMultipleScatteringUpdator::clone ( void  ) const
inlinevirtual

Implements GsfMaterialEffectsUpdator.

Definition at line 32 of file GsfMultipleScatteringUpdator.h.

References GsfMultipleScatteringUpdator().

33  {
34  return new GsfMultipleScatteringUpdator(*this);
35  }
GsfMultipleScatteringUpdator(float mass)
constructor with explicit mass
void GsfMultipleScatteringUpdator::compute ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
privatevirtual

Computation: generates vectors of weights, means and standard deviations.

Implements GsfMaterialEffectsUpdator.

Definition at line 10 of file GsfMultipleScatteringUpdator.cc.

References cl, h, TrajectoryStateOnSurface::localMomentum(), create_public_lumi_plots::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(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

12 {
13  //
14  // clear cache
15  //
16  theWeights.clear();
17  theDeltaPs.clear();
18  theDeltaCovs.clear();
19  //
20  // Get surface and check presence of medium properties
21  //
22  const Surface& surface = TSoS.surface();
23  //
24  // calculate components
25  //
26  if ( surface.mediumProperties() ) {
27  LocalVector pvec = TSoS.localMomentum();
28  double p = TSoS.localMomentum().mag();
29  pvec *= 1./p;
30  // thickness in radiation lengths
31  double rl = surface.mediumProperties()->radLen()/fabs(pvec.z());
32  // auxiliary variables for modified X0
33  const double z = 14; // atomic number of silicon
34  const double logz = log(z);
35  const double h = (z+1)/z*log(287*sqrt(z))/log(159*pow(z,-1./3.));
36  double beta2 = 1./(1.+mass()*mass()/p/p);
37  // reduced thickness
38  double dp1 = rl/beta2/h;
39  double logdp1 = log(dp1);
40  double logdp2 = 2./3.*logz + logdp1;
41  // means are always 0
42  theDeltaPs.push_back(0.);
43  theDeltaPs.push_back(0.);
44  // weights
45  double w2;
46  if ( logdp2<log(0.5) )
47  w2 = 0.05283+0.0077*logdp2+0.00069*logdp2*logdp2;
48  else
49  w2 =-0.01517+0.1151*logdp2-0.00653*logdp2*logdp2;
50  double w1 = 1.-w2;
51  theWeights.push_back(w1);
52  theWeights.push_back(w2);
53  // reduced variances
54  double var1 = 0.8510+0.03314*logdp1-0.001825*logdp1*logdp1;
55  double var2 = (1.-w1*var1)/w2;
56  for ( int ic=0; ic<2; ic++ ) {
57  // choose component and multiply with total variance
58  double var = ic==0 ? var1 : var2;
59  var *= 225.e-6*dp1/p/p;
61  // transform from orthogonal planes containing the
62  // momentum vector to local parameters
63  double sl = pvec.perp();
64  double cl = pvec.z();
65  double cf = pvec.x()/sl;
66  double sf = pvec.y()/sl;
67  cov(1,1) = var*(sf*sf*cl*cl + cf*cf)/(cl*cl*cl*cl);
68  cov(1,2) = var*(cf*sf*sl*sl )/(cl*cl*cl*cl);
69  cov(2,2) = var*(cf*cf*cl*cl + sf*sf)/(cl*cl*cl*cl);
70  theDeltaCovs.push_back(cov);
71  }
72  }
73  else {
74  theWeights.push_back(1.);
75  theDeltaPs.push_back(0.);
77  }
78  //
79  // Save arguments to avoid duplication of computation
80  //
81  storeArguments(TSoS,propDir);
82 }
float radLen() const
std::vector< AlgebraicSymMatrix55 > theDeltaCovs
T perp() const
Definition: PV3DBase.h:71
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
virtual void storeArguments(const TrajectoryStateOnSurface &, const PropagationDirection) const
T y() const
Definition: PV3DBase.h:62
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
double double double z
const MediumProperties * mediumProperties() const
Definition: Surface.h:93
LocalVector localMomentum() const
T mag() const
Definition: PV3DBase.h:66
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
float cl
Definition: Combine.cc:71
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
const Surface & surface() const
T x() const
Definition: PV3DBase.h:61
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
bool GsfMultipleScatteringUpdator::newArguments ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
protectedvirtual

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().

89  {
90  return TSoS.localMomentum().unit().z()!=theLastDz ||
91  TSoS.localMomentum().mag()!=theLastP || propDir!=theLastPropDir ||
93 }
float radLen() const
const MediumProperties * mediumProperties() const
Definition: Surface.h:93
LocalVector localMomentum() const
T mag() const
Definition: PV3DBase.h:66
T z() const
Definition: PV3DBase.h:63
Vector3DBase unit() const
Definition: Vector3DBase.h:57
const Surface & surface() const
void GsfMultipleScatteringUpdator::storeArguments ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
protectedvirtual

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().

98  {
99  theLastDz = TSoS.localMomentum().unit().z();
100  theLastP = TSoS.localMomentum().mag();
101  theLastPropDir = propDir;
103 }
float radLen() const
const MediumProperties * mediumProperties() const
Definition: Surface.h:93
LocalVector localMomentum() const
T mag() const
Definition: PV3DBase.h:66
T z() const
Definition: PV3DBase.h:63
Vector3DBase unit() const
Definition: Vector3DBase.h:57
const Surface & surface() const

Member Data Documentation

float GsfMultipleScatteringUpdator::theLastDz
mutableprivate

Definition at line 49 of file GsfMultipleScatteringUpdator.h.

Referenced by newArguments(), and storeArguments().

float GsfMultipleScatteringUpdator::theLastP
mutableprivate

Definition at line 50 of file GsfMultipleScatteringUpdator.h.

Referenced by newArguments(), and storeArguments().

PropagationDirection GsfMultipleScatteringUpdator::theLastPropDir
mutableprivate

Definition at line 51 of file GsfMultipleScatteringUpdator.h.

Referenced by newArguments(), and storeArguments().

float GsfMultipleScatteringUpdator::theLastRadLength
mutableprivate

Definition at line 52 of file GsfMultipleScatteringUpdator.h.

Referenced by newArguments(), and storeArguments().