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

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

+ Inheritance diagram for PHActsVertexFitter:
+ Collaboration diagram for PHActsVertexFitter:

Public Member Functions

 PHActsVertexFitter (const std::string &name="PHActsVertexFitter")
 Tracking includes.
 
 ~PHActsVertexFitter () override
 
int process_event (PHCompositeNode *topNode) override
 
int Init (PHCompositeNode *topNode) override
 
int InitRun (PHCompositeNode *topNode) override
 
int ResetEvent (PHCompositeNode *topNode) override
 Clean up after each event.
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void updateSvtxVertexMap (bool updateSvtxVertexMap)
 
- 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.
 
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)
 
int createNodes (PHCompositeNode *topNode)
 
VertexTrackMap getTracks ()
 Get the tracks with their associated vertex Ids.
 
const Acts::BoundTrackParametersmakeTrackParam (const SvtxTrack *track) const
 Turn the SvtxTrack object into an Acts::TrackParameters object.
 
ActsVertex fitVertex (BoundTrackParamVec tracks, Acts::Logging::Level logLevel) const
 Run the Acts vertex fitter.
 
void fitVertices (std::vector< const Acts::BoundTrackParameters * > tracks)
 Runs Acts vertex fitter.
 
void createActsSvtxVertex (const unsigned int, ActsVertex vertex)
 Update SvtxVertex or create new SvtxVertexMap.
 
void updateSvtxVertex (const unsigned int, ActsVertex vertex)
 

Private Attributes

int m_event = 0
 
std::map< const unsigned int,
Trajectory > * 
m_actsFitResults
 
ActsTrackingGeometrym_tGeometry
 
SvtxTrackMapm_trackMap = nullptr
 
SvtxVertexMapm_vertexMap = nullptr
 
SvtxVertexMapm_actsVertexMap = nullptr
 
bool m_updateSvtxVertexMap = 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

This class runs the Acts vertex fitter on the final tracks. It is required that the tracks already have an identified vertexId associated to them, i.e. that vertex finding has already been performed

Definition at line 35 of file PHActsVertexFitter.h.

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

Constructor & Destructor Documentation

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

Tracking includes.

Definition at line 42 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 42 of file PHActsVertexFitter.cc

PHActsVertexFitter::~PHActsVertexFitter ( )
inlineoverride

Definition at line 39 of file PHActsVertexFitter.h.

View newest version in sPHENIX GitHub at line 39 of file PHActsVertexFitter.h

Member Function Documentation

void PHActsVertexFitter::createActsSvtxVertex ( const unsigned int  vertexId,
ActsVertex  vertex 
)
private

Update SvtxVertex or create new SvtxVertexMap.

Definition at line 139 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 139 of file PHActsVertexFitter.cc

References Acts::UnitConstants::cm, Acts::UnitConstants::cm2, Acts::Vertex< input_track_t >::covariance(), Acts::Vertex< input_track_t >::fitQuality(), SvtxVertexMap::insert(), m_actsVertexMap, Acts::Vertex< input_track_t >::position(), Acts::Vertex< input_track_t >::time(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHActsVertexFitter::createNodes ( PHCompositeNode topNode)
private

Definition at line 372 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 372 of file PHActsVertexFitter.cc

References PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), and m_actsVertexMap.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHActsVertexFitter::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 57 of file PHActsVertexFitter.cc.

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

References Fun4AllReturnCodes::EVENT_OK, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

ActsVertex PHActsVertexFitter::fitVertex ( BoundTrackParamVec  tracks,
Acts::Logging::Level  logLevel 
) const
private

Run the Acts vertex fitter.

Determine the input mag field type from the initial geometry created in MakeActsGeometry

Setup aliases

Create necessary templated inputs for Acts vertex fitter

Can add a vertex fitting constraint as an option, if desired

Call the fitter and get the result

end std::visit call

Definition at line 176 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 176 of file PHActsVertexFitter.cc

