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

Vertexing using truth info. More...

#include <coresoftware/blob/master/offline/packages/trackreco/PHTruthTrackSeeding.h>

+ Inheritance diagram for PHTruthTrackSeeding:
+ Collaboration diagram for PHTruthTrackSeeding:

Public Member Functions

 PHTruthTrackSeeding (const std::string &name="PHTruthTrackSeeding")
 
unsigned int get_min_clusters_per_track () const
 
void set_min_clusters_per_track (unsigned int minClustersPerTrack)
 
void set_min_layer (unsigned int minLayer)
 
void set_max_layer (unsigned int maxLayer)
 
double get_min_momentum () const
 minimal truth momentum cut
 
void set_min_momentum (double m)
 minimal truth momentum cut
 
void helicalTrackFit (const bool helicalTrackFit)
 
- Public Member Functions inherited from PHTrackSeeding
 PHTrackSeeding (const std::string &name="PHTrackSeeding")
 
 ~PHTrackSeeding () 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 set_track_map_name (const std::string &map_name)
 
void SetUseTruthClusters (bool setit)
 
void SetIteration (int iter)
 
- 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.
 

Protected Member Functions

int Setup (PHCompositeNode *topNode) override
 
int Process (PHCompositeNode *topNode) override
 
int End () override
 Called in SubsysReco::End.
 

Private Member Functions

int GetNodes (PHCompositeNode *topNode)
 fetch node pointers
 
void circleFitSeed (std::vector< TrkrDefs::cluskey > clusters, double &x, double &y, double &z, double &px, double &py, double &pz, int charge)
 
void circleFitByTaubin (std::vector< TrkrDefs::cluskey > &clusters, double &R, double &X0, double &Y0)
 
void findRoot (const double &R, const double &X0, const double &Y0, double &x, double &y)
 
void lineFit (std::vector< TrkrDefs::cluskey > &clusters, double &A, double &B)
 

Private Attributes

PHG4TruthInfoContainer_g4truth_container = nullptr
 
TrkrClusterContainerm_clusterMap = nullptr
 
PHG4HitContainerphg4hits_tpc = nullptr
 
PHG4HitContainerphg4hits_intt = nullptr
 
PHG4HitContainerphg4hits_mvtx = nullptr
 
PHG4HitContainerphg4hits_micromegas = nullptr
 
TrkrHitTruthAssochittruthassoc = nullptr
 
SvtxClusterEval_clustereval
 
unsigned int _min_clusters_per_track = 3
 
unsigned int _min_layer = 0
 
unsigned int _max_layer = 60
 
bool m_helicalTrackFit = false
 
double _min_momentum = 50e-3
 minimal truth momentum cut (GeV)
 

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 Attributes inherited from PHTrackSeeding
TrkrClusterContainer_cluster_map = nullptr
 
TrkrClusterHitAssoc_cluster_hit_map = nullptr
 
TrkrClusterIterationMapv1_iteration_map
 
int _n_iteration
 
SvtxVertexMap_vertex_map = nullptr
 
SvtxTrackMap_track_map = nullptr
 
AssocInfoContainer_assoc_container = nullptr
 
TrkrHitSetContainer_hitsets = nullptr
 
std::string _track_map_name = "SvtxTrackMap"
 
bool _use_truth_clusters = false
 

Detailed Description

Vertexing using truth info.

Definition at line 31 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 31 of file PHTruthTrackSeeding.h

Constructor & Destructor Documentation

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

Definition at line 52 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 52 of file PHTruthTrackSeeding.cc

Member Function Documentation

void PHTruthTrackSeeding::circleFitByTaubin ( std::vector< TrkrDefs::cluskey > &  clusters,
double &  R,
double &  X0,
double &  Y0 
)
private

Circle fit to a given set of data points (in 2D) This is an algebraic fit, due to Taubin, based on the journal article G. Taubin, "Estimation Of Planar Curves, Surfaces And Nonplanar Space Curves Defined By Implicit Equations, With Applications To Edge And Range Image Segmentation", IEEE Trans. PAMI, Vol. 13, pages 1115-1138, (1991) It works well whether data points are sampled along an entire circle or along a small arc. It still has a small bias and its statistical accuracy is slightly lower than that of the geometric fit (minimizing geometric distances), It provides a very good initial guess for a subsequent geometric fit. Nikolai Chernov (September 2012)

Definition at line 363 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 363 of file PHTruthTrackSeeding.cc

References A22, A33, Dy, TrkrClusterContainer::findCluster(), TrkrCluster::getX(), isfinite, m_clusterMap, weight, x, and y.

