42 #include <boost/algorithm/string/split.hpp> 43 #include <boost/algorithm/string/classification.hpp> 44 #include <boost/lexical_cast.hpp> 71 VolumeBasedMagneticFieldESProducerFromDB::VolumeBasedMagneticFieldESProducerFromDB(
const edm::ParameterSet& iConfig) :
pset(iConfig)
75 nominalLabels ={
"3.8T",
"0T",
"2T",
"3T",
"3.5T",
"3.8T",
"4T"};
93 message =
" (from RunInfo DB)";
95 message =
" (from valueOverride card)";
104 edm::LogInfo(
"MagneticField|AutoMagneticField") <<
"Current: " << current << message <<
"; using map configuration with label: " << configLabel << endl
105 <<
"Version: " << conf->
version 113 if (conf->
version ==
"parametrizedMagneticField") {
123 if (!conf->
keys.empty()) {
137 auto cpv = std::make_unique<DDCompactView>(
DDName(
"cmsMagneticField:MAGF"));
139 parser.getDDLSAX2FileHandler()->setUserNS(
true);
141 std::unique_ptr<std::vector<unsigned char> > tb = (*gdd).getUncompressedBlob();
142 parser.parse(*tb, tb->size());
std::string closerNominalLabel(float current)
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
std::vector< MagBLayer * > barrelLayers() const
Get barrel layers.
DDName is used to identify DDD entities uniquely.
std::vector< std::string > nominalLabels
std::vector< double > values
std::vector< int > nominalCurrents
magneticfield::TableFileMap gridFiles
Specification of which data table is to be used for each volume.
std::vector< MagVolume6Faces * > barrelVolumes() const
std::string slaveFieldVersion
Label or type of the tracker parametrization.
static std::unique_ptr< MagneticField > get(std::string version, const edm::ParameterSet ¶meters)
virtual void build(const DDCompactView &cpv)
const DepRecordT getRecord() const
std::vector< MagESector * > endcapSectors() const
Get endcap layers.
std::vector< int > keys
Scaling factors for the field in specific volumes.
DDLParser is the main class of Detector Description Language Parser.
std::string version
Version of the data tables to be used.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void setScaling(const std::vector< int > &keys, const std::vector< double > &values)
std::vector< MagVolume6Faces * > endcapVolumes() const
int geometryVersion
Version of the geometry to be used.
std::unique_ptr< MagneticField > produce(const IdealMagneticFieldRecord &iRecord)
void setGridFiles(const magneticfield::TableFileMap &gridFiles)
std::vector< double > slaveFieldParameters