CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MultipleScatteringUpdator Class Referencefinal

#include <MultipleScatteringUpdator.h>

Inheritance diagram for MultipleScatteringUpdator:
MaterialEffectsUpdator

Public Member Functions

void compute (const TrajectoryStateOnSurface &, const PropagationDirection, Effect &effect) const override
 
 MultipleScatteringUpdator (float mass, float ptMin=-1.)
 
 ~MultipleScatteringUpdator () override
 destructor More...
 
- Public Member Functions inherited from MaterialEffectsUpdator
float mass () const
 
 MaterialEffectsUpdator (float mass)
 
virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual bool updateStateInPlace (TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual ~MaterialEffectsUpdator ()
 

Private Member Functions

MultipleScatteringUpdatorclone () const override
 

Private Attributes

float thePtMin
 

Additional Inherited Members

- Public Types inherited from MaterialEffectsUpdator
typedef materialEffect::Covariance Covariance
 
typedef materialEffect::CovIndex CovIndex
 
typedef materialEffect::Effect Effect
 

Detailed Description

Adds effects from multiple scattering (standard Highland formula) to a trajectory state. Uses radiation length from medium properties. Ported from ORCA.

Author
todorov, cerati

Definition at line 15 of file MultipleScatteringUpdator.h.

Constructor & Destructor Documentation

◆ MultipleScatteringUpdator()

MultipleScatteringUpdator::MultipleScatteringUpdator ( float  mass,
float  ptMin = -1. 
)
inline

Specify assumed mass of particle for material effects. If ptMin > 0, then the rms muliple scattering angle will be calculated taking into account the uncertainty in the reconstructed track momentum. (By default, it is neglected). However, a lower limit on the possible value of the track Pt will be applied at ptMin, to avoid the rms multiple scattering becoming too big.

Definition at line 23 of file MultipleScatteringUpdator.h.

Referenced by clone().

◆ ~MultipleScatteringUpdator()

MultipleScatteringUpdator::~MultipleScatteringUpdator ( )
inlineoverride

destructor

Definition at line 25 of file MultipleScatteringUpdator.h.

25 {}

Member Function Documentation

◆ clone()

MultipleScatteringUpdator* MultipleScatteringUpdator::clone ( void  ) const
inlineoverrideprivatevirtual

Implements MaterialEffectsUpdator.

Definition at line 16 of file MultipleScatteringUpdator.h.

16 { return new MultipleScatteringUpdator(*this); }

References MultipleScatteringUpdator().

◆ compute()

void MultipleScatteringUpdator::compute ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir,
Effect effect 
) const
overridevirtual

Implements MaterialEffectsUpdator.

Definition at line 14 of file MultipleScatteringUpdator.cc.

16  {
17  //
18  // Get surface
19  //
20  const Surface& surface = TSoS.surface();
21  //
22  //
23  // Now get information on medium
24  //
25  const MediumProperties& mp = surface.mediumProperties();
26  if
27  UNLIKELY(mp.radLen() == 0) return;
28 
29  // Momentum vector
30  LocalVector d = TSoS.localMomentum();
31  float p2 = d.mag2();
32  d *= 1.f / sqrt(p2);
33  float xf = 1.f / std::abs(d.z()); // increase of path due to angle of incidence
34  // calculate general physics things
35  constexpr float amscon = 1.8496e-4; // (13.6MeV)**2
36  const float m2 = mass() * mass(); // use mass hypothesis from constructor
37  float e2 = p2 + m2;
38  float beta2 = p2 / e2;
39  // calculate the multiple scattering angle
40  float radLen = mp.radLen() * xf; // effective rad. length
41  float sigt2 = 0.; // sigma(alpha)**2
42 
43  // Calculated rms scattering angle squared.
44  float fact = 1.f + 0.038f * unsafe_logf<2>(radLen);
45  fact *= fact;
46  float a = fact / (beta2 * p2);
47  sigt2 = amscon * radLen * a;
48 
49  if (thePtMin > 0) {
50 #ifdef DBG_MSU
51  std::cout << "Original rms scattering = " << sqrt(sigt2);
52 #endif
53  // Inflate estimated rms scattering angle, to take into account
54  // that 1/p is not known precisely.
55  AlgebraicSymMatrix55 const& covMatrix = TSoS.localError().matrix();
56  float error2_QoverP = covMatrix(0, 0);
57  // Formula valid for ultra-relativistic particles.
58  // sigt2 *= (1. + p2 * error2_QoverP);
59  // Exact formula
60  sigt2 *= 1.f + error2_QoverP * (p2 + m2 * beta2 * (5.f + 3.f * p2 * error2_QoverP));
61 #ifdef DBG_MSU
62  std::cout << " new = " << sqrt(sigt2);
63 #endif
64  // Convert Pt constraint to P constraint, neglecting uncertainty in
65  // track angle.
66  float pMin2 = thePtMin * thePtMin * (p2 / TSoS.globalMomentum().perp2());
67  // Use P constraint to calculate rms maximum scattering angle.
68  float betaMin2 = pMin2 / (pMin2 + m2);
69  float a_max = fact / (betaMin2 * pMin2);
70  float sigt2_max = amscon * radLen * a_max;
71  if (sigt2 > sigt2_max)
72  sigt2 = sigt2_max;
73 #ifdef DBG_MSU
74  std::cout << " after P constraint (" << pMin << ") = " << sqrt(sigt2);
75  std::cout << " for track with 1/p=" << 1 / p << "+-" << sqrt(error2_QoverP) << std::endl;
76 #endif
77  }
78 
79  float isl2 = 1.f / d.perp2();
80  float cl2 = (d.z() * d.z());
81  float cf2 = (d.x() * d.x()) * isl2;
82  float sf2 = (d.y() * d.y()) * isl2;
83  // Create update (transformation of independant variations
84  // on angle in orthogonal planes to local parameters.
85  float den = 1.f / (cl2 * cl2);
86  using namespace materialEffect;
87  effect.deltaCov[msxx] += (den * sigt2) * (sf2 * cl2 + cf2);
88  effect.deltaCov[msxy] += (den * sigt2) * (d.x() * d.y());
89  effect.deltaCov[msyy] += (den * sigt2) * (cf2 * cl2 + sf2);
90 
91  /*
92  std::cout << "new " << theDeltaCov(1,1) << " " << theDeltaCov(1,2) << " " << theDeltaCov(2,2) << std::endl;
93  oldMUcompute(TSoS,propDir, mass(), thePtMin);
94  */
95 }

