HepMC3 event record library
PythiaValidationTool.h
1 // -*- C++ -*-
2 //
3 // This file is part of HepMC
4 // Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
5 //
6 #ifndef PYTHIA_VALIDATION_TOOL_H
7 #define PYTHIA_VALIDATION_TOOL_H
8 
9 #ifdef HEPMC2
10 #include "HepMC/GenEvent.h"
11 #include "Pythia8/Pythia.h"
12 #ifdef PYTHIA_VERSION_INTEGER
13 #include "Pythia8Plugins/HepMC2.h"
14 #else
15 #include "Pythia8/Pythia8ToHepMC.h"
16 #endif
17 #else
18 #include "HepMC3/GenEvent.h"
19 #include "HepMC3/Selector.h"
20 #include "Pythia8/Pythia8ToHepMC3.h"
21 #endif
22 
23 #include "ValidationTool.h"
24 #include "Timer.h"
25 
26 #include "Pythia8/Pythia.h"
27 
29 public:
30  PythiaValidationTool( const std::string &filename );
31 
32  const std::string name() { return "pythia8"; }
33  const std::string long_name() { return name() + " config file: " + m_filename; }
34 
35  bool tool_modifies_event() { return true; }
36  Timer* timer() { return &m_timer; }
37 
38  void initialize();
39  int process(GenEvent &hepmc);
40  void finalize();
41 
42 private:
43  Pythia8::Pythia m_pythia;
44  std::string m_filename;
45  Timer m_timer;
46  HEPMC2CODE( Pythia8ToHepMC m_tohepmc; )
47  HEPMC3CODE( Pythia8ToHepMC3 m_tohepmc; )
48 };
49 
50 #endif
definition of /b Selector class
bool tool_modifies_event()
Get information if this tool modifies the event.
void initialize()
Initialize.
Timer * timer()
Get timer for this tool (if this tool is being timed)
Stores event-related information.
Definition: GenEvent.h:42
int process(GenEvent &hepmc)
Process event.
Definition of class GenEvent.
Definition: Timer.h:29
const std::string name()
Get name of the tool.
const std::string long_name()
Get long name of the tool.