EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcDigitizer Class Reference

#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4tpc/PHG4TpcDigitizer.h>

+ Inheritance diagram for PHG4TpcDigitizer:
+ Collaboration diagram for PHG4TpcDigitizer:

Public Member Functions

 PHG4TpcDigitizer (const std::string &name="PHG4TpcDigitizer")
 
 ~PHG4TpcDigitizer () override
 
int Init (PHCompositeNode *) override
 module initialization
 
int InitRun (PHCompositeNode *topNode) override
 run initialization
 
int process_event (PHCompositeNode *topNode) override
 event processing
 
int End (PHCompositeNode *) override
 end of process
 
void set_adc_scale (const int layer, const unsigned int max_adc, const float energy_per_adc)
 
void SetTpcMinLayer (const int minlayer)
 
void SetADCThreshold (const float thresh)
 
void SetENC (const float enc)
 
- 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.
 

Private Member Functions

void CalculateCylinderCellADCScale (PHCompositeNode *topNode)
 
void DigitizeCylinderCells (PHCompositeNode *topNode)
 
float added_noise ()
 

Private Attributes

unsigned int TpcMinLayer
 
float ADCThreshold
 
float TpcEnc
 
float Pedestal
 
float ChargeToPeakVolts
 
float ADCSignalConversionGain
 
float ADCNoiseConversionGain
 
std::vector< std::vector
< TrkrHitSet::ConstIterator > > 
phi_sorted_hits
 
std::vector< std::vector
< TrkrHitSet::ConstIterator > > 
z_sorted_hits
 
std::vector< float > adc_input
 
std::vector< TrkrDefs::hitkeyadc_hitid
 
std::vector< int > is_populated
 
std::map< int, unsigned int > _max_adc
 
std::map< int, float > _energy_scale
 
gsl_rng * RandomGenerator
 random generator that conform with sPHENIX standard
 

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")
 

Detailed Description

Definition at line 20 of file PHG4TpcDigitizer.h.

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

Constructor & Destructor Documentation

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

Definition at line 33 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 33 of file PHG4TpcDigitizer.cc

References Fun4AllBase::Name(), RandomGenerator, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

PHG4TpcDigitizer::~PHG4TpcDigitizer ( )
override

Definition at line 54 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 54 of file PHG4TpcDigitizer.cc

References RandomGenerator.

Member Function Documentation

float PHG4TpcDigitizer::added_noise ( )
private

Definition at line 618 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 618 of file PHG4TpcDigitizer.cc

References RandomGenerator, and TpcEnc.

Referenced by DigitizeCylinderCells().

+ Here is the caller graph for this function:

void PHG4TpcDigitizer::CalculateCylinderCellADCScale ( PHCompositeNode topNode)
private

Definition at line 118 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 118 of file PHG4TpcDigitizer.cc

References _energy_scale, _max_adc, PHG4CylinderCellGeomContainer::get_begin_end(), get_thickness(), G4TTL::layer, G4BARRELHCAL::length, and thickness.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcDigitizer::DigitizeCylinderCells ( PHCompositeNode topNode)
private

Definition at line 151 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 151 of file PHG4TpcDigitizer.cc

References adc_hitid, adc_input, ADCNoiseConversionGain, ADCSignalConversionGain, ADCThreshold, added_noise(), exit(), TrkrHitSetContainer::findHitSet(), TpcDefs::genHitKey(), PHG4CylinderCellGeom::get_phibins(), PHG4CylinderCellGeom::get_zbins(), TrkrHit::getAdc(), TrkrHitSet::getHits(), TrkrHitSetContainer::getHitSets(), TrkrDefs::getLayer(), PHG4CylinderCellGeomContainer::GetLayerCellGeom(), TpcDefs::getPad(), TpcDefs::getSectorId(), TpcDefs::getSide(), TpcDefs::getTBin(), is_populated, G4TTL::layer, Pedestal, phi_sorted_hits, PHWHERE, TrkrHitTruthAssoc::removeAssoc(), TrkrHitSet::removeHit(), TrkrHit::setAdc(), TrkrDefs::tpcId, Fun4AllBase::Verbosity(), and z_sorted_hits.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4TpcDigitizer::End ( PHCompositeNode )
inlineoverridevirtual

end of process

Reimplemented from SubsysReco.

Definition at line 36 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 36 of file PHG4TpcDigitizer.h

int PHG4TpcDigitizer::Init ( PHCompositeNode )
inlineoverridevirtual

module initialization

Reimplemented from SubsysReco.

Definition at line 27 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 27 of file PHG4TpcDigitizer.h

int PHG4TpcDigitizer::InitRun ( PHCompositeNode topNode)
overridevirtual

run initialization

Reimplemented from SubsysReco.

Definition at line 59 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 59 of file PHG4TpcDigitizer.cc