Referenced by circleFitSeed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHTruthTrackSeeding::circleFitSeed ( std::vector< TrkrDefs::cluskey clusters,
double &  x,
double &  y,
double &  z,
double &  px,
double &  py,
double &  pz,
int  charge 
)
private

0.3 conversion factor, 1.4=B field, 100 convert R from cm to m Get a very rough estimate of p

The only thing that is really needed for the propagation is the direction

Definition at line 271 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 271 of file PHTruthTrackSeeding.cc

References B(), circleFitByTaubin(), Acts::VectorHelpers::eta(), findRoot(), lineFit(), m, M_PI, phi, pt, Acts::IntegrationTest::R, and theta().

Referenced by Process().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHTruthTrackSeeding::End ( )
overrideprotectedvirtual

Called in SubsysReco::End.

Implements PHTrackSeeding.

Definition at line 264 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 264 of file PHTruthTrackSeeding.cc

void PHTruthTrackSeeding::findRoot ( const double &  R,
const double &  X0,
const double &  Y0,
double &  x,
double &  y 
)
private

Figure out which of the two roots is actually closer to the origin

Definition at line 336 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 336 of file PHTruthTrackSeeding.cc

Referenced by circleFitSeed().

+ Here is the caller graph for this function:

unsigned int PHTruthTrackSeeding::get_min_clusters_per_track ( ) const
inline

Definition at line 36 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 36 of file PHTruthTrackSeeding.h

References _min_clusters_per_track.

double PHTruthTrackSeeding::get_min_momentum ( ) const
inline

minimal truth momentum cut

Definition at line 57 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 57 of file PHTruthTrackSeeding.h

References _min_momentum.

int PHTruthTrackSeeding::GetNodes ( PHCompositeNode topNode)
private

fetch node pointers

Definition at line 220 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 220 of file PHTruthTrackSeeding.cc

References _g4truth_container, Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, g4zmq::exit(), hittruthassoc, m_clusterMap, phg4hits_intt, phg4hits_micromegas, phg4hits_mvtx, phg4hits_tpc, and PHWHERE.

Referenced by Setup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHTruthTrackSeeding::helicalTrackFit ( const bool  helicalTrackFit)
inline

Definition at line 67 of file PHTruthTrackSeeding.h.

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

References helicalTrackFit(), and m_helicalTrackFit.

Referenced by helicalTrackFit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHTruthTrackSeeding::lineFit ( std::vector< TrkrDefs::cluskey > &  clusters,
double &  A,
double &  B 
)
private

calculate slope

calculate intercept

Definition at line 312 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 312 of file PHTruthTrackSeeding.cc

References TrkrClusterContainer::findCluster(), m_clusterMap, r, and z.

Referenced by circleFitSeed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHTruthTrackSeeding::Process ( PHCompositeNode topNode)
overrideprotectedvirtual

process event interface for trackers, called in process_event. implemented in derived classes

g4 vertex id starts at 1, svtx vertex map starts at 0

Implements PHTrackSeeding.

Definition at line 73 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 73 of file PHTruthTrackSeeding.cc

