FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Pythia8Generator.h
Go to the documentation of this file.
1
/********************************************************************************
2
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3
* *
4
* This software is distributed under the terms of the *
5
* GNU Lesser General Public Licence (LGPL) version 3, *
6
* copied verbatim in the file "LICENSE" *
7
********************************************************************************/
8
// -------------------------------------------------------------------------
9
// ----- M. Al-Turany June 2014 -----
10
// -------------------------------------------------------------------------
11
12
#ifndef My_PYTHIA8GENERATOR_H
13
#define My_PYTHIA8GENERATOR_H 1
14
15
#include "
FairGenerator.h
"
// for FairGenerator
16
#include "Pythia8/Basics.h"
// for RndmEngine
17
#include "Pythia8/Pythia.h"
// for Pythia
18
19
#include <Rtypes.h>
// for Double_t, Bool_t, Int_t, etc
20
#include <TRandom.h>
// for TRandom
21
#include <TRandom1.h>
// for TRandom1
22
#include <TRandom3.h>
// for TRandom3, gRandom
23
class
FairPrimaryGenerator
;
// lines 22-22
24
25
class
FairPrimaryGenerator
;
26
using namespace
Pythia8;
27
28
class
PyTr1Rng
:
public
RndmEngine
29
{
30
public
:
31
PyTr1Rng
() { rng =
new
TRandom1(gRandom->GetSeed()); };
32
virtual
~PyTr1Rng
(){};
33
34
Double_t
flat
() {
return
rng->Rndm(); };
35
36
private
:
37
TRandom1 *rng;
38
};
39
40
class
PyTr3Rng
:
public
RndmEngine
41
{
42
public
:
43
PyTr3Rng
() { rng =
new
TRandom3(gRandom->GetSeed()); };
44
virtual
~PyTr3Rng
(){};
45
46
Double_t
flat
() {
return
rng->Rndm(); };
47
48
private
:
49
TRandom3 *rng;
50
};
51
52
class
Pythia8Generator
:
public
FairGenerator
53
{
54
public
:
56
Pythia8Generator
();
57
59
virtual
~
Pythia8Generator
();
60
62
Bool_t ReadEvent(
FairPrimaryGenerator
*);
63
void
SetParameters(
char
*);
64
void
Print();
65
66
virtual
Bool_t Init();
67
68
void
SetMom
(Double_t mom) { fMom = mom; };
69
void
SetId
(Double_t
id
) { fId = id; };
70
void
SetHNLId
(Int_t
id
) { fHNL = id; };
71
void
UseRandom1
()
72
{
73
fUseRandom1 = kTRUE;
74
fUseRandom3 = kFALSE;
75
};
76
void
UseRandom3
()
77
{
78
fUseRandom1 = kFALSE;
79
fUseRandom3 = kTRUE;
80
};
81
void
GetPythiaInstance(
int
);
82
83
private
:
84
Pythia fPythia;
85
RndmEngine *fRandomEngine;
86
87
protected
:
88
Double_t fMom;
// proton momentum
89
Int_t fHNL;
// HNL ID
90
Int_t fId;
// target type
91
Bool_t fUseRandom1;
// flag to use TRandom1
92
Bool_t fUseRandom3;
// flag to use TRandom3 (default)
93
94
ClassDef(
Pythia8Generator
, 1);
95
};
96
97
#endif
/* !My_PYTHIA8GENERATOR_H */
Pythia8Generator::UseRandom1
void UseRandom1()
Definition:
Pythia8Generator.h:71
PyTr3Rng::flat
Double_t flat()
Definition:
Pythia8Generator.h:46
FairGenerator
Definition:
FairGenerator.h:31
Pythia8Generator::SetMom
void SetMom(Double_t mom)
Definition:
Pythia8Generator.h:68
Pythia8Generator
Definition:
Pythia8Generator.h:52
PyTr1Rng::flat
Double_t flat()
Definition:
Pythia8Generator.h:34
FairPrimaryGenerator
Definition:
FairPrimaryGenerator.h:39
PyTr1Rng::~PyTr1Rng
virtual ~PyTr1Rng()
Definition:
Pythia8Generator.h:32
PyTr1Rng
Definition:
Pythia8Generator.h:28
PyTr3Rng
Definition:
Pythia8Generator.h:40
Pythia8Generator::SetHNLId
void SetHNLId(Int_t id)
Definition:
Pythia8Generator.h:70
Pythia8Generator::SetId
void SetId(Double_t id)
Definition:
Pythia8Generator.h:69
PyTr3Rng::PyTr3Rng
PyTr3Rng()
Definition:
Pythia8Generator.h:43
Pythia8Generator::UseRandom3
void UseRandom3()
Definition:
Pythia8Generator.h:76
PyTr1Rng::PyTr1Rng
PyTr1Rng()
Definition:
Pythia8Generator.h:31
PyTr3Rng::~PyTr3Rng
virtual ~PyTr3Rng()
Definition:
Pythia8Generator.h:44
FairGenerator.h
FairRoot
templates
project_stl_containers
MyProjGenerators
Pythia8Generator.h
Generated on Mon Mar 8 2021 12:14:07 for FairRoot by
1.8.5