References _energy_scale, _max_adc, Fun4AllReturnCodes::ABORTRUN, ADCNoiseConversionGain, ADCSignalConversionGain, ADCThreshold, CalculateCylinderCellADCScale(), ChargeToPeakVolts, Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), Pedestal, PHWHERE, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHG4TpcDigitizer::process_event ( PHCompositeNode topNode)
overridevirtual

event processing

Reimplemented from SubsysReco.

Definition at line 111 of file PHG4TpcDigitizer.cc.

View newest version in sPHENIX GitHub at line 111 of file PHG4TpcDigitizer.cc

References DigitizeCylinderCells(), and Fun4AllReturnCodes::EVENT_OK.

+ Here is the call graph for this function:

void PHG4TpcDigitizer::set_adc_scale ( const int  layer,
const unsigned int  max_adc,
const float  energy_per_adc 
)
inline

Definition at line 38 of file PHG4TpcDigitizer.h.

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

References _energy_scale, and _max_adc.

void PHG4TpcDigitizer::SetADCThreshold ( const float  thresh)
inline

Definition at line 45 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 45 of file PHG4TpcDigitizer.h

References ADCThreshold.

Referenced by TPC_Cells().

+ Here is the caller graph for this function:

void PHG4TpcDigitizer::SetENC ( const float  enc)
inline

Definition at line 46 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 46 of file PHG4TpcDigitizer.h

References TpcEnc.

Referenced by TPC_Cells().

+ Here is the caller graph for this function:

void PHG4TpcDigitizer::SetTpcMinLayer ( const int  minlayer)
inline

Definition at line 44 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 44 of file PHG4TpcDigitizer.h

References TpcMinLayer.

Referenced by TPC_Cells().

+ Here is the caller graph for this function:

Member Data Documentation

std::map<int, float> PHG4TpcDigitizer::_energy_scale
private

Definition at line 71 of file PHG4TpcDigitizer.h.

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

Referenced by CalculateCylinderCellADCScale(), InitRun(), and set_adc_scale().

std::map<int, unsigned int> PHG4TpcDigitizer::_max_adc
private

Definition at line 70 of file PHG4TpcDigitizer.h.

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

Referenced by CalculateCylinderCellADCScale(), InitRun(), and set_adc_scale().

std::vector<TrkrDefs::hitkey> PHG4TpcDigitizer::adc_hitid
private

Definition at line 66 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 66 of file PHG4TpcDigitizer.h

Referenced by DigitizeCylinderCells().

std::vector<float> PHG4TpcDigitizer::adc_input
private

Definition at line 65 of file PHG4TpcDigitizer.h.

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

Referenced by DigitizeCylinderCells().

float PHG4TpcDigitizer::ADCNoiseConversionGain
private

Definition at line 60 of file PHG4TpcDigitizer.h.

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

Referenced by DigitizeCylinderCells(), and InitRun().

float PHG4TpcDigitizer::ADCSignalConversionGain
private

Definition at line 59 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 59 of file PHG4TpcDigitizer.h

Referenced by DigitizeCylinderCells(), and InitRun().

float PHG4TpcDigitizer::ADCThreshold
private

Definition at line 54 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 54 of file PHG4TpcDigitizer.h

Referenced by DigitizeCylinderCells(), InitRun(), and SetADCThreshold().

float PHG4TpcDigitizer::ChargeToPeakVolts
private

Definition at line 57 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 57 of file PHG4TpcDigitizer.h

Referenced by InitRun().

std::vector<int> PHG4TpcDigitizer::is_populated
private

Definition at line 67 of file PHG4TpcDigitizer.h.

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

Referenced by DigitizeCylinderCells().

float PHG4TpcDigitizer::Pedestal
private

Definition at line 56 of file PHG4TpcDigitizer.h.

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

Referenced by DigitizeCylinderCells(), and InitRun().

std::vector<std::vector<TrkrHitSet::ConstIterator> > PHG4TpcDigitizer::phi_sorted_hits
private

Definition at line 62 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 62 of file PHG4TpcDigitizer.h

Referenced by DigitizeCylinderCells().

gsl_rng* PHG4TpcDigitizer::RandomGenerator
private

random generator that conform with sPHENIX standard

Definition at line 74 of file PHG4TpcDigitizer.h.

View newest version in sPHENIX GitHub at line 74 of file PHG4TpcDigitizer.h

Referenced by added_noise(), PHG4TpcDigitizer(), and ~PHG4TpcDigitizer().

float PHG4TpcDigitizer::TpcEnc
private

Definition at line 55 of file PHG4TpcDigitizer.h.

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

Referenced by added_noise(), and SetENC().

unsigned int PHG4TpcDigitizer::TpcMinLayer
private

Definition at line 53 of file PHG4TpcDigitizer.h.

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

Referenced by SetTpcMinLayer().

std::vector<std::vector<TrkrHitSet::ConstIterator> > PHG4TpcDigitizer::z_sorted_hits
private

Definition at line 63 of file PHG4TpcDigitizer.h.

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

Referenced by DigitizeCylinderCells().


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