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

#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4micromegas/PHG4MicromegasHitReco.h>

+ Inheritance diagram for PHG4MicromegasHitReco:
+ Collaboration diagram for PHG4MicromegasHitReco:

Classes

class  Deleter
 rng de-allocator More...
 

Public Member Functions

 PHG4MicromegasHitReco (const std::string &name="PHG4MicromegasHitReco", const std::string &detector="MICROMEGAS")
 
int InitRun (PHCompositeNode *) override
 run initialization
 
int process_event (PHCompositeNode *) override
 event processing
 
void SetDefaultParameters () override
 parameters
 
void set_tiles (const MicromegasTile::List &tiles)
 set micromegas tiles
 
- 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 Types

using charge_pair_t = std::pair< int, double >
 stores strip number and corresponding charge fraction
 
using charge_list_t = std::vector< charge_pair_t >
 map strip number to charge fraction
 

Private Member Functions

std::string bare_geonodename () const
 return bare geo node name, used for seting up cylinders in G4
 
std::string full_geonodename () const
 return full geo node name, that also contains tile information
 
void setup_tiles (PHCompositeNode *)
 setup tiles definition in CylinderGeom
 
uint get_primary_electrons (PHG4Hit *) const
 get total number of electrons collected for a give g4hit
 
uint get_single_electron_amplification () const
 get single electron amplification
 
charge_list_t distribute_charge (CylinderGeomMicromegas *, uint tileid, const TVector3 &local_position, double sigma) const
 distribute a Gaussian charge across adjacent strips
 

Private Attributes

std::string m_detector
 detector name
 
double m_tmin = -20
 timing window (ns)
 
double m_tmax = 800
 timing window (ns)
 
double m_electrons_per_gev = 0
 number of primary electrons per GeV
 
double m_gain = 0
 min gain
 
double m_cloud_sigma = 0.04
 electron cloud sigma (cm) after avalanche
 
double m_diffusion_trans = 0.03
 electron transverse diffusion (cm/sqrt(cm))
 
bool m_zigzag_strips = true
 use zig zag pads
 
MicromegasTile::List m_tiles
 micromegas tiles
 
std::unique_ptr< gsl_rng, Deleterm_rng
 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 28 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 28 of file PHG4MicromegasHitReco.h

Member Typedef Documentation

map strip number to charge fraction

Definition at line 73 of file PHG4MicromegasHitReco.h.

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

using PHG4MicromegasHitReco::charge_pair_t = std::pair<int, double>
private

stores strip number and corresponding charge fraction

Definition at line 70 of file PHG4MicromegasHitReco.h.

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

Constructor & Destructor Documentation

PHG4MicromegasHitReco::PHG4MicromegasHitReco ( const std::string &  name = "PHG4MicromegasHitReco",
const std::string &  detector = "MICROMEGAS" 
)
explicit

Definition at line 96 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 96 of file PHG4MicromegasHitReco.cc

References PHParameterInterface::InitializeParameters(), and m_rng.

+ Here is the call graph for this function:

Member Function Documentation

std::string PHG4MicromegasHitReco::bare_geonodename ( ) const
inlineprivate

return bare geo node name, used for seting up cylinders in G4

Definition at line 52 of file PHG4MicromegasHitReco.h.

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

References m_detector.

Referenced by setup_tiles().

+ Here is the caller graph for this function:

PHG4MicromegasHitReco::charge_list_t PHG4MicromegasHitReco::distribute_charge ( CylinderGeomMicromegas layergeom,
uint  tileid,
const TVector3 &  local_position,
double  sigma 
) const
private

distribute a Gaussian charge across adjacent strips

Definition at line 519 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 519 of file PHG4MicromegasHitReco.cc

References CylinderGeomMicromegas::find_strip_from_local_coords(), CylinderGeomMicromegas::get_local_coordinates(), CylinderGeomMicromegas::get_pitch(), CylinderGeomMicromegas::get_segmentation_type(), CylinderGeomMicromegas::get_strip_count(), m_zigzag_strips, and PHG4InttDefs::SEGMENTATION_PHI.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string PHG4MicromegasHitReco::full_geonodename ( ) const
inlineprivate

return full geo node name, that also contains tile information

Definition at line 56 of file PHG4MicromegasHitReco.h.

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

References m_detector.

Referenced by process_event(), and setup_tiles().

+ Here is the caller graph for this function:

uint PHG4MicromegasHitReco::get_primary_electrons ( PHG4Hit g4hit) const
private

get total number of electrons collected for a give g4hit

this accounts for the number of primary electrons, the detector gain, and fluctuations

Definition at line 504 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 504 of file PHG4MicromegasHitReco.cc

References PHG4Hit::get_eion(), m_electrons_per_gev, and m_rng.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint PHG4MicromegasHitReco::get_single_electron_amplification ( ) const
private

get single electron amplification

Definition at line 508 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 508 of file PHG4MicromegasHitReco.cc

References m_gain, and m_rng.

Referenced by process_event().

+ Here is the caller graph for this function:

int PHG4MicromegasHitReco::InitRun ( PHCompositeNode topNode)
overridevirtual

