File indexing completed on 2025-04-19 09:10:03
0001 #ifndef HADRONS_Current_Library_Current_Base_H
0002 #define HADRONS_Current_Library_Current_Base_H
0003
0004 #include <iostream>
0005 #include <string>
0006 #include <iomanip>
0007 #include "ATOOLS/Math/MathTools.H"
0008 #include "ATOOLS/Math/Vector.H"
0009 #include "ATOOLS/Phys/Flavour.H"
0010 #include "ATOOLS/Org/Getter_Function.H"
0011 #include "HADRONS++/Main/Tools.H"
0012 #include "METOOLS/Main/Spin_Structure.H"
0013
0014 #define DEFINE_CURRENT_GETTER(CLASS,TAG) \
0015 DECLARE_GETTER(CLASS,TAG,HADRONS::Current_Base,HADRONS::ME_Parameters); \
0016 Current_Base *ATOOLS::Getter<HADRONS::Current_Base,HADRONS::ME_Parameters,CLASS>:: \
0017 operator()(const ME_Parameters ¶meters) const \
0018 { return new CLASS(parameters.flavs, parameters.indices, TAG); }
0019
0020 namespace HADRONS {
0021
0022
0023
0024
0025
0026
0027
0028
0029 class Current_Base : public METOOLS::Spin_Structure<ATOOLS::Vec4C> {
0030 protected:
0031
0032
0033
0034 const ATOOLS::Flavour_Vector& m_flavs;
0035
0036
0037 double * p_masses;
0038
0039 std::vector<int> p_i;
0040
0041
0042 std::string m_name;
0043
0044 public:
0045
0046
0047
0048
0049
0050
0051
0052
0053 Current_Base(const ATOOLS::Flavour_Vector& flavs,
0054 const std::vector<int>& decayindices,
0055 const std::string& name);
0056 virtual ~Current_Base();
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 virtual void Calc(const ATOOLS::Vec4D_Vector& moms, bool anti) = 0;
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080 virtual void SetModelParameters( struct GeneralModel _md ) {};
0081
0082
0083
0084 inline std::string Name() const { return m_name; }
0085 inline void SetName(std::string name) { m_name = name; }
0086 inline int GetN() const { return p_i.size(); }
0087 inline const std::vector<int>& DecayIndices() const { return p_i; }
0088
0089
0090
0091
0092
0093 friend std::ostream& operator<<(std::ostream& s, const Current_Base& cb);
0094 };
0095
0096
0097 typedef ATOOLS::Getter_Function<Current_Base,ME_Parameters>
0098 Current_Getter_Function;
0099 }
0100
0101
0102 #endif