Analysis Software
Documentation for sPHENIX simulation software
|
performs space charge distortion reconstruction using tracks To reconstruct the distortions dr0, drphi0 and dz0 in a given volume element, the following chisquare is minimized chisquare = sum_cluster (drphi - (drphi0 + dr0 tan alpha))**2/error**2 + sum_cluster ( dz - (dz0 + dr0 tan beta))**2/error**2 with More...
#include <coresoftware/blob/master/offline/packages/tpccalib/TpcSpaceChargeReconstruction.h>
Public Member Functions | |
TpcSpaceChargeReconstruction (const std::string &="TPCSPACECHARGERECONSTRUCTION") | |
constructor | |
int | Init (PHCompositeNode *) override |
global initialization | |
int | InitRun (PHCompositeNode *) override |
run initialization | |
int | process_event (PHCompositeNode *) override |
event processing | |
int | End (PHCompositeNode *) override |
end of processing | |
void | SetDefaultParameters () override |
parameters | |
configuration | |
void | set_use_micromegas (bool value) |
set whether to use only tracks with micromegas or not | |
void | set_min_pt (double value) |
track min pT | |
void | set_grid_dimensions (int phibins, int rbins, int zbins) |
set grid dimensions | |
void | set_save_histograms (bool value) |
set to true to store evaluation histograms and ntuples | |
void | set_histogram_outputfile (const std::string &outputfile) |
output file name for evaluation histograms | |
void | set_outputfile (const std::string &filename) |
output file | |
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. | |
Public Member Functions inherited from PHParameterInterface | |
PHParameterInterface (const std::string &name) | |
PHParameterInterface (const PHParameterInterface &)=delete | |
PHParameterInterface & | operator= (PHParameterInterface const &)=delete |
virtual | ~PHParameterInterface () |
void | set_paramname (const std::string &name) |
void | set_double_param (const std::string &name, const double dval) |
double | get_double_param (const std::string &name) const |
void | set_int_param (const std::string &name, const int ival) |
int | get_int_param (const std::string &name) const |
void | set_string_param (const std::string &name, const std::string &sval) |
std::string | get_string_param (const std::string &name) const |
void | UpdateParametersWithMacro () |
void | SaveToNodeTree (PHCompositeNode *runNode, const std::string &nodename) |
void | PutOnParNode (PHCompositeNode *parNode, const std::string &nodename) |
void | Print () const |
Private Member Functions | |
int | load_nodes (PHCompositeNode *) |
load nodes | |
void | create_histograms () |
create evaluation histograms | |
Acts::Vector3 | get_global_position (TrkrDefs::cluskey, TrkrCluster *, short int) const |
get global position for a given cluster | |
void | process_tracks () |
process tracks | |
bool | accept_track (SvtxTrack *) const |
returns true if track fulfills basic requirement for distortion calculations | |
void | process_track (SvtxTrack *) |
process track | |
int | get_cell_index (const Acts::Vector3 &) |
get relevant cell for a given cluster | |
Private Attributes | |
int | m_event = 0 |
local event counter | |
std::string | m_outputfile = "TpcSpaceChargeMatrices.root" |
output file | |
bool | m_use_micromegas = true |
true if only tracks with micromegas must be used | |
double | m_min_pt = 0.5 |
minimum pT required for track to be considered in residuals calculation (GeV/c) | |
ActsGeometry * | m_tgeometry = nullptr |
acts geometry | |
ClusterErrorPara | m_cluster_error_parametrization |
cluster error parametrisation | |
std::unique_ptr < TpcSpaceChargeMatrixContainer > | m_matrix_container |
matrix container | |
selection parameters | |
float | m_max_talpha = 0.6 |
float | m_max_drphi = 0.5 |
float | m_max_tbeta = 1.5 |
float | m_max_dz = 0.5 |
counters | |
int | m_total_tracks = 0 |
int | m_accepted_tracks = 0 |
int | m_total_clusters = 0 |
int | m_accepted_clusters = 0 |
nodes | |
SvtxTrackMap * | m_track_map = nullptr |
TrkrClusterContainer * | m_cluster_map = nullptr |
TpcClusterZCrossingCorrection | m_clusterCrossingCorrection |
TpcDistortionCorrectionContainer * | m_dcc_static = nullptr |
TpcDistortionCorrectionContainer * | m_dcc_average = nullptr |
TpcDistortionCorrectionContainer * | m_dcc_fluctuation = nullptr |
TpcDistortionCorrection | m_distortionCorrection |
tpc distortion correction utility class | |
evaluation histograms | |
using | TH1_map_t = std::map< int, TH1 * > |
using | TH2_map_t = std::map< int, TH2 * > |
bool | m_savehistograms = false |
Output root histograms. | |
std::string | m_histogramfilename = "TpcSpaceChargeReconstruction.root" |
histogram output file name | |
std::unique_ptr< TFile > | m_histogramfile |
TH1_map_t | m_h_drphi |
TH1_map_t | m_h_dz |
TH2_map_t | m_h_drphi_alpha |
TH2_map_t | m_h_dz_beta |
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") | |
Protected Member Functions inherited from PHParameterInterface | |
void | set_default_double_param (const std::string &name, const double dval) |
void | set_default_int_param (const std::string &name, const int ival) |
void | set_default_string_param (const std::string &name, const std::string &sval) |
void | InitializeParameters () |
performs space charge distortion reconstruction using tracks To reconstruct the distortions dr0, drphi0 and dz0 in a given volume element, the following chisquare is minimized chisquare = sum_cluster (drphi - (drphi0 + dr0 tan alpha))**2/error**2 + sum_cluster ( dz - (dz0 + dr0 tan beta))**2/error**2 with
Definition at line 53 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 53 of file TpcSpaceChargeReconstruction.h
|
private |
Definition at line 187 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 187 of file TpcSpaceChargeReconstruction.h
|
private |
Definition at line 188 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 188 of file TpcSpaceChargeReconstruction.h
TpcSpaceChargeReconstruction::TpcSpaceChargeReconstruction | ( | const std::string & | name = "TPCSPACECHARGERECONSTRUCTION" | ) |
constructor
Definition at line 105 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 105 of file TpcSpaceChargeReconstruction.cc
References PHParameterInterface::InitializeParameters().
|
private |
returns true if track fulfills basic requirement for distortion calculations
Definition at line 377 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 377 of file TpcSpaceChargeReconstruction.cc
References TrackAnalysisUtils::get_cluster_keys(), SvtxTrack::get_pt(), m_min_pt, and m_use_micromegas.
Referenced by process_tracks().
|
private |
create evaluation histograms
Definition at line 262 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 262 of file TpcSpaceChargeReconstruction.cc
References h, m_h_drphi, m_h_drphi_alpha, m_h_dz, m_h_dz_beta, m_histogramfile, m_histogramfilename, m_matrix_container, m_max_drphi, m_max_dz, m_max_talpha, MATSCAN::phibins, Acts::Test::transform, and physmon_track_finding_ttbar::z.
Referenced by Init().
|
overridevirtual |
end of processing
Reimplemented from SubsysReco.
Definition at line 175 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 175 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, h, m_accepted_clusters, m_accepted_tracks, m_h_drphi, m_h_drphi_alpha, m_h_dz, m_h_dz_beta, m_histogramfile, m_matrix_container, m_outputfile, m_savehistograms, m_total_clusters, and m_total_tracks.
|
private |
get relevant cell for a given cluster
Definition at line 615 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 615 of file TpcSpaceChargeReconstruction.cc
References QAG4Util::get_r(), m_matrix_container, MATSCAN::phibins, physmon_track_finding_ttbar::r, and physmon_track_finding_ttbar::z.
Referenced by process_track().
|
private |
get global position for a given cluster
uses ActsTransformation to convert cluster local position into global coordinates incorporates TPC distortion correction, if present
Definition at line 328 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 328 of file TpcSpaceChargeReconstruction.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 process_track().
|
overridevirtual |
global initialization
Reimplemented from SubsysReco.
Definition at line 118 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 118 of file TpcSpaceChargeReconstruction.cc
References create_histograms(), Fun4AllReturnCodes::EVENT_OK, m_accepted_clusters, m_accepted_tracks, m_savehistograms, m_total_clusters, and m_total_tracks.
|
overridevirtual |
run initialization
Reimplemented from SubsysReco.
Definition at line 134 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 134 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, PHParameterInterface::get_double_param(), m_matrix_container, m_max_drphi, m_max_dz, m_max_talpha, m_max_tbeta, m_min_pt, m_outputfile, m_use_micromegas, and PHParameterInterface::UpdateParametersWithMacro().
|
private |
load nodes
Definition at line 226 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 226 of file TpcSpaceChargeReconstruction.cc
References assert, Fun4AllReturnCodes::EVENT_OK, m_cluster_map, m_dcc_average, m_dcc_fluctuation, m_dcc_static, m_event, m_tgeometry, and m_track_map.
Referenced by process_event().
|
overridevirtual |
event processing
Reimplemented from SubsysReco.
Definition at line 160 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 160 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, load_nodes(), m_event, and process_tracks().
|
private |
process track
Definition at line 395 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 395 of file TpcSpaceChargeReconstruction.cc
References assert, SvtxTrack::begin_states(), delta_phi(), dz, SvtxTrack::end_states(), TrkrClusterContainer::findCluster(), get_cell_index(), TrackAnalysisUtils::get_cluster_keys(), SvtxTrack::get_crossing(), get_global_position(), QAG4Util::get_r(), TrkrDefs::getLayer(), TrkrDefs::getTrkrId(), i, m_accepted_clusters, m_cluster_map, m_h_drphi, m_h_drphi_alpha, m_h_dz, m_h_dz_beta, m_matrix_container, m_max_drphi, m_max_dz, m_max_talpha, m_max_tbeta, m_savehistograms, m_total_clusters, PHWHERE, physmon_track_finding_ttbar::r, square(), filter::state, TrkrDefs::tpcId, and Fun4AllBase::Verbosity().
Referenced by process_tracks().
|
private |
process tracks
Definition at line 361 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 361 of file TpcSpaceChargeReconstruction.cc
References accept_track(), m_accepted_tracks, m_cluster_map, m_total_tracks, m_track_map, and process_track().
Referenced by process_event().
void TpcSpaceChargeReconstruction::set_grid_dimensions | ( | int | phibins, |
int | rbins, | ||
int | zbins | ||
) |
set grid dimensions
phibins | the number of bins in the azimuth direction |
zbins | the number of bins along z |
Definition at line 114 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 114 of file TpcSpaceChargeReconstruction.cc
References m_matrix_container.
|
inline |
output file name for evaluation histograms
Definition at line 83 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 83 of file TpcSpaceChargeReconstruction.h
References m_histogramfilename.
|
inline |
track min pT
Definition at line 68 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 68 of file TpcSpaceChargeReconstruction.h
|
inline |
output file
this is the file where space charge matrix container is stored
Definition at line 89 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 89 of file TpcSpaceChargeReconstruction.h
References filename, and m_outputfile.
|
inline |
set to true to store evaluation histograms and ntuples
Definition at line 80 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 80 of file TpcSpaceChargeReconstruction.h
References m_savehistograms, and value.
|
inline |
set whether to use only tracks with micromegas or not
Definition at line 64 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 64 of file TpcSpaceChargeReconstruction.h
References m_use_micromegas, and value.
|
overridevirtual |
parameters
Implements PHParameterInterface.
Definition at line 216 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 216 of file TpcSpaceChargeReconstruction.cc
References PHParameterInterface::set_default_double_param().
|
private |
Definition at line 174 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 174 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_track().
|
private |
Definition at line 171 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 171 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_tracks().
|
private |
cluster error parametrisation
Definition at line 163 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 163 of file TpcSpaceChargeReconstruction.h
|
private |
Definition at line 199 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 199 of file TpcSpaceChargeReconstruction.h
Referenced by load_nodes(), process_track(), and process_tracks().
|
private |
Definition at line 202 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 202 of file TpcSpaceChargeReconstruction.h
Referenced by get_global_position().
|
private |
Definition at line 206 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 206 of file TpcSpaceChargeReconstruction.h
Referenced by get_global_position(), and load_nodes().
|
private |
Definition at line 207 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 207 of file TpcSpaceChargeReconstruction.h
Referenced by get_global_position(), and load_nodes().
|
private |
Definition at line 205 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 205 of file TpcSpaceChargeReconstruction.h
Referenced by get_global_position(), and load_nodes().
|
private |
tpc distortion correction utility class
Definition at line 210 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 210 of file TpcSpaceChargeReconstruction.h
Referenced by get_global_position().
|
private |
local event counter
Definition at line 137 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 137 of file TpcSpaceChargeReconstruction.h
Referenced by load_nodes(), and process_event().
|
private |
Definition at line 190 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 190 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), End(), and process_track().
|
private |
Definition at line 192 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 192 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), End(), and process_track().
|
private |
Definition at line 191 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 191 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), End(), and process_track().
|
private |
Definition at line 193 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 193 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), End(), and process_track().
|
private |
Definition at line 185 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 185 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), and End().
|
private |
histogram output file name
Definition at line 184 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 184 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), and set_histogram_outputfile().
|
private |
matrix container
Definition at line 166 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 166 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), End(), get_cell_index(), InitRun(), process_track(), and set_grid_dimensions().
|
private |
Definition at line 155 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 155 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), InitRun(), and process_track().
|
private |
Definition at line 159 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 159 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), InitRun(), and process_track().
|
private |
Definition at line 154 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 154 of file TpcSpaceChargeReconstruction.h
Referenced by create_histograms(), InitRun(), and process_track().
|
private |
Definition at line 158 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 158 of file TpcSpaceChargeReconstruction.h
Referenced by InitRun(), and process_track().
|
private |
minimum pT required for track to be considered in residuals calculation (GeV/c)
Definition at line 146 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 146 of file TpcSpaceChargeReconstruction.h
Referenced by accept_track(), InitRun(), and set_min_pt().
|
private |
output file
Definition at line 140 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 140 of file TpcSpaceChargeReconstruction.h
Referenced by End(), InitRun(), and set_outputfile().
|
private |
Output root histograms.
Definition at line 181 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 181 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), process_track(), and set_save_histograms().
|
private |
acts geometry
Definition at line 149 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 149 of file TpcSpaceChargeReconstruction.h
Referenced by get_global_position(), and load_nodes().
|
private |
Definition at line 173 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 173 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_track().
|
private |
Definition at line 170 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 170 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_tracks().
|
private |
Definition at line 198 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 198 of file TpcSpaceChargeReconstruction.h
Referenced by load_nodes(), and process_tracks().
|
private |
true if only tracks with micromegas must be used
Definition at line 143 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 143 of file TpcSpaceChargeReconstruction.h
Referenced by accept_track(), InitRun(), and set_use_micromegas().