File indexing completed on 2025-04-19 09:10:10
0001 #ifndef PHASIC_Main_Phase_Space_Enhance_H
0002 #define PHASIC_Main_Phase_Space_Enhance_H
0003
0004 #include "PHASIC++/Enhance/Enhance_Observable_Base.H"
0005 #include "ATOOLS/Math/Histogram.H"
0006 #include "ATOOLS/Org/CXXFLAGS.H"
0007 #include <iostream>
0008
0009 namespace PHASIC {
0010 class Process_Base;
0011 class Phase_Space_Handler;
0012
0013 class Phase_Space_Enhance {
0014 private:
0015 Enhance_Observable_Base * p_obs, * p_func;
0016 ATOOLS::Histogram * p_histo, * p_histo_current;
0017 double m_func_min, m_func_max;
0018 int m_xs;
0019 double m_factor;
0020 ATOOLS::Vec4D * p_moms;
0021 ATOOLS::Flavour * p_flavs;
0022
0023 size_t m_nflavs;
0024
0025 void RegisterDefaults();
0026 public:
0027 Phase_Space_Enhance();
0028 ~Phase_Space_Enhance();
0029
0030 void Init(Phase_Space_Handler * psh);
0031 double operator()();
0032 double Factor(double totalxs);
0033
0034 void SetObservable(const std::string &enhanceobs,Process_Base * const process);
0035 void SetFunction(const std::string &enhancefunc,Process_Base * const process);
0036 void SetFactor(double f) {
0037 m_factor = f;
0038 }
0039
0040 void AddPoint(double xs);
0041 void Optimize();
0042 void ReadIn(const std::string &path);
0043
0044 inline void MPISync() {
0045 if (p_histo_current) p_histo_current->MPISync();
0046 }
0047 inline void WriteOut(const std::string &path) {
0048 if (p_histo) p_histo->Output(path+"/MC_Enhance.histo");
0049 }
0050 };
0051 }
0052 #endif