![]() |
|
|||
File indexing completed on 2025-08-06 08:13:17
0001 /// --------------------------------------------------------------------------- 0002 /*! \file RetowerOptions.h 0003 * \author Derek Anderson 0004 * \date 08.14.2024 0005 * 0006 * Options for the RetowerCEMC module 0007 */ 0008 /// --------------------------------------------------------------------------- 0009 0010 #ifndef RETOWEROPTIONS_H 0011 #define RETOWEROPTIONS_H 0012 0013 // jet libraries 0014 #include <jetbackground/RetowerCEMC.h> 0015 0016 // make common namespaces implicit 0017 using namespace std; 0018 0019 0020 0021 namespace RetowerOptions { 0022 0023 // RetowerConfig definition ================================================= 0024 0025 // -------------------------------------------------------------------------- 0026 //! Retower Configuration 0027 // -------------------------------------------------------------------------- 0028 /*! A lightweight POD struct consolidating 0029 * options for the RetowerCEMC module. 0030 */ 0031 struct RetowerConfig { 0032 0033 // i/o options 0034 bool useTowerInfo; 0035 string nodePrefix; 0036 0037 // general options 0038 float fracCut; 0039 0040 }; // end RetowerConfig 0041 0042 0043 // options ================================================================== 0044 0045 // general options 0046 const float fracCut = 0.5; 0047 0048 0049 0050 // set up configuration ===================================================== 0051 0052 // -------------------------------------------------------------------------- 0053 //! Generate RetowerCEMC configuration 0054 // -------------------------------------------------------------------------- 0055 RetowerConfig GetConfig(const bool isTowerInfo = true, const string prefix = "TOWERINFO_CALIB") { 0056 0057 RetowerConfig cfg { 0058 .useTowerInfo = isTowerInfo, 0059 .nodePrefix = prefix, 0060 .fracCut = fracCut 0061 }; 0062 return cfg; 0063 0064 } // end 'GetConfig(bool, string)' 0065 0066 0067 0068 // initialize emcal retowerer =============================================== 0069 0070 // -------------------------------------------------------------------------- 0071 //! Instantiate RetowerCEMC module with given configuration 0072 // -------------------------------------------------------------------------- 0073 RetowerCEMC* CreateRetowerer(RetowerConfig& config) { 0074 0075 RetowerCEMC* retower = new RetowerCEMC(); 0076 retower -> set_towerinfo(config.useTowerInfo); 0077 retower -> set_frac_cut(config.fracCut); 0078 retower -> set_towerNodePrefix(config.nodePrefix); 0079 return retower; 0080 0081 } // end 'CreateRetowerer(RetowerConfig&)' 0082 0083 } // end RetowerOptions namespace 0084 0085 #endif 0086 0087 // end ------------------------------------------------------------------------
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |