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

#include <JETSCAPE/blob/main/src/root/JetScapeWriterRootHepMC.h>

+ Inheritance diagram for Jetscape::JetScapeWriterRootHepMC:
+ Collaboration diagram for Jetscape::JetScapeWriterRootHepMC:

Public Member Functions

 JetScapeWriterRootHepMC ()
 
 JetScapeWriterRootHepMC (string m_file_name_out)
 
virtual ~JetScapeWriterRootHepMC ()
 
void Init ()
 
void Exec ()
 
bool GetStatus ()
 
void Close ()
 
void WriteEvent ()
 Gets called last, after all tasks have written themselves.
 
void Write (weak_ptr< PartonShower > ps)
 
void Write (weak_ptr< Hadron > h)
 
void WriteHeaderToFile ()
 Gets called first, before all tasks write themselves.
 
- Public Member Functions inherited from Jetscape::JetScapeWriter
 JetScapeWriter ()
 
 JetScapeWriter (string m_file_name_out)
 
virtual ~JetScapeWriter ()
 
void SetOutputFileName (string m_file_name_out)
 
string GetOutputFileName ()
 
virtual void Open ()
 
virtual void WriteInitFileXML ()
 
virtual void Write (weak_ptr< Parton > p)
 
virtual void Write (weak_ptr< Jet > j)
 
virtual void Write (weak_ptr< Vertex > v)
 
virtual void Write (string s)
 
virtual void WriteComment (string s)
 
virtual void WriteWhiteSpace (string s)
 
virtual void Write (ostream *o)
 
virtual JetScapeEventHeaderGetHeader ()
 
- Public Member Functions inherited from Jetscape::JetScapeModuleBase
 JetScapeModuleBase ()
 
 JetScapeModuleBase (string m_name)
 
virtual ~JetScapeModuleBase ()
 
virtual void Clear ()
 
void SetXMLMainFileName (string m_name)
 
string GetXMLMainFileName ()
 
void SetXMLUserFileName (string m_name)
 
string GetXMLUserFileName ()
 
shared_ptr< std::mt19937 > GetMt19937Generator ()
 
tinyxml2::XMLElementGetXMLElement (std::initializer_list< const char * > path, bool isRequired=true)
 
std::string GetXMLElementText (std::initializer_list< const char * > path, bool isRequired=true)
 
int GetXMLElementInt (std::initializer_list< const char * > path, bool isRequired=true)
 
double GetXMLElementDouble (std::initializer_list< const char * > path, bool isRequired=true)
 
- Public Member Functions inherited from Jetscape::JetScapeTask
 JetScapeTask ()
 
virtual ~JetScapeTask ()
 
virtual void Finish ()
 
virtual void ExecuteTasks ()
 
virtual void ExecuteTask ()
 
virtual void InitTask ()
 
virtual void InitTasks ()
 
virtual void ClearTasks ()
 
virtual void ClearTask ()
 
virtual void FinishTask ()
 
virtual void FinishTasks ()
 
virtual void WriteTasks (weak_ptr< JetScapeWriter > w)
 
virtual void WriteTask (weak_ptr< JetScapeWriter > w)
 
virtual void CollectHeader (weak_ptr< JetScapeWriter > w)
 
virtual void CollectHeaders (weak_ptr< JetScapeWriter > w)
 
virtual void Add (shared_ptr< JetScapeTask > m_tasks)
 
virtual const int GetMyTaskNumber () const
 
const vector< shared_ptr
< JetScapeTask > > 
GetTaskList () const
 
shared_ptr< JetScapeTaskGetTaskAt (int i)
 
void EraseTaskLast ()
 
void EraseTaskAt (int i)
 
void ResizeTaskList (int i)
 
void ClearTaskList ()
 
int GetNumberOfTasks ()
 
const bool GetActive () const
 
void SetActive (bool m_active_exec)
 
void SetId (string m_id)
 
const string GetId () const
 
const shared_ptr
< JetScapeModuleMutex
GetMutex () const
 
void SetMutex (shared_ptr< JetScapeModuleMutex > m_mutex)
 
- Public Member Functions inherited from sigslot::has_slots< sigslot::multi_threaded_local >
 has_slots ()
 
 has_slots (const has_slots &hs)
 
void signal_connect (_signal_base< sigslot::multi_threaded_local > *sender)
 
void signal_disconnect (_signal_base< sigslot::multi_threaded_local > *sender)
 
