/
Pythia6EventBuilder.h
73 lines (56 loc) · 1.7 KB
/
Pythia6EventBuilder.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
\file
Declaration of class erhic::Pythia6EventBuilder.
\author Thomas Burton
\date 2012-01-17
\copyright 2012 Brookhaven National Lab
*/
#ifndef INCLUDE_EICSMEAR_ERHIC_PYTHIA6EVENTBUILDER_H_
#define INCLUDE_EICSMEAR_ERHIC_PYTHIA6EVENTBUILDER_H_
#include <string>
#include <Rtypes.h> // For ClassDef macro
#include "eicsmear/erhic/EventFactory.h"
namespace erhic {
class EventMCFilterABC;
class EventPythia;
/**
Interface to PYTHIA 6.
Builds EventPythia objects directly from PYTHIA output, without
an intermediate text file.
Configure PYTHIA options via the ROOT::TPythia6 class.
\remark The following fields in EventPythia are not set:
F1, F2, R, sigma_rad, SigRadCor, EBrems
*/
class Pythia6EventBuilder : public VirtualEventFactory {
public:
/**
Constructor.
If a filter is provided, it will be applied so that all events
yielded by Create() pass the filter.
The filter should be allocated via new and is subsequently
owned and deleted by the Pythia6EventBuilder.
*/
explicit Pythia6EventBuilder(EventMCFilterABC* = NULL);
/**
Destructor
*/
virtual ~Pythia6EventBuilder();
/**
Generates an event from the current state of ROOT::TPythia6.
The returned event is dynamically allocated and must
be deleted by the user.
*/
virtual EventPythia* Create();
virtual std::string EventName() const;
virtual TBranch* Branch(TTree&, const std::string&);
virtual void Fill(TBranch&);
protected:
EventPythia* BuildEvent();
Long64_t mNGenerated;
Long64_t mNTrials;
EventMCFilterABC* mFilter;
EventPythia* mEvent;
ClassDef(erhic::Pythia6EventBuilder, 1)
};
} // namespace erhic
#endif // INCLUDE_EICSMEAR_ERHIC_PYTHIA6EVENTBUILDER_H_