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

#include <JETSCAPE/blob/main/src/initialstate/InitialFromFile.h>

+ Inheritance diagram for InitialFromFile:
+ Collaboration diagram for InitialFromFile:

Public Member Functions

 InitialFromFile ()
 
 ~InitialFromFile ()
 
void Exec ()
 
void Clear ()
 
void InitTask ()
 
virtual void Write (weak_ptr< JetScapeWriter > w)
 
double GetNpart ()
 
double GetNcoll ()
 
double GetTotalEntropy ()
 
- Public Member Functions inherited from Jetscape::InitialState
 InitialState ()
 
 ~InitialState ()
 
virtual void Init ()
 
virtual void CollectHeader (weak_ptr< JetScapeWriter > w)
 
void SetRanges (double xmax, double ymax, double zmax)
 
void SetSteps (double dx, double dy, double dz)
 
std::vector< doubleGetEntropyDensityDistribution ()
 
std::vector< doubleGetNumOfBinaryCollisions ()
 
int GetEventId () const
 
void SetEventId (int event_id_in)
 set the event id
 
std::tuple< double, double,
double
CoordFromIdx (int idx)
 
virtual void SampleABinaryCollisionPoint (double &x, double &y)
 
double GetXMax ()
 
double GetXStep ()
 
double GetYMax ()
 
double GetYStep ()
 
double GetZMax ()
 
double GetZStep ()
 
int GetXSize ()
 
int GetYSize ()
 
int GetZSize ()
 
- Public Member Functions inherited from Jetscape::JetScapeModuleBase
 JetScapeModuleBase ()
 
 JetScapeModuleBase (string m_name)
 
virtual ~JetScapeModuleBase ()
 
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 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 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

void ReadConfigs ()
 Load saved configurations for each event.
 
void ReadNbcDist ()
 Load saved number of binary collisions.
 
void ReadEntropyDist ()
 Load saved initial entropy density distribution.
 

Private Attributes

hid_t H5file_ptr_
 
hid_t H5group_ptr_
 
HydroinfoH5h5_helper_
 want to use auxiliary hdf5 file readers
 
int dim_x_
 
int dim_y_
 
double npart = -1
 
double ncoll = -1
 
double totalentropy = -1
 

Static Private Attributes

static RegisterJetScapeModule
< InitialFromFile
reg
 

Additional Inherited Members

- Static Public Member Functions inherited from Jetscape::JetScapeModuleBase
static int GetCurrentEvent ()
 
static void IncrementCurrentEvent ()
 
- Protected Attributes inherited from Jetscape::InitialState
std::vector< doubleentropy_density_distribution_
 
std::vector< doublenum_of_binary_collisions_
 
int event_id_
 
double grid_max_x_
 
double grid_max_y_
 
double grid_max_z_
 
double grid_step_x_
 
double grid_step_y_
 
double grid_step_z_
 

Detailed Description

Definition at line 31 of file InitialFromFile.h.

View newest version in sPHENIX GitHub at line 31 of file InitialFromFile.h

Constructor & Destructor Documentation

InitialFromFile::InitialFromFile ( )

Definition at line 21 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 21 of file InitialFromFile.cc

References Jetscape::InitialState::event_id_, h5_helper_, and Jetscape::JetScapeTask::SetId().

+ Here is the call graph for this function:

InitialFromFile::~InitialFromFile ( )

Definition at line 27 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 27 of file InitialFromFile.cc

References h5_helper_.

Member Function Documentation

void InitialFromFile::Clear ( void  )
virtual

Default Clear() function. It can be overridden by other tasks.

Reimplemented from Jetscape::InitialState.

Definition at line 116 of file InitialFromFile.cc.

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

References Jetscape::InitialState::entropy_density_distribution_, JSINFO, and Jetscape::InitialState::num_of_binary_collisions_.

Referenced by Exec().

+ Here is the caller graph for this function:

void InitialFromFile::Exec ( )
virtual

Reads the input parameters from the XML file under the tag <IS>. Calls InitTask(); This explicit call of InitTask() can be used for actual initialization of modules such as Trento if attached as a polymorphic class. It also initializes the tasks within the current module.

See Also
Read about polymorphism in C++.Default Exec() function. It can be overridden by other tasks.

Reimplemented from Jetscape::InitialState.

Definition at line 33 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 33 of file InitialFromFile.cc

References Clear(), check_license::err(), Jetscape::InitialState::event_id_, Jetscape::JetScapeModuleBase::GetXMLElementText(), H5file_ptr_, H5group_ptr_, JSINFO, JSWARN, ReadConfigs(), ReadEntropyDist(), ReadNbcDist(), and utils::status.

