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

#include <coresoftware/blob/master/simulation/g4simulation/g4intt/PHG4InttDigitizer.h>

+ Inheritance diagram for PHG4InttDigitizer:
+ Collaboration diagram for PHG4InttDigitizer:

Public Member Functions

 PHG4InttDigitizer (const std::string &name="PHG4InttDigitizer")
 
 ~PHG4InttDigitizer () override
 
int InitRun (PHCompositeNode *topNode) override
 run initialization
 
int process_event (PHCompositeNode *topNode) override
 event processing
 
int End (PHCompositeNode *topNode) override
 end of process
 
void SetDefaultParameters () override
 
void Detector (const std::string &d)
 
void set_adc_scale (const int &layer, const std::vector< double > &userrange)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
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
 
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)
 

Private Member Functions

void CalculateLadderCellADCScale (PHCompositeNode *topNode)
 
void DigitizeLadderCells (PHCompositeNode *topNode)
 
float added_noise ()
 

Private Attributes

std::string detector
 
float mNoiseMean
 
float mNoiseSigma
 
float mEnergyPerPair
 
std::map< int, unsigned int_max_adc
 
std::map< int, float > _energy_scale
 
const unsigned int nadcbins = 8
 
std::map< int, std::vector
< std::pair< double, double > > > 
_max_fphx_adc
 
unsigned int m_nCells
 
unsigned int m_nDeadCells
 
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")
 
- 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 ()
 

Detailed Description

Definition at line 17 of file PHG4InttDigitizer.h.

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

Constructor & Destructor Documentation

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

Definition at line 46 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 46 of file PHG4InttDigitizer.cc

References PHParameterInterface::InitializeParameters(), Fun4AllBase::Name(), RandomGenerator, and seed.

+ Here is the call graph for this function:

PHG4InttDigitizer::~PHG4InttDigitizer ( )
override

Definition at line 63 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 63 of file PHG4InttDigitizer.cc

References RandomGenerator.

Member Function Documentation

float PHG4InttDigitizer::added_noise ( )
private

Definition at line 324 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 324 of file PHG4InttDigitizer.cc

References mNoiseMean, noise(), and RandomGenerator.

+ Here is the call graph for this function:

void PHG4InttDigitizer::CalculateLadderCellADCScale ( PHCompositeNode topNode)
private

Definition at line 150 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 150 of file PHG4InttDigitizer.cc

References _energy_scale, _max_fphx_adc, PHG4CylinderGeomContainer::get_begin_end(), get_thickness(), G4TTL::layer, and thickness.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4InttDigitizer::Detector ( const std::string &  d)
inline

Definition at line 34 of file PHG4InttDigitizer.h.

View newest version in sPHENIX GitHub at line 34 of file PHG4InttDigitizer.h

References d, and detector.

void PHG4InttDigitizer::DigitizeLadderCells ( PHCompositeNode topNode)
private

Definition at line 179 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 179 of file PHG4InttDigitizer.cc

