Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHActsTrackProjection Class Reference

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

+ Inheritance diagram for PHActsTrackProjection:
+ Collaboration diagram for PHActsTrackProjection:

Public Types

using BoundTrackParam = const Acts::BoundTrackParameters
 
using SurfacePtr = std::shared_ptr< const Acts::Surface >
 
using Trajectory = ActsExamples::Trajectories
 
using BoundTrackParamResult = ActsPropagator::BTPPairResult
 

Public Member Functions

 PHActsTrackProjection (const std::string &name="PHActsTrackProjection")
 
int Init (PHCompositeNode *topNode) 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 useConstField (bool field)
 
void setConstFieldVal (float b)
 
void setLayerRadius (SvtxTrack::CAL_LAYER layer, const float rad)
 Set an arbitrary radius to project to, in cm.
 
- 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 Member Functions

int getNodes (PHCompositeNode *topNode)
 
int projectTracks (int caloLayer)
 
BoundTrackParamResult propagateTrack (const Acts::BoundTrackParameters &params, const int caloLayer, const SurfacePtr &targetSurf)
 Propagate the fitted track parameters to a surface with Acts.
 
int setCaloContainerNodes (PHCompositeNode *topNode, const int caloLayer)
 Set the particular calo nodes depending on which layer.
 
int makeCaloSurfacePtrs (PHCompositeNode *topNode)
 Make Acts::CylinderSurface objects corresponding to the calos.
 
void updateSvtxTrack (const ActsPropagator::BoundTrackParamPair &params, SvtxTrack *svtxTrack, const int caloLayer)
 Update the SvtxTrack object with the track-cluster match.
 
void getSquareTowerEnergies (int phiBin, int etaBin, double &energy3x3, double &energy5x5)
 Get 3x3 and 5x5 tower sums matched to a track.
 
void getClusterProperties (double phi, double eta, double &minIndex, double &minDphi, double &minDeta, double &minE)
 Get the cluster values for a particular matched track.
 
double deltaPhi (const double &phi)
 

Private Attributes

ActsGeometrym_tGeometry = nullptr
 Objects containing the Acts track fit results.
 
SvtxTrackMapm_trackMap = nullptr
 
SvtxVertexMapm_vertexMap = nullptr
 
std::vector< std::string > m_caloNames
 
std::vector< SvtxTrack::CAL_LAYERm_caloTypes
 
std::map< std::string, SurfacePtrm_caloSurfaces
 
std::map< SvtxTrack::CAL_LAYER,
float > 
m_caloRadii
 
RawTowerGeomContainerm_towerGeomContainer = nullptr
 
TowerInfoContainerm_towerContainer = nullptr
 
RawClusterContainerm_clusterContainer = nullptr
 
bool m_constField = true
 
float m_constFieldVal = 1.4
 
bool m_useCemcPosRecalib = false
 
bool m_calosAvailable = true
 
int m_event = 0
 

Static Private Attributes

static const int m_nCaloLayers = 3
 

Additional Inherited Members

- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

This class takes final fitted tracks from the Acts track fitting and projects them out to cylinders with radius at the same radius as the three calorimeters. Cluster matching is performed with the projections and the SvtxTrack object is updated.

Definition at line 38 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 38 of file PHActsTrackProjection.h

Member Typedef Documentation

Definition at line 42 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 42 of file PHActsTrackProjection.h

Definition at line 45 of file PHActsTrackProjection.h.

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

using PHActsTrackProjection::SurfacePtr = std::shared_ptr<const Acts::Surface>

Definition at line 43 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 43 of file PHActsTrackProjection.h

Definition at line 44 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 44 of file PHActsTrackProjection.h

Constructor & Destructor Documentation

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

Member Function Documentation

double PHActsTrackProjection::deltaPhi ( const double phi)
private

Definition at line 419 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 419 of file PHActsTrackProjection.cc

References ActsTests::PropagationDatasets::phi.

Referenced by getClusterProperties().

+ Here is the caller graph for this function:

int PHActsTrackProjection::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 130 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 130 of file PHActsTrackProjection.cc

References Fun4AllReturnCodes::EVENT_OK.

void PHActsTrackProjection::getClusterProperties ( double  phi,
double  eta,
double minIndex,
double minDphi,
double minDeta,
double minE 
)
private

Get the cluster values for a particular matched track.

Definition at line 197 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 197 of file PHActsTrackProjection.cc

References myAnalysis::clusterEta, deltaPhi(), INTTVtxZ::dphi, RawClusterContainer::getClustersMap(), RawClusterUtility::GetPseudorapidity(), m_clusterContainer, minR, and physmon_track_finding_ttbar::r.

+ Here is the call graph for this function:

int PHActsTrackProjection::getNodes ( PHCompositeNode topNode)
private

Definition at line 388 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 388 of file PHActsTrackProjection.cc

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

