Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/offline/packages/tpccalib/PHTpcResiduals.h>
Public Member Functions | |
PHTpcResiduals (const std::string &name="PHTpcResiduals") | |
~PHTpcResiduals () override=default | |
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 | setMinPt (double value) |
track min pT | |
void | setGridDimensions (const int phiBins, const int rBins, const int zBins) |
Grid dimensions. | |
void | setSavehistograms (bool) |
set to true to store evaluation histograms and ntuples | |
void | setHistogramOutputfile (const std::string &) |
output file name for evaluation histograms | |
void | setOutputfile (const std::string &outputfile) |
output file name for storing the space charge reconstruction matrices | |
void | setUseMicromegas (bool value) |
require micromegas to be present when extrapolating tracks to the TPC | |
Option for setting distortion correction calculation limits | |
void | setMaxTrackAlpha (float maxTAlpha) |
void | setMaxTrackBeta (float maxTBeta) |
void | setMaxTrackResidualDrphi (float maxResidualDrphi) |
void | setMaxTrackResidualDz (float maxResidualDz) |
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 Types | |
using | BoundTrackParam = const Acts::BoundTrackParameters |
using | BoundTrackParamPair = std::pair< float, BoundTrackParam > |
pairs path length and track parameters | |
Private Member Functions | |
int | getNodes (PHCompositeNode *topNode) |
int | createNodes (PHCompositeNode *topNode) |
Acts::Vector3 | getGlobalPosition (TrkrDefs::cluskey, TrkrCluster *, short int crossing) const |
get global position for a given cluster | |
int | processTracks (PHCompositeNode *topNode) |
bool | checkTrack (SvtxTrack *track) const |
void | processTrack (SvtxTrack *track) |
void | addTrackState (SvtxTrack *track, TrkrDefs::cluskey key, float pathlength, const Acts::BoundTrackParameters ¶ms) |
fill track state from bound track parameters | |
int | getCell (const Acts::Vector3 &loc) |
Gets distortion cell for identifying bins in TPC. | |
Acts::BoundTrackParameters | makeTrackParams (SvtxTrack *) const |
create ACTS track parameters from Svtx track | |
Static Private Attributes | |
static constexpr float | m_phiMin = 0 |
static constexpr float | m_phiMax = 2. * M_PI |
static constexpr float | m_rMin = 20 |
static constexpr float | m_rMax = 78 |
static constexpr int | m_minClusCount = 10 |
static constexpr unsigned int | m_nLayersTpc = 48 |
Tpc geometry. | |
static constexpr float | m_zMin = -105.5 |
static constexpr float | m_zMax = 105.5 |
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") | |
This class takes preliminary fits from PHActsTrkFitter to the silicon + MM clusters and calculates the residuals in the TPC from that track fit. The TPC state has to be explicitly determined here since the Acts::DirectNavigator does not visit the TPC states
Definition at line 36 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 36 of file PHTpcResiduals.h
|
private |
Definition at line 89 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 89 of file PHTpcResiduals.h
|
private |
pairs path length and track parameters
Definition at line 92 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 92 of file PHTpcResiduals.h
PHTpcResiduals::PHTpcResiduals | ( | const std::string & | name = "PHTpcResiduals" | ) |
Definition at line 103 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 103 of file PHTpcResiduals.cc
|
overridedefault |
|
private |
fill track state from bound track parameters
Definition at line 481 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 481 of file PHTpcResiduals.cc
References Acts::UnitConstants::cm, ActsGeometry::geometry(), ActsTrackingGeometry::getGeoContext(), i, SvtxTrack::insert_state(), j, m_tGeometry, m_transformer, momentum, Acts::GenericBoundTrackParameters< particle_hypothesis_t >::momentum(), Acts::GenericBoundTrackParameters< particle_hypothesis_t >::position(), ActsTransformations::rotateActsCovToSvtxTrack(), SvtxTrackState_v1::set_error(), SvtxTrackState_v1::set_name(), SvtxTrackState_v1::set_px(), SvtxTrackState_v1::set_py(), SvtxTrackState_v1::set_pz(), SvtxTrackState_v1::set_x(), SvtxTrackState_v1::set_y(), SvtxTrackState_v1::set_z(), filter::state, and to_string().
Referenced by processTrack().
|
private |
Definition at line 205 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 205 of file PHTpcResiduals.cc
References TrackAnalysisUtils::get_cluster_keys(), SvtxTrack::get_pt(), m_minPt, m_useMicromegas, and Fun4AllBase::Verbosity().
Referenced by processTracks().
|
private |
Definition at line 544 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 544 of file PHTpcResiduals.cc
References Fun4AllReturnCodes::EVENT_OK.
Referenced by InitRun().
|
overridevirtual |
Called at the end of all processing.
Reimplemented from SubsysReco.
Definition at line 151 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 151 of file PHTpcResiduals.cc
References Fun4AllReturnCodes::EVENT_OK, m_accepted_clusters, m_accepted_tracks, m_matrix_container, m_outputfile, m_total_clusters, and m_total_tracks.
|
private |
Gets distortion cell for identifying bins in TPC.
Definition at line 513 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 513 of file PHTpcResiduals.cc
References QAG4Util::get_r(), loc, m_matrix_container, m_phiMax, m_phiMin, m_rMax, m_rMin, m_zMax, m_zMin, MATSCAN::phibins, physmon_track_finding_ttbar::r, and physmon_track_finding_ttbar::z.
Referenced by processTrack().
|
private |
get global position for a given cluster
uses ActsTransformation to convert cluster local position into global coordinates
Definition at line 580 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 580 of file PHTpcResiduals.cc
References TpcClusterZCrossingCorrection::correctZ(), TpcDistortionCorrection::get_corrected_position(), ActsGeometry::getGlobalPosition(), TpcDefs::getSide(), TrkrDefs::getTrkrId(), m_clusterCrossingCorrection, m_dcc_average, m_dcc_fluctuation, m_dcc_static, m_distortionCorrection, m_tGeometry, and TrkrDefs::tpcId.
Referenced by processTrack().
|
private |
Definition at line 548 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 548 of file PHTpcResiduals.cc
References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, m_clusterContainer, m_dcc_average, m_dcc_fluctuation, m_dcc_static, m_tGeometry, m_trackMap, and PHWHERE.
Referenced by InitRun().
|
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 109 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 109 of file PHTpcResiduals.cc
References Fun4AllReturnCodes::EVENT_OK, m_accepted_clusters, m_accepted_tracks, m_maxResidualDrphi, m_maxResidualDz, m_maxTAlpha, m_maxTBeta, m_minPt, m_total_clusters, and m_total_tracks.
|
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 130 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 130 of file PHTpcResiduals.cc
References Fun4AllReturnCodes::ABORTEVENT, createNodes(), Fun4AllReturnCodes::EVENT_OK, and getNodes().
|
private |
create ACTS track parameters from Svtx track
Definition at line 225 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 225 of file PHTpcResiduals.cc
References Acts::UnitConstants::cm, Acts::Test::cov, Acts::GenericBoundTrackParameters< ParticleHypothesis >::create(), Acts::UnitConstants::e, ActsGeometry::geometry(), SvtxTrack::get_charge(), SvtxTrack::get_p(), SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), SvtxTrack::get_x(), SvtxTrack::get_y(), SvtxTrack::get_z(), ActsTrackingGeometry::getGeoContext(), m_tGeometry, m_transformer, momentum, Acts::UnitConstants::ns, merge_hashes::p, Acts::ParticleHypothesis::pion(), position, ActsTransformations::rotateSvtxTrackCovToActs(), and value.
Referenced by processTrack().
|
overridevirtual |
Called for each event. This is where you do the real work.
Reimplemented from SubsysReco.
Definition at line 142 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 142 of file PHTpcResiduals.cc
References m_event, and processTracks().
|
private |
Definition at line 251 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 251 of file PHTpcResiduals.cc
References addTrackState(), assert, Acts::UnitConstants::cm, deltaPhi(), dz, Acts::eBoundLoc0, Acts::eBoundLoc1, TrkrClusterContainer::findCluster(), ActsTrackingGeometry::geoContext, ActsGeometry::geometry(), TrackAnalysisUtils::get_cluster_keys(), SvtxTrack::get_crossing(), SvtxTrack::get_p(), QAG4Util::get_r(), SvtxTrack::get_x(), SvtxTrack::get_y(), SvtxTrack::get_z(), getCell(), ActsTrackingGeometry::getGeoContext(), getGlobalPosition(), TrkrDefs::getLayer(), ActsSurfaceMaps::getSurface(), TrkrDefs::getTrkrId(), index, m_accepted_clusters, m_clusterContainer, m_crossing, m_matrix_container, m_maxResidualDrphi, m_maxResidualDz, m_maxTAlpha, m_maxTBeta, m_tGeometry, m_total_clusters, makeTrackParams(), ActsGeometry::maps(), ActsTests::PropagationDatasets::pathLength, ActsPropagator::propagateTrack(), square(), writeMapConfig::surface, TrkrDefs::tpcId, and Fun4AllBase::Verbosity().
Referenced by processTracks().
|
private |
Definition at line 182 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 182 of file PHTpcResiduals.cc
References checkTrack(), Fun4AllReturnCodes::EVENT_OK, m_accepted_tracks, m_total_tracks, m_trackMap, processTrack(), SvtxTrackMap::size(), and Fun4AllBase::Verbosity().
Referenced by process_event().
void PHTpcResiduals::setGridDimensions | ( | const int | phiBins, |
const int | rBins, | ||
const int | zBins | ||
) |
Grid dimensions.
Definition at line 612 of file PHTpcResiduals.cc.
View newest version in sPHENIX GitHub at line 612 of file PHTpcResiduals.cc
References m_matrix_container.
|
inline |
output file name for evaluation histograms
Definition at line 76 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 76 of file PHTpcResiduals.h
|
inline |
Definition at line 51 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 51 of file PHTpcResiduals.h
References m_maxTAlpha.
|
inline |
Definition at line 54 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 54 of file PHTpcResiduals.h
References m_maxTBeta.
|
inline |
Definition at line 57 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 57 of file PHTpcResiduals.h
References m_maxResidualDrphi.
|
inline |
Definition at line 60 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 60 of file PHTpcResiduals.h
References m_maxResidualDz.
|
inline |
track min pT
Definition at line 66 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 66 of file PHTpcResiduals.h
|
inline |
output file name for storing the space charge reconstruction matrices
Definition at line 79 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 79 of file PHTpcResiduals.h
References m_outputfile.
Referenced by Tracking_Reco_TrackFit().
|
inline |
set to true to store evaluation histograms and ntuples
Definition at line 73 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 73 of file PHTpcResiduals.h
|
inline |
require micromegas to be present when extrapolating tracks to the TPC
Definition at line 83 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 83 of file PHTpcResiduals.h
References m_useMicromegas, and value.
|
private |
Definition at line 182 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 182 of file PHTpcResiduals.h
Referenced by End(), Init(), and processTrack().
|
private |
Definition at line 179 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 179 of file PHTpcResiduals.h
Referenced by End(), Init(), and processTracks().
|
private |
cluster error parametrisation
Definition at line 156 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 156 of file PHTpcResiduals.h
|
private |
Definition at line 124 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 124 of file PHTpcResiduals.h
Referenced by getNodes(), and processTrack().
|
private |
Definition at line 127 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 127 of file PHTpcResiduals.h
Referenced by getGlobalPosition().
|
private |
running track crossing id
Definition at line 174 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 174 of file PHTpcResiduals.h
Referenced by processTrack().
|
private |
Definition at line 131 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 131 of file PHTpcResiduals.h
Referenced by getGlobalPosition(), and getNodes().
|
private |
Definition at line 132 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 132 of file PHTpcResiduals.h
Referenced by getGlobalPosition(), and getNodes().
|
private |
Definition at line 130 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 130 of file PHTpcResiduals.h
Referenced by getGlobalPosition(), and getNodes().
|
private |
tpc distortion correction utility class
Definition at line 135 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 135 of file PHTpcResiduals.h
Referenced by getGlobalPosition().
|
private |
Definition at line 162 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 162 of file PHTpcResiduals.h
Referenced by process_event().
|
private |
matrix container
Definition at line 159 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 159 of file PHTpcResiduals.h
Referenced by End(), getCell(), processTrack(), and setGridDimensions().
|
private |
Definition at line 138 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 138 of file PHTpcResiduals.h
Referenced by Init(), processTrack(), and setMaxTrackResidualDrphi().
|
private |
Definition at line 140 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 140 of file PHTpcResiduals.h
Referenced by Init(), processTrack(), and setMaxTrackResidualDz().
|
private |
Definition at line 137 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 137 of file PHTpcResiduals.h
Referenced by Init(), processTrack(), and setMaxTrackAlpha().
|
private |
Definition at line 139 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 139 of file PHTpcResiduals.h
Referenced by Init(), processTrack(), and setMaxTrackBeta().
|
staticprivate |
Definition at line 148 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 148 of file PHTpcResiduals.h
|
private |
minimum pT required for track to be considered in residuals calculation (GeV/c)
Definition at line 168 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 168 of file PHTpcResiduals.h
Referenced by checkTrack(), Init(), and setMinPt().
|
staticprivate |
Tpc geometry.
Definition at line 151 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 151 of file PHTpcResiduals.h
|
private |
output file
Definition at line 171 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 171 of file PHTpcResiduals.h
Referenced by End(), and setOutputfile().
|
staticprivate |
Definition at line 143 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 143 of file PHTpcResiduals.h
Referenced by getCell().
|
staticprivate |
Definition at line 142 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 142 of file PHTpcResiduals.h
Referenced by getCell().
|
staticprivate |
Definition at line 146 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 146 of file PHTpcResiduals.h
Referenced by getCell().
|
staticprivate |
Definition at line 145 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 145 of file PHTpcResiduals.h
Referenced by getCell().
|
private |
Definition at line 123 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 123 of file PHTpcResiduals.h
Referenced by addTrackState(), getGlobalPosition(), getNodes(), makeTrackParams(), and processTrack().
|
private |
Definition at line 181 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 181 of file PHTpcResiduals.h
Referenced by End(), Init(), and processTrack().
|
private |
Definition at line 178 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 178 of file PHTpcResiduals.h
Referenced by End(), Init(), and processTracks().
|
private |
Node information for Acts tracking geometry and silicon+MM track fit
Definition at line 122 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 122 of file PHTpcResiduals.h
Referenced by getNodes(), and processTracks().
|
private |
actis transformation
Definition at line 118 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 118 of file PHTpcResiduals.h
Referenced by addTrackState(), and makeTrackParams().
|
private |
require micromegas to be present when extrapolating tracks to the TPC
Definition at line 165 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 165 of file PHTpcResiduals.h
Referenced by checkTrack(), and setUseMicromegas().
|
staticprivate |
Definition at line 153 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 153 of file PHTpcResiduals.h
Referenced by getCell().
|
staticprivate |
Definition at line 152 of file PHTpcResiduals.h.
View newest version in sPHENIX GitHub at line 152 of file PHTpcResiduals.h
Referenced by getCell().