File indexing completed on 2025-01-18 10:01:13
0001
0002
0003
0004
0005
0006 #ifndef HEPMC3_LHEFATTRIBUTES_H
0007 #define HEPMC3_LHEFATTRIBUTES_H
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "HepMC3/Attribute.h"
0017 #include "LHEF.h"
0018 #include "FourVector.h"
0019
0020 namespace HepMC3 {
0021
0022
0023
0024
0025
0026 class HEPRUPAttribute: public Attribute {
0027
0028 public:
0029
0030
0031 HEPRUPAttribute() {}
0032
0033
0034 HEPRUPAttribute(std::string s): Attribute(s) {}
0035
0036
0037 virtual ~HEPRUPAttribute() {
0038 clear();
0039 }
0040
0041
0042
0043
0044 public:
0045
0046 virtual bool from_string(const std::string &att) override;
0047
0048
0049 virtual bool to_string(std::string &att) const override;
0050
0051 public:
0052
0053
0054 void clear();
0055
0056
0057 LHEF::HEPRUP heprup;
0058
0059
0060 std::vector<LHEF::XMLTag*> tags;
0061
0062 };
0063
0064
0065
0066
0067
0068 class HEPEUPAttribute: public Attribute {
0069
0070 public:
0071
0072
0073 HEPEUPAttribute() {}
0074
0075
0076 HEPEUPAttribute(std::string s): Attribute(s) {}
0077
0078
0079 virtual ~HEPEUPAttribute() {
0080 clear();
0081 }
0082
0083
0084
0085
0086 public:
0087
0088 virtual bool from_string(const std::string &att) override;
0089
0090
0091 virtual bool init() override;
0092
0093
0094 virtual bool init(const GenRunInfo & ) override{
0095 return true;
0096 }
0097
0098
0099 virtual bool to_string(std::string &att) const override;
0100
0101 public:
0102
0103
0104 FourVector momentum(int i) const {
0105 return FourVector(hepeup.PUP[i][0], hepeup.PUP[i][1],
0106 hepeup.PUP[i][2], hepeup.PUP[i][3]);
0107 }
0108
0109
0110 void clear();
0111
0112
0113 LHEF::HEPEUP hepeup;
0114
0115
0116 std::vector<LHEF::XMLTag*> tags;
0117
0118
0119 };
0120
0121 }
0122
0123 #endif
0124
0125
0126
0127