58 useParametrizedTrackerField_{iConfig.getParameter<
bool>(
"useParametrizedTrackerField")},
59 useMergeFileIfAvailable_{iConfig.getParameter<
bool>(
"useMergeFileIfAvailable")},
60 conf_{iConfig, debug_},
61 version_{iConfig.getParameter<
std::string>(
"version")} {
62 LogTrace(
"MagGeoBuilder") <<
"info:Constructing a DD4hep_VolumeBasedMagneticFieldESProducer";
64 auto cc = setWhatProduced(
this, iConfig.getUntrackedParameter<
std::string>(
"label",
""));
66 if (useParametrizedTrackerField_) {
75 LogTrace(
"MagGeoBuilder") <<
"DD4hep_VolumeBasedMagneticFieldESProducer::produce() " <<
version_;
94 LogTrace(
"MagGeoBuilder") <<
"produce() finished build";
99 LogTrace(
"MagGeoBuilder") <<
"Getting MF for parametrized field";
115 desc.addUntracked<
bool>(
"debugBuilder",
false);
116 desc.add<
bool>(
"useMergeFileIfAvailable",
true);
117 desc.add<
bool>(
"useParametrizedTrackerField");
123 desc.add<
int>(
"geometryVersion");
128 sub.
add<
int>(
"master");
130 desc.addVPSet(
"gridFiles", sub);
132 desc.add<std::vector<int> >(
"scalingVolumes");
133 desc.add<std::vector<double> >(
"scalingFactors");
135 desc.add<std::vector<double> >(
"paramData", std::vector<double>());
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
const bool useMergeFileIfAvailable_
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
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< int > keys
Scaling factors for the field in specific volumes.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
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.
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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const bool useParametrizedTrackerField_
std::vector< MagVolume6Faces * > endcapVolumes() const