Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef GtPythiaTool_hh
#define GtPythiaTool_hh
/*
* Description:
* This tool is used to generate particles using Pythia.
* User need to specify the card.
*/
#include <GaudiKernel/AlgTool.h>
#include <Gaudi/Property.h>
#include "IGenTool.h"
#include "Pythia8/Pythia.h"
#include <vector>
#include <memory>
class GtPythiaTool: public extends<AlgTool, IGenTool> {
public:
using extends::extends;
// Overriding initialize and finalize
StatusCode initialize() override;
StatusCode finalize() override;
// IGenTool
bool mutate(Gen::GenEvent& event) override;
bool finish() override;
bool configure_gentool() override;
private:
std::unique_ptr<Pythia8::Pythia> m_pythia;
// below properties will be used by Pythia
Gaudi::Property<std::vector<std::string>> m_cmds{this, "Commands"};
Gaudi::Property<std::string> m_card{this, "Card"};
};
#endif