#include <iomanip>
int main(
int ,
char ** ) {
shared_ptr<HEPRUPAttribute> hepr = make_shared<HEPRUPAttribute>();
shared_ptr<GenRunInfo> runinfo = make_shared<GenRunInfo>();
runinfo->add_attribute("HEPRUP", hepr);
runinfo->add_attribute("NPRUP",
make_shared<FloatAttribute>(hepr->heprup.NPRUP));
std::vector<std::string> weightnames;
weightnames.push_back("0");
for ( int i = 0, N = hepr->heprup.weightinfo.size(); i < N; ++i )
weightnames.push_back(hepr->heprup.weightNameHepMC(i));
runinfo->set_weight_names(weightnames);
for ( int i = 0, N = hepr->heprup.generators.size(); i < N; ++i ) {
tool.
name = hepr->heprup.generators[i].name;
tool.
version = hepr->heprup.generators[i].version;
tool.
description = hepr->heprup.generators[i].contents;
runinfo->tools().push_back(tool);
}
int neve = 0;
++neve;
shared_ptr<HEPEUPAttribute> hepe = make_shared<HEPEUPAttribute>();
GenEvent ev(runinfo, Units::GEV, Units::MM);
make_shared<DoubleAttribute>(hepe->hepeup.AQCDUP));
make_shared<DoubleAttribute>(hepe->hepeup.AQEDUP));
make_shared<IntAttribute>(hepe->hepeup.NUP));
make_shared<LongAttribute>(hepe->hepeup.IDPRUP));
GenParticlePtr p1 = make_shared<GenParticle>(hepe->momentum(0),
hepe->hepeup.IDUP[0],
hepe->hepeup.ISTUP[0]);
GenParticlePtr p2 = make_shared<GenParticle>(hepe->momentum(1),
hepe->hepeup.IDUP[1],
hepe->hepeup.ISTUP[1]);
GenVertexPtr vx = make_shared<GenVertex>();
vx->add_particle_in(p1);
vx->add_particle_in(p2);
for ( int i = 2; i < hepe->hepeup.NUP; ++i )
vx->add_particle_out(make_shared<GenParticle>
(hepe->momentum(i),
hepe->hepeup.IDUP[i],
hepe->hepeup.ISTUP[i]));
std::vector<double> wts;
for ( int i = 0, N = hepe->hepeup.weights.size(); i < N; ++i )
wts.push_back(hepe->hepeup.weights[i].first);
make_shared<AssociatedParticle>(p2), p1->id());
}
hepr = shared_ptr<HEPRUPAttribute>();
while ( true ) {
shared_ptr<AssociatedParticle> assoc =
if ( !assoc || !assoc->associated() ||
assoc->associated() != ev.
particles()[1] )
return 3;
if ( input.
run_info()->weight_names() != weightnames )
return 2;
if ( !hepr ) {
for ( int i = 0, N = hepr->tags.size(); i < N; ++i )
if ( hepr->tags[i]->name != "init" )
hepr->heprup.NPRUP =
attribute<FloatAttribute>("NPRUP")->value());
}
}
shared_ptr<HEPEUPAttribute> hepe =
for ( int i = 0, N = hepe->tags.size(); i < N; ++i )
if ( hepe->tags[i]->name != "event" &&
hepe->tags[i]->name != "eventgroup" )
hepe->hepeup.AQCDUP =
hepe->hepeup.AQEDUP =
hepe->hepeup.NUP =
hepe->hepeup.IDPRUP =
}
}
Definition of class AssociatedParticle,.
Definition of class GenEvent.
Definition of class GenParticle.
Definition of class GenVertex.
Definition of class HEPRUPAttribute and class HEPEUAttribute.
Definition of class ReaderAscii.
Definition of class WriterAscii.
Attribute class allowing eg. a GenParticle to refer to another GenParticle.
Attribute that holds a real number as a double.
Stores event-related information.
void add_vertex(GenVertexPtr v)
Add vertex.
int event_number() const
Get event number.
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.
shared_ptr< T > attribute(const string &name, const int &id=0) const
Get attribute of type T.
const std::vector< ConstGenParticlePtr > & particles() const
Get list of particles (const)
Class for storing data for LHEF run information.
std::vector< LHEF::XMLTag * > tags
The parsed XML-tags.
Class for storing data for LHEF run information.
std::vector< LHEF::XMLTag * > tags
The parsed XML-tags.
Attribute that holds an Integer implemented as an int.
Attribute that holds an Integer implemented as an int.
GenEvent I/O parsing for structured text files.
bool read_event(GenEvent &evt)
Load event from file.
shared_ptr< GenRunInfo > run_info() const
Get the global GenRunInfo object.
GenEvent I/O serialization for structured text files.
void close()
Close file stream.
void write_event(const GenEvent &evt)
Write event to file.
std::vector< EventFile > eventfiles
std::ostream & headerBlock()
std::ostream & eventComments()
Les Houches event file classes.
int main(int argc, char **argv)