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

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

+ Inheritance diagram for PHG4TpcPadPlaneReadout:
+ Collaboration diagram for PHG4TpcPadPlaneReadout:

Public Member Functions

 PHG4TpcPadPlaneReadout (const std::string &name="PHG4TpcPadPlaneReadout")
 
 ~PHG4TpcPadPlaneReadout () override
 
int InitRun (PHCompositeNode *topNode) override
 
void UseGain (const int flagToUseGain)
 
void ReadGain ()
 
void SetDriftVelocity (double vd) override
 
void SetReadoutTime (float t) override
 
void MapToPadPlane (TpcClusterBuilder &tpc_clustbuilder, TrkrHitSetContainer *single_hitsetcontainer, TrkrHitSetContainer *hitsetcontainer, TrkrHitTruthAssoc *, const double x_gem, const double y_gem, const double t_gem, const unsigned int side, PHG4HitContainer::ConstIterator hiter, TNtuple *, TNtuple *) override
 
void SetDefaultParameters () override
 
void UpdateInternalParameters () override
 
- Public Member Functions inherited from PHG4TpcPadPlane
 PHG4TpcPadPlane (const std::string &name="PHG4TpcPadPlane")
 
int process_event (PHCompositeNode *) final
 
void Detector (const std::string &name)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int End (PHCompositeNode *)
 Called at the end of all processing.
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Init (PHCompositeNode *)
 
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
 
PHParameterInterfaceoperator= (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

void populate_zigzag_phibins (const unsigned int side, const unsigned int layernum, const double phi, const double cloud_sig_rp, std::vector< int > &pad_phibin, std::vector< double > &pad_phibin_share)
 
void populate_tbins (const double t, const std::array< double, 2 > &cloud_sig_tt, std::vector< int > &adc_tbin, std::vector< double > &adc_tbin_share)
 
double check_phi (const unsigned int side, const double phi, const double radius)
 
double getSingleEGEMAmplification ()
 

Private Attributes

PHG4TpcCylinderGeomContainerGeomContainer = nullptr
 
PHG4TpcCylinderGeomLayerGeom = nullptr
 
double neffelectrons_threshold = NAN
 
std::array< double, 3 > MinRadius
 
std::array< double, 3 > MaxRadius
 
double sigmaT = NAN
 
std::array< double, 2 > sigmaL
 
std::array< double, 3 > PhiBinWidth
 
double drift_velocity = 8.0e-03
 
float extended_readout_time = 0
 
int NTBins = INT_MAX
 
int m_NHits = 0
 
int m_flagToUseGain = 0
 
double averageGEMGain = NAN
 
std::array< std::array
< std::vector< double >
, NRSectors >, NSides
sector_min_Phi_sectors
 
std::array< std::array
< std::vector< double >
, NRSectors >, NSides
sector_max_Phi_sectors
 
gsl_rng * RandomGenerator = nullptr
 
TH2F * h_gain [2] = {nullptr}
 

Static Private Attributes

static constexpr int NSides = 2
 
static constexpr int NSectors = 12
 
static const int NRSectors = 3
 
static constexpr double _nsigmas = 5
 

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 ()
 
- Protected Attributes inherited from PHG4TpcPadPlane
std::string detector
 

Detailed Description

Definition at line 26 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 26 of file PHG4TpcPadPlaneReadout.h

Constructor & Destructor Documentation

PHG4TpcPadPlaneReadout::PHG4TpcPadPlaneReadout ( const std::string &  name = "PHG4TpcPadPlaneReadout")

Definition at line 68 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 68 of file PHG4TpcPadPlaneReadout.cc

References gsl_rng_set(), h_gain, PHParameterInterface::InitializeParameters(), RandomGenerator, and ReadGain().

+ Here is the call graph for this function:

PHG4TpcPadPlaneReadout::~PHG4TpcPadPlaneReadout ( )
override

Definition at line 82 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 82 of file PHG4TpcPadPlaneReadout.cc

References h_gain, and RandomGenerator.

Member Function Documentation

double PHG4TpcPadPlaneReadout::check_phi ( const unsigned int  side,
const double  phi,
const double  radius 
)
private

Definition at line 399 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 399 of file PHG4TpcPadPlaneReadout.cc

References MaxRadius, MinRadius, ActsTests::PropagationDatasets::phi, PhiBinWidth, physmon_simulation::s, sector_max_Phi_sectors, and sector_min_Phi_sectors.

Referenced by MapToPadPlane(), and populate_zigzag_phibins().

+ Here is the caller graph for this function:

double PHG4TpcPadPlaneReadout::getSingleEGEMAmplification ( )
private

Definition at line 105 of file PHG4TpcPadPlaneReadout.cc.

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

References averageGEMGain, and RandomGenerator.

Referenced by MapToPadPlane().

+ Here is the caller graph for this function:

int PHG4TpcPadPlaneReadout::InitRun ( PHCompositeNode )
overridevirtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.

Reimplemented from PHG4TpcPadPlane.

Definition at line 90 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 90 of file PHG4TpcPadPlaneReadout.cc

References assert, Fun4AllReturnCodes::EVENT_OK, GeomContainer, and PHG4TpcPadPlane::InitRun().

+ Here is the call graph for this function:

void PHG4TpcPadPlaneReadout::MapToPadPlane ( TpcClusterBuilder tpc_clustbuilder,
TrkrHitSetContainer single_hitsetcontainer,
TrkrHitSetContainer hitsetcontainer,
TrkrHitTruthAssoc ,
const double  x_gem,
const double  y_gem,
const double  t_gem,
const unsigned int  side,
PHG4HitContainer::ConstIterator  hiter,
TNtuple *  ,
TNtuple *   
)
overridevirtual
void PHG4TpcPadPlaneReadout::populate_tbins ( const double  t,
const std::array< double, 2 > &  cloud_sig_tt,
std::vector< int > &  adc_tbin,
std::vector< double > &  adc_tbin_share 
)
private

Definition at line 563 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 563 of file PHG4TpcPadPlaneReadout.cc

References PHG4TpcCylinderGeom::get_layer(), PHG4TpcCylinderGeom::get_zbin(), PHG4TpcCylinderGeom::get_zbins(), PHG4TpcCylinderGeom::get_zcenter(), PHG4TpcCylinderGeom::get_zstep(), index, Acts::index1, Acts::index2, it, LayerGeom, NTBins, and Fun4AllBase::Verbosity().

Referenced by MapToPadPlane().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcPadPlaneReadout::populate_zigzag_phibins ( const unsigned int  side,
const unsigned int  layernum,
const double  phi,
const double  cloud_sig_rp,
std::vector< int > &  pad_phibin,
std::vector< double > &  pad_phibin_share 
)
private

Definition at line 438 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 438 of file PHG4TpcPadPlaneReadout.cc

References _nsigmas, check_phi(), PHG4TpcCylinderGeom::get_layer(), PHG4TpcCylinderGeom::get_phibin(), PHG4TpcCylinderGeom::get_phibins(), PHG4TpcCylinderGeom::get_phicenter(), PHG4TpcCylinderGeom::get_phistep(), PHG4TpcCylinderGeom::get_radius(), LayerGeom, ActsTests::PropagationDatasets::phi, MATSCAN::phibins, sigma, square(), and Fun4AllBase::Verbosity().

Referenced by MapToPadPlane().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcPadPlaneReadout::ReadGain ( )

Definition at line 682 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 682 of file PHG4TpcPadPlaneReadout.cc

References h_gain, and m_flagToUseGain.

Referenced by PHG4TpcPadPlaneReadout().

+ Here is the caller graph for this function:

void PHG4TpcPadPlaneReadout::SetDefaultParameters ( )
overridevirtual

Implements PHParameterInterface.

Definition at line 699 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 699 of file PHG4TpcPadPlaneReadout.cc

References PHParameterInterface::set_default_double_param(), and PHParameterInterface::set_default_int_param().

+ Here is the call graph for this function:

void PHG4TpcPadPlaneReadout::SetDriftVelocity ( double  vd)
inlineoverridevirtual

Reimplemented from PHG4TpcPadPlane.

Definition at line 38 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 38 of file PHG4TpcPadPlaneReadout.h

References drift_velocity.

void PHG4TpcPadPlaneReadout::SetReadoutTime ( float  t)
inlineoverridevirtual

Reimplemented from PHG4TpcPadPlane.

Definition at line 39 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 39 of file PHG4TpcPadPlaneReadout.h

References extended_readout_time, and t.

void PHG4TpcPadPlaneReadout::UpdateInternalParameters ( )
overridevirtual

Reimplemented from PHG4TpcPadPlane.

Definition at line 736 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 736 of file PHG4TpcPadPlaneReadout.cc

References averageGEMGain, double(), drift_velocity, extended_readout_time, PHParameterInterface::get_double_param(), PHParameterInterface::get_int_param(), MaxRadius, MinRadius, neffelectrons_threshold, NSectors, NTBins, PhiBinWidth, sector_max_Phi_sectors, sector_min_Phi_sectors, sigmaL, and sigmaT.

+ Here is the call graph for this function:

void PHG4TpcPadPlaneReadout::UseGain ( const int  flagToUseGain)

Definition at line 676 of file PHG4TpcPadPlaneReadout.cc.

View newest version in sPHENIX GitHub at line 676 of file PHG4TpcPadPlaneReadout.cc

References m_flagToUseGain, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

Member Data Documentation

constexpr double PHG4TpcPadPlaneReadout::_nsigmas = 5
staticprivate

Definition at line 77 of file PHG4TpcPadPlaneReadout.h.

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

Referenced by populate_zigzag_phibins().

double PHG4TpcPadPlaneReadout::averageGEMGain = NAN
private

Definition at line 79 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 79 of file PHG4TpcPadPlaneReadout.h

Referenced by getSingleEGEMAmplification(), and UpdateInternalParameters().

double PHG4TpcPadPlaneReadout::drift_velocity = 8.0e-03
private

Definition at line 70 of file PHG4TpcPadPlaneReadout.h.

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

Referenced by SetDriftVelocity(), and UpdateInternalParameters().

float PHG4TpcPadPlaneReadout::extended_readout_time = 0
private

Definition at line 71 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 71 of file PHG4TpcPadPlaneReadout.h

Referenced by SetReadoutTime(), and UpdateInternalParameters().

PHG4TpcCylinderGeomContainer* PHG4TpcPadPlaneReadout::GeomContainer = nullptr
private

Definition at line 55 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 55 of file PHG4TpcPadPlaneReadout.h

Referenced by InitRun(), and MapToPadPlane().

TH2F* PHG4TpcPadPlaneReadout::h_gain[2] = {nullptr}
private

Definition at line 88 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 88 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane(), PHG4TpcPadPlaneReadout(), ReadGain(), and ~PHG4TpcPadPlaneReadout().

PHG4TpcCylinderGeom* PHG4TpcPadPlaneReadout::LayerGeom = nullptr
private

Definition at line 56 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 56 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane(), populate_tbins(), and populate_zigzag_phibins().

int PHG4TpcPadPlaneReadout::m_flagToUseGain = 0
private

Definition at line 75 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 75 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane(), ReadGain(), and UseGain().

int PHG4TpcPadPlaneReadout::m_NHits = 0
private

Definition at line 73 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 73 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane().

std::array<double, 3> PHG4TpcPadPlaneReadout::MaxRadius
private

Definition at line 61 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 61 of file PHG4TpcPadPlaneReadout.h

Referenced by check_phi(), MapToPadPlane(), and UpdateInternalParameters().

std::array<double, 3> PHG4TpcPadPlaneReadout::MinRadius
private

Definition at line 60 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 60 of file PHG4TpcPadPlaneReadout.h

Referenced by check_phi(), MapToPadPlane(), and UpdateInternalParameters().

double PHG4TpcPadPlaneReadout::neffelectrons_threshold = NAN
private

Definition at line 58 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 58 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane(), and UpdateInternalParameters().

const int PHG4TpcPadPlaneReadout::NRSectors = 3
staticprivate

Definition at line 65 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 65 of file PHG4TpcPadPlaneReadout.h

constexpr int PHG4TpcPadPlaneReadout::NSectors = 12
staticprivate

Definition at line 64 of file PHG4TpcPadPlaneReadout.h.

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

Referenced by UpdateInternalParameters().

constexpr int PHG4TpcPadPlaneReadout::NSides = 2
staticprivate

Definition at line 63 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 63 of file PHG4TpcPadPlaneReadout.h

int PHG4TpcPadPlaneReadout::NTBins = INT_MAX
private

Definition at line 72 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 72 of file PHG4TpcPadPlaneReadout.h

Referenced by populate_tbins(), and UpdateInternalParameters().

std::array<double, 3> PHG4TpcPadPlaneReadout::PhiBinWidth
private

Definition at line 69 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 69 of file PHG4TpcPadPlaneReadout.h

Referenced by check_phi(), and UpdateInternalParameters().

gsl_rng* PHG4TpcPadPlaneReadout::RandomGenerator = nullptr
private

Definition at line 86 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 86 of file PHG4TpcPadPlaneReadout.h

Referenced by getSingleEGEMAmplification(), PHG4TpcPadPlaneReadout(), and ~PHG4TpcPadPlaneReadout().

std::array< std::array< std::vector<double>, NRSectors >, NSides > PHG4TpcPadPlaneReadout::sector_max_Phi_sectors
private

Definition at line 82 of file PHG4TpcPadPlaneReadout.h.

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

Referenced by check_phi(), and UpdateInternalParameters().

std::array< std::array< std::vector<double>, NRSectors >, NSides > PHG4TpcPadPlaneReadout::sector_min_Phi_sectors
private

Definition at line 81 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 81 of file PHG4TpcPadPlaneReadout.h

Referenced by check_phi(), and UpdateInternalParameters().

std::array<double, 2> PHG4TpcPadPlaneReadout::sigmaL
private

Definition at line 68 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 68 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane(), and UpdateInternalParameters().

double PHG4TpcPadPlaneReadout::sigmaT = NAN
private

Definition at line 67 of file PHG4TpcPadPlaneReadout.h.

View newest version in sPHENIX GitHub at line 67 of file PHG4TpcPadPlaneReadout.h

Referenced by MapToPadPlane(), and UpdateInternalParameters().


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