ATLAS Offline Software
MaterialEffectsUpdator.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MaterialEffectsUpdator.cxx, (c) ATLAS Detector software
8 
9 // Trk include
11 #include "GaudiKernel/ITHistSvc.h"
19 #include "TrkGeometry/Layer.h"
26 #include "TrkSurfaces/Surface.h"
27 // Amg
30 
32 // std
33 #include <algorithm>
34 #include <functional>
35 #include <cmath>
36 
37 
38 // constructor
39 Trk::MaterialEffectsUpdator::MaterialEffectsUpdator(const std::string& t, const std::string& n, const IInterface* p)
40  : AthAlgTool(t, n, p)
41  ,
42  // TrkParametersManipulator(),
43  m_doCompoundLayerCheck(false)
44  , m_doEloss(true)
45  , m_doMs(true)
46  , m_forceMomentum(false)
47  , m_xKalmanStraggling(false)
48  , m_useMostProbableEloss(false)
49  , m_msgOutputValidationDirection(true)
50  , m_msgOutputCorrections(false)
51  , m_validationMode(false)
52  , m_validationIgnoreUnmeasured(true)
53  , m_landauMode(false)
54  , m_validationDirection(1)
55  , m_momentumCut(50. * Gaudi::Units::MeV)
56  , m_momentumMax(10. * Gaudi::Units::TeV)
57  , m_forcedMomentum(2000. * Gaudi::Units::MeV)
58  , m_eLossUpdator("Trk::EnergyLossUpdator/AtlasEnergyLossUpdator")
59  , m_msUpdator("Trk::MultipleScatteringUpdator/AtlasMultipleScatteringUpdator")
60  , m_materialMapper("Trk::MaterialMapper/AtlasMaterialMapper")
61 {
62  declareInterface<IMaterialEffectsUpdator>(this);
63  // configuration (to be changed to new genconf style)
64  declareProperty("CheckForCompoundLayers", m_doCompoundLayerCheck);
65  declareProperty("EnergyLoss", m_doEloss);
66  declareProperty("EnergyLossUpdator", m_eLossUpdator);
67  declareProperty("MultipleScattering", m_doMs);
68  declareProperty("MultipleScatteringUpdator", m_msUpdator);
69  // the momentum cut for particle interactions
70  declareProperty("MinimalMomentum", m_momentumCut);
71  declareProperty("MaximalMomentum", m_momentumMax);
72  declareProperty("ForceMomentum", m_forceMomentum);
73  declareProperty("ForcedMomentumValue", m_forcedMomentum);
74  declareProperty("MostProbableEnergyLoss", m_useMostProbableEloss);
75  declareProperty("ScreenOutputValidationDirection", m_msgOutputValidationDirection);
76  declareProperty("ScreenOutputCorrections", m_msgOutputCorrections);
77  // run vaidation mode true/false
78  declareProperty("ValidationMode", m_validationMode);
79  declareProperty("ValidationIgnoreUnmeasured", m_validationIgnoreUnmeasured);
80  declareProperty("ValidationDirection", m_validationDirection);
81  declareProperty("ValidationMaterialMapper", m_materialMapper);
82  declareProperty("LandauMode", m_landauMode);
83 }
84 
85 // destructor
87 
88 // Athena standard methods
89 // initialize
92 {
93 
94  ATH_MSG_DEBUG("Minimal momentum cut for material update : " << m_momentumCut << " MeV");
95 
96  // retrieve the EnergyLoss Updator and Material Effects updator
97  if (m_doEloss) {
98  if (m_eLossUpdator.retrieve().isFailure()) {
99  ATH_MSG_FATAL("Failed to retrieve tool " << m_eLossUpdator
100  << ". No multiple scattering effects will be taken into account.");
101  m_doEloss = false;
102  return StatusCode::FAILURE;
103  }
104  ATH_MSG_DEBUG("Retrieved tool " << m_eLossUpdator);
105 
106  } else {
107  m_eLossUpdator.disable();
108  }
109 
110  if (m_doMs) {
111  if (m_msUpdator.retrieve().isFailure()) {
112  ATH_MSG_FATAL("Failed to retrieve tool " << m_msUpdator
113  << ". No energy loss effects will be taken into account.");
114  m_doMs = false;
115  return StatusCode::FAILURE;
116  }
117  ATH_MSG_DEBUG("Retrieved tool " << m_msUpdator);
118 
119  } else {
120  m_msUpdator.disable();
121  }
122 
123  // retrieve the material mapper for the validation mode
124  if (m_validationMode) {
125  if (m_materialMapper.retrieve().isFailure()) {
126  ATH_MSG_FATAL("Failed to retrieve tool " << m_materialMapper << ". No material recording.");
127  return StatusCode::FAILURE;
128  }
129  ATH_MSG_DEBUG("Retrieved tool " << m_materialMapper);
130 
131  } else {
132  m_materialMapper.disable();
133  }
134 
135  return StatusCode::SUCCESS;
136 }
137 
138 
139 std::unique_ptr<Trk::TrackParameters>
141  ICache& cache,
142  const TrackParameters* parm,
143  const Layer& lay,
146  MaterialUpdateMode matupmode
147 ) const {
148  // no material properties - pass them back
149  if (particle == Trk::geantino || particle == Trk::nonInteractingMuon || (!m_doMs && !m_doEloss) ||
150  !lay.isOnLayer(parm->position())) {
151  return parm->uniqueClone();
152  }
153 
154  // get the quantities
155  const Trk::MaterialProperties* mprop = lay.fullUpdateMaterialProperties(*parm);
156  if (!mprop) {
157  return parm->uniqueClone();
158  }
159 
160  // get the real pathlength
161  double pathCorrection = std::abs(lay.surfaceRepresentation().pathCorrection(parm->position(), parm->momentum()));
162 
163  // --------------------------------------------------------------------------------------------------
164  if (m_validationMode) {
165  cache.validationLayer = &lay;
166  }
167  return updateImpl(cache, parm, *mprop, pathCorrection, dir, particle, matupmode);
168 }
169 
170 std::unique_ptr<Trk::TrackParameters>
172  ICache& cache,
173  const TrackParameters* parm,
174  const MaterialEffectsOnTrack& meff,
176  MaterialUpdateMode matupmode
177 ) const {
178  // no material properties - pass them back
179  // TODO, if the parm doesn't have a surface (i.e. its in
180  // curvilinear) then should we fall through?
181  if (particle == Trk::geantino || particle == Trk::nonInteractingMuon || (!m_doMs && !m_doEloss) ||
182  parm->associatedSurface() != meff.associatedSurface()) {
183  return parm->uniqueClone();
184  }
185 
186  // get the kinematics
187  double p = parm->momentum().mag();
188  double updateMomentum = (m_forceMomentum) ? m_forcedMomentum : p;
190  double E = std::sqrt(p * p + m * m);
191  double beta = p / E;
192 
193  double pathcorrection = 1.; // Trick the MultipleScatteringUpdator interface
194 
195  double energyLoss = 0;
196  double energyLossSigma = 0;
197 
198  if (meff.energyLoss() != nullptr) {
199  energyLoss = meff.energyLoss()->deltaE();
200  energyLossSigma = meff.energyLoss()->sigmaDeltaE();
201  }
202 
203  // update for mean energy loss
204  double newP = p;
205  double sigmaQoverP = 0;
206  double sigmaQoverPSq = 0;
207  // Landaus mpvs don't just add, if in Landau mode we need to do a different update
208  if (m_landauMode && cache.accumulatedElossSigma != 0 && energyLossSigma != 0) {
209  if (energyLoss > 0) {
210  energyLoss += energyLossSigma * std::log(1 + cache.accumulatedElossSigma / (energyLossSigma)) +
211  cache.accumulatedElossSigma * std::log(1 + energyLossSigma / cache.accumulatedElossSigma);
212  } else {
213  energyLoss -= energyLossSigma * std::log(1 + cache.accumulatedElossSigma / energyLossSigma) +
214  cache.accumulatedElossSigma * std::log(1 + energyLossSigma / cache.accumulatedElossSigma);
215  }
216  cache.accumulatedElossSigma += energyLossSigma;
217  } else if (m_landauMode) {
218  cache.accumulatedElossSigma += energyLossSigma;
219  }
220  double qOverPnew = parm->parameters()[Trk::qOverP];
221 
222  if (p > m_momentumCut && p < m_momentumMax && m_doEloss) {
223  double newP2 = (E + energyLoss) * (E + energyLoss) - m * m;
224  if (newP2 < m_momentumCut * m_momentumCut) {
225  return nullptr; // protect FPE
226  }
227  if (E + energyLoss < -m) {
228  return nullptr; // protect against flip in correction
229  }
230  newP = std::sqrt(newP2);
231  sigmaQoverP = energyLossSigma / (beta * p * p);
232  sigmaQoverPSq = sigmaQoverP * sigmaQoverP;
233  qOverPnew = parm->charge() / newP;
234  }
235  Trk::DefinedParameter qOverPmod(qOverPnew, Trk::qOverP);
236 
237  // check if Parameters are measured parameters
238  // the updatedParameters - first a copy
239  const Trk::TrackParameters* mpars = parm;
240  AmgVector(5) updatedParameters(mpars->parameters());
241  std::optional<AmgSymMatrix(5)> updatedCovariance = std::nullopt;
242  // initialize ErrorMatrix pointer
243  if (m_validationMode && !m_validationIgnoreUnmeasured) {
244  // the new CovarianceMatrix - a copy first
245  updatedCovariance = mpars->covariance()
246  ? std::optional<AmgSymMatrix(5)>(*mpars->covariance())
247  : std::nullopt;
248  double angularVariation = 0;
249  double sigmaDeltaPhiSq = 0;
250  double sigmaDeltaThetaSq = 0;
251 
252  if (m_doMs) {
253  // If the meff has scattering angles use those, otherwise use MEffUpdator
254  if (meff.scatteringAngles() == nullptr) {
255  // Trick to keep using existing MultipleScatteringUpdator interface
256  // Here we know the path length to be meff.thicknessX0, so we set pathcorrection = 1
257  // and create a dummy materialProperties with the properties we are interested in
258  MaterialProperties mprop(meff.thicknessInX0(), 1., 1., 0., 0., 0.);
259  angularVariation = m_msUpdator->sigmaSquare(mprop, updateMomentum, pathcorrection, Trk::muon);
260  // sigmaDeltaPhiSq = angularVariation/(parm->sinTheta()*parm->sinTheta());
261  sigmaDeltaPhiSq =
262  angularVariation / (std::sin(parm->parameters()[Trk::theta]) * std::sin(parm->parameters()[Trk::theta]));
263  sigmaDeltaThetaSq = angularVariation;
264  } else {
265  // material update from mefots -> D.L.
266  sigmaDeltaPhiSq = meff.scatteringAngles()->sigmaDeltaPhi();
267  sigmaDeltaPhiSq *= sigmaDeltaPhiSq;
268  sigmaDeltaThetaSq = meff.scatteringAngles()->sigmaDeltaTheta();
269  sigmaDeltaThetaSq *= sigmaDeltaThetaSq;
270  updatedParameters[Trk::phi] = parm->position().phi() + meff.scatteringAngles()->deltaPhi();
271  updatedParameters[Trk::theta] = parm->position().theta() + meff.scatteringAngles()->deltaTheta();
272  }
273  }
274  // update the covariance entries - angular variation in phi has dependency on theta direction
275  if (updatedCovariance) {
276  // sign of the noise adding -----------------------
277  int sign = int(matupmode);
278  // check for non-zero covariance matrix
279  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::phi, Trk::phi), sign, sigmaDeltaPhiSq);
280  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::theta, Trk::theta), sign, sigmaDeltaThetaSq);
281  if (!m_xKalmanStraggling && !m_landauMode) {
282  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::qOverP, Trk::qOverP), sign, sigmaQoverPSq);
283  } else if (m_xKalmanStraggling) { /* to be filled in*/
284  } else if (m_landauMode) {
285  // subtract what we added up till now and add what we should add up till now
286  // Landau's 68% limit is approx 1.6*sigmaParameter
287 
288  /* Get the TLS to a local here once and use it for calculation*/
289  (*updatedCovariance)(Trk::qOverP, Trk::qOverP) -=
290  sign * std::pow(1.6 * (cache.accumulatedElossSigma - p * p * sigmaQoverP) / (p * p), 2);
291  (*updatedCovariance)(Trk::qOverP, Trk::qOverP) +=
292  sign * std::pow(1.6 * cache.accumulatedElossSigma / (newP * newP), 2);
293  }
294  // the checks for the remove Noise mode -----------------------------------------------------
295  if (matupmode == Trk::removeNoise && !checkCovariance(*updatedCovariance)) {
296  // the covariance is invalid
297  return nullptr;
298  }
299 
300  // create the ErrorMatrix
301  // updatedError = new Trk::ErrorMatrix(updatedCovariance);
302  // -------------------------------------- screen output --------------------------------------
303  if (m_msgOutputCorrections) {
304  double sigmaAngle = std::sqrt(angularVariation);
305  ATH_MSG_VERBOSE(" sigma(phi) / sigma(theta) = " << sigmaAngle / std::sin(parm->parameters()[Trk::theta]) << " / "
306  << sigmaAngle);
307  ATH_MSG_VERBOSE(" deltaP / sigmaQoverP = " << energyLoss << " / " << sigmaQoverP);
308  }
309  // -------------------------------------------------------------------------------------------
310  }
311  // ----------------------------------------- validation section ----------------------------------
312  // validation if configured
313  if (m_validationMode) {
314  if (cache.validationLayer) {
315  // all you have from MaterialProperties
316  double pathInX0 = meff.thicknessInX0();
317 
318  Trk::AssociatedMaterial assMatHit(parm->position(),
319  pathInX0,
320  pathInX0,
321  0,
322  0,
323  0,
324  0,
325  pathcorrection,
327  cache.validationLayer);
328 
329  // record the Material hit ----------------------------------------------------------------
330  m_materialMapper->recordMaterialHit(assMatHit, parm->position());
331 
332  // the steps
333  cache.validationSteps++;
334  cache.validationPhi += parm->position().phi();
335  cache.validationEta += parm->position().eta();
336  // reset the validation layer
337  cache.validationLayer = nullptr;
338  }
339  }
340  // ----------------------------------------- validation section ----------------------------------
341  }
342  updatedParameters[Trk::qOverP] = qOverPnew;
344  updatedParameters[Trk::loc1],
345  updatedParameters[Trk::loc2],
346  updatedParameters[Trk::phi],
347  updatedParameters[Trk::theta],
348  updatedParameters[Trk::qOverP],
349  updatedCovariance
350  );
351 }
352 
353 std::unique_ptr<Trk::TrackParameters>
355  ICache& cache,
356  const TrackParameters* parm,
357  const Layer& lay,
360  MaterialUpdateMode matupmode
361 ) const {
362  // no material properties - pass the parameters back
363  if (particle == Trk::geantino || particle == Trk::nonInteractingMuon || (!m_doMs && !m_doEloss)) {
364  return parm->uniqueClone();
365  }
366 
367  // get the split factor
368  double preFactor = lay.preUpdateMaterialFactor(*parm, dir);
369  // return if the preFactor is less than one
370  if (preFactor < 0.01) {
371  return parm->uniqueClone();
372  }
373 
374  // get the material properties
375  const Trk::MaterialProperties* mprop = nullptr;
376 
377  // set the output if restricted to the validation direction
378  bool outputFlag = m_msgOutputValidationDirection ? dir == int(m_validationDirection) : true;
379 
380  mprop = lay.fullUpdateMaterialProperties(*parm);
381  double pathCorrection = std::abs(lay.surfaceRepresentation().pathCorrection(parm->position(), parm->momentum()));
382  pathCorrection *= preFactor;
383 
384  // exit if no mprop could be assigned
385  if (!mprop) {
386  return parm->uniqueClone();
387  }
388  // --------------------------------------------------------------------------------------------------
389  if (outputFlag) {
390  double layerR = lay.surfaceRepresentation().bounds().r();
391  double layerZ = lay.surfaceRepresentation().center().z();
392  double eta = parm->momentum().eta();
393  double sX0 = mprop->thicknessInX0();
394  double tX0 = pathCorrection * mprop->thicknessInX0();
395  ATH_MSG_VERBOSE(" [M] pre material update at layer with [r,z] = [ " << layerR << ", " << layerZ << " ] - Index "
396  << lay.layerIndex());
397  ATH_MSG_VERBOSE(" thickness/X0 , path/X0 (eta: g.factor) = " << sX0 << " , " << tX0 << " (" << eta << ": "
398  << pathCorrection << ")");
399  }
400  // --------------------------------------------------------------------------------------------------
401  if (m_validationMode) {
402  cache.validationLayer = &lay;
403  }
404  return updateImpl(cache, parm, *mprop, pathCorrection, dir, particle, matupmode);
405 }
406 
407 std::unique_ptr<Trk::TrackParameters>
409  ICache& cache,
410  const TrackParameters& parm,
411  const Layer& lay,
414  MaterialUpdateMode matupmode
415 ) const {
416  // no material properties - pass the parameters back
417  if (particle == Trk::geantino || particle == Trk::nonInteractingMuon || (!m_doMs && !m_doEloss) ||
418  !lay.isOnLayer(parm.position())) {
419  return parm.uniqueClone();
420  }
421 
422  // get the quantities
423  const Trk::MaterialProperties* mprop = nullptr;
424  double postFactor = lay.postUpdateMaterialFactor(parm, dir);
425 
426  // no material properties - pass them back
427  if (postFactor < 0.01) {
428  return parm.uniqueClone();
429  }
430 
431  // set the output if restricted to the validation direction
432  bool outputFlag = m_msgOutputValidationDirection ? dir == int(m_validationDirection) : true;
433 
434  mprop = lay.fullUpdateMaterialProperties(parm);
435  double pathCorrection = std::abs(lay.surfaceRepresentation().pathCorrection(parm.position(), parm.momentum()));
436  pathCorrection *= postFactor;
437 
438  // exit if no material properties
439  if (!mprop) {
440  return parm.uniqueClone();
441  }
442 
443  // --------------------------------------------------------------------------------------------------
444  if (outputFlag) {
445  double layerR = lay.surfaceRepresentation().bounds().r();
446  double layerZ = lay.surfaceRepresentation().center().z();
447  double eta = parm.momentum().eta();
448  double sX0 = mprop->thicknessInX0();
449  double tX0 = pathCorrection * mprop->thicknessInX0();
450  ATH_MSG_VERBOSE(" [M] post material update, layer with [r,z] = [ " << layerR << ", " << layerZ << " ] - Index "
451  << lay.layerIndex());
452  ATH_MSG_VERBOSE(" thickness/X0 , path/X0 (eta: g.factor) = " << sX0 << " , " << tX0 << " (" << eta << ": "
453  << pathCorrection << ")");
454  }
455  // --------------------------------------------------------------------------------------------------
456  if (m_validationMode) {
457  cache.validationLayer = &lay;
458  }
459  return updateImpl(cache, parm, *mprop, pathCorrection, dir, particle, matupmode);
460 }
461 
462 // actual update method - manipulation
463 std::unique_ptr<Trk::TrackParameters>
465  ICache& cache,
466  const TrackParameters* parm,
467  const MaterialProperties& matprop,
468  double pathcorrection,
471  MaterialUpdateMode matupmode
472 ) const {
473  // no material properties - pass them back
474  if (particle == Trk::geantino || particle == Trk::nonInteractingMuon || (!m_doMs && !m_doEloss)) {
475  return parm->uniqueClone();
476  }
477 
478  // get the kinematics
479  double p = parm->momentum().mag();
480  double updateMomentum = (m_forceMomentum) ? m_forcedMomentum : p;
482  double E = std::sqrt(p * p + m * m);
483  double beta = p / E;
484 
485  // set the output if restricted to the validation direction
486  bool outputFlag = m_msgOutputValidationDirection ? dir == int(m_validationDirection) : true;
487 
488  // no material update below/above a certain cut value
489  if (p > m_momentumCut && p < m_momentumMax) {
490  // get the delta of the Energy
491  EnergyLoss energyLoss =
492  (m_doEloss) ? m_eLossUpdator->energyLoss(matprop, updateMomentum,
493  pathcorrection, dir, particle,
494  m_useMostProbableEloss)
495  : EnergyLoss{};
496  // update for mean energy loss
497  double deltaE = energyLoss.deltaE();
498  double sigmaDeltaE = energyLoss.sigmaDeltaE();
499 
500  if (m_landauMode && cache.accumulatedElossSigma != 0 && sigmaDeltaE != 0) {
501  if (dir == Trk::oppositeMomentum) {
502  deltaE += sigmaDeltaE * std::log(1 + cache.accumulatedElossSigma / sigmaDeltaE) +
503  cache.accumulatedElossSigma * std::log(1 + sigmaDeltaE / cache.accumulatedElossSigma);
504  } else {
505  deltaE -= sigmaDeltaE * std::log(1 + cache.accumulatedElossSigma / sigmaDeltaE) +
506  cache.accumulatedElossSigma * std::log(1 + sigmaDeltaE / cache.accumulatedElossSigma);
507  }
508  cache.accumulatedElossSigma += sigmaDeltaE;
509  } else if (m_landauMode) {
510  cache.accumulatedElossSigma += sigmaDeltaE;
511  }
512 
513  double newP2 = (E + deltaE) * (E + deltaE) - m * m;
514  if (E + deltaE < -m) {
515  return nullptr; // protect against flip in correction
516  }
517  if (newP2 < m_momentumCut * m_momentumCut) {
518  return nullptr; // protect against FPE
519  }
520  double deltaP = std::sqrt(newP2) - p;
521  double sigmaQoverP = sigmaDeltaE / std::pow(beta * p, 2);
522 
523  Trk::DefinedParameter qOverPmod(parm->charge() / (p + deltaP), Trk::qOverP);
524 
525  // check if Parameters are measured parameters
526  const Trk::TrackParameters* mpars = parm;
527  AmgVector(5) updatedParameters(mpars->parameters());
528  // initialize ErrorMatrix pointer
529  std::optional<AmgSymMatrix(5)> updatedCovariance = std::nullopt;
530  {
531  // the new CovarianceMatrix - a copy first
532  updatedCovariance =
533  mpars->covariance()
534  ? std::optional<AmgSymMatrix(5)>(*mpars->covariance())
535  : std::nullopt;
536  // only update if msUpdator exists
537  double angularVariation =
538  (m_doMs) ? m_msUpdator->sigmaSquare(matprop, updateMomentum, pathcorrection, particle) : 0.;
539  // update the covariance entries - angular variation in phi has dependency on theta direction
540  if (updatedCovariance) {
541  // sign of the noise adding ----------------------------------------------------------------
542  int sign = int(matupmode);
543 
544  double sigmaDeltaPhiSq =
545  angularVariation / (std::sin(parm->parameters()[Trk::theta]) * std::sin(parm->parameters()[Trk::theta]));
546  double sigmaDeltaThetaSq = angularVariation;
547  // checks will only be done in the removeNoise mode
548  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::phi, Trk::phi), sign, sigmaDeltaPhiSq);
549  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::theta, Trk::theta), sign, sigmaDeltaThetaSq);
550  if (!m_xKalmanStraggling && !m_landauMode) {
551  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::qOverP, Trk::qOverP), sign, sigmaQoverP * sigmaQoverP);
552  } else if (m_xKalmanStraggling) {
553  double q = parm->charge();
555  (*updatedCovariance)(Trk::qOverP, Trk::qOverP), sign, 0.2 * deltaP * deltaP * q * q * q * q);
556  } else if (m_landauMode) {
557  // subtract what we added up till now and add what we should add up till now
558  // Landau's 68% limit is approx 1.6*sigmaParameter
559  (*updatedCovariance)(Trk::qOverP, Trk::qOverP) -=
560  sign * std::pow(1.6 * (cache.accumulatedElossSigma - p * p * sigmaQoverP) / (p * p), 2);
561  (*updatedCovariance)(Trk::qOverP, Trk::qOverP) +=
562  sign * std::pow(1.6 * cache.accumulatedElossSigma / ((p + deltaP) * (p + deltaP)), 2);
563  }
564  // the checks for the remove Noise mode -----------------------------------------------------
565  if (matupmode == Trk::removeNoise && !checkCovariance(*updatedCovariance)) {
566  // the covariance is invalid
567  return nullptr;
568  }
569 
570  // create the ErrorMatrix
571 
572  // -------------------------------------- screen output --------------------------------------
573  if (outputFlag && m_msgOutputCorrections) {
574  double sigmaAngle = std::sqrt(angularVariation);
575  ATH_MSG_VERBOSE(" sigma(phi) / sigma(theta) = " << sigmaAngle / std::sin(parm->parameters()[Trk::theta])
576  << " / " << sigmaAngle);
577  ATH_MSG_VERBOSE(" deltaP / sigmaQoverP = " << deltaP << " / " << sigmaQoverP);
578  }
579  // -------------------------------------------------------------------------------------------
580  }
581  // ----------------------------------------- validation section ----------------------------------
582  // validation if configured
583  if (m_validationMode && dir == Trk::PropDirection(m_validationDirection) && updatedCovariance) {
584 
585  if (cache.validationLayer) {
586  // all you have from MaterialProperties
587  double pathInX0 = pathcorrection * matprop.thicknessInX0();
588  double A = 0.;
589  double Z = 0.;
590  double rho = 0.;
591  double l0 = 0.;
592  // or better take the extended version for more information
593  const Trk::MaterialProperties* extProperties = dynamic_cast<const Trk::MaterialProperties*>(&matprop);
594 
595  if (extProperties) {
596  A = extProperties->averageA();
597  Z = extProperties->averageZ();
598  rho = extProperties->averageRho();
599  l0 = extProperties->l0();
600  }
601 
602  Trk::AssociatedMaterial assMatHit(parm->position(),
603  pathInX0,
604  matprop.x0(),
605  l0,
606  A,
607  Z,
608  rho,
609  pathcorrection,
611  cache.validationLayer);
612 
613  // record the Material hit ----------------------------------------------------------------
614  m_materialMapper->recordMaterialHit(assMatHit, parm->position());
615  // the steps
616  cache.validationSteps++;
617  cache.validationPhi += parm->position().phi();
618  cache.validationEta += parm->position().eta();
619  // reset the cache.tion layer
620  cache.validationLayer = nullptr;
621  }
622  }
623  // ----------------------------------------- validation section ----------------------------------
624  }
625  updatedParameters[Trk::qOverP] = parm->charge() / (p + deltaP);
627  updatedParameters[Trk::loc1],
628  updatedParameters[Trk::loc2],
629  updatedParameters[Trk::phi],
630  updatedParameters[Trk::theta],
631  updatedParameters[Trk::qOverP],
632  std::move(updatedCovariance)
633  );
634  }
635  //default if we have not returned just above
636  return parm->uniqueClone();
637 }
638 
639 // actual update method
640 std::unique_ptr<Trk::TrackParameters>
642  ICache& cache,
643  const TrackParameters& parm,
644  const MaterialProperties& matprop,
645  double pathcorrection,
648  MaterialUpdateMode matupmode
649 ) const {
650  // no material properties - pass them back
651  if (particle == Trk::geantino || (!m_doMs && !m_doEloss)) {
652  return parm.uniqueClone();
653  }
654 
655  // get the kinematics
656  double p = parm.momentum().mag();
657  double updateMomentum = (m_forceMomentum) ? m_forcedMomentum : p;
659  double E = std::sqrt(p * p + m * m);
660  double beta = p / E;
661 
662  // set the output if restricted to the validation direction
663  bool outputFlag = m_msgOutputValidationDirection ? dir == int(m_validationDirection) : true;
664 
665  // no material update below or above a certain cut value
666  if (p > m_momentumCut && p < m_momentumMax) {
667  // the updatedParameters - first a copy
668  AmgVector(5) updatedParameters(parm.parameters());
669 
670  // get the delta of the Energy
671  EnergyLoss energyLoss =
672  (m_doEloss)
673  ? m_eLossUpdator->energyLoss(matprop, updateMomentum, pathcorrection, dir, particle, m_useMostProbableEloss)
674  : EnergyLoss{};
675  // update for mean energy loss
676  double deltaE = energyLoss.deltaE() ;
677  double sigmaDeltaE = energyLoss.sigmaDeltaE();
678  if (m_landauMode && cache.accumulatedElossSigma != 0 && sigmaDeltaE != 0) {
679  if (dir == Trk::oppositeMomentum) {
680  deltaE += sigmaDeltaE * std::log(1 + cache.accumulatedElossSigma / sigmaDeltaE) +
681  cache.accumulatedElossSigma * std::log(1 + sigmaDeltaE / cache.accumulatedElossSigma);
682  } else {
683  deltaE -= sigmaDeltaE * std::log(1 + cache.accumulatedElossSigma / sigmaDeltaE) +
684  cache.accumulatedElossSigma * std::log(1 + sigmaDeltaE / cache.accumulatedElossSigma);
685  }
686 
687  cache.accumulatedElossSigma += sigmaDeltaE;
688  } else if (m_landauMode) {
689  cache.accumulatedElossSigma += sigmaDeltaE;
690  }
691 
692  double newP2 = (E + deltaE) * (E + deltaE) - m * m;
693  if (E + deltaE < -m) {
694  return nullptr; // protect against flip in correction
695  }
696  if (newP2 < m_momentumCut * m_momentumCut) {
697  return nullptr; // protect against FPE
698  }
699  double deltaP = std::sqrt(newP2) - p;
700  double sigmaQoverP = sigmaDeltaE / std::pow(beta * p, 2);
701 
702  updatedParameters[Trk::qOverP] = parm.charge() / (p + deltaP);
703 
704  // check if Parameters are measured parameters
705  std::optional<AmgSymMatrix(5)> updatedCovariance = std::nullopt;
706  if (parm.covariance() || (m_validationMode && !m_validationIgnoreUnmeasured)) {
707  // the new CovarianceMatrix - a copy first
708  updatedCovariance = AmgSymMatrix(5)(*parm.covariance());
709  // only update if msUpdator exists
710  double angularVariation =
711  (m_doMs) ? m_msUpdator->sigmaSquare(matprop, updateMomentum, pathcorrection, particle) : 0.;
712  // update the covariance entries - angular variation in phi has dependency on theta direction
713  // sign of the noise adding ----------------------------------------------------------------
714  int sign = int(matupmode);
715  // checks will only be done in the removeNoise mode
716  double sigmaDeltaPhiSq =
717  angularVariation / (std::sin(parm.parameters()[Trk::theta]) * std::sin(parm.parameters()[Trk::theta]));
718  double sigmaDeltaThetaSq = angularVariation;
719  // checks will only be done in the removeNoise mode
720  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::phi, Trk::phi), sign, sigmaDeltaPhiSq);
721  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::theta, Trk::theta), sign, sigmaDeltaThetaSq);
722  if (!m_xKalmanStraggling && !m_landauMode) {
723  COVARIANCEUPDATEWITHCHECK((*updatedCovariance)(Trk::qOverP, Trk::qOverP), sign, sigmaQoverP * sigmaQoverP);
724  } else if (m_xKalmanStraggling) { /* to be filled in*/
725  } else if (m_landauMode) {
726  // subtract what we added up till now and add what we should add up till now
727  // Landau's 68% limit is best modeled by 1.6*sigmaParameter
728  (*updatedCovariance)(Trk::qOverP, Trk::qOverP) -=
729  sign * std::pow(1.6 * (cache.accumulatedElossSigma - p * p * sigmaQoverP) / (p * p), 2);
730  (*updatedCovariance)(Trk::qOverP, Trk::qOverP) +=
731  sign * std::pow(1.6 * cache.accumulatedElossSigma / ((p + deltaP) * (p + deltaP)), 2);
732  }
733 
734  // the checks for the remove Noise mode -----------------------------------------------------
735  if (matupmode == Trk::removeNoise && !checkCovariance(*updatedCovariance)) {
736  // the covariance is invalid
737  return nullptr;
738  }
739 
740  // create the ErrorMatrix // -------------------------------------- screen output
741  // --------------------------------------
742  if (outputFlag && m_msgOutputCorrections) {
743  double sigmaAngle = std::sqrt(angularVariation);
744  ATH_MSG_VERBOSE(" sigma(phi) / sigma(theta) = " << sigmaAngle / std::sin(parm.parameters()[Trk::theta]) << " / "
745  << sigmaAngle);
746  ATH_MSG_VERBOSE(" deltaP / sigmaQoverP = " << deltaP << " / " << sigmaQoverP);
747  }
748  // ----------------------------------------- validation section ----------------------------------
749  // validation if configured
750  if (m_validationMode && dir == Trk::PropDirection(m_validationDirection)) {
751 
752  if (cache.validationLayer) {
753  // all you have from MaterialProperties
754  double pathInX0 = pathcorrection * matprop.thicknessInX0();
755  double A = 0.;
756  double Z = 0.;
757  double rho = 0.;
758  double l0 = 0.;
759  // or better take the extended version for more information
760  const Trk::MaterialProperties* extProperties = dynamic_cast<const Trk::MaterialProperties*>(&matprop);
761 
762  if (extProperties) {
763  A = extProperties->averageA();
764  Z = extProperties->averageZ();
765  rho = extProperties->averageRho();
766  l0 = extProperties->l0();
767  }
768 
769  Trk::AssociatedMaterial assMatHit(parm.position(),
770  pathInX0,
771  matprop.x0(),
772  l0,
773  A,
774  Z,
775  rho,
776  pathcorrection,
778  cache.validationLayer);
779 
780  // record the Material hit ----------------------------------------------------------------
781  m_materialMapper->recordMaterialHit(assMatHit, parm.position());
782 
783  // the steps
784  cache.validationSteps++;
785  cache.validationPhi += parm.position().phi();
786  cache.validationEta += parm.position().eta();
787  // reset the validation layer
788  cache.validationLayer = nullptr;
789  }
790  }
791  // ------------------------------------------validation section ----------------------------------
792  }
794  updatedParameters[Trk::loc1],
795  updatedParameters[Trk::loc2],
796  updatedParameters[Trk::phi],
797  updatedParameters[Trk::theta],
798  updatedParameters[Trk::qOverP],
799  std::move(updatedCovariance)
800  );
801  }
802  return parm.uniqueClone();
803 }
804 
805 void
807 {
808  cache.validationEta = 0.;
809  cache.validationPhi = 0.;
810  cache.validationSteps = 0;
811 }
812 
813 void
815 {
816  cache.accumulatedElossSigma = 0;
817 }
818 
820 {
821  if (updated(Trk::phi, Trk::phi) > 0. && updated(Trk::theta, Trk::theta) > 0. &&
822  updated(Trk::qOverP, Trk::qOverP) > 0.) {
823  return true;
824  }
825 
826  // given an update
827  ATH_MSG_DEBUG(" [-] update material with 'removeNoise' results in negative covariance entries. Skipping update.");
828  return false;
829 }
COVARIANCEUPDATEWITHCHECK
#define COVARIANCEUPDATEWITHCHECK(cov, sign, value)
Definition: MaterialEffectsUpdator.h:28
Trk::MaterialEffectsUpdator::initialize
virtual StatusCode initialize() override
AlgTool initailize method.
Definition: MaterialEffectsUpdator.cxx:91
Trk::ScatteringAngles::deltaPhi
double deltaPhi() const
returns the
Definition: ScatteringAngles.h:82
Trk::Layer::isOnLayer
virtual bool isOnLayer(const Amg::Vector3D &gp, const BoundaryCheck &bcheck=BoundaryCheck(true)) const
isOnLayer() method, using isOnSurface() with Layer specific tolerance
Definition: Layer.cxx:149
Trk::MaterialEffectsUpdator::m_momentumCut
double m_momentumCut
Minimal momentum cut for update.
Definition: MaterialEffectsUpdator.h:335
EnergyLoss.h
Trk::MaterialEffectsUpdator::m_useMostProbableEloss
bool m_useMostProbableEloss
use the most probable energy loss
Definition: MaterialEffectsUpdator.h:320
Trk::Layer::postUpdateMaterialFactor
virtual double postUpdateMaterialFactor(const TrackParameters &, PropDirection) const
getting the MaterialProperties back - for pre-update
Definition: Layer.h:151
Trk::Surface::pathCorrection
virtual double pathCorrection(const Amg::Vector3D &pos, const Amg::Vector3D &mom) const
the pathCorrection for derived classes with thickness - it reflects if the direction projection is po...
ScatteringAngles.h
Trk::IMaterialEffectsUpdator::ICache
Cache class to allow passing information to/between calls.
Definition: IMaterialEffectsUpdator.h:63
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::Layer::fullUpdateMaterialProperties
const MaterialProperties * fullUpdateMaterialProperties(const TrackParameters &par) const
getting the MaterialProperties back - for full update
Definition: Layer.cxx:183
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
Trk::MaterialEffectsUpdator::~MaterialEffectsUpdator
virtual ~MaterialEffectsUpdator()
Virtual destructor.
Trk::MaterialEffectsUpdator::modelActionImpl
static void modelActionImpl(ICache &cache, const TrackParameters *parm=nullptr)
Definition: MaterialEffectsUpdator.cxx:814
Trk::MaterialProperties::averageA
float averageA() const
Return the average A of the material [gram/mole].
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TrackParameters.h
Trk::MaterialEffectsUpdator::m_validationMode
bool m_validationMode
Switch for validation mode.
Definition: MaterialEffectsUpdator.h:328
Trk::MaterialEffectsUpdator::m_validationIgnoreUnmeasured
bool m_validationIgnoreUnmeasured
Ignore unmeasured TrackParameters (Navigation!)
Definition: MaterialEffectsUpdator.h:329
Trk::ParametersBase::charge
double charge() const
Returns the charge.
Surface.h
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Trk::MaterialEffectsUpdator::m_msgOutputValidationDirection
bool m_msgOutputValidationDirection
validation direction used for screen output
Definition: MaterialEffectsUpdator.h:322
MaterialProperties.h
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::oppositeMomentum
@ oppositeMomentum
Definition: PropDirection.h:21
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersBase::uniqueClone
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone() const
clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existi...
Definition: ParametersBase.h:97
IEnergyLossUpdator.h
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
Trk::MaterialEffectsUpdator::m_eLossUpdator
ToolHandle< IEnergyLossUpdator > m_eLossUpdator
AlgoTool for EnergyLoss updates.
Definition: MaterialEffectsUpdator.h:339
CompoundLayer.h
Trk::MaterialProperties::thicknessInX0
float thicknessInX0() const
Return the radiationlength fraction.
Trk::MaterialEffectsUpdator::m_materialMapper
ToolHandle< IMaterialMapper > m_materialMapper
the material mapper for recording the layer material
Definition: MaterialEffectsUpdator.h:341
Trk::EnergyLoss::sigmaDeltaE
double sigmaDeltaE() const
returns the symmatric error
Trk::MaterialEffectsUpdator::m_validationDirection
int m_validationDirection
validation direction
Definition: MaterialEffectsUpdator.h:333
Trk::MaterialProperties::averageRho
float averageRho() const
Return the average density of the material.
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:35
Layer.h
Trk::MaterialEffectsUpdator::MaterialEffectsUpdator
MaterialEffectsUpdator(const std::string &, const std::string &, const IInterface *)
AlgTool like constructor.
Definition: MaterialEffectsUpdator.cxx:39
Trk::MaterialEffectsBase::thicknessInX0
double thicknessInX0() const
returns the actually traversed material .
python.SystemOfUnits.TeV
int TeV
Definition: SystemOfUnits.py:158
Trk::MaterialUpdateMode
MaterialUpdateMode
This is a steering enum to force the material update it can be: (1) addNoise (-1) removeNoise Second ...
Definition: MaterialUpdateMode.h:18
Trk::MaterialProperties::x0
float x0() const
Return the radiation length.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
ParamDefs.h
Trk::IMaterialEffectsUpdator::ICache::validationSteps
int validationSteps
number of validation steps
Definition: IMaterialEffectsUpdator.h:75
MaterialEffectsUpdator.h
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
Trk::MaterialEffectsUpdator::m_doEloss
bool m_doEloss
steer energy loss On/Off from outside
Definition: MaterialEffectsUpdator.h:315
Trk::Layer::preUpdateMaterialFactor
virtual double preUpdateMaterialFactor(const TrackParameters &, PropDirection) const
getting the MaterialProperties back - for pre-update
Definition: Layer.h:145
MaterialEffectsOnTrack.h
Trk::IMaterialEffectsUpdator::ICache::accumulatedElossSigma
double accumulatedElossSigma
Definition: IMaterialEffectsUpdator.h:80
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
GeoPrimitives.h
Trk::MaterialEffectsOnTrack
represents the full description of deflection and e-loss of a track in material.
Definition: MaterialEffectsOnTrack.h:40
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::ScatteringAngles::sigmaDeltaTheta
double sigmaDeltaTheta() const
returns the
Definition: ScatteringAngles.h:100
A
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DefinedParameter.h
Trk::Layer::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
Trk::MaterialEffectsUpdator::m_doCompoundLayerCheck
bool m_doCompoundLayerCheck
turn on/off the necessary checks when we may have compound layers
Definition: MaterialEffectsUpdator.h:313
Trk::Surface::createUniqueTrackParameters
virtual ChargedTrackParametersUniquePtr createUniqueTrackParameters(double l1, double l2, double phi, double theat, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const =0
Use the Surface as a ParametersBase constructor, from local parameters - charged.
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:66
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Trk::geantino
@ geantino
Definition: ParticleHypothesis.h:26
Trk::MaterialEffectsUpdator::m_forcedMomentum
double m_forcedMomentum
Forced momentum value.
Definition: MaterialEffectsUpdator.h:337
Trk::EnergyLoss::deltaE
double deltaE() const
returns the
Trk::IMaterialEffectsUpdator::ICache::validationEta
double validationEta
eta
Definition: IMaterialEffectsUpdator.h:77
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
Trk::MaterialEffectsUpdator::m_momentumMax
double m_momentumMax
Maximal momentum cut for update.
Definition: MaterialEffectsUpdator.h:336
Trk::MaterialEffectsUpdator::updateImpl
std::unique_ptr< TrackParameters > updateImpl(ICache &cache, const TrackParameters *parm, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const
Definition: MaterialEffectsUpdator.cxx:140
Trk::ParametersBase
Definition: ParametersBase.h:55
IMaterialMapper.h
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
Trk::MaterialEffectsUpdator::m_landauMode
bool m_landauMode
If in Landau mode, error propagation is done as for landaus.
Definition: MaterialEffectsUpdator.h:331
Trk::MaterialEffectsUpdator::m_msUpdator
ToolHandle< IMultipleScatteringUpdator > m_msUpdator
AlgoTool for MultipleScatterin effects.
Definition: MaterialEffectsUpdator.h:340
ParticleHypothesis.h
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::AssociatedMaterial
Definition: AssociatedMaterial.h:33
Trk::MaterialEffectsUpdator::validationActionImpl
static void validationActionImpl(ICache &cache)
Definition: MaterialEffectsUpdator.cxx:806
Athena::Units
Definition: Units.h:45
Trk::ParticleMasses::mass
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:53
EventPrimitives.h
IMultipleScatteringUpdator.h
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
Trk::EnergyLoss
This class describes energy loss material effects in the ATLAS tracking EDM.
Definition: EnergyLoss.h:34
Trk::MaterialEffectsUpdator::checkCovariance
bool checkCovariance(AmgSymMatrix(5) &updated) const
A simple check method for the 'removeNoise' update model.
Definition: MaterialEffectsUpdator.cxx:819
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::MaterialProperties
Definition: MaterialProperties.h:40
TrackingVolume.h
Trk::MaterialEffectsOnTrack::energyLoss
const EnergyLoss * energyLoss() const
returns the energy loss object.
Trk::MaterialEffectsUpdator::m_msgOutputCorrections
bool m_msgOutputCorrections
screen output of actual corrections
Definition: MaterialEffectsUpdator.h:324
Trk::MaterialEffectsUpdator::m_doMs
bool m_doMs
steer multiple scattering On/Off from outside
Definition: MaterialEffectsUpdator.h:316
Trk::MaterialEffectsUpdator::m_forceMomentum
bool m_forceMomentum
Force the momentum to be a specific value.
Definition: MaterialEffectsUpdator.h:318
Trk::MaterialEffectsOnTrack::scatteringAngles
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
Trk::MaterialProperties::averageZ
float averageZ() const
Returns the average Z of the material.
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::Layer::enclosingTrackingVolume
const TrackingVolume * enclosingTrackingVolume() const
get the confining TrackingVolume
Trk::ScatteringAngles::sigmaDeltaPhi
double sigmaDeltaPhi() const
returns the
Definition: ScatteringAngles.h:94
ReadCellNoiseFromCoolCompare.l0
l0
Definition: ReadCellNoiseFromCoolCompare.py:359
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
extractSporadic.q
list q
Definition: extractSporadic.py:98
AssociatedMaterial.h
Trk::IMaterialEffectsUpdator::ICache::validationPhi
double validationPhi
theta
Definition: IMaterialEffectsUpdator.h:76
Trk::phi
@ phi
Definition: ParamDefs.h:75
Trk::nonInteractingMuon
@ nonInteractingMuon
Definition: ParticleHypothesis.h:36
Trk::ScatteringAngles::deltaTheta
double deltaTheta() const
returns the
Definition: ScatteringAngles.h:88
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
AthAlgTool
Definition: AthAlgTool.h:26
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
Trk::removeNoise
@ removeNoise
Definition: MaterialUpdateMode.h:20
Trk::MaterialProperties::l0
float l0() const
Return the nuclear interaction length.
Trk::MaterialEffectsBase::associatedSurface
const Surface & associatedSurface() const
returns the surface to which these m.eff. are associated.
Trk::MaterialEffectsUpdator::postUpdateImpl
std::unique_ptr< TrackParameters > postUpdateImpl(ICache &cache, const TrackParameters &parm, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const
Definition: MaterialEffectsUpdator.cxx:408
fitman.rho
rho
Definition: fitman.py:532
Trk::IMaterialEffectsUpdator::ICache::validationLayer
const Trk::Layer * validationLayer
Definition: IMaterialEffectsUpdator.h:74
Trk::Layer
Definition: Layer.h:73
Trk::Layer::layerIndex
const LayerIndex & layerIndex() const
get the layerIndex
Trk::MaterialEffectsUpdator::preUpdateImpl
std::unique_ptr< TrackParameters > preUpdateImpl(ICache &cache, const TrackParameters *parm, const Layer &sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, MaterialUpdateMode matupmode=addNoise) const
Definition: MaterialEffectsUpdator.cxx:354
Trk::SurfaceBounds::r
virtual double r() const =0
Interface method for the maximal extension or the radius.