EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
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 <fun4all_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_grid_dimensions (int phibins, int rbins, int zbins) |
set grid dimensions | |
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 | |
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) |
Private Member Functions | |
int | load_nodes (PHCompositeNode *) |
load nodes | |
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 (TrkrCluster *) const |
get relevant cell for a given cluster | |
Private Attributes | |
std::string | m_outputfile = "TpcSpaceChargeMatrices.root" |
output file | |
bool | m_use_micromegas = true |
true if only tracks with micromegas must be used | |
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 |
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") | |
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 37 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 37 of file TpcSpaceChargeReconstruction.h
TpcSpaceChargeReconstruction::TpcSpaceChargeReconstruction | ( | const std::string & | name = "TPCSPACECHARGERECONSTRUCTION" | ) |
constructor
Definition at line 69 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 69 of file TpcSpaceChargeReconstruction.cc
References PHParameterInterface::InitializeParameters().
|
private |
returns true if track fulfills basic requirement for distortion calculations
Definition at line 204 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 204 of file TpcSpaceChargeReconstruction.cc
References SvtxTrack::get_px(), SvtxTrack::get_py(), m_use_micromegas, and square().
Referenced by process_tracks().
|
overridevirtual |
end of processing
Reimplemented from SubsysReco.
Definition at line 137 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 137 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, m_accepted_clusters, m_accepted_tracks, m_matrix_container, m_outputfile, m_total_clusters, m_total_tracks, and run_skim::outputfile.
|
private |
get relevant cell for a given cluster
Definition at line 397 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 397 of file TpcSpaceChargeReconstruction.cc
References QAG4Util::get_r(), TrkrCluster::getX(), TrkrCluster::getY(), TrkrCluster::getZ(), ir(), m_matrix_container, M_PI, phibins, and z.
Referenced by process_track().
|
overridevirtual |
global initialization
Reimplemented from SubsysReco.
Definition at line 82 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 82 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, m_accepted_clusters, m_accepted_tracks, m_total_clusters, and m_total_tracks.
|
overridevirtual |
run initialization
Reimplemented from SubsysReco.
Definition at line 95 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 95 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_outputfile, m_use_micromegas, PHParameterInterface::UpdateParametersWithMacro(), and Fun4AllBase::Verbosity().
|
private |
load nodes
Definition at line 177 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 177 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, m_cluster_map, and m_track_map.
Referenced by process_event().
|
overridevirtual |
event processing
Reimplemented from SubsysReco.
Definition at line 126 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 126 of file TpcSpaceChargeReconstruction.cc
References Fun4AllReturnCodes::EVENT_OK, load_nodes(), and process_tracks().
|
private |
process track
Definition at line 220 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 220 of file TpcSpaceChargeReconstruction.cc
References kdfinder::abs(), SvtxTrack::begin_cluster_keys(), SvtxTrack::begin_states(), cos(), QAG4Util::delta_phi(), dz, SvtxTrack::end_cluster_keys(), SvtxTrack::end_states(), TrkrClusterContainer::findCluster(), get_cell_index(), QAG4Util::get_r(), TrkrDefs::getTrkrId(), m_accepted_clusters, m_cluster_map, m_matrix_container, m_max_drphi, m_max_dz, m_max_talpha, m_max_tbeta, m_total_clusters, PHWHERE, square(), and TrkrDefs::tpcId.
Referenced by process_tracks().
|
private |
process tracks
Definition at line 189 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 189 of file TpcSpaceChargeReconstruction.cc
References accept_track(), SvtxTrackMap::begin(), SvtxTrackMap::end(), 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 78 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 78 of file TpcSpaceChargeReconstruction.cc
References m_matrix_container.
|
inline |
output file
this is the file where space charge matrix container is stored
Definition at line 62 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 62 of file TpcSpaceChargeReconstruction.h
References INPUTHEPMC::filename, and m_outputfile.
Referenced by Tracking_Reco().
|
inline |
set whether to use only tracks with micromegas or not
Definition at line 48 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 48 of file TpcSpaceChargeReconstruction.h
References m_use_micromegas, and value.
|
overridevirtual |
parameters
Implements PHParameterInterface.
Definition at line 167 of file TpcSpaceChargeReconstruction.cc.
View newest version in sPHENIX GitHub at line 167 of file TpcSpaceChargeReconstruction.cc
References PHParameterInterface::set_default_double_param().
|
private |
Definition at line 125 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 125 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_track().
|
private |
Definition at line 122 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 122 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_tracks().
|
private |
Definition at line 131 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 131 of file TpcSpaceChargeReconstruction.h
Referenced by load_nodes(), process_track(), and process_tracks().
|
private |
matrix container
Definition at line 117 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 117 of file TpcSpaceChargeReconstruction.h
Referenced by End(), get_cell_index(), InitRun(), process_track(), and set_grid_dimensions().
|
private |
Definition at line 109 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 109 of file TpcSpaceChargeReconstruction.h
Referenced by InitRun(), and process_track().
|
private |
Definition at line 113 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 113 of file TpcSpaceChargeReconstruction.h
Referenced by InitRun(), and process_track().
|
private |
Definition at line 108 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 108 of file TpcSpaceChargeReconstruction.h
Referenced by InitRun(), and process_track().
|
private |
Definition at line 112 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 112 of file TpcSpaceChargeReconstruction.h
Referenced by InitRun(), and process_track().
|
private |
output file
Definition at line 100 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 100 of file TpcSpaceChargeReconstruction.h
Referenced by End(), InitRun(), and set_outputfile().
|
private |
Definition at line 124 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 124 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_track().
|
private |
Definition at line 121 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 121 of file TpcSpaceChargeReconstruction.h
Referenced by End(), Init(), and process_tracks().
|
private |
Definition at line 130 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 130 of file TpcSpaceChargeReconstruction.h
Referenced by load_nodes(), and process_tracks().
|
private |
true if only tracks with micromegas must be used
Definition at line 103 of file TpcSpaceChargeReconstruction.h.
View newest version in sPHENIX GitHub at line 103 of file TpcSpaceChargeReconstruction.h
Referenced by accept_track(), InitRun(), and set_use_micromegas().