CMS 3D CMS Logo

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

#include <MultipleScatteringUpdator.h>

Inheritance diagram for MultipleScatteringUpdator:
MaterialEffectsUpdator

Public Member Functions

virtual double deltaP (const TrajectoryStateOnSurface &, const PropagationDirection) const
 reimplementation of deltaP (since always 0) More...
 
 MultipleScatteringUpdator (double mass, double ptMin=-1.)
 
 ~MultipleScatteringUpdator ()
 destructor More...
 
- Public Member Functions inherited from MaterialEffectsUpdator
virtual const
AlgebraicSymMatrix55
deltaLocalError (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
double mass () const
 
 MaterialEffectsUpdator (double 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

virtual MultipleScatteringUpdatorclone () const
 
virtual void compute (const TrajectoryStateOnSurface &, const PropagationDirection) const
 

Private Attributes

double thePtMin
 

Additional Inherited Members

- Protected Attributes inherited from MaterialEffectsUpdator
AlgebraicSymMatrix55 theDeltaCov
 
double theDeltaP
 
- Static Protected Attributes inherited from MaterialEffectsUpdator
static AlgebraicSymMatrix55 theNullMatrix
 

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 ( double  mass,
double  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 26 of file MultipleScatteringUpdator.h.

Referenced by clone().

MultipleScatteringUpdator::~MultipleScatteringUpdator ( )
inline

destructor

Definition at line 30 of file MultipleScatteringUpdator.h.

30 {}

Member Function Documentation

virtual MultipleScatteringUpdator* MultipleScatteringUpdator::clone ( void  ) const
inlineprivatevirtual

Implements MaterialEffectsUpdator.

Definition at line 17 of file MultipleScatteringUpdator.h.

References MultipleScatteringUpdator().

17  {
18  return new MultipleScatteringUpdator(*this);
19  }
MultipleScatteringUpdator(double mass, double ptMin=-1.)
void MultipleScatteringUpdator::compute ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
privatevirtual

Implements MaterialEffectsUpdator.

Definition at line 14 of file MultipleScatteringUpdator.cc.

References a, GetRecoTauVFromDQM_MC_cff::cl2, gather_cfg::cout, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localMomentum(), create_public_lumi_plots::log, PV3DBase< T, PVType, FrameType >::mag2(), MaterialEffectsUpdator::mass(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), AlCaHLTBitMon_ParallelJobs::p, p2, PV3DBase< T, PVType, FrameType >::perp2(), MediumProperties::radLen(), mathSSE::sqrt(), TrajectoryStateOnSurface::surface(), MaterialEffectsUpdator::theDeltaCov, thePtMin, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

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

reimplementation of deltaP (since always 0)

Reimplemented from MaterialEffectsUpdator.

Definition at line 32 of file MultipleScatteringUpdator.h.

Referenced by CombinedMaterialEffectsUpdator::compute().

32  {
33  return 0.;
34  }

Member Data Documentation

double MultipleScatteringUpdator::thePtMin
private

Definition at line 43 of file MultipleScatteringUpdator.h.

Referenced by compute().