EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHPythia8 Class Reference

#include <fun4all_coresoftware/blob/master/generators/PHPythia8/PHPythia8.h>

+ Inheritance diagram for PHPythia8:
+ Collaboration diagram for PHPythia8:

Public Member Functions

 PHPythia8 (const std::string &name="PHPythia8")
 
 ~PHPythia8 () override
 
int Init (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void set_config_file (const std::string &cfg_file)
 
void print_config () const
 
void register_trigger (PHPy8GenTrigger *theTrigger)
 set event selection criteria
 
void set_trigger_OR ()
 
void set_trigger_AND ()
 
void process_string (const std::string &s)
 pass commands directly to PYTHIA8
 
void beam_vertex_parameters (double beamX, double beamY, double beamZ, double beamXsigma, double beamYsigma, double beamZsigma)
 
void save_event_weight (const bool b)
 
void save_integrated_luminosity (const bool b)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
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.
 
- Public Member Functions inherited from PHHepMCGenHelper
 PHHepMCGenHelper ()
 
virtual ~PHHepMCGenHelper ()
 
void set_vertex_distribution_function (VTXFUNC x, VTXFUNC y, VTXFUNC z, VTXFUNC t)
 toss a new vertex according to a Uniform or Gaus distribution
 
void set_vertex_distribution_mean (const double x, const double y, const double z, const double t)
 set the mean value of the vertex distribution, use PHENIX units of cm, ns
 
void set_vertex_distribution_width (const double x, const double y, const double z, const double t)
 set the width of the vertex distribution function about the mean, use PHENIX units of cm, ns
 
int get_embedding_id () const
 
void set_embedding_id (int id)
 
void set_reuse_vertex (int src_embedding_id)
 reuse vertex from another PHHepMCGenEvent with embedding_id = src_embedding_id Additional smearing and shift possible with set_vertex_distribution_*()
 
const PHHepMCGenEventget_PHHepMCGenEvent_template () const
 choice of reference version of the PHHepMCGenEvent
 
PHHepMCGenEventinsert_event (HepMC::GenEvent *evt)
 send HepMC::GenEvent to DST tree. This function takes ownership of evt
 
const PHHepMCGenEventMapget_geneventmap () const
 
PHHepMCGenEventMapget_geneventmap ()
 
gsl_rng * get_random_generator ()
 
void set_geneventmap (PHHepMCGenEventMap *geneventmap)
 
void set_beam_direction_theta_phi (const double beamA_theta, const double beamA_phi, const double beamB_theta, const double beamB_phi)
 
void set_beam_angular_divergence_hv (const double beamA_divergence_h, const double beamA_divergence_v, const double beamB_divergence_h, const double beamB_divergence_v)
 
void set_beam_angular_z_coefficient_hv (const double beamA_h, const double beamA_v, const double beamB_h, const double beamB_v)
 
void use_beam_bunch_sim (bool b)
 simulate bunch interaction instead of applying vertex distributions
 
void set_beam_bunch_width (const std::vector< double > &beamA, const std::vector< double > &beamB)
 
void CopySettings (PHHepMCGenHelper &helper)
 
void CopySettings (PHHepMCGenHelper *helper_dest)
 copy setting to helper_dest
 
void CopyHelperSettings (PHHepMCGenHelper *helper_src)
 copy setting from helper_src
 
void Print (const std::string &what="ALL") const
 
void PHHepMCGenHelper_Verbosity (int v)
 
int PHHepMCGenHelper_Verbosity ()
 

Private Member Functions

int read_config (const std::string &cfg_file)
 
int create_node_tree (PHCompositeNode *topNode) final
 init interface nodes
 
double percent_diff (const double a, const double b)
 

Private Attributes

int m_EventCount
 
std::vector< PHPy8GenTrigger * > m_RegisteredTriggers
 
bool m_TriggersOR
 
bool m_TriggersAND
 
Pythia8::Pythia * m_Pythia8
 
std::string m_ConfigFileName
 
std::vector< std::string > m_Commands
 
HepMC::Pythia8ToHepMC * m_Pythia8ToHepMC
 
bool m_SaveEventWeightFlag
 whether to store the overall event weight into the HepMC weights
 
bool m_SaveIntegratedLuminosityFlag
 whether to store the integrated luminosity and other event statistics to the TOP/RUN/PHGenIntegral node
 
PHGenIntegralm_IntegralNode
 pointer to data node saving the integrated luminosity
 

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
}
 
