Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:58

0001 #ifndef PHFIELD_PHFIELDUTILITY_H
0002 #define PHFIELD_PHFIELDUTILITY_H
0003 
0004 #include <string>
0005 
0006 class PHCompositeNode;
0007 class PHField;
0008 class PHFieldConfig;
0009 
0010 //! Toolsets to do geometry operations
0011 class PHFieldUtility
0012 {
0013  public:
0014   //! Make a default PHFieldConfig as in default macro of pro.3 release
0015   //! Field map = /phenix/upgrades/decadal/fieldmaps/sPHENIX.2d.root
0016   //! Field Scale to 1.4/1.5
0017   //! \output default field configuration object. Caller assumes ownership
0018   static PHFieldConfig *DefaultFieldConfig();
0019 
0020   //! Get transient PHField from DST nodes. If not found, make a new one based on default_config
0021   //! \param[in]  default_config  default configuraiton if not on DST. If nullptr, use DefaultFieldConfig() as the default
0022   //! \param[in]  topNode         you know who....
0023   static PHField *
0024   GetFieldMapNode(const PHFieldConfig *default_config = nullptr, PHCompositeNode *topNode = nullptr, const int verbosity = 0);
0025 
0026   //! Get persistent PHFieldConfig from DST nodes. If not found, make a new one based on default_config
0027   //! \param[in]  default_config  default configuraiton if not on DST. If nullptr, use DefaultFieldConfig() as the default
0028   //! \param[in]  topNode         you know who....
0029   static PHFieldConfig *
0030   GetFieldConfigNode(const PHFieldConfig *default_config = nullptr, PHCompositeNode *topNode = nullptr, const int verbosity = 0);
0031 
0032   //! Build or build field map with a configuration object
0033   static PHField *
0034   BuildFieldMap(const PHFieldConfig *field_config, float inner_radius = 0., float outer_radius = 1.e10, float size_z = 1.e10, const int verbosity = 0);
0035 
0036   //! DST node name for RunTime field map object
0037   static std::string
0038   GetDSTFieldMapNodeName()
0039   {
0040     return std::string("FIELD_MAP");
0041   }
0042 
0043   //! DST node name for persistent field configuration node
0044   static std::string
0045   GetDSTConfigNodeName()
0046   {
0047     return std::string("FIELD_CONFIG");
0048   }
0049 
0050  private:
0051   // static tool sets only
0052   PHFieldUtility() = delete;
0053   ~PHFieldUtility() = delete;
0054 };
0055 
0056 #endif