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

#include <coresoftware/blob/master/calibrations/tpc/generator/ChargeMapReader.h>

+ Collaboration diagram for ChargeMapReader:

Public Member Functions

 ChargeMapReader ()
 
 ChargeMapReader (int _n0, float _rmin, float _rmax, int _n1, float _phimin, float _phimax, int _n2, float _zmin, float _zmax)
 
 ~ChargeMapReader ()
 
void FillChargeHistogram (TH3 *h)
 
void AddChargeInBin (int r, int phi, int z, float q)
 
void AddChargeAtPosition (float r, float phi, float z, float q)
 
float GetChargeInBin (int r, int phi, int z)
 
float GetChargeAtPosition (float r, float phi, float z)
 
TH3 * GetDensityHistogram ()
 
bool ReadSourceCharge (const char *filename, const char *histname, float axisScale=1., float contentScale=1.)
 
bool ReadSourceCharge (TH3 *sourceHist, float axisScale=1., float contentScale=1.)
 
bool ReadSourceAdc (const char *adcfilename, const char *adchistname, const char *ibfgainfilename, const char *ibfgainhistname, float axisScale=1., float contentScale=1.)
 
bool ReadSourceAdc (TH3 *adcHist, TH2 *gainHist, float axisScale=1., float contentScale=1.)
 
void SetChargeInBin (int r, int phi, int z, float q)
 
void SetChargeAtPosition (float r, float phi, float z, float q)
 
bool SetOutputParameters (int _nr, float _rmin, float _rmax, int _nphi, float _phimin, float _phimax, int _nz, float _zmin, float _zmax)
 
bool SetOutputBounds (float _rmin, float _rmax, float _phimin, float _phimax, float _zmin, float _zmax)
 
bool SetOutputBins (int _nr, int _nphi, int _nz)
 

Static Public Member Functions

static bool CanInterpolateAt (float x, float y, float z, TH3 *h)
 

Private Member Functions

bool CanInterpolateAt (float r, float phi, float z)
 
void RegenerateCharge ()
 
void RegenerateDensity ()
 

Private Attributes

MultiArray< float > * charge = nullptr
 
TH3 * hSourceCharge = nullptr
 
TH3 * hChargeDensity = nullptr
 
float inputAxisScale = 1
 
float inputChargeScale = 1
 
int nBins [3] = {1, 1, 1}
 
float lowerBound [3] = {0, 0, 0}
 
float upperBound [3] = {999, 999, 999}
 
float binWidth [3] = {999, 999, 999}
 

Detailed Description

Definition at line 7 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 7 of file ChargeMapReader.h

Constructor & Destructor Documentation

ChargeMapReader::ChargeMapReader ( )

Definition at line 16 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 16 of file ChargeMapReader.cc

References printf().

+ Here is the call graph for this function:

ChargeMapReader::ChargeMapReader ( int  _n0,
float  _rmin,
float  _rmax,
int  _n1,
float  _phimin,
float  _phimax,
int  _n2,
float  _zmin,
float  _zmax 
)

Definition at line 23 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 23 of file ChargeMapReader.cc

References printf(), and SetOutputParameters().

+ Here is the call graph for this function:

ChargeMapReader::~ChargeMapReader ( )

Definition at line 31 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 31 of file ChargeMapReader.cc

Member Function Documentation

void ChargeMapReader::AddChargeAtPosition ( float  r,
float  phi,
float  z,
float  q 
)

Definition at line 619 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 619 of file ChargeMapReader.cc

References AddChargeInBin(), binWidth, and lowerBound.

Referenced by AnnularFieldSim::add_testcharge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ChargeMapReader::AddChargeInBin ( int  r,
int  phi,
int  z,
float  q 
)

Definition at line 605 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 605 of file ChargeMapReader.cc

References MultiArray< T >::Add(), assert, charge, DEBUG, nBins, and printf().

Referenced by AddChargeAtPosition(), and AnnularFieldSim::load_analytic_spacecharge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ChargeMapReader::CanInterpolateAt ( float  r,
float  phi,
float  z 
)
private

Definition at line 38 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 38 of file ChargeMapReader.cc

References hChargeDensity.

Referenced by RegenerateCharge().

+ Here is the caller graph for this function:

bool ChargeMapReader::CanInterpolateAt ( float  x,
float  y,
float  z,
TH3 *  h 
)
static

Definition at line 44 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 44 of file ChargeMapReader.cc

References CKF_timing_vs_mu::ax, i, nbins, Acts::Test::pos, ambiguity_solver_full_chain::x, and y.

void ChargeMapReader::FillChargeHistogram ( TH3 *  h)

Definition at line 101 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 101 of file ChargeMapReader.cc

References binWidth, charge, DEBUG, INTTVtxZ::dphi, dz, MultiArray< T >::Get(), i, lowerBound, nBins, and printf().

+ Here is the call graph for this function:

float ChargeMapReader::GetChargeAtPosition ( float  r,
float  phi,
float  z 
)

Definition at line 652 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 652 of file ChargeMapReader.cc

References binWidth, GetChargeInBin(), and lowerBound.

Referenced by AnnularFieldSim::GetChargeAt(), and AnnularFieldSim::save_spacecharge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float ChargeMapReader::GetChargeInBin ( int  r,
int  phi,
int  z 
)

Definition at line 626 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 626 of file ChargeMapReader.cc

References assert, charge, DEBUG, MultiArray< T >::Get(), nBins, and printf().

Referenced by GetChargeAtPosition(), AnnularFieldSim::load_analytic_spacecharge(), AnnularFieldSim::sum_full3d_field_at(), AnnularFieldSim::sum_local_field_at(), and AnnularFieldSim::sum_phislice_field_at().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TH3* ChargeMapReader::GetDensityHistogram ( )
inline

Definition at line 40 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 40 of file ChargeMapReader.h

References hChargeDensity.

bool ChargeMapReader::ReadSourceAdc ( const char *  adcfilename,
const char *  adchistname,
const char *  ibfgainfilename,
const char *  ibfgainhistname,
float  axisScale = 1.,
float  contentScale = 1. 
)

Definition at line 367 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 367 of file ChargeMapReader.cc

References hSourceCharge, and printf().

Referenced by AnnularFieldSim::load_digital_current().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ChargeMapReader::ReadSourceAdc ( TH3 *  adcHist,
TH2 *  gainHist,
float  axisScale = 1.,
float  contentScale = 1. 
)

Definition at line 395 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 395 of file ChargeMapReader.cc

References CKF_timing_vs_mu::ax, DEBUG, hSourceCharge, i, inputAxisScale, inputChargeScale, nbins, printf(), RegenerateCharge(), and RegenerateDensity().

+ Here is the call graph for this function:

bool ChargeMapReader::ReadSourceCharge ( const char *  filename,
const char *  histname,
float  axisScale = 1.,
float  contentScale = 1. 
)

Definition at line 325 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 325 of file ChargeMapReader.cc

References hSourceCharge, inputAxisScale, inputChargeScale, RegenerateCharge(), and RegenerateDensity().

Referenced by AnnularFieldSim::load_spacecharge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ChargeMapReader::ReadSourceCharge ( TH3 *  sourceHist,
float  axisScale = 1.,
float  contentScale = 1. 
)

Definition at line 343 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 343 of file ChargeMapReader.cc

References DEBUG, hSourceCharge, inputAxisScale, inputChargeScale, printf(), RegenerateCharge(), and RegenerateDensity().

+ Here is the call graph for this function:

void ChargeMapReader::RegenerateCharge ( )
private

Definition at line 135 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 135 of file ChargeMapReader.cc

References binWidth, CanInterpolateAt(), charge, DEBUG, INTTVtxZ::dphi, dz, hChargeDensity, hSourceCharge, i, inputAxisScale, inputChargeScale, lowerBound, nBins, printf(), MultiArray< T >::Set(), and MultiArray< T >::SetAll().

Referenced by ReadSourceAdc(), ReadSourceCharge(), SetOutputBins(), SetOutputBounds(), and SetOutputParameters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ChargeMapReader::RegenerateDensity ( )
private

Definition at line 234 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 234 of file ChargeMapReader.cc

References KFPMath::a, CKF_timing_vs_mu::ax, DEBUG, INTTVtxZ::dphi, dz, hChargeDensity, hSourceCharge, i, nbins, and printf().

Referenced by ReadSourceAdc(), and ReadSourceCharge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ChargeMapReader::SetChargeAtPosition ( float  r,
float  phi,
float  z,
float  q 
)

Definition at line 684 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 684 of file ChargeMapReader.cc

References binWidth, lowerBound, and SetChargeInBin().

+ Here is the call graph for this function:

void ChargeMapReader::SetChargeInBin ( int  r,
int  phi,
int  z,
float  q 
)

Definition at line 658 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 658 of file ChargeMapReader.cc

References assert, charge, DEBUG, nBins, printf(), and MultiArray< T >::Set().

Referenced by SetChargeAtPosition().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ChargeMapReader::SetOutputBins ( int  _nr,
int  _nphi,
int  _nz 
)

Definition at line 570 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 570 of file ChargeMapReader.cc

References binWidth, charge, hChargeDensity, i, lowerBound, nBins, RegenerateCharge(), MultiArray< T >::SetAll(), and upperBound.

+ Here is the call graph for this function:

bool ChargeMapReader::SetOutputBounds ( float  _rmin,
float  _rmax,
float  _phimin,
float  _phimax,
float  _zmin,
float  _zmax 
)

Definition at line 528 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 528 of file ChargeMapReader.cc

References binWidth, charge, hChargeDensity, i, lowerBound, nBins, RegenerateCharge(), MultiArray< T >::SetAll(), and upperBound.

+ Here is the call graph for this function:

bool ChargeMapReader::SetOutputParameters ( int  _nr,
float  _rmin,
float  _rmax,
int  _nphi,
float  _phimin,
float  _phimax,
int  _nz,
float  _zmin,
float  _zmax 
)

Definition at line 460 of file ChargeMapReader.cc.

View newest version in sPHENIX GitHub at line 460 of file ChargeMapReader.cc

References binWidth, charge, DEBUG, hChargeDensity, i, lowerBound, nBins, printf(), RegenerateCharge(), MultiArray< T >::SetAll(), and upperBound.

Referenced by ChargeMapReader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

float ChargeMapReader::binWidth[3] = {999, 999, 999}
private
MultiArray<float>* ChargeMapReader::charge = nullptr
private

Definition at line 15 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 15 of file ChargeMapReader.h

Referenced by AddChargeInBin(), FillChargeHistogram(), GetChargeInBin(), RegenerateCharge(), SetChargeInBin(), SetOutputBins(), SetOutputBounds(), and SetOutputParameters().

TH3* ChargeMapReader::hChargeDensity = nullptr
private

Definition at line 17 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 17 of file ChargeMapReader.h

Referenced by CanInterpolateAt(), GetDensityHistogram(), RegenerateCharge(), RegenerateDensity(), SetOutputBins(), SetOutputBounds(), and SetOutputParameters().

TH3* ChargeMapReader::hSourceCharge = nullptr
private

Definition at line 16 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 16 of file ChargeMapReader.h

Referenced by ReadSourceAdc(), ReadSourceCharge(), RegenerateCharge(), and RegenerateDensity().

float ChargeMapReader::inputAxisScale = 1
private

Definition at line 18 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 18 of file ChargeMapReader.h

Referenced by ReadSourceAdc(), ReadSourceCharge(), and RegenerateCharge().

float ChargeMapReader::inputChargeScale = 1
private

Definition at line 19 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 19 of file ChargeMapReader.h

Referenced by ReadSourceAdc(), ReadSourceCharge(), and RegenerateCharge().

float ChargeMapReader::lowerBound[3] = {0, 0, 0}
private
int ChargeMapReader::nBins[3] = {1, 1, 1}
private

Definition at line 20 of file ChargeMapReader.h.

View newest version in sPHENIX GitHub at line 20 of file ChargeMapReader.h

Referenced by AddChargeInBin(), FillChargeHistogram(), GetChargeInBin(), RegenerateCharge(), SetChargeInBin(), SetOutputBins(), SetOutputBounds(), and SetOutputParameters().

float ChargeMapReader::upperBound[3] = {999, 999, 999}
private

Definition at line 22 of file ChargeMapReader.h.

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

Referenced by SetOutputBins(), SetOutputBounds(), and SetOutputParameters().


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