- Public Types inherited from PHHepMCGenHelper
enum  VTXFUNC { Uniform, Gaus }
 supported function distributions More...
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from PHHepMCGenHelper
void HepMC2Lab_boost_rotation_translation (PHHepMCGenEvent *genevent)
 Record the translation,boost,rotation for HepMC frame to lab frame according to collision settings.
 
void move_vertex (PHHepMCGenEvent *genevent)
 move vertex in translation according to vertex settings
 
std::pair< double, double > generate_vertx_with_bunch_interaction (PHHepMCGenEvent *genevent)
 

Detailed Description

Definition at line 27 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 27 of file PHPythia8.h

Constructor & Destructor Documentation

PHPythia8::PHPythia8 ( const std::string &  name = "PHPythia8")

Definition at line 40 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 40 of file PHPythia8.cc

References m_Pythia8, m_Pythia8ToHepMC, and PHHepMCGenHelper::set_embedding_id().

+ Here is the call graph for this function:

PHPythia8::~PHPythia8 ( )
override

Definition at line 71 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 71 of file PHPythia8.cc

References m_Pythia8, and m_Pythia8ToHepMC.

Member Function Documentation

void PHPythia8::beam_vertex_parameters ( double  beamX,
double  beamY,
double  beamZ,
double  beamXsigma,
double  beamYsigma,
double  beamZsigma 
)
inline

Definition at line 59 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 59 of file PHPythia8.h

References PHHepMCGenHelper::set_vertex_distribution_mean(), and PHHepMCGenHelper::set_vertex_distribution_width().

+ Here is the call graph for this function:

int PHPythia8::create_node_tree ( PHCompositeNode topNode)
finalprivatevirtual

init interface nodes

Reimplemented from PHHepMCGenHelper.

Definition at line 274 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 274 of file PHPythia8.cc

References Fun4AllReturnCodes::ABORTRUN, PHHepMCGenHelper::create_node_tree(), Fun4AllReturnCodes::EVENT_OK, exit(), PHNodeIterator::findFirst(), PHHepMCGenHelper::get_embedding_id(), PHObject::identify(), m_IntegralNode, m_SaveIntegratedLuminosityFlag, PHWHERE, and nlohmann::to_string().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHPythia8::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 116 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 116 of file PHPythia8.cc

References Fun4AllReturnCodes::EVENT_OK, PHObject::identify(), m_EventCount, m_IntegralNode, m_Pythia8, Fun4AllBase::Verbosity(), Fun4AllBase::VERBOSITY_MORE, and Fun4AllBase::VERBOSITY_SOME.

+ Here is the call graph for this function:

int PHPythia8::Init ( PHCompositeNode )
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 77 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 77 of file PHPythia8.cc

References create_node_tree(), Fun4AllReturnCodes::EVENT_OK, exit(), m_Commands, m_ConfigFileName, m_Pythia8, PHWHERE, and read_config().

+ Here is the call graph for this function:

double PHPythia8::percent_diff ( const double  a,
const double  b 
)
inlineprivate

Definition at line 76 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 76 of file PHPythia8.h

void PHPythia8::print_config ( ) const

Definition at line 169 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 169 of file PHPythia8.cc

References m_Pythia8.

int PHPythia8::process_event ( PHCompositeNode )
overridevirtual
void PHPythia8::process_string ( const std::string &  s)
inline

pass commands directly to PYTHIA8

Definition at line 58 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 58 of file PHPythia8.h

References m_Commands.

int PHPythia8::read_config ( const std::string &  cfg_file)
private

