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

#include <fun4all_coresoftware/blob/master/offline/packages/trackreco/PHTruthClustering.h>

+ Inheritance diagram for PHTruthClustering:
+ Collaboration diagram for PHTruthClustering:

Public Member Functions

 PHTruthClustering (const std::string &name="PHTruthClustering")
 
 ~PHTruthClustering () override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void UsePrimaryTrackClustersOnly (bool flag)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Init (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.
 

Private Member Functions

int GetNodes (PHCompositeNode *topNode)
 fetch node pointers
 
std::map< unsigned int,
TrkrCluster * > 
all_truth_clusters (PHG4Particle *particle)
 
std::set< PHG4Hit * > all_truth_hits (PHG4Particle *particle)
 
void LayerClusterG4Hits (std::set< PHG4Hit * > truth_hits, std::vector< PHG4Hit * > &contributing_hits, std::vector< double > &contributing_hits_energy, std::vector< std::vector< double >> &contributing_hits_entry, std::vector< std::vector< double >> &contributing_hits_exit, float layer, float &x, float &y, float &z, float &t, float &e)
 
void G4ClusterSize (unsigned int layer, std::vector< std::vector< double >> contributing_hits_entry, std::vector< std::vector< double >> contributing_hits_exit, float &g4phisize, float &g4zsize)
 
float line_circle_intersection (float x[], float y[], float z[], float radius)
 
unsigned int getTpcSector (double x, double y)
 
unsigned int getAdcValue (double gedep)
 

Private Attributes

int iclus = 0
 
TrkrClusterContainer_reco_cluster_map {nullptr}
 
TrkrHitSetContainer_hitsets = {nullptr}
 
PHG4TruthInfoContainer_g4truth_container {nullptr}
 
PHG4HitContainer_g4hits_svtx {nullptr}
 
PHG4HitContainer_g4hits_mms {nullptr}
 
PHG4HitContainer_g4hits_tracker {nullptr}
 
PHG4HitContainer_g4hits_maps {nullptr}
 
PHG4CylinderCellGeomContainer_tpc_geom_container {nullptr}
 
PHG4CylinderGeomContainer_intt_geom_container {nullptr}
 
PHG4CylinderGeomContainer_mvtx_geom_container {nullptr}
 
PHG4CylinderGeomContainer_mms_geom_container {nullptr}
 
const unsigned int _nlayers_maps = 3
 
const unsigned int _nlayers_intt = 4
 
const unsigned int _nlayers_tpc = 48
 
const unsigned int _nlayers_mms = 2
 
double clus_err_rphi [57] = {0}
 
double clus_err_z [57] = {0}
 
double mvtx_clus_err_rphi = 5e-04
 
double mvtx_clus_err_z = 5e-04
 
double intt_clus_err_rphi = 25e-04
 
double intt_clus_err_z = 1.0
 
double tpc_inner_clus_err_rphi = 200e-04
 
double tpc_inner_clus_err_z = 750e-04
 
double tpc_outer_clus_err_rphi = 150e-04
 
double tpc_outer_clus_err_z = 500e-04
 
double mms_layer55_clus_err_rphi = 100e-04
 
double mms_layer55_clus_err_z = 25.0
 
double mms_layer56_clus_err_rphi = 12.5
 
double mms_layer56_clus_err_z = 200e-04
 
bool _primary_clusters_only = false
 

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 35 of file PHTruthClustering.h.

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

Constructor & Destructor Documentation

PHTruthClustering::PHTruthClustering ( const std::string &  name = "PHTruthClustering")

Definition at line 65 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 65 of file PHTruthClustering.cc

PHTruthClustering::~PHTruthClustering ( )
override

Definition at line 70 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 70 of file PHTruthClustering.cc

Member Function Documentation

std::map< unsigned int, TrkrCluster * > PHTruthClustering::all_truth_clusters ( PHG4Particle particle)
private

Definition at line 247 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 247 of file PHTruthClustering.cc

References _nlayers_intt, _nlayers_maps, _nlayers_mms, _nlayers_tpc, all_truth_hits(), clus_err_rphi, clus_err_z, cos(), DIM, G4ClusterSize(), InttDefs::genClusKey(), MvtxDefs::genClusKey(), TpcDefs::genClusKey(), MicromegasDefs::genClusterKey(), MicromegasDefs::genHitSetKey(), PHG4Particle::get_track_id(), getAdcValue(), TrkrClusterv2::getError(), getTpcSector(), iclus, G4TTL::layer, LayerClusterG4Hits(), PHWHERE, PHG4InttDefs::SEGMENTATION_PHI, TrkrClusterv2::setAdc(), TrkrClusterv2::setClusKey(), TrkrClusterv2::setError(), TrkrClusterv2::setGlobal(), TrkrClusterv2::setPosition(), TrkrClusterv2::setSize(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::set< PHG4Hit * > PHTruthClustering::all_truth_hits ( PHG4Particle particle)
private

Definition at line 929 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 929 of file PHTruthClustering.cc

References _g4hits_maps, _g4hits_mms, _g4hits_svtx, _g4hits_tracker, PHG4Particle::get_track_id(), PHG4Hit::get_trkid(), and PHG4HitContainer::getHits().

Referenced by all_truth_clusters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHTruthClustering::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 1123 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 1123 of file PHTruthClustering.cc

References Fun4AllReturnCodes::EVENT_OK.

void PHTruthClustering::G4ClusterSize ( unsigned int  layer,
std::vector< std::vector< double >>  contributing_hits_entry,
std::vector< std::vector< double >>  contributing_hits_exit,
float &  g4phisize,
float &  g4zsize 
)
private
unsigned int PHTruthClustering::getAdcValue ( double  gedep)
private

Definition at line 1039 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 1039 of file PHTruthClustering.cc

Referenced by all_truth_clusters().

+ Here is the caller graph for this function:

int PHTruthClustering::GetNodes ( PHCompositeNode topNode)
private

fetch node pointers

Definition at line 1066 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 1066 of file PHTruthClustering.cc

References _g4hits_maps, _g4hits_mms, _g4hits_svtx, _g4hits_tracker, _g4truth_container, _intt_geom_container, _mms_geom_container, _mvtx_geom_container, _reco_cluster_map, _tpc_geom_container, Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::ABORTRUN, PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), PHCompositeNode::PHCompositeNode(), and PHWHERE.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int PHTruthClustering::getTpcSector ( double  x,
double  y 
)
private

Definition at line 1032 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 1032 of file PHTruthClustering.cc

References M_PI, and phi.

Referenced by all_truth_clusters().

+ Here is the caller graph for this function:

int PHTruthClustering::InitRun ( PHCompositeNode )
overridevirtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.

Reimplemented from SubsysReco.

Definition at line 75 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 75 of file PHTruthClustering.cc

References _nlayers_intt, _nlayers_maps, _nlayers_tpc, clus_err_rphi, clus_err_z, Fun4AllReturnCodes::EVENT_OK, GetNodes(), intt_clus_err_rphi, intt_clus_err_z, G4TTL::layer, mms_layer55_clus_err_rphi, mms_layer55_clus_err_z, mms_layer56_clus_err_rphi, mms_layer56_clus_err_z, mvtx_clus_err_rphi, mvtx_clus_err_z, tpc_inner_clus_err_rphi, tpc_inner_clus_err_z, tpc_outer_clus_err_rphi, tpc_outer_clus_err_z, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void PHTruthClustering::LayerClusterG4Hits ( std::set< PHG4Hit * >  truth_hits,
std::vector< PHG4Hit * > &  contributing_hits,
std::vector< double > &  contributing_hits_energy,
std::vector< std::vector< double >> &  contributing_hits_entry,
std::vector< std::vector< double >> &  contributing_hits_exit,
float  layer,
float &  x,
float &  y,
float &  z,
float &  t,
float &  e 
)
private

Definition at line 439 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 439 of file PHTruthClustering.cc

References _nlayers_intt, _nlayers_maps, _nlayers_tpc, _tpc_geom_container, PHG4Hit::get_avg_t(), PHG4Hit::get_avg_x(), PHG4Hit::get_avg_y(), PHG4Hit::get_avg_z(), PHG4Hit::get_edep(), PHG4Hit::get_layer(), PHG4CylinderCellGeom::get_radius(), PHG4CylinderCellGeom::get_thickness(), PHG4Hit::get_x(), PHG4Hit::get_y(), PHG4Hit::get_z(), PHG4CylinderCellGeomContainer::GetLayerCellGeom(), line_circle_intersection(), boost::swap(), and Fun4AllBase::Verbosity().

Referenced by all_truth_clusters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float PHTruthClustering::line_circle_intersection ( float  x[],
float  y[],
float  z[],
float  radius 
)
private

Definition at line 996 of file PHTruthClustering.cc.

View newest version in sPHENIX GitHub at line 996 of file PHTruthClustering.cc

References Acts::UnitConstants::C, Acts::UnitConstants::e, PHWHERE, G4BECAL::radius, and t.

Referenced by LayerClusterG4Hits().

+ Here is the caller graph for this function:

void PHTruthClustering::UsePrimaryTrackClustersOnly ( bool  flag)
inline

Definition at line 45 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 45 of file PHTruthClustering.h

References _primary_clusters_only.

Member Data Documentation

PHG4HitContainer* PHTruthClustering::_g4hits_maps {nullptr}
private

Definition at line 72 of file PHTruthClustering.h.

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

Referenced by all_truth_hits(), and GetNodes().

PHG4HitContainer* PHTruthClustering::_g4hits_mms {nullptr}
private

Definition at line 70 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 70 of file PHTruthClustering.h

Referenced by all_truth_hits(), and GetNodes().

PHG4HitContainer* PHTruthClustering::_g4hits_svtx {nullptr}
private

Definition at line 69 of file PHTruthClustering.h.

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

Referenced by all_truth_hits(), and GetNodes().

PHG4HitContainer* PHTruthClustering::_g4hits_tracker {nullptr}
private

Definition at line 71 of file PHTruthClustering.h.

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

Referenced by all_truth_hits(), and GetNodes().

PHG4TruthInfoContainer* PHTruthClustering::_g4truth_container {nullptr}
private

Definition at line 67 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 67 of file PHTruthClustering.h

Referenced by GetNodes().

TrkrHitSetContainer* PHTruthClustering::_hitsets = {nullptr}
private

Definition at line 66 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 66 of file PHTruthClustering.h

Referenced by process_event().

PHG4CylinderGeomContainer* PHTruthClustering::_intt_geom_container {nullptr}
private

Definition at line 75 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 75 of file PHTruthClustering.h

Referenced by G4ClusterSize(), and GetNodes().

PHG4CylinderGeomContainer* PHTruthClustering::_mms_geom_container {nullptr}
private

Definition at line 77 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 77 of file PHTruthClustering.h

Referenced by GetNodes().

PHG4CylinderGeomContainer* PHTruthClustering::_mvtx_geom_container {nullptr}
private

Definition at line 76 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 76 of file PHTruthClustering.h

Referenced by G4ClusterSize(), and GetNodes().

const unsigned int PHTruthClustering::_nlayers_intt = 4
private

Definition at line 80 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 80 of file PHTruthClustering.h

Referenced by all_truth_clusters(), InitRun(), and LayerClusterG4Hits().

const unsigned int PHTruthClustering::_nlayers_maps = 3
private

Definition at line 79 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 79 of file PHTruthClustering.h

Referenced by all_truth_clusters(), InitRun(), and LayerClusterG4Hits().

const unsigned int PHTruthClustering::_nlayers_mms = 2
private

Definition at line 82 of file PHTruthClustering.h.

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

Referenced by all_truth_clusters().

const unsigned int PHTruthClustering::_nlayers_tpc = 48
private

Definition at line 81 of file PHTruthClustering.h.

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

Referenced by all_truth_clusters(), InitRun(), and LayerClusterG4Hits().

bool PHTruthClustering::_primary_clusters_only = false
private

Definition at line 100 of file PHTruthClustering.h.

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

Referenced by process_event(), and UsePrimaryTrackClustersOnly().

TrkrClusterContainer* PHTruthClustering::_reco_cluster_map {nullptr}
private

Definition at line 65 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 65 of file PHTruthClustering.h

Referenced by GetNodes(), and process_event().

PHG4CylinderCellGeomContainer* PHTruthClustering::_tpc_geom_container {nullptr}
private

Definition at line 74 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 74 of file PHTruthClustering.h

Referenced by G4ClusterSize(), GetNodes(), and LayerClusterG4Hits().

double PHTruthClustering::clus_err_rphi[57] = {0}
private

Definition at line 84 of file PHTruthClustering.h.

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

Referenced by all_truth_clusters(), and InitRun().

double PHTruthClustering::clus_err_z[57] = {0}
private

Definition at line 85 of file PHTruthClustering.h.

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

Referenced by all_truth_clusters(), and InitRun().

int PHTruthClustering::iclus = 0
private

Definition at line 63 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 63 of file PHTruthClustering.h

Referenced by all_truth_clusters().

double PHTruthClustering::intt_clus_err_rphi = 25e-04
private

Definition at line 89 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 89 of file PHTruthClustering.h

Referenced by InitRun().

double PHTruthClustering::intt_clus_err_z = 1.0
private

Definition at line 90 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::mms_layer55_clus_err_rphi = 100e-04
private

Definition at line 95 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 95 of file PHTruthClustering.h

Referenced by InitRun().

double PHTruthClustering::mms_layer55_clus_err_z = 25.0
private

Definition at line 96 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::mms_layer56_clus_err_rphi = 12.5
private

Definition at line 97 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::mms_layer56_clus_err_z = 200e-04
private

Definition at line 98 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 98 of file PHTruthClustering.h

Referenced by InitRun().

double PHTruthClustering::mvtx_clus_err_rphi = 5e-04
private

Definition at line 87 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::mvtx_clus_err_z = 5e-04
private

Definition at line 88 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::tpc_inner_clus_err_rphi = 200e-04
private

Definition at line 91 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::tpc_inner_clus_err_z = 750e-04
private

Definition at line 92 of file PHTruthClustering.h.

View newest version in sPHENIX GitHub at line 92 of file PHTruthClustering.h

Referenced by InitRun().

double PHTruthClustering::tpc_outer_clus_err_rphi = 150e-04
private

Definition at line 93 of file PHTruthClustering.h.

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

Referenced by InitRun().

double PHTruthClustering::tpc_outer_clus_err_z = 500e-04
private

Definition at line 94 of file PHTruthClustering.h.

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

Referenced by InitRun().


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