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

handle distortions (static and time-ordered) More...

#include <coresoftware/blob/master/simulation/g4simulation/g4tpc/PHG4TpcDistortion.h>

+ Collaboration diagram for PHG4TpcDistortion:

Public Member Functions

 PHG4TpcDistortion ()=default
 constructor
 
accessors
double get_x_distortion_cartesian (double x, double y, double z) const
 x distortion for a given truth location of the primary ionization
 
double get_y_distortion_cartesian (double x, double y, double z) const
 y distortion for a given truth location of the primary ionization
 
double get_z_distortion_cartesian (double x, double y, double z) const
 z distortion for a given truth location of the primary ionization
 
double get_r_distortion (double r, double phi, double z) const
 radial distortion for a given cylindrical truth location of the primary ionization
 
double get_rphi_distortion (double r, double phi, double z) const
 R*phi (hence the unitful phi-hat) distortion for a given cylindrical truth location of the primary ionization.
 
double get_z_distortion (double r, double phi, double z) const
 z distortion for a given cylindrical truth location of the primary ionization
 
double get_reaches_readout (double r, double phi, double z) const
 
int Verbosity () const
 Gets the verbosity of this module.
 
modifiers
void set_do_static_distortions (bool value)
 enable distortions from a single fixed source
 
void set_static_distortion_filename (const std::string &value)
 set the filename for the single fixed distortion
 
void set_do_time_ordered_distortions (bool value)
 enable time ordered distortions
 
void set_time_ordered_distortion_filename (const std::string &value)
 time ordered distortion filename
 
void set_read_phi_as_radians (bool flag=true)
 
void Init ()
 initialize
 
void load_event (int event_num)
 get relevant histogram from time ordered TTrees
 
void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 

Private Member Functions

double get_distortion (char axis, double r, double phi, double z) const
 get distortion for a set of histogram and an input momentum distribution
 

Private Attributes

int verbosity = 0
 The verbosity level. 0 means not verbose at all.
 
bool m_phi_hist_in_radians =true
 Flag controls whether to assume the phi hist units are radians or cm.
 
static histograms
bool m_do_static_distortions = false
 
std::string m_static_distortion_filename
 
std::unique_ptr< TFile > m_static_tfile
 
TH3 * hDRint [2] = {nullptr, nullptr}
 
TH3 * hDPint [2] = {nullptr, nullptr}
 
TH3 * hDZint [2] = {nullptr, nullptr}
 
TH3 * hReach [2] = {nullptr, nullptr}
 
time ordered histograms
bool m_do_time_ordered_distortions = false
 
std::string m_time_ordered_distortion_filename
 
std::unique_ptr< TFile > m_time_ordered_tfile
 
TTree * TimeTree = nullptr
 
TH3 * TimehDR [2] = {nullptr, nullptr}
 
TH3 * TimehDP [2] = {nullptr, nullptr}
 
TH3 * TimehDZ [2] = {nullptr, nullptr}
 
TH3 * TimehRR [2] = {nullptr, nullptr}
 

Detailed Description

handle distortions (static and time-ordered)

Definition at line 22 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 22 of file PHG4TpcDistortion.h

Constructor & Destructor Documentation

PHG4TpcDistortion::PHG4TpcDistortion ( )
explicitdefault

constructor

Member Function Documentation

double PHG4TpcDistortion::get_distortion ( char  axis,
double  r,
double  phi,
double  z 
) const
private

get distortion for a set of histogram and an input momentum distribution

Definition at line 195 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 195 of file PHG4TpcDistortion.cc

References hDPint, hDRint, hDZint, hReach, m_do_static_distortions, m_do_time_ordered_distortions, TimehDP, TimehDR, TimehDZ, and TimehRR.

Referenced by get_r_distortion(), get_rphi_distortion(), get_x_distortion_cartesian(), get_y_distortion_cartesian(), get_z_distortion(), and get_z_distortion_cartesian().

+ Here is the caller graph for this function:

double PHG4TpcDistortion::get_r_distortion ( double  r,
double  phi,
double  z 
) const

radial distortion for a given cylindrical truth location of the primary ionization

Definition at line 168 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 168 of file PHG4TpcDistortion.cc

References get_distortion().

+ Here is the call graph for this function:

double PHG4TpcDistortion::get_reaches_readout ( double  r,
double  phi,
double  z 
) const

Definition at line 188 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 188 of file PHG4TpcDistortion.cc

References printf().

+ Here is the call graph for this function:

double PHG4TpcDistortion::get_rphi_distortion ( double  r,
double  phi,
double  z 
) const

R*phi (hence the unitful phi-hat) distortion for a given cylindrical truth location of the primary ionization.

Definition at line 174 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 174 of file PHG4TpcDistortion.cc

References get_distortion(), and m_phi_hist_in_radians.

+ Here is the call graph for this function:

double PHG4TpcDistortion::get_x_distortion_cartesian ( double  x,
double  y,
double  z 
) const

x distortion for a given truth location of the primary ionization

Definition at line 122 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 122 of file PHG4TpcDistortion.cc

References INTTVtxZ::dphi, and get_distortion().

+ Here is the call graph for this function:

double PHG4TpcDistortion::get_y_distortion_cartesian ( double  x,
double  y,
double  z 
) const

y distortion for a given truth location of the primary ionization

Definition at line 139 of file PHG4TpcDistortion.cc.

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

References INTTVtxZ::dphi, dy, and get_distortion().

+ Here is the call graph for this function:

double PHG4TpcDistortion::get_z_distortion ( double  r,
double  phi,
double  z 
) const

z distortion for a given cylindrical truth location of the primary ionization