Definition at line 149 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 149 of file PHPythia8.cc

References Fun4AllReturnCodes::EVENT_OK, exit(), m_ConfigFileName, m_Pythia8, Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHPythia8::register_trigger ( PHPy8GenTrigger theTrigger)

set event selection criteria

Definition at line 311 of file PHPythia8.cc.

View newest version in sPHENIX GitHub at line 311 of file PHPythia8.cc

References PHPy8GenTrigger::GetName(), m_RegisteredTriggers, Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_MORE.

+ Here is the call graph for this function:

void PHPythia8::save_event_weight ( const bool  b)
inline

Definition at line 70 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 70 of file PHPythia8.h

References m_SaveEventWeightFlag.

void PHPythia8::save_integrated_luminosity ( const bool  b)
inline

Definition at line 71 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 71 of file PHPythia8.h

References m_SaveIntegratedLuminosityFlag.

void PHPythia8::set_config_file ( const std::string &  cfg_file)
inline

Definition at line 37 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 37 of file PHPythia8.h

References m_ConfigFileName.

Referenced by Fun4All_G4_FastMom(), Fun4All_G4_FastMom_GEM(), Fun4All_G4_FastMom_GEM_RICH(), Fun4All_Generator_Display(), and InputInit().

+ Here is the caller graph for this function:

void PHPythia8::set_trigger_AND ( )
inline

Definition at line 51 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 51 of file PHPythia8.h

References m_TriggersAND, and m_TriggersOR.

void PHPythia8::set_trigger_OR ( )
inline

Definition at line 46 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 46 of file PHPythia8.h

References m_TriggersAND, and m_TriggersOR.

Member Data Documentation

std::vector<std::string> PHPythia8::m_Commands
private

Definition at line 88 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 88 of file PHPythia8.h

Referenced by Init(), and process_string().

std::string PHPythia8::m_ConfigFileName
private

Definition at line 87 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 87 of file PHPythia8.h

Referenced by Init(), read_config(), and set_config_file().

int PHPythia8::m_EventCount
private

Definition at line 77 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 77 of file PHPythia8.h

Referenced by End(), and process_event().

PHGenIntegral* PHPythia8::m_IntegralNode
private

pointer to data node saving the integrated luminosity

Definition at line 100 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 100 of file PHPythia8.h

Referenced by create_node_tree(), End(), and process_event().

Pythia8::Pythia* PHPythia8::m_Pythia8
private

Definition at line 85 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 85 of file PHPythia8.h

Referenced by End(), Init(), PHPythia8(), print_config(), process_event(), read_config(), and ~PHPythia8().

HepMC::Pythia8ToHepMC* PHPythia8::m_Pythia8ToHepMC
private

Definition at line 91 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 91 of file PHPythia8.h

Referenced by PHPythia8(), process_event(), and ~PHPythia8().

std::vector<PHPy8GenTrigger *> PHPythia8::m_RegisteredTriggers
private

Definition at line 80 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 80 of file PHPythia8.h

Referenced by process_event(), and register_trigger().

bool PHPythia8::m_SaveEventWeightFlag
private

whether to store the overall event weight into the HepMC weights

Definition at line 94 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 94 of file PHPythia8.h

Referenced by process_event(), and save_event_weight().

bool PHPythia8::m_SaveIntegratedLuminosityFlag
private

whether to store the integrated luminosity and other event statistics to the TOP/RUN/PHGenIntegral node

Definition at line 97 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 97 of file PHPythia8.h

Referenced by create_node_tree(), and save_integrated_luminosity().

bool PHPythia8::m_TriggersAND
private

Definition at line 82 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 82 of file PHPythia8.h

Referenced by process_event(), set_trigger_AND(), and set_trigger_OR().

bool PHPythia8::m_TriggersOR
private

Definition at line 81 of file PHPythia8.h.

View newest version in sPHENIX GitHub at line 81 of file PHPythia8.h

Referenced by process_event(), set_trigger_AND(), and set_trigger_OR().


The documentation for this class was generated from the following files: