EIC 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 <fun4all_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
 
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 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.
 
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}
 
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}
 

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 164 of file PHG4TpcDistortion.cc.

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

References exit(), hDPint, hDRint, hDZint, m_do_static_distortions, m_do_time_ordered_distortions, M_PI, TimehDP, TimehDR, and TimehDZ.

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 call graph for this function:

+ 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 147 of file PHG4TpcDistortion.cc.

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

References get_distortion().

+ 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 153 of file PHG4TpcDistortion.cc.

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

References get_distortion().

+ 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 100 of file PHG4TpcDistortion.cc.

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

References cos(), dx, get_distortion(), and phi.

+ 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 117 of file PHG4TpcDistortion.cc.

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

References cos(), dy, get_distortion(), and phi.

+ 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 159 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 159 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 134 of file PHG4TpcDistortion.cc.

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

References dz, get_distortion(), and phi.

+ Here is the call graph for this function:

void PHG4TpcDistortion::Init ( void  )

initialize

Definition at line 32 of file PHG4TpcDistortion.cc.

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

References exit(), hDPint, hDRint, hDZint, m_do_static_distortions, m_do_time_ordered_distortions, m_static_distortion_filename, m_static_tfile, m_time_ordered_distortion_filename, m_time_ordered_tfile, TimehDP, TimehDR, TimehDZ, and TimeTree.

+ Here is the call graph for this function:

void PHG4TpcDistortion::load_event ( int  event_num)

get relevant histogram from time ordered TTrees

Definition at line 83 of file PHG4TpcDistortion.cc.

View newest version in sPHENIX GitHub at line 83 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 65 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 65 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 77 of file PHG4TpcDistortion.h.

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

References m_do_time_ordered_distortions, and value.

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

set the filename for the single fixed distortion

Definition at line 71 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 71 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 83 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 83 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 54 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 54 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 95 of file PHG4TpcDistortion.h.

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

References verbosity.

Member Data Documentation

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

Definition at line 115 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

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

Definition at line 114 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

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

Definition at line 116 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

bool PHG4TpcDistortion::m_do_static_distortions = false
private

Definition at line 111 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 111 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 121 of file PHG4TpcDistortion.h.

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

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

std::string PHG4TpcDistortion::m_static_distortion_filename
private

Definition at line 112 of file PHG4TpcDistortion.h.

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

Referenced by Init(), and set_static_distortion_filename().

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

Definition at line 113 of file PHG4TpcDistortion.h.

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

Referenced by Init().

std::string PHG4TpcDistortion::m_time_ordered_distortion_filename
private

Definition at line 122 of file PHG4TpcDistortion.h.

View newest version in sPHENIX GitHub at line 122 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 123 of file PHG4TpcDistortion.h.

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

Referenced by Init().

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

Definition at line 126 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

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

Definition at line 125 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

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

Definition at line 127 of file PHG4TpcDistortion.h.

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

Referenced by get_distortion(), and Init().

TTree* PHG4TpcDistortion::TimeTree =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 Init(), and load_event().

int PHG4TpcDistortion::verbosity = 0
private

The verbosity level. 0 means not verbose at all.

Definition at line 107 of file PHG4TpcDistortion.h.

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

Referenced by Verbosity().


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