Definition at line 183 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 183 of file PHG4TpcDistortion.cc

References get_distortion().

+ Here is the call graph for this function:

double PHG4TpcDistortion::get_z_distortion_cartesian ( double  x,
double  y,
double  z 
) const

z distortion for a given truth location of the primary ionization

Definition at line 156 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 156 of file PHG4TpcDistortion.cc

References dz, and get_distortion().

+ Here is the call graph for this function:

void PHG4TpcDistortion::Init ( )
void PHG4TpcDistortion::load_event ( int  event_num)

get relevant histogram from time ordered TTrees

Definition at line 105 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 105 of file PHG4TpcDistortion.cc

References TimeTree.

void PHG4TpcDistortion::set_do_static_distortions ( bool  value)
inline

enable distortions from a single fixed source

Definition at line 64 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 64 of file PHG4TpcDistortion.h

References m_do_static_distortions, and value.

Referenced by TPC_Cells().

+ Here is the caller graph for this function:

void PHG4TpcDistortion::set_do_time_ordered_distortions ( bool  value)
inline

enable time ordered distortions

Definition at line 76 of file PHG4TpcDistortion.h.

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

References m_do_time_ordered_distortions, and value.

void PHG4TpcDistortion::set_read_phi_as_radians ( bool  flag = true)
inline

Definition at line 87 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 87 of file PHG4TpcDistortion.h

References m_phi_hist_in_radians.

void PHG4TpcDistortion::set_static_distortion_filename ( const std::string &  value)
inline

set the filename for the single fixed distortion

Definition at line 70 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 70 of file PHG4TpcDistortion.h

References m_static_distortion_filename, and value.

void PHG4TpcDistortion::set_time_ordered_distortion_filename ( const std::string &  value)
inline

time ordered distortion filename

Definition at line 82 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 82 of file PHG4TpcDistortion.h

References m_time_ordered_distortion_filename, and value.

int PHG4TpcDistortion::Verbosity ( ) const
inline

Gets the verbosity of this module.

Definition at line 53 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 53 of file PHG4TpcDistortion.h

References verbosity.

void PHG4TpcDistortion::Verbosity ( const int  ival)
inline

Sets the verbosity of this module (0 by default=quiet).

Definition at line 98 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 98 of file PHG4TpcDistortion.h

References verbosity.

Member Data Documentation

TH3* PHG4TpcDistortion::hDPint[2] = {nullptr, nullptr}
private

Definition at line 122 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 122 of file PHG4TpcDistortion.h

Referenced by get_distortion(), and Init().

TH3* PHG4TpcDistortion::hDRint[2] = {nullptr, nullptr}
private

Definition at line 121 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

TH3* PHG4TpcDistortion::hDZint[2] = {nullptr, nullptr}
private

Definition at line 123 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

TH3* PHG4TpcDistortion::hReach[2] = {nullptr, nullptr}
private

Definition at line 124 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion().

bool PHG4TpcDistortion::m_do_static_distortions = false
private

Definition at line 118 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 118 of file PHG4TpcDistortion.h

Referenced by get_distortion(), Init(), and set_do_static_distortions().

bool PHG4TpcDistortion::m_do_time_ordered_distortions = false
private

Definition at line 129 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 129 of file PHG4TpcDistortion.h

Referenced by get_distortion(), Init(), and set_do_time_ordered_distortions().

bool PHG4TpcDistortion::m_phi_hist_in_radians =true
private

Flag controls whether to assume the phi hist units are radians or cm.

Definition at line 113 of file PHG4TpcDistortion.h.

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

Referenced by get_rphi_distortion(), and set_read_phi_as_radians().

std::string PHG4TpcDistortion::m_static_distortion_filename
private

Definition at line 119 of file PHG4TpcDistortion.h.

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

Referenced by Init(), and set_static_distortion_filename().

std::unique_ptr<TFile> PHG4TpcDistortion::m_static_tfile
private

Definition at line 120 of file PHG4TpcDistortion.h.

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

Referenced by Init().

std::string PHG4TpcDistortion::m_time_ordered_distortion_filename
private

Definition at line 130 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 130 of file PHG4TpcDistortion.h

Referenced by Init(), and set_time_ordered_distortion_filename().

std::unique_ptr<TFile> PHG4TpcDistortion::m_time_ordered_tfile
private

Definition at line 131 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 131 of file PHG4TpcDistortion.h

Referenced by Init().

TH3* PHG4TpcDistortion::TimehDP[2] = {nullptr, nullptr}
private

Definition at line 134 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 134 of file PHG4TpcDistortion.h

Referenced by get_distortion(), and Init().

TH3* PHG4TpcDistortion::TimehDR[2] = {nullptr, nullptr}
private

Definition at line 133 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 133 of file PHG4TpcDistortion.h

Referenced by get_distortion(), and Init().

TH3* PHG4TpcDistortion::TimehDZ[2] = {nullptr, nullptr}
private

Definition at line 135 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 135 of file PHG4TpcDistortion.h

Referenced by get_distortion(), and Init().

TH3* PHG4TpcDistortion::TimehRR[2] = {nullptr, nullptr}
private

Definition at line 136 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 136 of file PHG4TpcDistortion.h

Referenced by get_distortion(), and Init().

TTree* PHG4TpcDistortion::TimeTree = nullptr
private

Definition at line 132 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 132 of file PHG4TpcDistortion.h

Referenced by Init(), and load_event().

int PHG4TpcDistortion::verbosity = 0
private

The verbosity level. 0 means not verbose at all.

Definition at line 110 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 110 of file PHG4TpcDistortion.h

Referenced by Verbosity().


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