CMS 3D CMS Logo

Functions
MultipleScatteringUpdator.cc File Reference
#include "TrackingTools/MaterialEffects/interface/MultipleScatteringUpdator.h"
#include "DataFormats/GeometrySurface/interface/MediumProperties.h"
#include "DataFormats/Math/interface/approx_log.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ oldMUcompute() [1/2]

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

◆ oldMUcompute() [2/2]

void oldMUcompute ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir,
float  mass,
float  thePtMin 
)

Definition at line 101 of file MultipleScatteringUpdator.cc.

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

References a, HLT_FULL_cff::beta, GetRecoTauVFromDQM_MC_cff::cl, gather_cfg::cout, ztail::d, MillePedeFileConverter_cfg::e, TrajectoryStateOnSurface::globalMomentum(), MediumProperties::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localMomentum(), dqm-mbProfile::log, visualization-live-secondInstance_cfg::m, PV3DBase< T, PVType, FrameType >::mag(), MaterialEffectsUpdator::mass(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), ALCARECOTkAlMinBias_cff::pMin, MediumProperties::radLen(), fastSimProducer_cff::radLen, mathSSE::sqrt(), TrajectoryStateOnSurface::surface(), and MultipleScatteringUpdator::thePtMin.

Vector3DBase< float, LocalTag >
TrajectoryStateOnSurface::localMomentum
LocalVector localMomentum() const
Definition: TrajectoryStateOnSurface.h:75
HLT_FULL_cff.beta
beta
Definition: HLT_FULL_cff.py:8651
MediumProperties::radLen
float radLen() const
Definition: MediumProperties.h:20
gather_cfg.cout
cout
Definition: gather_cfg.py:144
Surface
Definition: Surface.h:36
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
Surface::mediumProperties
const MediumProperties & mediumProperties() const
Definition: Surface.h:83
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
fastSimProducer_cff.radLen
radLen
Definition: fastSimProducer_cff.py:62
a
double a
Definition: hdecay.h:119
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ALCARECOTkAlMinBias_cff.pMin
pMin
GeV.
Definition: ALCARECOTkAlMinBias_cff.py:35
MediumProperties::isValid
bool isValid() const
Definition: MediumProperties.h:26
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
MediumProperties
Definition: MediumProperties.h:12
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
ztail.d
d
Definition: ztail.py:151
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::perp
T perp() const
Definition: PV3DBase.h:69
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37