Analysis Software
Documentation for sPHENIX simulation software
|
#include <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::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 | |
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 |
ActsGeometry * | 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 = std::numeric_limits<int>::max() - 10 } |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
Definition at line 40 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 40 of file DSTEmulator.h
|
private |
Definition at line 110 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 110 of file DSTEmulator.h
|
private |
Definition at line 71 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 71 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 443 of file DSTEmulator.cc.
View newest version in sPHENIX GitHub at line 443 of file DSTEmulator.cc
|
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().
|
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().
|
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.
|
private |
evaluate tracks
Definition at line 634 of file DSTEmulator.cc.
View newest version in sPHENIX GitHub at line 634 of file DSTEmulator.cc
References _dst_data, apply_compression, TrackEvaluationContainerv1::clearTracks(), Acts::UnitConstants::cm, compress_dx(), compress_dy(), configureMap::data, TrkrClusterContainer::findCluster(), PHFlag::FlagExist(), ActsGeometry::geometry(), get_embed(), PHFlag::get_IntFlag(), get_max_contributor(), QAG4Util::get_r(), ActsTrackingGeometry::getGeoContext(), getGlobalPosition(), TrkrDefs::getHitSetKeyFromClusKey(), TrkrDefs::getLayer(), PHG4TruthInfoContainer::GetParticle(), TrkrDefs::getTrkrId(), train_ambiguity_solver::id, recoConsts::instance(), layer, m_cluster_map, m_container, m_g4truthinfo, m_tGeometry, ActsSurfaceMaps::m_tpcSurfaceMap, m_track_map, ActsGeometry::maps(), PHWHERE, rnd, round(), sabotage, writeMapConfig::surface, TrkrDefs::tpcId, and TrackEvaluationContainerv1::tracks().
Referenced by process_event().
|
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().
|
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().
|
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().
|
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().
|
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.
|
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.
|
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().
|
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().
|
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().
|
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().
|
private |
Definition at line 120 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 120 of file DSTEmulator.h
|
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 |
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().
|
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().
|
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().
|
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().
|
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().
|
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 |
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 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 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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
private |
Definition at line 114 of file DSTEmulator.h.
View newest version in sPHENIX GitHub at line 114 of file DSTEmulator.h
|
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().
|
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().
|
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().