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

#include <fun4all_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::Vector3D getGlobalPosition (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
 
ActsSurfaceMapsm_surfMaps = nullptr
 
ActsTrackingGeometrym_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 = INT_MAX - 10
}
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

Definition at line 39 of file DSTEmulator.h.

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

Member Typedef Documentation

Definition at line 111 of file DSTEmulator.h.

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

using DSTEmulator::G4HitSet = std::set<PHG4Hit*>
private

Definition at line 72 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 72 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 411 of file DSTEmulator.cc.

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

Member Function Documentation

float DSTEmulator::compress_dx ( float  in_val)
private

Definition at line 884 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 884 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 892 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 892 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 518 of file DSTEmulator.cc.

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

References _dst_data, _tfile, and Fun4AllReturnCodes::EVENT_OK.

void DSTEmulator::evaluate_tracks ( )
private

evaluate tracks

Definition at line 601 of file DSTEmulator.cc.

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

References _dst_data, kdfinder::abs(), apply_compression, TrackEvaluationContainerv1::clearTracks(), Acts::UnitConstants::cm, compress_dx(), compress_dy(), data, TrkrClusterContainer::findCluster(), PHFlag::FlagExist(), ActsTrackingGeometry::geoContext, get_embed(), PHFlag::get_IntFlag(), get_max_contributor(), QAG4Util::get_r(), getGlobalPosition(), TrkrDefs::getHitSetKeyFromClusKey(), TrkrDefs::getLayer(), PHG4TruthInfoContainer::GetParticle(), TrkrDefs::getTrkrId(), recoConsts::instance(), G4TTL::layer, m_cluster_map, m_container, m_g4truthinfo, M_PI, m_surfMaps, m_tGeometry, m_track_map, PHWHERE, G4BECAL::radius, rnd, round(), sabotage, surface(), TrkrDefs::tpcId, ActsSurfaceMaps::tpcSurfaceMap, TrackEvaluationContainerv1::tracks(), and Acts::Test::world.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 900 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 900 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, TrkrDefs::mvtxId, 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 993 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 993 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 961 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 961 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::Vector3D DSTEmulator::getGlobalPosition ( TrkrCluster cluster) const
private

Definition at line 527 of file DSTEmulator.cc.

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

References ActsTransformations::getGlobalPosition(), m_surfMaps, m_tGeometry, and m_transform.

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 422 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 422 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 477 of file DSTEmulator.cc.

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

References Fun4AllReturnCodes::EVENT_OK.

int DSTEmulator::load_nodes ( PHCompositeNode topNode)
private

load nodes

Definition at line 541 of file DSTEmulator.cc.

View newest version in sPHENIX GitHub at line 541 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 481 of file DSTEmulator.cc.

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

References Fun4AllReturnCodes::ABORTRUN, evaluate_tracks(), Fun4AllReturnCodes::EVENT_OK, load_nodes(), m_container, m_g4hit_map, m_surfMaps, 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 118 of file DSTEmulator.h.

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

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

std::string DSTEmulator::_filename
private

Definition at line 121 of file DSTEmulator.h.

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

Referenced by Init().

TFile* DSTEmulator::_tfile
private

Definition at line 122 of file DSTEmulator.h.

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

Referenced by End(), and Init().

bool DSTEmulator::apply_compression = true
private

Definition at line 133 of file DSTEmulator.h.

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

Referenced by evaluate_tracks().

TrkrClusterHitAssoc* DSTEmulator::m_cluster_hit_map = nullptr
private

cluster to hit association

Definition at line 91 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and load_nodes().

TrkrClusterContainer* DSTEmulator::m_cluster_map = nullptr
private

clusters

Definition at line 88 of file DSTEmulator.h.

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

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

DSTCompressor* DSTEmulator::m_compressor
private

Definition at line 124 of file DSTEmulator.h.

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

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

TrackEvaluationContainerv1* DSTEmulator::m_container = nullptr
private

evaluation node

Definition at line 82 of file DSTEmulator.h.

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

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

G4HitMap DSTEmulator::m_g4hit_map
mutableprivate

Definition at line 112 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and process_event().

PHG4HitContainer* DSTEmulator::m_g4hits_intt = 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_micromegas = nullptr
private

Definition at line 104 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* DSTEmulator::m_g4hits_mvtx = 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_tpc = 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().

PHG4TruthInfoContainer* DSTEmulator::m_g4truthinfo = nullptr
private

truth information

Definition at line 108 of file DSTEmulator.h.

View newest version in sPHENIX GitHub at line 108 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 94 of file DSTEmulator.h.

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

Referenced by find_g4hits(), and load_nodes().

TrkrHitSetContainer* DSTEmulator::m_hitsetcontainer = nullptr
private

hits

Definition at line 85 of file DSTEmulator.h.

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

Referenced by load_nodes().

ActsSurfaceMaps* DSTEmulator::m_surfMaps = nullptr
private

Definition at line 114 of file DSTEmulator.h.

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

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

ActsTrackingGeometry* DSTEmulator::m_tGeometry = nullptr
private

Definition at line 115 of file DSTEmulator.h.

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

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

SvtxTrackMap* DSTEmulator::m_track_map = nullptr
private

tracks

Definition at line 97 of file DSTEmulator.h.

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

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

ActsTransformations DSTEmulator::m_transform
private

Definition at line 116 of file DSTEmulator.h.

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

Referenced by getGlobalPosition().

int DSTEmulator::nBits = 8
private

Definition at line 127 of file DSTEmulator.h.

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

Referenced by Init().

TRandom DSTEmulator::rnd
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().

int DSTEmulator::sabotage = 0
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().


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