+ Here is the call graph for this function:

double InitialFromFile::GetNcoll ( )
inlinevirtual

Generated number of binary collisions.

Reimplemented from Jetscape::InitialState.

Definition at line 65 of file InitialFromFile.h.

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

double InitialFromFile::GetNpart ( )
inlinevirtual

Generated number of collision participants.

Reimplemented from Jetscape::InitialState.

Definition at line 61 of file InitialFromFile.h.

View newest version in sPHENIX GitHub at line 61 of file InitialFromFile.h

References npart().

+ Here is the call graph for this function:

double InitialFromFile::GetTotalEntropy ( )
inlinevirtual

Generated total entropy

Reimplemented from Jetscape::InitialState.

Definition at line 69 of file InitialFromFile.h.

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

void InitialFromFile::InitTask ( )
virtual

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

Reimplemented from Jetscape::JetScapeTask.

Definition at line 31 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 31 of file InitialFromFile.cc

void InitialFromFile::ReadConfigs ( )
private

Load saved configurations for each event.

Definition at line 69 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 69 of file InitialFromFile.cc

References dim_x_, dim_y_, h5_helper_, H5group_ptr_, JSINFO, ncoll, npart, HydroinfoH5::readH5Attribute_double(), HydroinfoH5::readH5Attribute_int(), Jetscape::InitialState::SetRanges(), Jetscape::InitialState::SetSteps(), totalentropy, and xmax.

Referenced by Exec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void InitialFromFile::ReadEntropyDist ( )
private

Load saved initial entropy density distribution.

Definition at line 100 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 100 of file InitialFromFile.cc

References TauVsDIS_MachineLearning_Differentiation::dataset, dim_x_, dim_y_, Jetscape::InitialState::entropy_density_distribution_, H5group_ptr_, i, j, JSINFO, and utils::status.

Referenced by Exec().

+ Here is the caller graph for this function:

void InitialFromFile::ReadNbcDist ( )
private

Load saved number of binary collisions.

Definition at line 84 of file InitialFromFile.cc.

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

References TauVsDIS_MachineLearning_Differentiation::dataset, dim_x_, dim_y_, H5group_ptr_, i, j, JSINFO, Jetscape::InitialState::num_of_binary_collisions_, and utils::status.

Referenced by Exec().

+ Here is the caller graph for this function:

void InitialFromFile::Write ( weak_ptr< JetScapeWriter w)
virtual

Default Write() function. It can be overridden by other tasks.

Parameters
wA pointer to the JetScapeWriter class.

Reimplemented from Jetscape::InitialState.

Definition at line 122 of file InitialFromFile.cc.

View newest version in sPHENIX GitHub at line 122 of file InitialFromFile.cc

Member Data Documentation

int InitialFromFile::dim_x_
private

Definition at line 90 of file InitialFromFile.h.

View newest version in sPHENIX GitHub at line 90 of file InitialFromFile.h

Referenced by ReadConfigs(), ReadEntropyDist(), and ReadNbcDist().

int InitialFromFile::dim_y_
private

Definition at line 90 of file InitialFromFile.h.

View newest version in sPHENIX GitHub at line 90 of file InitialFromFile.h

Referenced by ReadConfigs(), ReadEntropyDist(), and ReadNbcDist().

HydroinfoH5* InitialFromFile::h5_helper_
private

want to use auxiliary hdf5 file readers

Definition at line 88 of file InitialFromFile.h.

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

Referenced by InitialFromFile(), ReadConfigs(), and ~InitialFromFile().

hid_t InitialFromFile::H5file_ptr_
private

Definition at line 69 of file InitialFromFile.h.

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

Referenced by Exec().

hid_t InitialFromFile::H5group_ptr_
private

Definition at line 76 of file InitialFromFile.h.

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

Referenced by Exec(), ReadConfigs(), ReadEntropyDist(), and ReadNbcDist().

double InitialFromFile::ncoll = -1
private

Definition at line 93 of file InitialFromFile.h.

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

Referenced by ReadConfigs().

double InitialFromFile::npart = -1
private

Definition at line 92 of file InitialFromFile.h.

View newest version in sPHENIX GitHub at line 92 of file InitialFromFile.h

Referenced by ReadConfigs().

RegisterJetScapeModule< InitialFromFile > InitialFromFile::reg
staticprivate

Definition at line 97 of file InitialFromFile.h.

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

double InitialFromFile::totalentropy = -1
private

Definition at line 94 of file InitialFromFile.h.

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

Referenced by ReadConfigs().


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