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

#include <fun4all_coresoftware/blob/master/generators/phhepmc/Fun4AllHepMCInputManager.h>

+ Inheritance diagram for Fun4AllHepMCInputManager:
+ Collaboration diagram for Fun4AllHepMCInputManager:

Public Member Functions

 Fun4AllHepMCInputManager (const std::string &name="DUMMY", const std::string &nodename="DST", const std::string &topnodename="TOP")
 
 ~Fun4AllHepMCInputManager () override
 
int fileopen (const std::string &filenam) override
 
int fileclose () override
 
int run (const int nevents=0) override
 
int ResetEvent () override
 
void ReadOscar (const int i)
 
int ReadOscar () const
 
void Print (const std::string &what="ALL") const override
 
int PushBackEvents (const int i) override
 
int SyncIt (const SyncObject *) override
 
int GetSyncObject (SyncObject **) override
 
int NoSyncPushBackEvents (const int nevt) override
 
HepMC::GenEvent * ConvertFromOscar ()
 
int SkipForThisManager (const int nevents) override
 
int MyCurrentEvent (const unsigned int index=0) const
 
- Public Member Functions inherited from Fun4AllInputManager
 ~Fun4AllInputManager () override
 
virtual int ReadInRunNode (PHCompositeNode *)
 
std::string FileName () const
 
void FileName (const std::string &fn)
 
virtual int BranchSelect (const std::string &, const int)
 
virtual int setBranches ()
 
void Print (const std::string &what="ALL") const override
 
virtual int skip (const int nevt)
 
int AddFile (const std::string &filename)
 
int AddListFile (const std::string &filename, const int do_it=0)
 
int registerSubsystem (SubsysReco *subsystem)
 
virtual int RejectEvent ()
 
void Repeat (const int i=-1)
 
virtual void setSyncManager (Fun4AllSyncManager *master)
 
virtual int ResetFileList ()
 
virtual void SetRunNumber (const int runno)
 
virtual int RunNumber () const
 
void AddToFileOpened (const std::string &filename)
 
std::pair< std::list
< std::string >
::const_iterator, std::list
< std::string >
::const_iterator > 
FileOpenListBeginEnd ()
 
std::string InputNode ()
 
void InputNode (const std::string &innode)
 
std::string TopNodeName () const
 
bool FileListEmpty () const
 
virtual int IsOpen () const
 
virtual int HasSyncObject () const
 
- 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_*()
 
virtual int create_node_tree (PHCompositeNode *topNode)
 init interface nodes
 
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 ()
 

Protected Attributes

HepMC::GenEvent * evt = nullptr
 
int events_total = 0
 
int events_thisfile = 0
 
int m_EventPushedBackFlag = 0
 
HepMC::IO_GenEvent * ascii_in = nullptr
 
std::string m_HepMCTmpFile
 

Private Attributes

PHCompositeNodetopNode = nullptr
 
std::ifstream * filestream = nullptr
 
std::istream * unzipstream = nullptr
 
int m_ReadOscarFlag = 0
 
std::vector< int > m_MyEvent
 
boost::iostreams::filtering_streambuf
< boost::iostreams::input > 
zinbuffer
 
std::ifstream theOscarFile
 
std::string filename
 
std::string topNodeName
 

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 Fun4AllInputManager
 Fun4AllInputManager (const std::string &name="DUMMY", const std::string &nodename="DST", const std::string &topnodename="TOP")
 
void UpdateFileList ()
 
int OpenNextFile ()
 
void IsOpen (const int i)
 
Fun4AllSyncManagerMySyncManager ()
 
- 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 26 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 26 of file Fun4AllHepMCInputManager.h

Constructor & Destructor Documentation

Fun4AllHepMCInputManager::Fun4AllHepMCInputManager ( const std::string &  name = "DUMMY",
const std::string &  nodename = "DST",
const std::string &  topnodename = "TOP" 
)

Definition at line 47 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 47 of file Fun4AllHepMCInputManager.cc

References PHCompositeNode::addNode(), Fun4AllServer::getNode(), Fun4AllInputManager::InputNode(), Fun4AllServer::instance(), PHHepMCGenHelper::set_embedding_id(), PHHepMCGenHelper::set_geneventmap(), topNode, Fun4AllServer::topNode(), and topNodeName.

+ Here is the call graph for this function:

Fun4AllHepMCInputManager::~Fun4AllHepMCInputManager ( )
override

Definition at line 71 of file Fun4AllHepMCInputManager.cc.

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

References ascii_in, fileclose(), filestream, m_HepMCTmpFile, and unzipstream.

+ Here is the call graph for this function:

Member Function Documentation

HepMC::GenEvent * Fun4AllHepMCInputManager::ConvertFromOscar ( )

Definition at line 353 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 353 of file Fun4AllHepMCInputManager.cc

References events_total, evt, getline, Acts::UnitConstants::m, p, pid, theOscarFile, toMM, v, and Fun4AllBase::Verbosity().

Referenced by Fun4AllHepMCPileupInputManager::run(), and run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllHepMCInputManager::fileclose ( )
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 250 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 250 of file Fun4AllHepMCInputManager.cc

References ascii_in, Fun4AllInputManager::IsOpen(), m_ReadOscarFlag, Fun4AllBase::Name(), theOscarFile, and Fun4AllInputManager::UpdateFileList().

Referenced by fileopen(), PushBackEvents(), Fun4AllHepMCPileupInputManager::run(), run(), and ~Fun4AllHepMCInputManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllHepMCInputManager::fileopen ( const std::string &  filenam)
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 84 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 84 of file Fun4AllHepMCInputManager.cc

References Fun4AllInputManager::AddToFileOpened(), ascii_in, Fun4AllSyncManager::CurrentRun(), events_thisfile, exit(), fileclose(), filename, filestream, PHFlag::FlagExist(), PHFlag::get_IntFlag(), in, recoConsts::instance(), Fun4AllInputManager::IsOpen(), FROG::location(), m_ReadOscarFlag, Fun4AllInputManager::MySyncManager(), Fun4AllBase::Name(), theOscarFile, unzipstream, Fun4AllBase::Verbosity(), and zinbuffer.

Referenced by InputManagers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllHepMCInputManager::GetSyncObject ( SyncObject **  )
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 43 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 43 of file Fun4AllHepMCInputManager.h

References Fun4AllReturnCodes::SYNC_NOOBJECT.

int Fun4AllHepMCInputManager::MyCurrentEvent ( const unsigned int  index = 0) const

Definition at line 432 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 432 of file Fun4AllHepMCInputManager.cc

References m_MyEvent.

Referenced by Fun4AllHepMCPileupInputManager::run(), and Fun4AllHepMCPileupInputManager::SkipForThisManager().

+ Here is the caller graph for this function:

int Fun4AllHepMCInputManager::NoSyncPushBackEvents ( const int  nevt)
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 44 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 44 of file Fun4AllHepMCInputManager.h

References PushBackEvents().

+ Here is the call graph for this function:

void Fun4AllHepMCInputManager::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from Fun4AllBase.

Definition at line 273 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 273 of file Fun4AllHepMCInputManager.cc

References Fun4AllBase::Name(), Fun4AllInputManager::Print(), and PHHepMCGenHelper::Print().

+ Here is the call graph for this function:

int Fun4AllHepMCInputManager::PushBackEvents ( const int  i)
overridevirtual

Reimplemented from Fun4AllInputManager.

Reimplemented in Fun4AllHepMCPileupInputManager.

Definition at line 281 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 281 of file Fun4AllHepMCInputManager.cc

References ascii_in, evt, fileclose(), Fun4AllInputManager::IsOpen(), m_EventPushedBackFlag, m_HepMCTmpFile, m_MyEvent, Fun4AllBase::Name(), nevents, PHWHERE, nlohmann::to_string(), and Fun4AllBase::Verbosity().

Referenced by NoSyncPushBackEvents(), and SkipForThisManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Fun4AllHepMCInputManager::ReadOscar ( const int  i)
inline

Definition at line 35 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 35 of file Fun4AllHepMCInputManager.h

References m_ReadOscarFlag.

int Fun4AllHepMCInputManager::ReadOscar ( ) const
inline

Definition at line 36 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 36 of file Fun4AllHepMCInputManager.h

References m_ReadOscarFlag.

Referenced by Fun4AllHepMCPileupInputManager::run().

+ Here is the caller graph for this function:

int Fun4AllHepMCInputManager::ResetEvent ( )
overridevirtual

Reimplemented from Fun4AllInputManager.

Reimplemented in Fun4AllHepMCPileupInputManager.