References a, funct::abs(), GetRecoTauVFromDQM_MC_cff::cl2, gather_cfg::cout, ztail::d, materialEffect::Effect::deltaCov, fact, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localMomentum(), MaterialEffectsUpdator::mass(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), materialEffect::msxx, materialEffect::msxy, materialEffect::msyy, AlCaHLTBitMon_ParallelJobs::p, p2, PV3DBase< T, PVType, FrameType >::perp2(), ALCARECOTkAlMinBias_cff::pMin, MediumProperties::radLen(), fastSimProducer_cff::radLen, mathSSE::sqrt(), TrajectoryStateOnSurface::surface(), thePtMin, and UNLIKELY.

Referenced by CombinedMaterialEffectsUpdator::compute().

Member Data Documentation

◆ thePtMin

float MultipleScatteringUpdator::thePtMin
private

Definition at line 31 of file MultipleScatteringUpdator.h.

Referenced by compute(), and oldMUcompute().

Vector3DBase< float, LocalTag >
TrajectoryStateOnSurface::localMomentum
LocalVector localMomentum() const
Definition: TrajectoryStateOnSurface.h:75
MediumProperties::radLen
float radLen() const
Definition: MediumProperties.h:20
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:153
Surface
Definition: Surface.h:36
GetRecoTauVFromDQM_MC_cff.cl2
cl2
Definition: GetRecoTauVFromDQM_MC_cff.py:44
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
MaterialEffectsUpdator::MaterialEffectsUpdator
MaterialEffectsUpdator(float mass)
Definition: MaterialEffectsUpdator.cc:8
Surface::mediumProperties
const MediumProperties & mediumProperties() const
Definition: Surface.h:83
materialEffect::msyy
Definition: MaterialEffectsUpdator.h:19
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
materialEffect::Effect::deltaCov
Covariance deltaCov
Definition: MaterialEffectsUpdator.h:45
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
p2
double p2[4]
Definition: TauolaWrapper.h:90
materialEffect::msxx
Definition: MaterialEffectsUpdator.h:19
materialEffect
Definition: MaterialEffectsUpdator.h:18
fastSimProducer_cff.radLen
radLen
Definition: fastSimProducer_cff.py:62
MaterialEffectsUpdator::mass
float mass() const
Definition: MaterialEffectsUpdator.h:83
a
double a
Definition: hdecay.h:119
ALCARECOTkAlMinBias_cff.pMin
pMin
GeV.
Definition: ALCARECOTkAlMinBias_cff.py:35
MultipleScatteringUpdator::thePtMin
float thePtMin
Definition: MultipleScatteringUpdator.h:31
fact
const double fact
Definition: NuclearInteractionFTFSimulator.cc:74
materialEffect::msxy
Definition: MaterialEffectsUpdator.h:19
MultipleScatteringUpdator::MultipleScatteringUpdator
MultipleScatteringUpdator(float mass, float ptMin=-1.)
Definition: MultipleScatteringUpdator.h:23
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
MediumProperties
Definition: MediumProperties.h:12
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
ztail.d
d
Definition: ztail.py:151
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
PV3DBase::perp2
T perp2() const
Definition: PV3DBase.h:68