virtual ~has_slots ()
 
void disconnect_all ()
 

Private Member Functions

HepMC3::GenVertexPtr castVtxToHepMC (const shared_ptr< Vertex > vtx) const
 
HepMC3::GenParticlePtr castPartonToHepMC (const shared_ptr< Parton > pparticle) const
 
HepMC3::GenParticlePtr castPartonToHepMC (const Parton &particle) const
 
HepMC3::GenParticlePtr castHadronToHepMC (const shared_ptr< Hadron > pparticle) const
 
HepMC3::GenParticlePtr castHadronToHepMC (const Hadron &particle) const
 

Private Attributes

HepMC3::GenEvent evt
 
vector< HepMC3::GenVertexPtr > vertices
 
HepMC3::GenVertexPtr hadronizationvertex
 
bool hashadrons =false
 WriteEvent needs to know whether it should overwrite final partons status to 1.
 

Additional Inherited Members

- Static Public Member Functions inherited from Jetscape::JetScapeModuleBase
static int GetCurrentEvent ()
 
static void IncrementCurrentEvent ()
 
- Protected Attributes inherited from Jetscape::JetScapeWriter
string file_name_out
 
JetScapeEventHeader header
 

Detailed Description

Definition at line 39 of file JetScapeWriterRootHepMC.h.

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

Constructor & Destructor Documentation

Jetscape::JetScapeWriterRootHepMC::JetScapeWriterRootHepMC ( )
inline

Definition at line 42 of file JetScapeWriterRootHepMC.h.

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

References Jetscape::JetScapeTask::SetId().

+ Here is the call graph for this function:

Jetscape::JetScapeWriterRootHepMC::JetScapeWriterRootHepMC ( string  m_file_name_out)
inline

Definition at line 43 of file JetScapeWriterRootHepMC.h.

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

References Jetscape::JetScapeTask::SetId().

+ Here is the call graph for this function:

Jetscape::JetScapeWriterRootHepMC::~JetScapeWriterRootHepMC ( )
virtual

Definition at line 56 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 56 of file JetScapeWriterRootHepMC.cc

References Close(), and Jetscape::JetScapeTask::GetActive().

+ Here is the call graph for this function:

Member Function Documentation

HepMC3::GenParticlePtr Jetscape::JetScapeWriterRootHepMC::castHadronToHepMC ( const shared_ptr< Hadron pparticle) const
inlineprivate

Definition at line 100 of file JetScapeWriterRootHepMC.h.

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

Referenced by Write().

+ Here is the caller graph for this function:

HepMC3::GenParticlePtr Jetscape::JetScapeWriterRootHepMC::castHadronToHepMC ( const Hadron particle) const
inlineprivate

Definition at line 105 of file JetScapeWriterRootHepMC.h.

View newest version in sPHENIX GitHub at line 105 of file JetScapeWriterRootHepMC.h

References Jetscape::JetScapeParticleBase::pid(), and Jetscape::JetScapeParticleBase::pstat().

+ Here is the call graph for this function:

HepMC3::GenParticlePtr Jetscape::JetScapeWriterRootHepMC::castPartonToHepMC ( const shared_ptr< Parton pparticle) const
inlineprivate

Definition at line 88 of file JetScapeWriterRootHepMC.h.

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

Referenced by Write().

+ Here is the caller graph for this function:

HepMC3::GenParticlePtr Jetscape::JetScapeWriterRootHepMC::castPartonToHepMC ( const Parton particle) const
inlineprivate

Definition at line 93 of file JetScapeWriterRootHepMC.h.

View newest version in sPHENIX GitHub at line 93 of file JetScapeWriterRootHepMC.h

References Jetscape::JetScapeParticleBase::pid(), and Jetscape::JetScapeParticleBase::pstat().

+ Here is the call graph for this function:

HepMC3::GenVertexPtr Jetscape::JetScapeWriterRootHepMC::castVtxToHepMC ( const shared_ptr< Vertex vtx) const
inlineprivate

Definition at line 77 of file JetScapeWriterRootHepMC.h.

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

References t, ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

Referenced by Write().

+ Here is the caller graph for this function:

void Jetscape::JetScapeWriterRootHepMC::Close ( )
inlinevirtual

Reimplemented from Jetscape::JetScapeWriter.

Definition at line 53 of file JetScapeWriterRootHepMC.h.

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

