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

#include <coresoftware/blob/master/simulation/g4simulation/g4eval/DSTEmulator.h>

+ Inheritance diagram for DSTEmulator:
+ Collaboration diagram for DSTEmulator:

Public Member Functions

 DSTEmulator (const std::string &="DSTEmulator", const std::string &filename="DSTana.root", int nBits=8, int sabotage=0, bool compress=true)
 constructor
 
int Init (PHCompositeNode *) override
 global initialization
 
int InitRun (PHCompositeNode *) override
 run initialization
 
int process_event (PHCompositeNode *) override
 event processing
 
int End (PHCompositeNode *) override
 end of processing
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
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.
 

Private Types

using G4HitSet = std::set< PHG4Hit * >
 
using G4HitMap = std::map< TrkrDefs::cluskey, G4HitSet >
 

Private Member Functions

int load_nodes (PHCompositeNode *)
 load nodes
 
void evaluate_tracks ()
 evaluate tracks
 
float compress_dx (float in_val)
 
float compress_dy (float in_val)
 
G4HitSet find_g4hits (TrkrDefs::cluskey) const
 
Acts::Vector3 getGlobalPosition (TrkrDefs::cluskey, TrkrCluster *) const
 
std::pair< int, int > get_max_contributor (SvtxTrack *) const
 get G4Particle id of max contributor to a given track
 
int get_embed (PHG4Particle *) const
 get embedded id for given g4track
 

Private Attributes

TrackEvaluationContainerv1m_container = nullptr
 evaluation node
 
TrkrHitSetContainerm_hitsetcontainer = nullptr
 hits
 
TrkrClusterContainerm_cluster_map = nullptr
 clusters
 
TrkrClusterHitAssocm_cluster_hit_map = nullptr
 cluster to hit association
 
TrkrHitTruthAssocm_hit_truth_map = nullptr
 hit to truth association
 
SvtxTrackMapm_track_map = nullptr
 tracks
 
PHG4TruthInfoContainerm_g4truthinfo = nullptr
 truth information
 
G4HitMap m_g4hit_map
 
ActsGeometrym_tGeometry = nullptr
 
ActsTransformations m_transform
 
TNtuple * _dst_data {}
 
std::string _filename
 
TFile * _tfile
 
DSTCompressorm_compressor {}
 
int nBits = 8
 
int sabotage = 0
 
TRandom rnd
 
bool apply_compression = true
 
geant4 hits
PHG4HitContainerm_g4hits_tpc = nullptr
 
PHG4HitContainerm_g4hits_intt = nullptr
 
PHG4HitContainerm_g4hits_mvtx = nullptr
 
PHG4HitContainerm_g4hits_micromegas = nullptr
 

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
}
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

Definition at line 40 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 40 of file DSTEmulator.h

Member Typedef Documentation

using DSTEmulator::G4HitMap = std::map<TrkrDefs::cluskey, G4HitSet>
private

Definition at line 110 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 110 of file DSTEmulator.h

Definition at line 71 of file DSTEmulator.h.

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

Constructor & Destructor Documentation

DSTEmulator::DSTEmulator ( const std::string &  name = "DSTEmulator",
const std::string &  filename = "DSTana.root",
int  nBits = 8,
int  sabotage = 0,
bool  compress = true 
)

constructor

Definition at line 443 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 443 of file DSTEmulator.cc

Member Function Documentation

float DSTEmulator::compress_dx ( float  in_val)
private

Definition at line 924 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 924 of file DSTEmulator.cc

References DSTCompressor::compressPhi(), DSTCompressor::decompressPhi(), and m_compressor.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float DSTEmulator::compress_dy ( float  in_val)
private

Definition at line 932 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 932 of file DSTEmulator.cc

References DSTCompressor::compressZ(), DSTCompressor::decompressZ(), and m_compressor.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DSTEmulator::End ( PHCompositeNode )
overridevirtual

end of processing

Reimplemented from SubsysReco.

Definition at line 553 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 553 of file DSTEmulator.cc

References _dst_data, _tfile, and Fun4AllReturnCodes::EVENT_OK.

void DSTEmulator::evaluate_tracks ( )
private
DSTEmulator::G4HitSet DSTEmulator::find_g4hits ( TrkrDefs::cluskey  cluster_key) const
private

Definition at line 940 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 940 of file DSTEmulator.cc

References PHG4HitContainer::findHit(), TrkrHitTruthAssoc::getG4Hits(), TrkrClusterHitAssoc::getHits(), TrkrDefs::getHitSetKeyFromClusKey(), TrkrDefs::getTrkrId(), TrkrDefs::inttId, m_cluster_hit_map, m_g4hit_map, m_g4hits_intt, m_g4hits_micromegas, m_g4hits_mvtx, m_g4hits_tpc, m_hit_truth_map, TrkrDefs::micromegasId, testing::internal::move(), TrkrDefs::mvtxId, out, and TrkrDefs::tpcId.

Referenced by get_max_contributor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DSTEmulator::get_embed ( PHG4Particle particle) const
private

get embedded id for given g4track

Definition at line 1064 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 1064 of file DSTEmulator.cc

References PHG4Particle::get_primary_id(), PHG4TruthInfoContainer::isEmbeded(), and m_g4truthinfo.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::pair< int, int > DSTEmulator::get_max_contributor ( SvtxTrack track) const
private

get G4Particle id of max contributor to a given track

Definition at line 1020 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 1020 of file DSTEmulator.cc

References SvtxTrack::begin_cluster_keys(), SvtxTrack::end_cluster_keys(), find_g4hits(), m_cluster_map, m_g4truthinfo, and m_track_map.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Acts::Vector3 DSTEmulator::getGlobalPosition ( TrkrDefs::cluskey  key,
TrkrCluster cluster 
) const
private

