EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4main/HepMCNodeReader.h>
Public Member Functions | |
HepMCNodeReader (const std::string &name="HEPMCREADER") | |
~HepMCNodeReader () override | |
int | Init (PHCompositeNode *topNode) override |
int | process_event (PHCompositeNode *topNode) override |
void | pythia (const bool pythia) |
void | Embed (const int i=1) |
void | VertexPosition (const double v_x, const double v_y, const double v_z) |
void | SmearVertex (const double s_x, const double s_y, const double s_z) |
void | SetT0 (const double t0) |
void | SetSeed (const unsigned int i) |
Override seed. | |
Public Member Functions inherited from SubsysReco | |
~SubsysReco () override | |
virtual int | End (PHCompositeNode *) |
Called at the end of all processing. | |
virtual int | EndRun (const int) |
Called at the end of each run. | |
virtual int | InitRun (PHCompositeNode *) |
virtual int | Reset (PHCompositeNode *) |
Reset. | |
virtual int | ResetEvent (PHCompositeNode *) |
Clean up after each event. | |
void | Print (const std::string &="ALL") const override |
Public Member Functions inherited from Fun4AllBase | |
virtual | ~Fun4AllBase () |
virtual const std::string | Name () const |
Returns the name of this module. | |
virtual void | Name (const std::string &name) |
Sets the name of this module. | |
virtual void | Verbosity (const int ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual void | Verbosity (enu_Verbosity ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual int | Verbosity () const |
Gets the verbosity of this module. | |
Private Member Functions | |
double | smeargauss (const double width) |
double | smearflat (const double width) |
Private Attributes | |
gsl_rng * | RandomGenerator |
bool | is_pythia |
int | use_seed |
unsigned int | seed |
double | vertex_pos_x |
double | vertex_pos_y |
double | vertex_pos_z |
double | vertex_t0 |
double | width_vx |
double | width_vy |
double | width_vz |
Additional Inherited Members | |
Public Types inherited from Fun4AllBase | |
enum | enu_Verbosity { VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3, VERBOSITY_A_LOT = 4, VERBOSITY_MAX = INT_MAX - 10 } |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
HepMCNodeReader take input from all subevents from PHHepMCGenEventMap and send them to simulation in Geant4 For HepMC subevent which is already simulated, they will not be simulated again in Geant4.
Definition at line 17 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 17 of file HepMCNodeReader.h
HepMCNodeReader::HepMCNodeReader | ( | const std::string & | name = "HEPMCREADER" | ) |
Definition at line 67 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 67 of file HepMCNodeReader.cc
References RandomGenerator.
|
override |
Definition at line 84 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 84 of file HepMCNodeReader.cc
References RandomGenerator.
void HepMCNodeReader::Embed | ( | const int | i = 1 | ) |
this function is depreciated. Embedding IDs are controlled for individually HEPMC subevents in Fun4AllHepMCInputManagers and event generators.
Definition at line 439 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 439 of file HepMCNodeReader.cc
|
overridevirtual |
Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).
Reimplemented from SubsysReco.
Definition at line 89 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 89 of file HepMCNodeReader.cc
References PHCompositeNode::addNode(), PHNodeIterator::findFirst(), Fun4AllBase::Name(), RandomGenerator, seed, and use_seed.
|
overridevirtual |
Called for each event. This is where you do the real work.
Reimplemented from SubsysReco.
Definition at line 113 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 113 of file HepMCNodeReader.cc
References Fun4AllReturnCodes::ABORTEVENT, PHG4InEvent::AddEmbeddedParticle(), PHG4InEvent::AddParticle(), PHG4InEvent::AddVtx(), Fun4AllReturnCodes::DISCARDEVENT, Fun4AllReturnCodes::EVENT_OK, exit(), PHFlag::get_CharFlag(), PHHepMCGenEvent::get_collision_vertex(), PHHepMCGenEvent::get_embedding_id(), PHFlag::get_FloatFlag(), PHHepMCGenEvent::get_LorentzRotation_EvtGen2Lab(), PHHepMCGenEvent::getEvent(), PHG4InEvent::identify(), PHHepMCGenEvent::identify(), recoConsts::instance(), is_pythia, PHHepMCGenEvent::is_simulated(), isfinal, p, particle, PHWHERE, PHHepMCGenEventMap::rbegin(), PHHepMCGenEventMap::rend(), PHG4Particle::set_barcode(), PHG4Particle::set_pid(), PHG4Particle::set_px(), PHG4Particle::set_py(), PHG4Particle::set_pz(), smearflat(), smeargauss(), Acts::Test::time, v, Fun4AllBase::Verbosity(), vertex_pos_x, vertex_pos_y, vertex_pos_z, vertex_t0, width_vx, width_vy, and width_vz.
|
inline |
Definition at line 26 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 26 of file HepMCNodeReader.h
References is_pythia, and pythia().
Referenced by pepsimainerhic(), and pythia().
|
inline |
Override seed.
Definition at line 49 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 49 of file HepMCNodeReader.h
|
inline |
Arbitary time shift for all sub-events. And the vertex shifts are better controlled for individually HEPMC subevents in Fun4AllHepMCInputManagers and event generators.
Definition at line 46 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 46 of file HepMCNodeReader.h
References vertex_t0.
|
private |
Definition at line 403 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 403 of file HepMCNodeReader.cc
References RandomGenerator.
Referenced by process_event().
|
private |
Definition at line 397 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 397 of file HepMCNodeReader.cc
References RandomGenerator.
Referenced by process_event().
void HepMCNodeReader::SmearVertex | ( | const double | s_x, |
const double | s_y, | ||
const double | s_z | ||
) |
HepMCNodeReader::SmearVertex - WARNING - this function is depreciated. HepMCNodeReader::SmearVertex() smear each HEPMC subevents to a new vertex location. And the vertex smears are better controlled for individually HEPMC subevents in Fun4AllHepMCInputManagers and event generators. Positive value is Gauss smear, and negative values are flat smear
Definition at line 424 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 424 of file HepMCNodeReader.cc
void HepMCNodeReader::VertexPosition | ( | const double | v_x, |
const double | v_y, | ||
const double | v_z | ||
) |
this function is depreciated. HepMCNodeReader::VertexPosition() move all HEPMC subevents to a new vertex location. And the vertex shifts are better controlled for individually HEPMC subevents in Fun4AllHepMCInputManagers and event generators.
Definition at line 409 of file HepMCNodeReader.cc.
View newest version in sPHENIX GitHub at line 409 of file HepMCNodeReader.cc
References vertex_pos_x, vertex_pos_y, and vertex_pos_z.
|
private |
Definition at line 60 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 60 of file HepMCNodeReader.h
Referenced by process_event(), and pythia().
|
private |
Definition at line 59 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 59 of file HepMCNodeReader.h
Referenced by HepMCNodeReader(), Init(), smearflat(), smeargauss(), and ~HepMCNodeReader().
|
private |
Definition at line 62 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 62 of file HepMCNodeReader.h
|
private |
Definition at line 61 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 61 of file HepMCNodeReader.h
|
private |
Definition at line 63 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 63 of file HepMCNodeReader.h
Referenced by process_event(), and VertexPosition().
|
private |
Definition at line 64 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 64 of file HepMCNodeReader.h
Referenced by process_event(), and VertexPosition().
|
private |
Definition at line 65 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 65 of file HepMCNodeReader.h
Referenced by process_event(), and VertexPosition().
|
private |
Definition at line 66 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 66 of file HepMCNodeReader.h
Referenced by process_event(), and SetT0().
|
private |
Definition at line 67 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 67 of file HepMCNodeReader.h
Referenced by process_event(), and SmearVertex().
|
private |
Definition at line 68 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 68 of file HepMCNodeReader.h
Referenced by process_event(), and SmearVertex().
|
private |
Definition at line 69 of file HepMCNodeReader.h.
View newest version in sPHENIX GitHub at line 69 of file HepMCNodeReader.h
Referenced by process_event(), and SmearVertex().