Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllOscarInputManager Class Reference

#include <coresoftware/blob/master/generators/phhepmc/Fun4AllOscarInputManager.h>

+ Inheritance diagram for Fun4AllOscarInputManager:
+ Collaboration diagram for Fun4AllOscarInputManager:

Public Member Functions

 Fun4AllOscarInputManager (const std::string &name="DUMMY", const std::string &topnodename="TOP")
 
 ~Fun4AllOscarInputManager () override
 
int fileopen (const std::string &filenam) override
 
int fileclose () override
 
int run (const int nevents=0) override
 
void Print (const std::string &what="ALL") const override
 
int ResetEvent () override
 
int PushBackEvents (const int i) override
 
int skip (const int i) override
 
int SyncIt (const SyncObject *) override
 
int GetSyncObject (SyncObject **) override
 
int NoSyncPushBackEvents (const int nevt) override
 
int ConvertFromOscar ()
 
- 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
 
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 SkipForThisManager (const int)
 
virtual int HasSyncObject () const
 
virtual std::string GetString (const std::string &) const
 
const std::list< std::string > GetFileList () const
 
const std::list< std::string > GetFileOpenedList () 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

int events_total
 
int events_thisfile
 
std::string filename
 
std::string topNodeName
 
PHCompositeNodetopNode
 
HepMC::GenEvent * evt
 
int skipEvents
 
int skippedEvents
 
std::ifstream * filestream
 
std::istream * unzipstream
 
std::ifstream theOscarFile
 
bool isCompressed
 

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 = std::numeric_limits<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, doublegenerate_vertx_with_bunch_interaction (PHHepMCGenEvent *genevent)
 

Detailed Description

Definition at line 21 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 21 of file Fun4AllOscarInputManager.h

Constructor & Destructor Documentation

Fun4AllOscarInputManager::Fun4AllOscarInputManager ( const std::string &  name = "DUMMY",
const std::string &  topnodename = "TOP" 
)

Definition at line 47 of file Fun4AllOscarInputManager.cc.

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

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

+ Here is the call graph for this function:

Fun4AllOscarInputManager::~Fun4AllOscarInputManager ( )
override

Definition at line 75 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 75 of file Fun4AllOscarInputManager.cc

References fileclose(), filestream, and unzipstream.

+ Here is the call graph for this function:

Member Function Documentation

int Fun4AllOscarInputManager::ConvertFromOscar ( )

Definition at line 276 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 276 of file Fun4AllOscarInputManager.cc

References E, end, events_total, evt, PHHepMCGenEventMap::find(), PHHepMCGenHelper::get_embedding_id(), PHHepMCGenHelper::get_geneventmap(), i, PHHepMCGenHelper::insert_event(), isCompressed, Acts::UnitConstants::m, merge_hashes::p, train_ambiguity_solver::pid, skippedEvents, utils::status, theOscarFile, toMM, testSigmaEff::v, and Fun4AllBase::Verbosity().

Referenced by run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Fun4AllOscarInputManager::fileclose ( )
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 206 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 206 of file Fun4AllOscarInputManager.cc

References filestream, isCompressed, Fun4AllInputManager::IsOpen(), Fun4AllBase::Name(), theOscarFile, and Fun4AllInputManager::UpdateFileList().

Referenced by fileopen(), run(), and ~Fun4AllOscarInputManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from Fun4AllInputManager.

Definition at line 82 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 82 of file Fun4AllOscarInputManager.cc

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

+ Here is the call graph for this function:

int Fun4AllOscarInputManager::GetSyncObject ( SyncObject **  )
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 38 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 38 of file Fun4AllOscarInputManager.h

References Fun4AllReturnCodes::SYNC_NOOBJECT.

int Fun4AllOscarInputManager::NoSyncPushBackEvents ( const int  nevt)
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 39 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 39 of file Fun4AllOscarInputManager.h

References PushBackEvents().

+ Here is the call graph for this function:

void Fun4AllOscarInputManager::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 228 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 228 of file Fun4AllOscarInputManager.cc