run initialization

Reimplemented from SubsysReco.

Definition at line 110 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 110 of file PHG4MicromegasHitReco.cc

References Fun4AllReturnCodes::EVENT_OK, exit(), PHNodeIterator::findFirst(), PHParameterInterface::get_double_param(), PHParameterInterface::get_int_param(), m_cloud_sigma, m_diffusion_trans, m_electrons_per_gev, m_gain, m_tmax, m_tmin, m_zigzag_strips, PHWHERE, setup_tiles(), PHParameterInterface::UpdateParametersWithMacro(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int PHG4MicromegasHitReco::process_event ( PHCompositeNode topNode)
overridevirtual

event processing

Reimplemented from SubsysReco.

Definition at line 195 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 195 of file PHG4MicromegasHitReco.cc

References kdfinder::abs(), TrkrHitv2::addEnergy(), cos(), distribute_charge(), Fun4AllReturnCodes::EVENT_OK, full_geonodename(), MicromegasDefs::genHitKey(), MicromegasDefs::genHitSetKey(), get_primary_electrons(), get_single_electron_amplification(), PHG4Hit::get_t(), PHG4Hitv1::get_x(), PHG4Hit::get_x(), PHG4Hitv1::get_y(), PHG4Hit::get_y(), PHG4Hitv1::get_z(), PHG4Hit::get_z(), it, G4TTL::layer, m_cloud_sigma, m_detector, m_diffusion_trans, M_PI, m_rng, m_tmax, m_tmin, t, value, Fun4AllBase::Verbosity(), and y.

+ Here is the call graph for this function:

void PHG4MicromegasHitReco::set_tiles ( const MicromegasTile::List tiles)
inline

set micromegas tiles

Definition at line 46 of file PHG4MicromegasHitReco.h.

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

References m_tiles.

void PHG4MicromegasHitReco::SetDefaultParameters ( )
overridevirtual

parameters

Implements PHParameterInterface.

Definition at line 387 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 387 of file PHG4MicromegasHitReco.cc

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

+ Here is the call graph for this function:

void PHG4MicromegasHitReco::setup_tiles ( PHCompositeNode topNode)
private

setup tiles definition in CylinderGeom

Definition at line 429 of file PHG4MicromegasHitReco.cc.

View newest version in sPHENIX GitHub at line 429 of file PHG4MicromegasHitReco.cc

References bare_geonodename(), exit(), PHNodeIterator::findFirst(), full_geonodename(), G4TTL::layer, m_tiles, PHWHERE, PHG4InttDefs::SEGMENTATION_PHI, PHG4InttDefs::SEGMENTATION_Z, CylinderGeomMicromegas::set_tiles(), and Fun4AllBase::Verbosity().

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double PHG4MicromegasHitReco::m_cloud_sigma = 0.04
private

electron cloud sigma (cm) after avalanche

Definition at line 94 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 94 of file PHG4MicromegasHitReco.h

Referenced by InitRun(), and process_event().

std::string PHG4MicromegasHitReco::m_detector
private

detector name

Definition at line 79 of file PHG4MicromegasHitReco.h.

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

Referenced by bare_geonodename(), full_geonodename(), and process_event().

double PHG4MicromegasHitReco::m_diffusion_trans = 0.03
private

electron transverse diffusion (cm/sqrt(cm))

Definition at line 97 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 97 of file PHG4MicromegasHitReco.h

Referenced by InitRun(), and process_event().

double PHG4MicromegasHitReco::m_electrons_per_gev = 0
private

number of primary electrons per GeV

Definition at line 88 of file PHG4MicromegasHitReco.h.

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

Referenced by get_primary_electrons(), and InitRun().

double PHG4MicromegasHitReco::m_gain = 0
private

min gain

Definition at line 91 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 91 of file PHG4MicromegasHitReco.h

Referenced by get_single_electron_amplification(), and InitRun().

std::unique_ptr<gsl_rng, Deleter> PHG4MicromegasHitReco::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 115 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 115 of file PHG4MicromegasHitReco.h

Referenced by get_primary_electrons(), get_single_electron_amplification(), PHG4MicromegasHitReco(), and process_event().

MicromegasTile::List PHG4MicromegasHitReco::m_tiles
private

micromegas tiles

Definition at line 103 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 103 of file PHG4MicromegasHitReco.h

Referenced by set_tiles(), and setup_tiles().

double PHG4MicromegasHitReco::m_tmax = 800
private

timing window (ns)

Definition at line 85 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 85 of file PHG4MicromegasHitReco.h

Referenced by InitRun(), and process_event().

double PHG4MicromegasHitReco::m_tmin = -20
private

timing window (ns)

Definition at line 82 of file PHG4MicromegasHitReco.h.

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

Referenced by InitRun(), and process_event().

bool PHG4MicromegasHitReco::m_zigzag_strips = true
private

use zig zag pads

Definition at line 100 of file PHG4MicromegasHitReco.h.

View newest version in sPHENIX GitHub at line 100 of file PHG4MicromegasHitReco.h

Referenced by distribute_charge(), and InitRun().


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