29 #include <sys/types.h>
48 cout <<
"PHFieldUtility::BuildFieldMap - construction field with configuration: ";
103 cout <<
"PHFieldUtility::BuildFieldMap - Invalid Field Configuration" << endl;
120 "/phenix/upgrades/decadal/fieldmaps/sPHENIX.2d.root",
134 "PHCompositeNode",
"PAR"));
138 serr << __PRETTY_FUNCTION__ <<
": PAR Node missing, request aborting.";
139 cout << serr.str() << endl;
141 throw runtime_error(serr.str());
146 PHField *field = findNode::getClass<PHField>(parNode, GetDSTFieldMapNodeName());
150 GetFieldConfigNode(default_config, topNode, verbosity);
151 assert(field_config);
153 field = BuildFieldMap(field_config, verbosity>0?verbosity-1:verbosity);
173 "PHCompositeNode",
"RUN"));
177 serr << __PRETTY_FUNCTION__ <<
": RUN Node missing, request aborting.";
178 cout << serr.str() << endl;
180 throw runtime_error(serr.str());
185 PHFieldConfig *field = findNode::getClass<PHFieldConfig>(runNode,
186 GetDSTConfigNodeName());
191 field = DefaultFieldConfig();
194 cout <<
"PHFieldUtility::GetFieldConfigNode - field map with configuration from build-in default: ";
200 field =
static_cast<PHFieldConfig *
>(default_config->Clone());
203 cout <<
"PHFieldUtility::GetFieldConfigNode - field map with configuration from input default: ";
210 GetDSTConfigNodeName(),
"PHObject"));
216 cout <<
"PHFieldUtility::GetFieldConfigNode - field map with configuration from DST/RUN: ";
static Fun4AllServer * instance()
PHCompositeNode * topNode() const
PHBoolean addNode(PHNode *)
untested code - I don't know if this is being used, drop me a line (with the field) and I test this -...
PHFieldConfig_v1 implements field configuration information for input a field map file.
PHFieldConfig store field configuration information.
virtual double get_taregetmag_y() const
field value in Tesla for target field model ONLY for PHFieldConfig_v3
@ kFieldUniform
Constant field.
@ kField2D
2D field map expressed in cylindrical coordinates
@ kField3DCartesian
3D field map expressed in Cartesian coordinates
@ kField3DCylindrical
3D field map expressed in cylindrical coordinates
virtual void identify(std::ostream &os=std::cout) const
virtual double get_magfield_rescale1() const
field value in Tesla for uniform field model ONLY for PHFieldConfig_v3
virtual double get_field_mag_x() const
field value in Tesla for uniform field model ONLY for PHFieldConfig_v2
virtual double get_field_mag_z() const
field value in Tesla for uniform field model ONLY for PHFieldConfig_v2
virtual FieldConfigTypes get_field_config() const
virtual double get_magfield_rescale() const
virtual const std::string & get_filename2() const
virtual const std::string & get_filename() const
virtual const std::string & get_filename1() const
field value in Tesla for target field model ONLY for PHFieldConfig_v3
virtual double get_magfield_rescale2() const
field value in Tesla for uniform field model ONLY for PHFieldConfig_v3
virtual double get_field_mag_y() const
field value in Tesla for uniform field model ONLY for PHFieldConfig_v2
untested code - I don't know if this is being used, drop me a line (with the field) and I test this -...
static PHField * GetFieldMapNode(const PHFieldConfig *default_config=nullptr, PHCompositeNode *topNode=nullptr, const int verbosity=0)
Get transient PHField from DST nodes. If not found, make a new one based on default_config.
static PHFieldConfig * DefaultFieldConfig()
static PHFieldConfig * GetFieldConfigNode(const PHFieldConfig *default_config=nullptr, PHCompositeNode *topNode=nullptr, const int verbosity=0)
Get persistent PHGeomIOTGeo from DST nodes. If not found, make a new one.
virtual ~PHFieldUtility()
static PHField * BuildFieldMap(const PHFieldConfig *field_config, const int verbosity=0)
Build or build field map with a configuration object.
transient DST object for field storage and access
PHNode * findFirst(const std::string &, const std::string &)