HepMC3 event record library
PythiaValidationTool.cc
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
5//
6#include "PythiaValidationTool.h"
7
8PythiaValidationTool::PythiaValidationTool( const std::string &filename ):m_filename(filename),m_timer("pythia8 conversion time") {
9 m_pythia.readFile(m_filename);
10}
11
13 m_pythia.init();
14}
15
17 if( !m_pythia.next() ) return 1;
18
19 // Exclude generation time
20 m_timer.start();
21
22 m_tohepmc.fill_next_event(m_pythia.event, &hepmc, -1, &m_pythia.info);
23 return 0;
24}
25
27#ifdef PYTHIA_VERSION_INTEGER
28 if (PYTHIA_VERSION_INTEGER>8200) m_pythia.stat();
29#else
30 m_pythia.statistics();
31#endif
32}
Stores event-related information.
Definition: GenEvent.h:41
PythiaValidationTool(const std::string &filename)
Constructor.
void initialize()
Initialize.
Pythia8::Pythia m_pythia
Pythia8 instance.
std::string m_filename
Used file.
int process(GenEvent &hepmc)
Process event.
void start()
Definition: Timer.h:44