CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
10  const PropagationDirection propDir,
11  Effect effects[]) const {
12  //
13  // Get surface and check presence of medium properties
14  //
15  const Surface& surface = TSoS.surface();
16  //
17  // calculate components
18  //
19  if (surface.mediumProperties().isValid()) {
20  LocalVector pvec = TSoS.localMomentum();
21  float p = TSoS.localMomentum().mag();
22  pvec *= 1. / p;
23  // thickness in radiation lengths
24  float rl = surface.mediumProperties().radLen() / fabs(pvec.z());
25  // auxiliary variables for modified X0
26  constexpr float z = 14; // atomic number of silicon
27  const float logz = log(z);
28  const float h = (z + 1) / z * log(287 * sqrt(z)) / log(159 * pow(z, -1. / 3.));
29  float beta2 = 1. / (1. + mass() * mass() / p / p);
30  // reduced thickness
31  float dp1 = rl / beta2 / h;
32  float logdp1 = log(dp1);
33  float logdp2 = 2. / 3. * logz + logdp1;
34  // weights
35  float w2;
36  if (logdp2 < log(0.5))
37  w2 = 0.05283 + 0.0077 * logdp2 + 0.00069 * logdp2 * logdp2;
38  else
39  w2 = -0.01517 + 0.1151 * logdp2 - 0.00653 * logdp2 * logdp2;
40  float w1 = 1. - w2;
41  effects[0].weight *= w1;
42  effects[1].weight *= w2;
43  // reduced variances
44  float var1 = 0.8510 + 0.03314 * logdp1 - 0.001825 * logdp1 * logdp1;
45  float var2 = (1. - w1 * var1) / w2;
46  for (int ic = 0; ic < 2; ic++) {
47  // choose component and multiply with total variance
48  float var = ic == 0 ? var1 : var2;
49  var *= 225.e-6 * dp1 / p / p;
51  // transform from orthogonal planes containing the
52  // momentum vector to local parameters
53  float sl = pvec.perp();
54  float cl = pvec.z();
55  float cf = pvec.x() / sl;
56  float sf = pvec.y() / sl;
57  using namespace materialEffect;
58  effects[ic].deltaCov[msxx] += var * (sf * sf * cl * cl + cf * cf) / (cl * cl * cl * cl);
59  effects[ic].deltaCov[msxy] += var * (cf * sf * sl * sl) / (cl * cl * cl * cl);
60  effects[ic].deltaCov[msyy] += var * (cf * cf * cl * cl + sf * sf) / (cl * cl * cl * cl);
61  }
62  }
63 }
float radLen() const
static std::vector< std::string > checklist log
T perp() const
Definition: PV3DBase.h:69
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
T y() const
Definition: PV3DBase.h:60
PropagationDirection
tuple cl
Definition: haddnano.py:49
LocalVector localMomentum() const
const SurfaceType & surface() const
T mag() const
Definition: PV3DBase.h:64
T sqrt(T t)
Definition: SSEVec.h:19
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
T z() const
Definition: PV3DBase.h:61
void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const override
Computation: generates vectors of weights, means and standard deviations.
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
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:59
const MediumProperties & mediumProperties() const
Definition: Surface.h:83
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29