ECCE @ EIC Software
 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
2 
3 #include "FermiMotion.h"
4 
7 
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 //____________________________________________________________________________..
29  : SubsysReco(name)
30 
31 {
32  RandomGenerator = gsl_rng_alloc(gsl_rng_mt19937);
33 }
34 
35 //____________________________________________________________________________..
37 {
38  gsl_rng_free(RandomGenerator);
39 }
40 
41 //____________________________________________________________________________..
43 {
44  unsigned int seed = PHRandomSeed();
45  gsl_rng_set(RandomGenerator, seed);
46 
48 }
49 
50 //____________________________________________________________________________..
52 {
53  AddpF(topNode);
54 
56 }
57 
58 //____________________________________________________________________________..
59 
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  }
72  }
73 }