23 namespace MD = MultiDimensional;
25 AmplitudeBase::AmplitudeBase() : _WCNames{}, _WCPrefix{
""}, _WCLabel{
NONE}, _tensorList{}, _multiplicity{1ul} {
29 vector<complex<double>> result(
_WCNames.size());
30 for(
size_t pos = 0ul; pos <
_WCNames.size(); ++pos) {
31 auto it = wcDict.find(
_WCNames[pos]);
32 if(it != wcDict.end()) {
33 result[pos] = it->second;
41 vector<complex<double>> result(
_WCNames.size());
42 for(
size_t pos = 0ul; pos <
_WCNames.size(); ++pos) {
60 if(!data || data->rank() == 0) {
64 for(
IndexType i = 0; i<values.size(); ++i) {
65 data->element({i}) = values[i];
97 MSG_WARNING(
"Unable to update the signature index");
PDG codes to UID functions.
Base class for amplitudes.
std::pair< std::string, IndexLabel > getWCInfo() const
std::vector< std::complex< double > > getWCVectorFromDict(const std::map< std::string, std::complex< double >> &wcDict) const
Non-sparse tensor data container.
Tensor indices label definitions.
WTerm setWeightTerm(WTerm group)
TensorData makeVector(IndexList dimensions, LabelsList labels, vector< complex< double >> values)
Hammer base amplitude class.
std::vector< Tensor > _tensorList
list of (list of) labels for the tensor indices (one for each signature)
std::shared_ptr< IContainer > SharedTensorData
static Log & getLog(const std::string &name)
Get a logger with the given name.
std::vector< std::complex< double > > getWCVectorFromSettings(WTerm what) const
Order-0 tensor data container.
virtual bool setSignatureIndex(size_t idx=0)
select a specific signature to be the current signature
virtual bool setSignatureIndex(size_t idx=0)
select a specific signature to be the current signature
Multidimensional tensor class with complex numbers as elements.
std::vector< std::string > _WCNames
void updateWCTensor(std::vector< std::complex< double >> values, MultiDimensional::SharedTensorData &data) const
virtual void preProcessWCValues(std::vector< std::complex< double >> &data) const
virtual void updateWilsonCeffLabelPrefix()
size_t _signatureIndex
the index of the current signature
void init()
initializes the amplitude (defines settings associated to this amplitude, etc.)
size_t multiplicityFactor() const
void updateWCSettings(const std::vector< std::complex< double >> &values, WTerm what)
void addTensor(Tensor &&tensor)
adds the index labels for the amplitude tensor for a specific signature to the index labels signature...
void updateVectorOfSettings(const std::vector< T > &values, const std::vector< std::string > &names, const std::string &path="", WTerm group=WTerm::COMMON)
Log & getLog() const
logging facility
Tensor & getTensor()
returns a reference to itself as a Tensor