File indexing completed on 2024-04-06 12:28:51
0001 #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h"
0002
0003 #include "MSLayersKeeper.h"
0004 #include "MSLayersKeeperX0AtEta.h"
0005 #include "MSLayersKeeperX0Averaged.h"
0006 #include "MSLayersKeeperX0DetLayer.h"
0007 #include "MSLayersAtAngle.h"
0008
0009 struct MultipleScatteringParametrisationMaker::Keepers {
0010 Keepers(GeometricSearchTracker const& tracker, MagneticField const& bfield)
0011 : x0AtEta(tracker, bfield), x0Averaged(tracker, bfield), keepers{&x0DetLayer, &x0AtEta, &x0Averaged} {}
0012
0013 MSLayersKeeperX0DetLayer x0DetLayer;
0014 MSLayersKeeperX0AtEta x0AtEta;
0015 MSLayersKeeperX0Averaged x0Averaged;
0016 MSLayersKeeper* keepers[3];
0017 };
0018
0019 MultipleScatteringParametrisationMaker::MultipleScatteringParametrisationMaker(GeometricSearchTracker const& tracker,
0020 MagneticField const& bfield)
0021 : impl_(std::make_unique<Keepers>(tracker, bfield)) {}
0022
0023 MultipleScatteringParametrisationMaker::~MultipleScatteringParametrisationMaker() = default;
0024
0025 MultipleScatteringParametrisation MultipleScatteringParametrisationMaker::parametrisation(const DetLayer* layer,
0026 X0Source x0Source) const {
0027 return MultipleScatteringParametrisation(layer, impl_->keepers[static_cast<int>(x0Source)]);
0028 }