ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
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
)
29
:
SubsysReco
(name)
30
31
{
32
RandomGenerator
= gsl_rng_alloc(gsl_rng_mt19937);
33
}
34
35
//____________________________________________________________________________..
36
FermimotionAfterburner::~FermimotionAfterburner
()
37
{
38
gsl_rng_free(
RandomGenerator
);
39
}
40
41
//____________________________________________________________________________..
42
int
FermimotionAfterburner::Init
(
PHCompositeNode
*
/*topNode*/
)
43
{
44
unsigned
int
seed
=
PHRandomSeed
();
45
gsl_rng_set(
RandomGenerator
, seed);
46
47
return
Fun4AllReturnCodes::EVENT_OK
;
48
}
49
50
//____________________________________________________________________________..
51
int
FermimotionAfterburner::process_event
(
PHCompositeNode
*topNode)
52
{
53
AddpF
(topNode);
54
55
return
Fun4AllReturnCodes::EVENT_OK
;
56
}
57
58
//____________________________________________________________________________..
59
60
void
FermimotionAfterburner::AddpF
(
PHCompositeNode
*topNode)
61
{
62
PHHepMCGenEventMap
*genevtmap = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap"
);
63
for
(
PHHepMCGenEventMap::Iter
iter = genevtmap->
begin
(); iter != genevtmap->
end
(); ++iter)
64
{
65
PHHepMCGenEvent
*genevt = iter->second;
66
HepMC::GenEvent *evt = genevt->
getEvent
();
67
if
(!evt)
68
{
69
std::cout <<
PHWHERE
<<
" no evt pointer under HEPMC Node found"
<< std::endl;
70
}
71
FermiMotion
(evt,
RandomGenerator
);
72
}
73
}
coresoftware
blob
master
generators
FermiMotionAfterburner
FermimotionAfterburner.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:29
using
1.8.2 with
ECCE GitHub integration