31 m_hepr = make_shared<HEPRUPAttribute>();
46 make_shared<FloatAttribute>(
m_hepr->heprup.NPRUP));
51 std::vector<std::string> weightnames;
52 weightnames.push_back(
"0");
54 for (
int i = 0, N =
m_hepr->heprup.weightinfo.size(); i < N; ++i )
55 weightnames.push_back(
m_hepr->heprup.weightNameHepMC(i));
56 run_info()->set_weight_names(weightnames);
60 for (
int i = 0, N =
m_hepr->heprup.generators.size(); i < N; ++i )
80 shared_ptr<HEPEUPAttribute> hepe = make_shared<HEPEUPAttribute>();
90 make_shared<DoubleAttribute>(hepe->hepeup.AQCDUP));
92 make_shared<DoubleAttribute>(hepe->hepeup.AQEDUP));
94 make_shared<IntAttribute>(hepe->hepeup.NUP));
96 make_shared<LongAttribute>(hepe->hepeup.IDPRUP));
99 GenParticlePtr p1 = make_shared<GenParticle>(hepe->momentum(0),
100 hepe->hepeup.IDUP[0],
101 hepe->hepeup.ISTUP[0]);
102 GenParticlePtr p2 = make_shared<GenParticle>(hepe->momentum(1),
103 hepe->hepeup.IDUP[1],
104 hepe->hepeup.ISTUP[1]);
105 GenVertexPtr vx = make_shared<GenVertex>();
106 vx->add_particle_in(p1);
107 vx->add_particle_in(p2);
109 for (
int i = 2; i < hepe->hepeup.NUP; ++i )
110 vx->add_particle_out(make_shared<GenParticle>
112 hepe->hepeup.IDUP[i],
113 hepe->hepeup.ISTUP[i]));
116 std::vector<double> wts;
117 for (
int i = 0, N = hepe->hepeup.weights.size(); i < N; ++i )
118 wts.push_back(hepe->hepeup.weights[i].first);
Definition of class ReaderLHEF.
Stores event-related information.
void add_vertex(GenVertexPtr v)
Add vertex.
void add_attribute(const string &name, const shared_ptr< Attribute > &att, const int &id=0)
Add event attribute to event.
void set_event_number(const int &num)
Set event number.
const std::vector< double > & weights() const
Get event weight values as a vector.
LHEF::Reader * m_reader
The actual reader.
bool read_event(GenEvent &ev)
Reading event.
shared_ptr< HEPRUPAttribute > m_hepr
Holder of attributes.
bool m_failed
State of reader.
ReaderLHEF(std::istream &)
The ctor to read from stream.
void set_run_info(shared_ptr< GenRunInfo > run)
Set the global GenRunInfo object.
shared_ptr< GenRunInfo > run_info() const
Get the global GenRunInfo object.
Les Houches event file classes.