55 useParametrizedTrackerField_{iConfig.getParameter<
bool>(
"useParametrizedTrackerField")},
56 conf_{iConfig, debug_},
57 version_{iConfig.getParameter<
std::string>(
"version")} {
58 LogTrace(
"MagGeoBuilder") <<
"info:Constructing a DD4hep_VolumeBasedMagneticFieldESProducer";
60 auto cc = setWhatProduced(
this, iConfig.getUntrackedParameter<
std::string>(
"label",
""));
62 if (useParametrizedTrackerField_) {
71 LogTrace(
"MagGeoBuilder") <<
"DD4hep_VolumeBasedMagneticFieldESProducer::produce() " <<
version_;
90 LogTrace(
"MagGeoBuilder") <<
"produce() finished build";
95 LogTrace(
"MagGeoBuilder") <<
"Getting MF for parametrized field";
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::vector< MagBLayer * > barrelLayers() const
Get barrel layers.
const std::string version_
DD4hep_VolumeBasedMagneticFieldESProducer(const edm::ParameterSet &iConfig)
std::unique_ptr< MagneticField > produce(const IdealMagneticFieldRecord &iRecord)
const DD4hep_VolumeBasedMagneticFieldESProducer & operator=(const DD4hep_VolumeBasedMagneticFieldESProducer &)=delete
const cms::DDDetector * detector() const
std::vector< double > values
magneticfield::TableFileMap gridFiles
Specification of which data table is to be used for each volume.
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > keys
Scaling factors for the field in specific volumes.
const MagFieldConfig conf_
void setGridFiles(const TableFileMap &gridFiles)
edm::ESGetToken< cms::DDCompactView, IdealMagneticFieldRecord > cpvToken_
std::string version
Version of the data tables to be used.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > paramFieldToken_
std::vector< MagESector * > endcapSectors() const
Get endcap layers.
std::vector< MagVolume6Faces * > barrelVolumes() const
void build(const cms::DDDetector *det)
int geometryVersion
Version of the geometry to be used.
void setScaling(const std::vector< int > &keys, const std::vector< double > &values)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const bool useParametrizedTrackerField_
std::vector< MagVolume6Faces * > endcapVolumes() const