EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4eval/DSTEmulator.h>
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 | |
TrackEvaluationContainerv1 * | m_container = nullptr |
evaluation node | |
TrkrHitSetContainer * | m_hitsetcontainer = nullptr |
hits | |
TrkrClusterContainer * | m_cluster_map = nullptr |
clusters | |
TrkrClusterHitAssoc * | m_cluster_hit_map = nullptr |
cluster to hit association | |
TrkrHitTruthAssoc * | m_hit_truth_map = nullptr |
hit to truth association | |
SvtxTrackMap * | m_track_map = nullptr |
tracks | |
PHG4TruthInfoContainer * | m_g4truthinfo = nullptr |
truth information | |
G4HitMap | m_g4hit_map |
ActsSurfaceMaps * | m_surfMaps = nullptr |
ActsTrackingGeometry * | m_tGeometry = nullptr |
ActsTransformations | m_transform |
TNtuple * | _dst_data |
std::string | _filename |
TFile * | _tfile |
DSTCompressor * | m_compressor |
int | nBits = 8 |
int | sabotage = 0 |
TRandom | rnd |
bool | apply_compression = true |
geant4 hits | |
PHG4HitContainer * | m_g4hits_tpc = nullptr |
PHG4HitContainer * | m_g4hits_intt = nullptr |
PHG4HitContainer * | m_g4hits_mvtx = nullptr |
PHG4HitContainer * | m_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") | |
Definition at line 39 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 39 of file DSTEmulator.h
|
private |
Definition at line 111 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 111 of file DSTEmulator.h
|
private |
Definition at line 72 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 72 of file DSTEmulator.h
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
|
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().
|
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().
|
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.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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.
|
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.
|
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().
|
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().
|
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().
|
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().
|
private |
Definition at line 122 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 122 of file DSTEmulator.h
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().