Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/offline/packages/trackreco/PHSimpleVertexFinder.h>
Public Member Functions | |
PHSimpleVertexFinder (const std::string &name="PHSimpleVertexFinder") | |
Tracking includes. | |
~PHSimpleVertexFinder () 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 | setBeamLineCut (const double cut) |
void | setDcaCut (const double cut) |
void | setTrackQualityCut (double cut) |
void | setRequireMVTX (bool set) |
void | setNmvtxRequired (unsigned int n) |
void | setOutlierPairCut (const double cut) |
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 Types | |
using | matrix_t = Eigen::Matrix< double, 3, 3 > |
Private Member Functions | |
int | GetNodes (PHCompositeNode *topNode) |
int | CreateNodes (PHCompositeNode *topNode) |
void | checkDCAs () |
void | findDcaTwoTracks (SvtxTrack *tr1, SvtxTrack *tr2) |
double | dcaTwoLines (const Eigen::Vector3d &p1, const Eigen::Vector3d &v1, const Eigen::Vector3d &p2, const Eigen::Vector3d &v2, Eigen::Vector3d &PCA1, Eigen::Vector3d &PCA2) |
std::vector< std::set < unsigned int > > | findConnectedTracks () |
void | removeOutlierTrackPairs () |
double | getMedian (std::vector< double > &v) |
double | getAverage (std::vector< double > &v) |
Private Attributes | |
SvtxTrackMap * | _track_map {nullptr} |
SvtxTrack * | _track {nullptr} |
SvtxVertexMap * | _svtx_vertex_map {nullptr} |
double | _base_dcacut = 0.0080 |
double | _active_dcacut = 0.080 |
double | _beamline_xy_cut = 0.2 |
double | _qual_cut = 10.0 |
bool | _require_mvtx = true |
unsigned int | _nmvtx_required = 3 |
double | _track_pt_cut = 0.0 |
double | _outlier_cut = 0.015 |
std::multimap< unsigned int, unsigned int > | _vertex_track_map |
std::multimap< unsigned int, std::pair< unsigned int, double > > | _track_pair_map |
std::multimap< unsigned int, std::pair< unsigned int, std::pair< Eigen::Vector3d, Eigen::Vector3d > > > | _track_pair_pca_map |
std::map< unsigned int, Eigen::Vector3d > | _vertex_position_map |
std::map< unsigned int, matrix_t > | _vertex_covariance_map |
std::set< unsigned int > | _vertex_set |
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 28 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 28 of file PHSimpleVertexFinder.h
|
private |
Definition at line 77 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 77 of file PHSimpleVertexFinder.h
PHSimpleVertexFinder::PHSimpleVertexFinder | ( | const std::string & | name = "PHSimpleVertexFinder" | ) |
Tracking includes.
Definition at line 39 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 39 of file PHSimpleVertexFinder.cc
|
override |
Definition at line 46 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 46 of file PHSimpleVertexFinder.cc
|
private |
Definition at line 279 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 279 of file PHSimpleVertexFinder.cc
References _nmvtx_required, _qual_cut, _require_mvtx, _track_map, SvtxTrackMap::begin(), TrackSeed::begin_cluster_keys(), SvtxTrackMap::end(), TrackSeed::end_cluster_keys(), findDcaTwoTracks(), TrkrDefs::getTrkrId(), TrkrDefs::mvtxId, next, and Fun4AllBase::Verbosity().
Referenced by process_event().
|
private |
Check that it is there
Get the tracking subnode
Definition at line 228 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 228 of file PHSimpleVertexFinder.cc
References _svtx_vertex_map, PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, and PHNodeIterator::findFirst().
Referenced by InitRun().
|
private |
Definition at line 386 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 386 of file PHSimpleVertexFinder.cc
References b1, Acts::PhysicalConstants::c, INTTVtxZ::dca, F, G, TauVsDIS_MachineLearning_Differentiation::X, and TauVsDIS_MachineLearning_Differentiation::Y.
Referenced by findDcaTwoTracks().
|
overridevirtual |
Called at the end of all processing.
Reimplemented from SubsysReco.
Definition at line 223 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 223 of file PHSimpleVertexFinder.cc
References Fun4AllReturnCodes::EVENT_OK.
|
private |
Definition at line 444 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 444 of file PHSimpleVertexFinder.cc
References _track_pair_map, it, and Fun4AllBase::Verbosity().
Referenced by process_event().
Definition at line 342 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 342 of file PHSimpleVertexFinder.cc
References _active_dcacut, _beamline_xy_cut, _track_pair_map, _track_pair_pca_map, _track_pt_cut, KFPMath::a2, b1, INTTVtxZ::dca, dcaTwoLines(), SvtxTrack::get_id(), SvtxTrack::get_p(), SvtxTrack::get_pt(), SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), SvtxTrack::get_x(), SvtxTrack::get_y(), SvtxTrack::get_z(), and Fun4AllBase::Verbosity().
Referenced by checkDCAs().
Definition at line 662 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 662 of file PHSimpleVertexFinder.cc
References it, and Fun4AllBase::Verbosity().
Referenced by removeOutlierTrackPairs().
Definition at line 629 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 629 of file PHSimpleVertexFinder.cc
References Acts::UnitConstants::m, Acts::UnitConstants::m2, and Fun4AllBase::Verbosity().
Referenced by removeOutlierTrackPairs().
|
private |
Definition at line 264 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 264 of file PHSimpleVertexFinder.cc
References _track_map, Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, and PHWHERE.
Referenced by InitRun().
|
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 52 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 52 of file PHSimpleVertexFinder.cc
References CreateNodes(), Fun4AllReturnCodes::EVENT_OK, and GetNodes().
|
overridevirtual |
Called for each event. This is where you do the real work.
If we didn't find any matches, try again with a slightly larger DCA cut
Iterate through the tracks and assign the closest vtx id to the track position for propagating back to the vtx. Catches any tracks that were missed or were not compatible with any of the identified vertices
If there is a vertex already assigned, keep going
Reimplemented from SubsysReco.
Definition at line 62 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 62 of file PHSimpleVertexFinder.cc
References _active_dcacut, _base_dcacut, _svtx_vertex_map, _track_map, _track_pair_map, _track_pair_pca_map, _vertex_covariance_map, _vertex_position_map, _vertex_set, _vertex_track_map, checkDCAs(), SvtxVertexMap::clear(), Acts::Test::cov, dz, Fun4AllReturnCodes::EVENT_OK, findConnectedTracks(), SvtxVertexMap::get(), SvtxTrackMap::get(), i, SvtxVertexMap::insert(), it, j, PHWHERE, Acts::Test::pos, removeOutlierTrackPairs(), SvtxTrack::set_vertex_id(), SvtxTrackMap::size(), and Fun4AllBase::Verbosity().
|
private |
Definition at line 504 of file PHSimpleVertexFinder.cc.
View newest version in sPHENIX GitHub at line 504 of file PHSimpleVertexFinder.cc
References _outlier_cut, _track_pair_pca_map, _vertex_position_map, _vertex_set, _vertex_track_map, getAverage(), getMedian(), it, Fun4AllBase::Verbosity(), vx, vy, and vz.
Referenced by process_event().
|
inline |
Definition at line 39 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 39 of file PHSimpleVertexFinder.h
References _beamline_xy_cut.
|
inline |
Definition at line 40 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 40 of file PHSimpleVertexFinder.h
References _base_dcacut.
|
inline |
Definition at line 43 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 43 of file PHSimpleVertexFinder.h
References _nmvtx_required, and n.
|
inline |
Definition at line 45 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 45 of file PHSimpleVertexFinder.h
References _outlier_cut.
|
inline |
Definition at line 42 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 42 of file PHSimpleVertexFinder.h
References _require_mvtx.
|
inline |
Definition at line 41 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 41 of file PHSimpleVertexFinder.h
References _qual_cut.
|
private |
Definition at line 68 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 68 of file PHSimpleVertexFinder.h
Referenced by findDcaTwoTracks(), and process_event().
|
private |
Definition at line 67 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 67 of file PHSimpleVertexFinder.h
Referenced by process_event(), and setDcaCut().
|
private |
Definition at line 69 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 69 of file PHSimpleVertexFinder.h
Referenced by findDcaTwoTracks(), and setBeamLineCut().
|
private |
Definition at line 72 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 72 of file PHSimpleVertexFinder.h
Referenced by checkDCAs(), and setNmvtxRequired().
|
private |
Definition at line 74 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 74 of file PHSimpleVertexFinder.h
Referenced by removeOutlierTrackPairs(), and setOutlierPairCut().
|
private |
Definition at line 70 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 70 of file PHSimpleVertexFinder.h
Referenced by checkDCAs(), and setTrackQualityCut().
|
private |
Definition at line 71 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 71 of file PHSimpleVertexFinder.h
Referenced by checkDCAs(), and setRequireMVTX().
|
private |
Definition at line 65 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 65 of file PHSimpleVertexFinder.h
Referenced by CreateNodes(), and process_event().
|
private |
Definition at line 64 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 64 of file PHSimpleVertexFinder.h
|
private |
Definition at line 63 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 63 of file PHSimpleVertexFinder.h
Referenced by checkDCAs(), GetNodes(), and process_event().
|
private |
Definition at line 78 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 78 of file PHSimpleVertexFinder.h
Referenced by findConnectedTracks(), findDcaTwoTracks(), and process_event().
|
private |
Definition at line 81 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 81 of file PHSimpleVertexFinder.h
Referenced by findDcaTwoTracks(), process_event(), and removeOutlierTrackPairs().
|
private |
Definition at line 73 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 73 of file PHSimpleVertexFinder.h
Referenced by findDcaTwoTracks().
|
private |
Definition at line 83 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 83 of file PHSimpleVertexFinder.h
Referenced by process_event().
|
private |
Definition at line 82 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 82 of file PHSimpleVertexFinder.h
Referenced by process_event(), and removeOutlierTrackPairs().
|
private |
Definition at line 84 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 84 of file PHSimpleVertexFinder.h
Referenced by process_event(), and removeOutlierTrackPairs().
|
private |
Definition at line 76 of file PHSimpleVertexFinder.h.
View newest version in sPHENIX GitHub at line 76 of file PHSimpleVertexFinder.h
Referenced by process_event(), and removeOutlierTrackPairs().