References _energy_scale, _max_fphx_adc, g4zmq::exit(), TrkrHit::getAdc(), InttDefs::getCol(), TrkrHit::getEnergy(), TrkrHitSet::getHits(), TrkrHitSetContainer::getHitSets(), InttDefs::getLadderPhiId(), InttDefs::getLadderZId(), TrkrDefs::getLayer(), InttDefs::getRow(), InttDeadMap::identify(), TrkrHit::identify(), TrkrDefs::inttId, InttDeadMap::isDeadChannelIntt(), G4TTL::layer, m_nCells, m_nDeadCells, TrkrHitSet::removeHit(), TrkrHit::setAdc(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_MORE.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4InttDigitizer::End ( PHCompositeNode topNode)
overridevirtual

end of process

Reimplemented from SubsysReco.

Definition at line 303 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 303 of file PHG4InttDigitizer.cc

References Fun4AllReturnCodes::EVENT_OK, m_nCells, m_nDeadCells, Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.

+ Here is the call graph for this function:

int PHG4InttDigitizer::InitRun ( PHCompositeNode topNode)
overridevirtual

run initialization

Reimplemented from SubsysReco.

Definition at line 68 of file PHG4InttDigitizer.cc.

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

References _energy_scale, _max_adc, Fun4AllReturnCodes::ABORTRUN, PHCompositeNode::addNode(), CalculateLadderCellADCScale(), detector, Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), PHParameterInterface::get_double_param(), mEnergyPerPair, mNoiseMean, mNoiseSigma, PHWHERE, PHParameterInterface::PutOnParNode(), PHParameterInterface::SaveToNodeTree(), PHParameterInterface::UpdateParametersWithMacro(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHG4InttDigitizer::process_event ( PHCompositeNode topNode)
overridevirtual

event processing

Reimplemented from SubsysReco.

Definition at line 143 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 143 of file PHG4InttDigitizer.cc

References DigitizeLadderCells(), and Fun4AllReturnCodes::EVENT_OK.

+ Here is the call graph for this function:

void PHG4InttDigitizer::set_adc_scale ( const int layer,
const std::vector< double > &  userrange 
)

Definition at line 337 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 337 of file PHG4InttDigitizer.cc

References _max_fphx_adc, FLT_MAX, and nadcbins.

void PHG4InttDigitizer::SetDefaultParameters ( )
overridevirtual

Implements PHParameterInterface.

Definition at line 316 of file PHG4InttDigitizer.cc.

View newest version in sPHENIX GitHub at line 316 of file PHG4InttDigitizer.cc

References e, and PHParameterInterface::set_default_double_param().

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 53 of file PHG4InttDigitizer.h.

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

Referenced by CalculateLadderCellADCScale(), DigitizeLadderCells(), and InitRun().

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

Definition at line 52 of file PHG4InttDigitizer.h.

View newest version in sPHENIX GitHub at line 52 of file PHG4InttDigitizer.h

Referenced by InitRun().

std::map<int, std::vector<std::pair<double, double> > > PHG4InttDigitizer::_max_fphx_adc
private

Definition at line 59 of file PHG4InttDigitizer.h.

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

Referenced by CalculateLadderCellADCScale(), DigitizeLadderCells(), and set_adc_scale().

std::string PHG4InttDigitizer::detector
private

Definition at line 43 of file PHG4InttDigitizer.h.

View newest version in sPHENIX GitHub at line 43 of file PHG4InttDigitizer.h

Referenced by Detector(), and InitRun().

unsigned int PHG4InttDigitizer::m_nCells
private

Definition at line 61 of file PHG4InttDigitizer.h.

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

Referenced by DigitizeLadderCells(), and End().

unsigned int PHG4InttDigitizer::m_nDeadCells
private

Definition at line 62 of file PHG4InttDigitizer.h.

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

Referenced by DigitizeLadderCells(), and End().

float PHG4InttDigitizer::mEnergyPerPair
private

Definition at line 49 of file PHG4InttDigitizer.h.

View newest version in sPHENIX GitHub at line 49 of file PHG4InttDigitizer.h

Referenced by InitRun().

float PHG4InttDigitizer::mNoiseMean
private

Definition at line 47 of file PHG4InttDigitizer.h.

View newest version in sPHENIX GitHub at line 47 of file PHG4InttDigitizer.h

Referenced by added_noise(), and InitRun().

float PHG4InttDigitizer::mNoiseSigma
private

Definition at line 48 of file PHG4InttDigitizer.h.

View newest version in sPHENIX GitHub at line 48 of file PHG4InttDigitizer.h

Referenced by InitRun().

const unsigned int PHG4InttDigitizer::nadcbins = 8
private

Definition at line 58 of file PHG4InttDigitizer.h.

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

Referenced by set_adc_scale().

gsl_rng* PHG4InttDigitizer::RandomGenerator
private

random generator that conform with sPHENIX standard

Definition at line 65 of file PHG4InttDigitizer.h.

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

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


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