References Acts::IntegrationTest::bField, ActsTrackingGeometry::geoContext, Acts::getDefaultLogger(), m_tGeometry, ActsTrackingGeometry::magField, ActsTrackingGeometry::magFieldContext, Acts::Vertex< input_track_t >::position(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHActsVertexFitter::fitVertices ( std::vector< const Acts::BoundTrackParameters * >  tracks)
private

Runs Acts vertex fitter.

int PHActsVertexFitter::getNodes ( PHCompositeNode topNode)
private

Definition at line 333 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 333 of file PHActsVertexFitter.cc

References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, m_actsFitResults, m_tGeometry, m_trackMap, m_vertexMap, and PHWHERE.

Referenced by InitRun().

+ Here is the caller graph for this function:

VertexTrackMap PHActsVertexFitter::getTracks ( )
private

Get the tracks with their associated vertex Ids.

Definition at line 250 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 250 of file PHActsVertexFitter.cc

References ActsTrackingGeometry::geoContext, m_tGeometry, m_trackMap, makeTrackParam(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHActsVertexFitter::Init ( PHCompositeNode )
overridevirtual

Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).

Reimplemented from SubsysReco.

Definition at line 49 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 49 of file PHActsVertexFitter.cc

References Fun4AllReturnCodes::EVENT_OK, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHActsVertexFitter::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 71 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 71 of file PHActsVertexFitter.cc

References Fun4AllReturnCodes::ABORTRUN, createNodes(), Fun4AllReturnCodes::EVENT_OK, and getNodes().

+ Here is the call graph for this function:

const Acts::BoundTrackParameters * PHActsVertexFitter::makeTrackParam ( const SvtxTrack track) const
private

Turn the SvtxTrack object into an Acts::TrackParameters object.

Definition at line 297 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 297 of file PHActsVertexFitter.cc

References Acts::UnitConstants::cm, Acts::Test::cov, Acts::UnitConstants::e, ActsTrackingGeometry::geoContext, SvtxTrack::get_charge(), SvtxTrack::get_error(), SvtxTrack::get_p(), SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), SvtxTrack::get_x(), SvtxTrack::get_y(), SvtxTrack::get_z(), m_tGeometry, Acts::UnitConstants::ns, and p.

Referenced by getTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHActsVertexFitter::process_event ( PHCompositeNode )
overridevirtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

Definition at line 82 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 82 of file PHActsVertexFitter.cc

References createActsSvtxVertex(), Fun4AllReturnCodes::EVENT_OK, Acts::Logging::FATAL, fitVertex(), getTracks(), m_event, m_updateSvtxVertexMap, updateSvtxVertex(), Acts::Logging::VERBOSE, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHActsVertexFitter::ResetEvent ( PHCompositeNode )
overridevirtual

Clean up after each event.

Reimplemented from SubsysReco.

Definition at line 64 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 64 of file PHActsVertexFitter.cc

References SvtxVertexMap::clear(), Fun4AllReturnCodes::EVENT_OK, and m_actsVertexMap.

+ Here is the call graph for this function:

void PHActsVertexFitter::updateSvtxVertex ( const unsigned int  vertexId,
ActsVertex  vertex 
)
private

Definition at line 112 of file PHActsVertexFitter.cc.

View newest version in sPHENIX GitHub at line 112 of file PHActsVertexFitter.cc

References Acts::UnitConstants::cm, Acts::UnitConstants::cm2, Acts::Vertex< input_track_t >::covariance(), Acts::Vertex< input_track_t >::fitQuality(), SvtxVertexMap::get(), m_vertexMap, Acts::Vertex< input_track_t >::position(), SvtxVertex::set_x(), Acts::Vertex< input_track_t >::time(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHActsVertexFitter::updateSvtxVertexMap ( bool  updateSvtxVertexMap)
inline

Definition at line 46 of file PHActsVertexFitter.h.

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

References m_updateSvtxVertexMap.

Member Data Documentation

std::map<const unsigned int, Trajectory>* PHActsVertexFitter::m_actsFitResults
private

Definition at line 76 of file PHActsVertexFitter.h.

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

Referenced by getNodes().

SvtxVertexMap* PHActsVertexFitter::m_actsVertexMap = nullptr
private

Definition at line 80 of file PHActsVertexFitter.h.

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

Referenced by createActsSvtxVertex(), createNodes(), and ResetEvent().

int PHActsVertexFitter::m_event = 0
private

Definition at line 74 of file PHActsVertexFitter.h.

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

Referenced by process_event().

ActsTrackingGeometry* PHActsVertexFitter::m_tGeometry
private

Definition at line 77 of file PHActsVertexFitter.h.

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

Referenced by fitVertex(), getNodes(), getTracks(), and makeTrackParam().

SvtxTrackMap* PHActsVertexFitter::m_trackMap = nullptr
private

Definition at line 78 of file PHActsVertexFitter.h.

View newest version in sPHENIX GitHub at line 78 of file PHActsVertexFitter.h

Referenced by getNodes(), and getTracks().

bool PHActsVertexFitter::m_updateSvtxVertexMap = false
private

Option to update the default SvtxVertexMap. A new SvtxVertexMap called SvtxVertexMapActs is created by default in the module

Definition at line 84 of file PHActsVertexFitter.h.

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

Referenced by process_event(), and updateSvtxVertexMap().

SvtxVertexMap* PHActsVertexFitter::m_vertexMap = nullptr
private

Definition at line 79 of file PHActsVertexFitter.h.

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

Referenced by getNodes(), and updateSvtxVertex().


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