CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
MultipleScatteringUpdator.cc File Reference
#include "TrackingTools/MaterialEffects/interface/MultipleScatteringUpdator.h"
#include "DataFormats/GeometrySurface/interface/MediumProperties.h"

Go to the source code of this file.

Functions

void oldMUcompute (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, double mass, double ptmin)
 

Function Documentation

void oldMUcompute ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir,
double  mass,
double  ptmin 
)

Definition at line 108 of file MultipleScatteringUpdator.cc.

References a, beta, cl, gather_cfg::cout, alignCSCRings::e, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localMomentum(), create_public_lumi_plots::log, m, PV3DBase< T, PVType, FrameType >::mag(), scaleCards::mass, LocalTrajectoryError::matrix(), Surface::mediumProperties(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), MediumProperties::radLen(), mathSSE::sqrt(), TrajectoryStateOnSurface::surface(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

110 {
111  //
112  // Get surface
113  //
114  const Surface& surface = TSoS.surface();
115  //
116  //
117  // Now get information on medium
118  //
119  if (surface.mediumProperties()) {
120  // Momentum vector
121  LocalVector d = TSoS.localMomentum();
122  double p = d.mag();
123  d *= 1./p;
124  // MediumProperties mp(0.02, .5e-4);
125  const MediumProperties& mp = *surface.mediumProperties();
126  double xf = 1./fabs(d.z()); // increase of path due to angle of incidence
127  // calculate general physics things
128  const double amscon = 1.8496e-4; // (13.6MeV)**2
129  const double m = mass; // use mass hypothesis from constructor
130  double e = sqrt(p*p + m*m);
131  double beta = p/e;
132  // calculate the multiple scattering angle
133  double radLen = mp.radLen()*xf; // effective rad. length
134  double sigt2 = 0.; // sigma(alpha)**2
135  if (radLen > 0) {
136  // Calculated rms scattering angle squared.
137  double a = (1. + 0.038*log(radLen))/(beta*p); a *= a;
138  sigt2 = amscon*radLen*a;
139  if (thePtMin > 0) {
140 #ifdef DBG_MSU
141  std::cout<<"Original rms scattering = "<<sqrt(sigt2);
142 #endif
143  // Inflate estimated rms scattering angle, to take into account
144  // that 1/p is not known precisely.
145  AlgebraicSymMatrix55 covMatrix = TSoS.localError().matrix();
146  double error2_QoverP = covMatrix(0,0);
147  // Formula valid for ultra-relativistic particles.
148 // sigt2 *= (1. + (p*p) * error2_QoverP);
149  // Exact formula
150  sigt2 *= (1. + (p*p) * error2_QoverP *
151  (1. + 5*m*m/(e*e) + 3*m*m*beta*beta*error2_QoverP));
152 #ifdef DBG_MSU
153  std::cout<<" new = "<<sqrt(sigt2);
154 #endif
155  // Convert Pt constraint to P constraint, neglecting uncertainty in
156  // track angle.
157  double pMin = thePtMin*(TSoS.globalMomentum().mag()/TSoS.globalMomentum().perp());
158  // Use P constraint to calculate rms maximum scattering angle.
159  double betaMin = pMin/sqrt(pMin * pMin + m*m);
160  double a_max = (1. + 0.038*log(radLen))/(betaMin * pMin); a_max *= a_max;
161  double sigt2_max = amscon*radLen*a_max;
162  if (sigt2 > sigt2_max) sigt2 = sigt2_max;
163 #ifdef DBG_MSU
164  std::cout<<" after P constraint ("<<pMin<<") = "<<sqrt(sigt2);
165  std::cout<<" for track with 1/p="<<1/p<<"+-"<<sqrt(error2_QoverP)<<std::endl;
166 #endif
167  }
168  }
169  double sl = d.perp();
170  double cl = d.z();
171  double cf = d.x()/sl;
172  double sf = d.y()/sl;
173  // Create update (transformation of independant variations
174  // on angle in orthogonal planes to local parameters.
175  std::cout << "old " << sigt2*(sf*sf*cl*cl + cf*cf)/(cl*cl*cl*cl)
176  << " " << sigt2*(cf*sf*sl*sl )/(cl*cl*cl*cl)
177  << " " << sigt2*(cf*cf*cl*cl + sf*sf)/(cl*cl*cl*cl) << std::endl;
178  }
179 }
const double beta
float radLen() const
T perp() const
Definition: PV3DBase.h:71
T y() const
Definition: PV3DBase.h:62
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
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
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
float cl
Definition: Combine.cc:71
GlobalVector globalMomentum() const
double a
Definition: hdecay.h:121
tuple mass
Definition: scaleCards.py:27
const Surface & surface() const
tuple cout
Definition: gather_cfg.py:121
T x() const
Definition: PV3DBase.h:61