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

#include <coresoftware/blob/master/simulation/g4simulation/g4main/ReadEICFiles.h>

+ Inheritance diagram for ReadEICFiles:
+ Collaboration diagram for ReadEICFiles:

Public Member Functions

 ReadEICFiles (const std::string &name="EICReader")
 
 ~ReadEICFiles () override
 
int Init (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
bool OpenInputFile (const std::string &name)
 
void SetFirstEntry (int e)
 
void SetNodeName (const std::string &s)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int End (PHCompositeNode *)
 Called at the end of all processing.
 
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_*()
 
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 ()
 

Private Types

enum  EvtGen { Milou = 1, DEMP = 2, Unknown = 100 }
 

Private Member Functions

void GetTree ()
 
int CreateNodeTree (PHCompositeNode *topNode)
 

Private Attributes

std::string filename
 
TChain * Tin
 
int nEntries
 
int entry
 
int m_EvtGenId
 
erhic::EventMC * GenEvent
 
std::string _node_name
 

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 20 of file ReadEICFiles.h.

View newest version in sPHENIX GitHub at line 20 of file ReadEICFiles.h

Member Enumeration Documentation

enum ReadEICFiles::EvtGen
private
Enumerator:
Milou 
DEMP 
Unknown 

Definition at line 44 of file ReadEICFiles.h.

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

Constructor & Destructor Documentation

ReadEICFiles::ReadEICFiles ( const std::string &  name = "EICReader")

Definition at line 45 of file ReadEICFiles.cc.

View newest version in sPHENIX GitHub at line 45 of file ReadEICFiles.cc

References PHHepMCGenHelper::set_embedding_id().

+ Here is the call graph for this function:

ReadEICFiles::~ReadEICFiles ( )
override

Definition at line 61 of file ReadEICFiles.cc.

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

References Tin.

Member Function Documentation

int ReadEICFiles::CreateNodeTree ( PHCompositeNode topNode)
private

Creade node on node tree

Definition at line 365 of file ReadEICFiles.cc.

View newest version in sPHENIX GitHub at line 365 of file ReadEICFiles.cc

References Fun4AllReturnCodes::ABORTRUN, PHCompositeNode::addNode(), PHHepMCGenHelper::create_node_tree(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), and PHWHERE.

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ReadEICFiles::GetTree ( )
private

Get tree from input file

Definition at line 79 of file ReadEICFiles.cc.

View newest version in sPHENIX GitHub at line 79 of file ReadEICFiles.cc

References GenEvent, m_EvtGenId, nEntries, Tin, and Fun4AllBase::Verbosity().

Referenced by OpenInputFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ReadEICFiles::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 103 of file ReadEICFiles.cc.

View newest version in sPHENIX GitHub at line 103 of file ReadEICFiles.cc

References CreateNodeTree().

+ Here is the call graph for this function:

bool ReadEICFiles::OpenInputFile ( const std::string &  name)

Specify name of input file to open

Definition at line 68 of file ReadEICFiles.cc.

View newest version in sPHENIX GitHub at line 68 of file ReadEICFiles.cc

References filename, GetTree(), and Tin.

Referenced by Fun4All_FileSplit(), Fun4All_Generator_Display(), and InputRegister().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ReadEICFiles::process_event ( PHCompositeNode )
overridevirtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

Definition at line 110 of file ReadEICFiles.cc.

View newest version in sPHENIX GitHub at line 110 of file ReadEICFiles.cc

References Fun4AllReturnCodes::ABORTRUN, entry, filename, GenEvent, PHHepMCGenHelper::insert_event(), m, m_EvtGenId, nEntries, G4InuclParticleNames::pp, EicEventHeader::set_demp_weight(), EicEventHeader::set_eventgenerator_type(), EicEventHeader::set_milou_trueQ2(), EicEventHeader::set_milou_trueX(), EicEventHeader::set_milou_weight(), Tin, v, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void ReadEICFiles::SetFirstEntry ( int  e)
inline

Set first entry from input tree to be used

Definition at line 33 of file ReadEICFiles.h.

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

References e, and entry.

Referenced by Fun4All_FileSplit(), Fun4All_G4_ECCEModular(), Fun4All_G4_EICDetector(), and Fun4All_G4_EICDetector_AnaTutorial().

+ Here is the caller graph for this function:

void ReadEICFiles::SetNodeName ( const std::string &  s)
inline

Set name of output node

Definition at line 35 of file ReadEICFiles.h.

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

References _node_name.

Member Data Documentation

std::string ReadEICFiles::_node_name
private

Definition at line 72 of file ReadEICFiles.h.

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

Referenced by SetNodeName().

int ReadEICFiles::entry
private

Number of current event being used from input tree

Definition at line 61 of file ReadEICFiles.h.

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

Referenced by process_event(), and SetFirstEntry().

std::string ReadEICFiles::filename
private

Name of file containing input tree

Definition at line 52 of file ReadEICFiles.h.

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

Referenced by OpenInputFile(), and process_event().

erhic::EventMC* ReadEICFiles::GenEvent
private

Pinter to event record in tree (= branch). Use 'abstract' EventMC class pointer from which all event types (erhic::EventMilou etc) inherit from.

Definition at line 69 of file ReadEICFiles.h.

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

Referenced by GetTree(), and process_event().

int ReadEICFiles::m_EvtGenId
private

Event Generator id

Definition at line 64 of file ReadEICFiles.h.

View newest version in sPHENIX GitHub at line 64 of file ReadEICFiles.h

Referenced by GetTree(), and process_event().

int ReadEICFiles::nEntries
private

Number of events in input tree

Definition at line 58 of file ReadEICFiles.h.

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

Referenced by GetTree(), and process_event().

TChain* ReadEICFiles::Tin
private

Input tree created with eic-smear tree builder

Definition at line 55 of file ReadEICFiles.h.

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

Referenced by GetTree(), OpenInputFile(), process_event(), and ~ReadEICFiles().


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