Definition at line 426 of file Fun4AllHepMCInputManager.cc.

View newest version in sPHENIX GitHub at line 426 of file Fun4AllHepMCInputManager.cc

References m_MyEvent.

int Fun4AllHepMCInputManager::SkipForThisManager ( const int  nevents)
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Reimplemented in Fun4AllHepMCPileupInputManager.

Definition at line 47 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 47 of file Fun4AllHepMCInputManager.h

References PushBackEvents().

+ Here is the call graph for this function:

int Fun4AllHepMCInputManager::SyncIt ( const SyncObject )
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 42 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 42 of file Fun4AllHepMCInputManager.h

References Fun4AllReturnCodes::SYNC_OK.

Member Data Documentation

HepMC::IO_GenEvent* Fun4AllHepMCInputManager::ascii_in = nullptr
protected

Definition at line 57 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 57 of file Fun4AllHepMCInputManager.h

Referenced by fileclose(), fileopen(), PushBackEvents(), Fun4AllHepMCPileupInputManager::run(), run(), and ~Fun4AllHepMCInputManager().

int Fun4AllHepMCInputManager::events_thisfile = 0
protected

Definition at line 54 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 54 of file Fun4AllHepMCInputManager.h

Referenced by fileopen(), Fun4AllHepMCPileupInputManager::run(), and run().

int Fun4AllHepMCInputManager::events_total = 0
protected

Definition at line 53 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 53 of file Fun4AllHepMCInputManager.h

Referenced by ConvertFromOscar(), Fun4AllHepMCPileupInputManager::run(), and run().

HepMC::GenEvent* Fun4AllHepMCInputManager::evt = nullptr
protected

Definition at line 51 of file Fun4AllHepMCInputManager.h.

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

Referenced by ConvertFromOscar(), PushBackEvents(), Fun4AllHepMCPileupInputManager::run(), and run().

std::string Fun4AllHepMCInputManager::filename
private

Definition at line 76 of file Fun4AllHepMCInputManager.h.

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

Referenced by fileopen().

std::ifstream* Fun4AllHepMCInputManager::filestream = nullptr
private

Definition at line 65 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 65 of file Fun4AllHepMCInputManager.h

Referenced by fileopen(), and ~Fun4AllHepMCInputManager().

int Fun4AllHepMCInputManager::m_EventPushedBackFlag = 0
protected

Definition at line 55 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 55 of file Fun4AllHepMCInputManager.h

Referenced by PushBackEvents(), Fun4AllHepMCPileupInputManager::PushBackEvents(), Fun4AllHepMCPileupInputManager::run(), and run().

std::string Fun4AllHepMCInputManager::m_HepMCTmpFile
protected
std::vector<int> Fun4AllHepMCInputManager::m_MyEvent
private

Definition at line 70 of file Fun4AllHepMCInputManager.h.

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

Referenced by MyCurrentEvent(), PushBackEvents(), ResetEvent(), and run().

int Fun4AllHepMCInputManager::m_ReadOscarFlag = 0
private

Definition at line 68 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 68 of file Fun4AllHepMCInputManager.h

Referenced by fileclose(), fileopen(), ReadOscar(), and run().

std::ifstream Fun4AllHepMCInputManager::theOscarFile
private

Definition at line 74 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 74 of file Fun4AllHepMCInputManager.h

Referenced by ConvertFromOscar(), fileclose(), and fileopen().

PHCompositeNode* Fun4AllHepMCInputManager::topNode = nullptr
private

Definition at line 62 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 62 of file Fun4AllHepMCInputManager.h

Referenced by Fun4AllHepMCInputManager().

std::string Fun4AllHepMCInputManager::topNodeName
private

Definition at line 77 of file Fun4AllHepMCInputManager.h.

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

Referenced by Fun4AllHepMCInputManager().

std::istream* Fun4AllHepMCInputManager::unzipstream = nullptr
private

Definition at line 66 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 66 of file Fun4AllHepMCInputManager.h

Referenced by fileopen(), and ~Fun4AllHepMCInputManager().

boost::iostreams::filtering_streambuf<boost::iostreams::input> Fun4AllHepMCInputManager::zinbuffer
private

Definition at line 72 of file Fun4AllHepMCInputManager.h.

View newest version in sPHENIX GitHub at line 72 of file Fun4AllHepMCInputManager.h

Referenced by fileopen().


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