Definition at line 562 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 562 of file DSTEmulator.cc

References ActsGeometry::getGlobalPosition(), and m_tGeometry.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DSTEmulator::Init ( PHCompositeNode topNode)
overridevirtual

global initialization

Reimplemented from SubsysReco.

Definition at line 455 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 455 of file DSTEmulator.cc

References _dst_data, _filename, _tfile, Fun4AllReturnCodes::ABORTEVENT, Acts::UnitConstants::e, Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), m_compressor, and nBits.

+ Here is the call graph for this function:

int DSTEmulator::InitRun ( PHCompositeNode )
overridevirtual

run initialization

Reimplemented from SubsysReco.

Definition at line 514 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 514 of file DSTEmulator.cc

References Fun4AllReturnCodes::EVENT_OK.

int DSTEmulator::load_nodes ( PHCompositeNode topNode)
private

load nodes

Definition at line 575 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 575 of file DSTEmulator.cc

References Fun4AllReturnCodes::EVENT_OK, m_cluster_hit_map, m_cluster_map, m_container, m_g4hits_intt, m_g4hits_micromegas, m_g4hits_mvtx, m_g4hits_tpc, m_g4truthinfo, m_hit_truth_map, m_hitsetcontainer, m_track_map, and TrkrClusterContainer::size().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DSTEmulator::process_event ( PHCompositeNode topNode)
overridevirtual

event processing

Reimplemented from SubsysReco.

Definition at line 520 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 520 of file DSTEmulator.cc

References Fun4AllReturnCodes::ABORTRUN, evaluate_tracks(), Fun4AllReturnCodes::EVENT_OK, load_nodes(), m_container, m_g4hit_map, m_tGeometry, PHWHERE, and TrackEvaluationContainerv1::Reset().

+ Here is the call graph for this function:

Member Data Documentation

TNtuple* DSTEmulator::_dst_data {}
private

Definition at line 116 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 116 of file DSTEmulator.h

Referenced by End(), evaluate_tracks(), and Init().

std::string DSTEmulator::_filename
private

Definition at line 119 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 119 of file DSTEmulator.h

Referenced by Init().

TFile* DSTEmulator::_tfile
private

Definition at line 120 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 120 of file DSTEmulator.h

Referenced by End(), and Init().

bool DSTEmulator::apply_compression = true
private

Definition at line 131 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 131 of file DSTEmulator.h

Referenced by evaluate_tracks().

TrkrClusterHitAssoc* DSTEmulator::m_cluster_hit_map = nullptr
private

cluster to hit association

Definition at line 90 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and load_nodes().

TrkrClusterContainer* DSTEmulator::m_cluster_map = nullptr
private

clusters

Definition at line 87 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 87 of file DSTEmulator.h

Referenced by evaluate_tracks(), get_max_contributor(), and load_nodes().

DSTCompressor* DSTEmulator::m_compressor {}
private

Definition at line 122 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 122 of file DSTEmulator.h

Referenced by compress_dx(), compress_dy(), and Init().

TrackEvaluationContainerv1* DSTEmulator::m_container = nullptr
private

evaluation node

Definition at line 81 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 81 of file DSTEmulator.h

Referenced by evaluate_tracks(), load_nodes(), and process_event().

G4HitMap DSTEmulator::m_g4hit_map
mutableprivate

Definition at line 111 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 111 of file DSTEmulator.h

Referenced by find_g4hits(), and process_event().

PHG4HitContainer* DSTEmulator::m_g4hits_intt = nullptr
private

Definition at line 101 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 101 of file DSTEmulator.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* DSTEmulator::m_g4hits_micromegas = nullptr
private

Definition at line 103 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 103 of file DSTEmulator.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* DSTEmulator::m_g4hits_mvtx = nullptr
private

Definition at line 102 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 102 of file DSTEmulator.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* DSTEmulator::m_g4hits_tpc = nullptr
private

Definition at line 100 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and load_nodes().

PHG4TruthInfoContainer* DSTEmulator::m_g4truthinfo = nullptr
private

truth information

Definition at line 107 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 107 of file DSTEmulator.h

Referenced by evaluate_tracks(), get_embed(), get_max_contributor(), and load_nodes().

TrkrHitTruthAssoc* DSTEmulator::m_hit_truth_map = nullptr
private

hit to truth association

Definition at line 93 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and load_nodes().

TrkrHitSetContainer* DSTEmulator::m_hitsetcontainer = nullptr
private

hits

Definition at line 84 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 84 of file DSTEmulator.h

Referenced by load_nodes().

ActsGeometry* DSTEmulator::m_tGeometry = nullptr
private

Definition at line 113 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 113 of file DSTEmulator.h

Referenced by evaluate_tracks(), getGlobalPosition(), and process_event().

SvtxTrackMap* DSTEmulator::m_track_map = nullptr
private

tracks

Definition at line 96 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 96 of file DSTEmulator.h

Referenced by evaluate_tracks(), get_max_contributor(), and load_nodes().

ActsTransformations DSTEmulator::m_transform
private

Definition at line 114 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 114 of file DSTEmulator.h

int DSTEmulator::nBits = 8
private

Definition at line 125 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 125 of file DSTEmulator.h

Referenced by Init().

TRandom DSTEmulator::rnd
private

Definition at line 129 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 129 of file DSTEmulator.h

Referenced by evaluate_tracks().

int DSTEmulator::sabotage = 0
private

Definition at line 127 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 127 of file DSTEmulator.h

Referenced by evaluate_tracks().


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