References PHTrackSeeding::_assoc_container, PHTrackSeeding::_cluster_map, _clustereval, _g4truth_container, _max_layer, _min_clusters_per_track, _min_layer, _min_momentum, PHTrackSeeding::_track_map, PHTrackSeeding::_track_map_name, SvtxTrackMap::begin(), SvtxTrack::begin_cluster_keys(), SvtxClusterEval::best_cluster_by_nhit(), circleFitSeed(), SvtxTrackMap::end(), SvtxTrack::end_cluster_keys(), Fun4AllReturnCodes::EVENT_OK, g4zmq::exit(), TrkrClusterContainer::findCluster(), SvtxTrack::get_id(), PHG4Particle::get_pid(), SvtxTrack::get_pt(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4Particle::get_track_id(), SvtxTrack::get_truth_track_id(), PHG4Particle::get_vtx_id(), SvtxTrack::get_x(), SvtxTrack::get_y(), SvtxTrack::get_z(), TrkrCluster::getClusKey(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), PHG4TruthInfoContainer::GetVtx(), TrkrCluster::getX(), TrkrCluster::getY(), PHG4Particle::identify(), SvtxTrackMap::insert(), G4TTL::layer, m_helicalTrackFit, SvtxClusterEval::next_event(), particle, radius, PHG4VtxPoint::set_x(), AssocInfoContainer::SetClusterTrackAssoc(), SvtxTrackMap::size(), SvtxTrack::size_cluster_keys(), Fun4AllBase::Verbosity(), x, y, and z.

+ Here is the call graph for this function:

void PHTruthTrackSeeding::set_max_layer ( unsigned int  maxLayer)
inline

Definition at line 51 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 51 of file PHTruthTrackSeeding.h

References _max_layer.

void PHTruthTrackSeeding::set_min_clusters_per_track ( unsigned int  minClustersPerTrack)
inline

Definition at line 41 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 41 of file PHTruthTrackSeeding.h

References _min_clusters_per_track.

void PHTruthTrackSeeding::set_min_layer ( unsigned int  minLayer)
inline

Definition at line 46 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 46 of file PHTruthTrackSeeding.h

References _min_layer.

void PHTruthTrackSeeding::set_min_momentum ( double  m)
inline

minimal truth momentum cut

Definition at line 63 of file PHTruthTrackSeeding.h.

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

References _min_momentum, and m.

int PHTruthTrackSeeding::Setup ( PHCompositeNode topNode)
overrideprotectedvirtual

setup interface for trackers, called in InitRun, setup things like pointers to nodes. overrided in derived classes

Reimplemented from PHTrackSeeding.

Definition at line 57 of file PHTruthTrackSeeding.cc.

View newest version in sPHENIX GitHub at line 57 of file PHTruthTrackSeeding.cc

References _clustereval, SvtxClusterEval::do_caching(), Fun4AllReturnCodes::EVENT_OK, GetNodes(), and PHTrackSeeding::Setup().

+ Here is the call graph for this function:

Member Data Documentation

SvtxClusterEval* PHTruthTrackSeeding::_clustereval
private

Definition at line 97 of file PHTruthTrackSeeding.h.

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

Referenced by Process(), and Setup().

PHG4TruthInfoContainer* PHTruthTrackSeeding::_g4truth_container = nullptr
private

Definition at line 89 of file PHTruthTrackSeeding.h.

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

Referenced by GetNodes(), and Process().

unsigned int PHTruthTrackSeeding::_max_layer = 60
private

Definition at line 101 of file PHTruthTrackSeeding.h.

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

Referenced by Process(), and set_max_layer().

unsigned int PHTruthTrackSeeding::_min_clusters_per_track = 3
private

Definition at line 99 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 99 of file PHTruthTrackSeeding.h

Referenced by get_min_clusters_per_track(), Process(), and set_min_clusters_per_track().

unsigned int PHTruthTrackSeeding::_min_layer = 0
private

Definition at line 100 of file PHTruthTrackSeeding.h.

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

Referenced by Process(), and set_min_layer().

double PHTruthTrackSeeding::_min_momentum = 50e-3
private

minimal truth momentum cut (GeV)

Definition at line 108 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 108 of file PHTruthTrackSeeding.h

Referenced by get_min_momentum(), Process(), and set_min_momentum().

TrkrHitTruthAssoc* PHTruthTrackSeeding::hittruthassoc = nullptr
private

Definition at line 96 of file PHTruthTrackSeeding.h.

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

Referenced by GetNodes().

TrkrClusterContainer* PHTruthTrackSeeding::m_clusterMap = nullptr
private

Definition at line 90 of file PHTruthTrackSeeding.h.

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

Referenced by circleFitByTaubin(), GetNodes(), and lineFit().

bool PHTruthTrackSeeding::m_helicalTrackFit = false
private

Option to perform a helical track fit to get track parameters for truth seeded track

Definition at line 105 of file PHTruthTrackSeeding.h.

View newest version in sPHENIX GitHub at line 105 of file PHTruthTrackSeeding.h

Referenced by helicalTrackFit(), and Process().

PHG4HitContainer* PHTruthTrackSeeding::phg4hits_intt = nullptr
private

Definition at line 92 of file PHTruthTrackSeeding.h.

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

Referenced by GetNodes().

PHG4HitContainer* PHTruthTrackSeeding::phg4hits_micromegas = nullptr
private

Definition at line 94 of file PHTruthTrackSeeding.h.

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

Referenced by GetNodes().

PHG4HitContainer* PHTruthTrackSeeding::phg4hits_mvtx = nullptr
private

Definition at line 93 of file PHTruthTrackSeeding.h.

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

Referenced by GetNodes().

PHG4HitContainer* PHTruthTrackSeeding::phg4hits_tpc = nullptr
private

Definition at line 91 of file PHTruthTrackSeeding.h.

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

Referenced by GetNodes().


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