Referenced by ~JetScapeWriterRootHepMC().

+ Here is the caller graph for this function:

void Jetscape::JetScapeWriterRootHepMC::Exec ( )
virtual

A virtual function to define a default Exec() function for a JetScapeModuleBase. It can be overridden by different modules/tasks.

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 336 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 336 of file JetScapeWriterRootHepMC.cc

bool Jetscape::JetScapeWriterRootHepMC::GetStatus ( )
inlinevirtual

Implements Jetscape::JetScapeWriter.

Definition at line 52 of file JetScapeWriterRootHepMC.h.

View newest version in sPHENIX GitHub at line 52 of file JetScapeWriterRootHepMC.h

void Jetscape::JetScapeWriterRootHepMC::Init ( )
virtual

A virtual function for a default initialization of a JetScapeModuleBase. It also checks whether a XML file is loaded or not.

Reimplemented from Jetscape::JetScapeModuleBase.

Definition at line 329 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 329 of file JetScapeWriterRootHepMC.cc

References Jetscape::JetScapeTask::GetActive(), Jetscape::JetScapeWriter::GetOutputFileName(), and JSINFO.

+ Here is the call graph for this function:

void Jetscape::JetScapeWriterRootHepMC::Write ( weak_ptr< PartonShower ps)
virtual

Reimplemented from Jetscape::JetScapeWriter.

Definition at line 135 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 135 of file JetScapeWriterRootHepMC.cc

References castPartonToHepMC(), castVtxToHepMC(), in, JSWARN, out, dfs::run(), dfs::scan_whole_graph(), dfs::start_node(), utils::status, topsort::top_order_begin(), topsort::top_order_end(), testSigmaEff::v, and vertices.

+ Here is the call graph for this function:

void Jetscape::JetScapeWriterRootHepMC::Write ( weak_ptr< Hadron h)
virtual

Reimplemented from Jetscape::JetScapeWriter.

Definition at line 292 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 292 of file JetScapeWriterRootHepMC.cc

References castHadronToHepMC(), hadronizationvertex, hashadrons, and vertices.

+ Here is the call graph for this function:

void Jetscape::JetScapeWriterRootHepMC::WriteEvent ( )
virtual

Gets called last, after all tasks have written themselves.

Reimplemented from Jetscape::JetScapeWriter.

Definition at line 101 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 101 of file JetScapeWriterRootHepMC.cc

References evt, Jetscape::JetScapeModuleBase::GetCurrentEvent(), hadronizationvertex, hashadrons, JSWARN, merge_hashes::p, testSigmaEff::v, VERBOSE, and vertices.

+ Here is the call graph for this function:

void Jetscape::JetScapeWriterRootHepMC::WriteHeaderToFile ( )
virtual

Gets called first, before all tasks write themselves.

Reimplemented from Jetscape::JetScapeWriter.

Definition at line 61 of file JetScapeWriterRootHepMC.cc.

View newest version in sPHENIX GitHub at line 61 of file JetScapeWriterRootHepMC.cc

References evt, Jetscape::JetScapeEventHeader::GetEventPlaneAngle(), Jetscape::JetScapeWriter::GetHeader(), Jetscape::JetScapeEventHeader::GetNcoll(), Jetscape::JetScapeEventHeader::GetNpart(), and xsec.

+ Here is the call graph for this function:

Member Data Documentation

HepMC3::GenEvent Jetscape::JetScapeWriterRootHepMC::evt
private

Definition at line 69 of file JetScapeWriterRootHepMC.h.

View newest version in sPHENIX GitHub at line 69 of file JetScapeWriterRootHepMC.h

Referenced by WriteEvent(), and WriteHeaderToFile().

HepMC3::GenVertexPtr Jetscape::JetScapeWriterRootHepMC::hadronizationvertex
private

Definition at line 71 of file JetScapeWriterRootHepMC.h.

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

Referenced by Write(), and WriteEvent().

bool Jetscape::JetScapeWriterRootHepMC::hashadrons =false
private

WriteEvent needs to know whether it should overwrite final partons status to 1.

Definition at line 74 of file JetScapeWriterRootHepMC.h.

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

Referenced by Write(), and WriteEvent().

vector<HepMC3::GenVertexPtr> Jetscape::JetScapeWriterRootHepMC::vertices
private

Definition at line 70 of file JetScapeWriterRootHepMC.h.

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

Referenced by Write(), and WriteEvent().


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