Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FermimotionAfterburner.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FermimotionAfterburner.cc
1
#include "
FermimotionAfterburner.h
"
2
3
#include "
FermiMotion.h
"
4
5
#include <
phhepmc/PHHepMCGenEvent.h
>
6
#include <
phhepmc/PHHepMCGenEventMap.h
>
7
8
#include <
fun4all/Fun4AllReturnCodes.h
>
9
#include <
fun4all/SubsysReco.h
>
// for SubsysReco
10
11
#include <
phool/PHRandomSeed.h
>
12
#include <
phool/getClass.h
>
13
#include <
phool/phool.h
>
14
15
#include <gsl/gsl_rng.h>
16
17
#include <iostream>
18
#include <set>
// for set, _Rb_tree_const_ite...
19
#include <string>
20
#include <utility>
21
22
namespace
HepMC
23
{
24
class
GenEvent;
25
}
26
27
//____________________________________________________________________________..
28
FermimotionAfterburner::FermimotionAfterburner
(
const
std::string
&
name
,
const
double
pTspec)
29
:
SubsysReco
(name)
30
31
{
32
RandomGenerator
= gsl_rng_alloc(gsl_rng_mt19937);
33
m_pTspec
= pTspec;
34
}
35
36
//____________________________________________________________________________..
37
FermimotionAfterburner::~FermimotionAfterburner
()
38
{
39
gsl_rng_free(
RandomGenerator
);
40
}
41
42
//____________________________________________________________________________..
43
int
FermimotionAfterburner::Init
(
PHCompositeNode
*
/*topNode*/
)
44
{
45
unsigned
int
seed
=
PHRandomSeed
();
46
gsl_rng_set
(
RandomGenerator
, seed);
47
48
return
Fun4AllReturnCodes::EVENT_OK
;
49
}
50
51
//____________________________________________________________________________..
52
int
FermimotionAfterburner::process_event
(
PHCompositeNode
*topNode)
53
{
54
AddpF
(topNode);
55
56
return
Fun4AllReturnCodes::EVENT_OK
;
57
}
58
59
//____________________________________________________________________________..
60
61
void
FermimotionAfterburner::AddpF
(
PHCompositeNode
*topNode)
62
{
63
PHHepMCGenEventMap
*genevtmap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap"
);
64
for
(
PHHepMCGenEventMap::Iter
iter = genevtmap->
begin
(); iter != genevtmap->
end
(); ++iter)
65
{
66
PHHepMCGenEvent
*genevt = iter->second;
67
HepMC::GenEvent *evt = genevt->
getEvent
();
68
if
(!evt)
69
{
70
std::cout <<
PHWHERE
<<
" no evt pointer under HEPMC Node found"
<< std::endl;
71
}
72
FermiMotion
(evt,
RandomGenerator
,
m_pTspec
);
73
}
74
}
coresoftware
blob
master
generators
FermiMotionAfterburner
FermimotionAfterburner.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:59
using
1.8.2 with
sPHENIX GitHub integration