CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfMultipleScatteringUpdator.cc
Go to the documentation of this file.
2 
4 
5 // #include "CommonDet/DetUtilities/interface/DetExceptions.h"
6 
7 // #include "Utilities/Notification/interface/Verbose.h"
8 
9 void
11  const PropagationDirection propDir, Effect effects[]) const
12 {
13  //
14  // Get surface and check presence of medium properties
15  //
16  const Surface& surface = TSoS.surface();
17  //
18  // calculate components
19  //
20  if ( surface.mediumProperties().isValid() ) {
21  LocalVector pvec = TSoS.localMomentum();
22  float p = TSoS.localMomentum().mag();
23  pvec *= 1./p;
24  // thickness in radiation lengths
25  float rl = surface.mediumProperties().radLen()/fabs(pvec.z());
26  // auxiliary variables for modified X0
27  constexpr float z = 14; // atomic number of silicon
28  const float logz = log(z);
29  const float h = (z+1)/z*log(287*sqrt(z))/log(159*pow(z,-1./3.));
30  float beta2 = 1./(1.+mass()*mass()/p/p);
31  // reduced thickness
32  float dp1 = rl/beta2/h;
33  float logdp1 = log(dp1);
34  float logdp2 = 2./3.*logz + logdp1;
35  // weights
36  float w2;
37  if ( logdp2<log(0.5) )
38  w2 = 0.05283+0.0077*logdp2+0.00069*logdp2*logdp2;
39  else
40  w2 =-0.01517+0.1151*logdp2-0.00653*logdp2*logdp2;
41  float w1 = 1.-w2;
42  effects[0].weight*=w1;
43  effects[1].weight*=w2;
44  // reduced variances
45  float var1 = 0.8510+0.03314*logdp1-0.001825*logdp1*logdp1;
46  float var2 = (1.-w1*var1)/w2;
47  for ( int ic=0; ic<2; ic++ ) {
48  // choose component and multiply with total variance
49  float var = ic==0 ? var1 : var2;
50  var *= 225.e-6*dp1/p/p;
52  // transform from orthogonal planes containing the
53  // momentum vector to local parameters
54  float sl = pvec.perp();
55  float cl = pvec.z();
56  float cf = pvec.x()/sl;
57  float sf = pvec.y()/sl;
58  using namespace materialEffect;
59  effects[ic].deltaCov[msxx] += var*(sf*sf*cl*cl + cf*cf)/(cl*cl*cl*cl);
60  effects[ic].deltaCov[msxy] += var*(cf*sf*sl*sl )/(cl*cl*cl*cl);
61  effects[ic].deltaCov[msyy] += var*(cf*cf*cl*cl + sf*sf)/(cl*cl*cl*cl);
62  }
63  }
64 
65 }
66 
float radLen() const
T perp() const
Definition: PV3DBase.h:72
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
T y() const
Definition: PV3DBase.h:63
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
PropagationDirection
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const
Computation: generates vectors of weights, means and standard deviations.
#define constexpr
LocalVector localMomentum() const
const SurfaceType & surface() const
T mag() const
Definition: PV3DBase.h:67
T sqrt(T t)
Definition: SSEVec.h:48
T z() const
Definition: PV3DBase.h:64
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
bool isValid() const
T x() const
Definition: PV3DBase.h:62
const MediumProperties & mediumProperties() const
Definition: Surface.h:120
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
tuple log
Definition: cmsBatch.py:341