9 #ifndef TRKEXUTILS_EXTRAPOLATIONCELL_H
10 #define TRKEXUTILS_EXTRAPOLATIONCELL_H
22 #ifndef TRKEXUTILS_CHECKPATHMACRO
23 #define TRKEXUTILS_CHECKPATHMACRO
24 #define reachedLimit(current, limit, tolerance) \
26 (((current) < (limit)) \
27 ? ((current) - (limit)) * ((current) - (limit)) / ((limit) * (limit)) < \
28 (tolerance) * (tolerance) \
34 class MaterialProperties;
94 return (
m_value & (1 <<
int(em)));
208 double pLength = -1.)
291 std::vector<ExtrapolationStep<T>>
305 unsigned int econfig = 1)
478 startParameters = endParameters;
479 startVolume = endVolume;
480 startLayer = endLayer;
485 leadParameters = startParameters;
488 leadLayerSurface = 0;
489 lastBoundaryParameters = 0;
490 lastBoundarySurface = 0;
491 lastLeadParameters = startParameters;
497 eLoss->set(0., 0., 0., 0., 0., 0.);
499 extrapolationSteps.clear();
511 endParameters = leadParameters->clone();
522 for (
auto bC : m_garbageCollection)
524 m_garbageCollection.clear();
527 for (
auto& es : extrapolationSteps) {
528 delete es.parameters;
529 delete es.transportJacobian;
532 extrapolationSteps.clear();
542 if (!checkConfigurationMode(fillMode)) {
553 extrapolationSteps.size()
554 ? extrapolationSteps[extrapolationSteps.size() - 1].surface
560 extrapolationSteps[extrapolationSteps.size() - 1].parameters =
parameters;
561 extrapolationSteps[extrapolationSteps.size() - 1].surface = cssf;
562 extrapolationSteps[extrapolationSteps.size() - 1].stepConfiguration.addMode(
578 extrapolationSteps.size()
579 ? extrapolationSteps[extrapolationSteps.size() - 1].surface
587 extrapolationSteps[extrapolationSteps.size() - 1].surface = cssf;
589 extrapolationSteps[extrapolationSteps.size() - 1].transportJacobian = tjac;
590 extrapolationSteps[extrapolationSteps.size() - 1].stepConfiguration.addMode(
594 extrapolationSteps[extrapolationSteps.size() - 1].pathLength = pLength;
595 extrapolationSteps[extrapolationSteps.size() - 1]
600 pathLength += pLength;
630 zOaTrX +=
mat->zOverAtimesRho() *
step /
mat->X0;
645 addMaterial(sfactor, mprop);
652 extrapolationSteps.size()
653 ? extrapolationSteps[extrapolationSteps.size() - 1].surface
659 extrapolationSteps[extrapolationSteps.size() - 1].surface = cssf;
660 extrapolationSteps[extrapolationSteps.size() - 1].layer = lay;
664 extrapolationSteps[extrapolationSteps.size() - 1].material = mprop;
665 extrapolationSteps[extrapolationSteps.size() - 1].stepConfiguration.addMode(
667 extrapolationSteps[extrapolationSteps.size() - 1].materialPosition =
669 extrapolationSteps[extrapolationSteps.size() - 1].materialScaling = sfactor;
675 #endif // TRKEXUTILS_EXTRAPOLATIONCELL_H