References Fun4AllInputManager::Print().

+ Here is the call graph for this function:

int Fun4AllOscarInputManager::PushBackEvents ( const int  i)
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 241 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 241 of file Fun4AllOscarInputManager.cc

References skippedEvents, and theOscarFile.

Referenced by NoSyncPushBackEvents(), and skip().

+ Here is the caller graph for this function:

int Fun4AllOscarInputManager::ResetEvent ( )
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 234 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 234 of file Fun4AllOscarInputManager.cc

int Fun4AllOscarInputManager::run ( const int  nevents = 0)
overridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 146 of file Fun4AllOscarInputManager.cc.

View newest version in sPHENIX GitHub at line 146 of file Fun4AllOscarInputManager.cc

References ConvertFromOscar(), Fun4AllReturnCodes::EVENT_OK, events_thisfile, events_total, evt, fileclose(), Fun4AllInputManager::FileListEmpty(), Fun4AllInputManager::IsOpen(), Fun4AllBase::Name(), Fun4AllInputManager::OpenNextFile(), Fun4AllInputManager::RejectEvent(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int Fun4AllOscarInputManager::skip ( const int  i)
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 33 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 33 of file Fun4AllOscarInputManager.h

References PushBackEvents().

+ Here is the call graph for this function:

int Fun4AllOscarInputManager::SyncIt ( const SyncObject )
inlineoverridevirtual

Reimplemented from Fun4AllInputManager.

Definition at line 37 of file Fun4AllOscarInputManager.h.

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

References Fun4AllReturnCodes::SYNC_OK.

Member Data Documentation

int Fun4AllOscarInputManager::events_thisfile
protected

Definition at line 44 of file Fun4AllOscarInputManager.h.

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

Referenced by fileopen(), and run().

int Fun4AllOscarInputManager::events_total
protected

Definition at line 43 of file Fun4AllOscarInputManager.h.

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

Referenced by ConvertFromOscar(), and run().

HepMC::GenEvent* Fun4AllOscarInputManager::evt
protected

Definition at line 48 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 48 of file Fun4AllOscarInputManager.h

Referenced by ConvertFromOscar(), and run().

std::string Fun4AllOscarInputManager::filename
protected

Definition at line 45 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 45 of file Fun4AllOscarInputManager.h

Referenced by cpp.ast.Include::__str__(), cpp.ast.AstBuilder::_GetClass(), fileopen(), and cpp.ast.AstBuilder::HandleError().

std::ifstream* Fun4AllOscarInputManager::filestream
protected

Definition at line 53 of file Fun4AllOscarInputManager.h.

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

Referenced by fileclose(), fileopen(), and ~Fun4AllOscarInputManager().

bool Fun4AllOscarInputManager::isCompressed
protected

Definition at line 57 of file Fun4AllOscarInputManager.h.

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

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

int Fun4AllOscarInputManager::skipEvents
protected

Definition at line 50 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 50 of file Fun4AllOscarInputManager.h

int Fun4AllOscarInputManager::skippedEvents
protected

Definition at line 50 of file Fun4AllOscarInputManager.h.

View newest version in sPHENIX GitHub at line 50 of file Fun4AllOscarInputManager.h

Referenced by ConvertFromOscar(), and PushBackEvents().

std::ifstream Fun4AllOscarInputManager::theOscarFile
protected

Definition at line 55 of file Fun4AllOscarInputManager.h.

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

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

PHCompositeNode* Fun4AllOscarInputManager::topNode
protected

Definition at line 47 of file Fun4AllOscarInputManager.h.

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

Referenced by Fun4AllOscarInputManager().

std::string Fun4AllOscarInputManager::topNodeName
protected

Definition at line 46 of file Fun4AllOscarInputManager.h.

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

Referenced by Fun4AllOscarInputManager().

std::istream* Fun4AllOscarInputManager::unzipstream
protected

Definition at line 54 of file Fun4AllOscarInputManager.h.

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

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


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