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

#include <coresoftware/blob/master/simulation/g4simulation/g4micromegas/PHG4MicromegasDigitizer.h>

+ Inheritance diagram for PHG4MicromegasDigitizer:
+ Collaboration diagram for PHG4MicromegasDigitizer:

Classes

class  Deleter
 rng de-allocator More...
 

Public Member Functions

 PHG4MicromegasDigitizer (const std::string &name="PHG4MicromegasDigitizer")
 
int InitRun (PHCompositeNode *) override
 run initialization
 
int process_event (PHCompositeNode *topNode) override
 event processing
 
void SetDefaultParameters () override
 parameters
 
- 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
 
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

double add_noise () const
 add noise to a measurement
 

Private Attributes

double m_adc_threshold = 2700
 threshold (electrons)
 
double m_enc = 670
 noise (electrons)
 
double m_pedestal = 50000
 pedestal (electrons)
 
double m_volts_per_charge = 20
 conversion factor mv/fc
 
double m_volt_per_electron_signal = 0
 conversion factor (mv/electron)
 
double m_volt_per_electron_noise = 0
 conversion factor (mv/electron)
 
std::unique_ptr< gsl_rng, Deleterm_rng
 random generator that conform with sPHENIX standard
 

Static Private Attributes

static constexpr double m_adc_per_volt = 1024./2200
 conversion factor (adc/mv)
 

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 23 of file PHG4MicromegasDigitizer.h.

View newest version in sPHENIX GitHub at line 23 of file PHG4MicromegasDigitizer.h

Constructor & Destructor Documentation

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

Definition at line 41 of file PHG4MicromegasDigitizer.cc.

View newest version in sPHENIX GitHub at line 41 of file PHG4MicromegasDigitizer.cc

References PHParameterInterface::InitializeParameters(), m_rng, and seed.

+ Here is the call graph for this function:

Member Function Documentation

double PHG4MicromegasDigitizer::add_noise ( ) const
private

add noise to a measurement

Definition at line 163 of file PHG4MicromegasDigitizer.cc.

View newest version in sPHENIX GitHub at line 163 of file PHG4MicromegasDigitizer.cc

References m_enc, and m_rng.

Referenced by process_event().

+ Here is the caller graph for this function:

int PHG4MicromegasDigitizer::InitRun ( PHCompositeNode )
overridevirtual

run initialization

Reimplemented from SubsysReco.

Definition at line 54 of file PHG4MicromegasDigitizer.cc.

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

References Fun4AllReturnCodes::EVENT_OK, PHParameterInterface::get_double_param(), m_adc_threshold, m_enc, m_pedestal, m_volt_per_electron_noise, m_volt_per_electron_signal, m_volts_per_charge, and PHParameterInterface::UpdateParametersWithMacro().

+ Here is the call graph for this function:

int PHG4MicromegasDigitizer::process_event ( PHCompositeNode topNode)
overridevirtual

event processing

Reimplemented from SubsysReco.

Definition at line 90 of file PHG4MicromegasDigitizer.cc.

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

References add_noise(), Fun4AllReturnCodes::EVENT_OK, TrkrHit::getEnergy(), TrkrHitSet::getHits(), m_adc_per_volt, m_adc_threshold, m_pedestal, m_volt_per_electron_noise, m_volt_per_electron_signal, TrkrDefs::micromegasId, noise(), TrkrHitSet::removeHit(), and TrkrHit::setAdc().

+ Here is the call graph for this function:

void PHG4MicromegasDigitizer::SetDefaultParameters ( )
overridevirtual

parameters

Implements PHParameterInterface.

Definition at line 153 of file PHG4MicromegasDigitizer.cc.

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

References PHParameterInterface::set_default_double_param().

+ Here is the call graph for this function:

Member Data Documentation

constexpr double PHG4MicromegasDigitizer::m_adc_per_volt = 1024./2200
staticprivate

conversion factor (adc/mv)

this is a fixed parameter, from SAMPA

Definition at line 63 of file PHG4MicromegasDigitizer.h.

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

Referenced by process_event().

double PHG4MicromegasDigitizer::m_adc_threshold = 2700
private

threshold (electrons)

Definition at line 44 of file PHG4MicromegasDigitizer.h.

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

Referenced by InitRun(), and process_event().

double PHG4MicromegasDigitizer::m_enc = 670
private

noise (electrons)

Definition at line 47 of file PHG4MicromegasDigitizer.h.

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

Referenced by add_noise(), and InitRun().

double PHG4MicromegasDigitizer::m_pedestal = 50000
private

pedestal (electrons)

Definition at line 50 of file PHG4MicromegasDigitizer.h.

View newest version in sPHENIX GitHub at line 50 of file PHG4MicromegasDigitizer.h

Referenced by InitRun(), and process_event().

std::unique_ptr<gsl_rng, Deleter> PHG4MicromegasDigitizer::m_rng
private

random generator that conform with sPHENIX standard

using a unique_ptr with custom Deleter ensures that the structure is properly freed when parent object is destroyed

Definition at line 75 of file PHG4MicromegasDigitizer.h.

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

Referenced by add_noise(), and PHG4MicromegasDigitizer().

double PHG4MicromegasDigitizer::m_volt_per_electron_noise = 0
private

conversion factor (mv/electron)

Definition at line 59 of file PHG4MicromegasDigitizer.h.

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

Referenced by InitRun(), and process_event().

double PHG4MicromegasDigitizer::m_volt_per_electron_signal = 0
private

conversion factor (mv/electron)

Definition at line 56 of file PHG4MicromegasDigitizer.h.

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

Referenced by InitRun(), and process_event().

double PHG4MicromegasDigitizer::m_volts_per_charge = 20
private

conversion factor mv/fc

Definition at line 53 of file PHG4MicromegasDigitizer.h.

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

Referenced by InitRun().


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