Referenced by InitRun().

+ Here is the caller graph for this function:

void PHActsTrackProjection::getSquareTowerEnergies ( int  phiBin,
int  etaBin,
double energy3x3,
double energy5x5 
)
private

Get 3x3 and 5x5 tower sums matched to a track.

Check the phi periodic boundary conditions

Check the eta boundary conditions

Definition at line 228 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 228 of file PHActsTrackProjection.cc

References RawTowerGeomContainer::get_etabins(), RawTowerGeomContainer::get_phibins(), TowerInfoContainer::get_tower_at_key(), m_towerContainer, and m_towerGeomContainer.

+ Here is the call graph for this function:

int PHActsTrackProjection::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 125 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 125 of file PHActsTrackProjection.cc

References Fun4AllReturnCodes::EVENT_OK.

int PHActsTrackProjection::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.

only need to print warning once

Reimplemented from SubsysReco.

Definition at line 56 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 56 of file PHActsTrackProjection.cc

References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, getNodes(), m_calosAvailable, makeCaloSurfacePtrs(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHActsTrackProjection::makeCaloSurfacePtrs ( PHCompositeNode topNode)
private

Make Acts::CylinderSurface objects corresponding to the calos.

Default to using calo radius

Extend farther so that there is at least surface there, for high curling tracks. Can always reject later

Make a cylindrical surface at (0,0,0) aligned along the z axis

Definition at line 313 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 313 of file PHActsTrackProjection.cc

References Acts::UnitConstants::cm, eta, Fun4AllReturnCodes::EVENT_OK, ActsGeometry::geometry(), RawTowerGeomContainer::get_radius(), RawTowerGeomContainer::get_thickness(), ActsTrackingGeometry::getGeoContext(), m_caloNames, m_caloRadii, m_caloSurfaces, m_caloTypes, m_nCaloLayers, m_tGeometry, m_towerGeomContainer, perf_headwind::name, setCaloContainerNodes(), surf(), ActsTests::PropagationDatasets::theta, Acts::Test::transform, and Fun4AllBase::Verbosity().

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHActsTrackProjection::process_event ( PHCompositeNode )
overridevirtual

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

Reimplemented from SubsysReco.

Definition at line 81 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 81 of file PHActsTrackProjection.cc

References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, layer, m_caloNames, m_event, m_nCaloLayers, projectTracks(), setCaloContainerNodes(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHActsTrackProjection::projectTracks ( int  caloLayer)
private

Definition at line 135 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 135 of file PHActsTrackProjection.cc

References Fun4AllReturnCodes::EVENT_OK, m_caloNames, m_caloSurfaces, m_tGeometry, m_trackMap, m_vertexMap, ActsPropagator::makeTrackParams(), propagateTrack(), and updateSvtxTrack().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHActsTrackProjection::BoundTrackParamResult PHActsTrackProjection::propagateTrack ( const Acts::BoundTrackParameters params,
const int  caloLayer,
const SurfacePtr targetSurf 
)
private

Propagate the fitted track parameters to a surface with Acts.

Definition at line 264 of file PHActsTrackProjection.cc.

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

References ActsPropagator::constField(), m_constFieldVal, m_tGeometry, ActsPropagator::propagateTrackFast(), ActsPropagator::setConstFieldValue(), Acts::UnitConstants::T, Fun4AllBase::Verbosity(), and ActsPropagator::verbosity().

Referenced by projectTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHActsTrackProjection::setCaloContainerNodes ( PHCompositeNode topNode,
const int  caloLayer 
)
private

Set the particular calo nodes depending on which layer.

Definition at line 277 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 277 of file PHActsTrackProjection.cc

References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, m_caloNames, m_calosAvailable, m_clusterContainer, m_towerContainer, m_towerGeomContainer, m_useCemcPosRecalib, and PHWHERE.

Referenced by makeCaloSurfacePtrs(), and process_event().

+ Here is the caller graph for this function:

void PHActsTrackProjection::setConstFieldVal ( float  b)
inline

Definition at line 55 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 55 of file PHActsTrackProjection.h

References KFPMath::b, and m_constFieldVal.

void PHActsTrackProjection::setLayerRadius ( SvtxTrack::CAL_LAYER  layer,
const float  rad 
)
inline

Set an arbitrary radius to project to, in cm.

Definition at line 58 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 58 of file PHActsTrackProjection.h

References layer, m_caloRadii, and Acts::UnitConstants::rad.

void PHActsTrackProjection::updateSvtxTrack ( const ActsPropagator::BoundTrackParamPair params,
SvtxTrack svtxTrack,
const int  caloLayer 
)
private

Update the SvtxTrack object with the track-cluster match.

Definition at line 158 of file PHActsTrackProjection.cc.

View newest version in sPHENIX GitHub at line 158 of file PHActsTrackProjection.cc

References Acts::UnitConstants::cm, ActsGeometry::geometry(), ActsTrackingGeometry::getGeoContext(), i, SvtxTrack::insert_state(), j, m_caloRadii, m_caloTypes, m_tGeometry, momentum, out, ActsTransformations::rotateActsCovToSvtxTrack(), SvtxTrackState_v1::set_error(), SvtxTrackState_v1::set_px(), SvtxTrackState_v1::set_py(), SvtxTrackState_v1::set_pz(), SvtxTrackState_v1::set_x(), SvtxTrackState_v1::set_y(), SvtxTrackState_v1::set_z(), and Fun4AllBase::Verbosity().

Referenced by projectTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHActsTrackProjection::useConstField ( bool  field)
inline

Definition at line 54 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 54 of file PHActsTrackProjection.h

References ckf::field, and m_constField.

Member Data Documentation

std::vector<std::string> PHActsTrackProjection::m_caloNames
private

Definition at line 112 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 112 of file PHActsTrackProjection.h

Referenced by makeCaloSurfacePtrs(), PHActsTrackProjection(), process_event(), projectTracks(), and setCaloContainerNodes().

std::map<SvtxTrack::CAL_LAYER, float> PHActsTrackProjection::m_caloRadii
private

An optional map that allows projection to an arbitrary radius Results are written to the SvtxTrack based on the provided CAL_LAYER

Definition at line 117 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 117 of file PHActsTrackProjection.h

Referenced by makeCaloSurfacePtrs(), setLayerRadius(), and updateSvtxTrack().

bool PHActsTrackProjection::m_calosAvailable = true
private

Definition at line 126 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 126 of file PHActsTrackProjection.h

Referenced by InitRun(), and setCaloContainerNodes().

std::map<std::string, SurfacePtr> PHActsTrackProjection::m_caloSurfaces
private

Definition at line 114 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 114 of file PHActsTrackProjection.h

Referenced by makeCaloSurfacePtrs(), and projectTracks().

std::vector<SvtxTrack::CAL_LAYER> PHActsTrackProjection::m_caloTypes
private

Definition at line 113 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 113 of file PHActsTrackProjection.h

Referenced by makeCaloSurfacePtrs(), PHActsTrackProjection(), and updateSvtxTrack().

RawClusterContainer* PHActsTrackProjection::m_clusterContainer = nullptr
private

Definition at line 121 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 121 of file PHActsTrackProjection.h

Referenced by getClusterProperties(), and setCaloContainerNodes().

bool PHActsTrackProjection::m_constField = true
private

Definition at line 123 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 123 of file PHActsTrackProjection.h

Referenced by useConstField().

float PHActsTrackProjection::m_constFieldVal = 1.4
private

Definition at line 124 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 124 of file PHActsTrackProjection.h

Referenced by propagateTrack(), and setConstFieldVal().

int PHActsTrackProjection::m_event = 0
private

Definition at line 128 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 128 of file PHActsTrackProjection.h

Referenced by process_event().

const int PHActsTrackProjection::m_nCaloLayers = 3
staticprivate

Objects to hold calorimeter information. There are only 3 calo layers

Definition at line 111 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 111 of file PHActsTrackProjection.h

Referenced by makeCaloSurfacePtrs(), and process_event().

ActsGeometry* PHActsTrackProjection::m_tGeometry = nullptr
private

Objects containing the Acts track fit results.

Definition at line 105 of file PHActsTrackProjection.h.

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

Referenced by getNodes(), makeCaloSurfacePtrs(), projectTracks(), propagateTrack(), and updateSvtxTrack().

TowerInfoContainer* PHActsTrackProjection::m_towerContainer = nullptr
private

Definition at line 120 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 120 of file PHActsTrackProjection.h

Referenced by getSquareTowerEnergies(), and setCaloContainerNodes().

RawTowerGeomContainer* PHActsTrackProjection::m_towerGeomContainer = nullptr
private

Definition at line 119 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 119 of file PHActsTrackProjection.h

Referenced by getSquareTowerEnergies(), makeCaloSurfacePtrs(), and setCaloContainerNodes().

SvtxTrackMap* PHActsTrackProjection::m_trackMap = nullptr
private

Definition at line 106 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 106 of file PHActsTrackProjection.h

Referenced by getNodes(), and projectTracks().

bool PHActsTrackProjection::m_useCemcPosRecalib = false
private

Definition at line 125 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 125 of file PHActsTrackProjection.h

Referenced by setCaloContainerNodes().

SvtxVertexMap* PHActsTrackProjection::m_vertexMap = nullptr
private

Definition at line 107 of file PHActsTrackProjection.h.

View newest version in sPHENIX GitHub at line 107 of file PHActsTrackProjection.h

Referenced by getNodes(), and projectTracks().


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