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

#include <coresoftware/blob/master/simulation/g4simulation/g4calo/HcalRawTowerBuilder.h>

+ Inheritance diagram for HcalRawTowerBuilder:
+ Collaboration diagram for HcalRawTowerBuilder:

Public Types

enum  enu_tower_energy_src { kEnergyDeposition, kLightYield, kIonizationEnergy, unknown = -1 }
 

Public Member Functions

 HcalRawTowerBuilder (const std::string &name="HcalRawTowerBuilder")
 
 ~HcalRawTowerBuilder () override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
void Detector (const std::string &d)
 
void EminCut (const double e)
 
void checkenergy (const int i=1)
 
int get_tower_energy_src () const
 
std::string get_sim_tower_node_prefix () const
 
void set_sim_tower_node_prefix (const std::string &simTowerNodePrefix)
 
short get_tower_row (const short cellrow) const
 
void set_decal_filename (const std::string &fname)
 
void SetDefaultParameters () override
 
void set_cell_decal_factor (const int etabin, const int phibin, const double d)
 
void set_tower_decal_factor (const int etabin, const int phibin, const double d)
 
- 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

void CreateNodes (PHCompositeNode *topNode)
 
void ReadParamsFromNodeTree (PHCompositeNode *topNode)
 
void SetTowerDecalFactors ()
 
void set_tower_decal_factor_real (const int etabin, const int phibin, const double d)
 

Private Attributes

RawTowerContainerm_Towers = nullptr
 
RawTowerGeomContainerm_RawTowerGeom = nullptr
 
double m_Emin = NAN
 
int m_ChkEnergyConservationFlag = 0
 
int m_TowerEnergySrc = enu_tower_energy_src::unknown
 
int m_NcellToTower = -1
 
std::string m_Detector = "NONE"
 
std::string m_TowerNodeName
 
std::string m_TowerGeomNodeName
 
std::string m_SimTowerNodePrefix
 
std::string m_DeCalibrationFileName
 
std::vector< std::vector
< double > > 
m_DecalArray
 
std::map< std::pair< int, int >
, double > 
m_TowerDecalFactors
 

Additional Inherited Members

- 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 16 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 16 of file HcalRawTowerBuilder.h

Member Enumeration Documentation

Enumerator:
kEnergyDeposition 

save Geant4 energy deposition as the weight of the cells

kLightYield 

save light yield as the weight of the cells

kIonizationEnergy 

save ionization energy

unknown 

initialization value

Definition at line 28 of file HcalRawTowerBuilder.h.

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

Constructor & Destructor Documentation

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

Definition at line 47 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 47 of file HcalRawTowerBuilder.cc

References PHParameterInterface::InitializeParameters().

+ Here is the call graph for this function:

HcalRawTowerBuilder::~HcalRawTowerBuilder ( )
inlineoverride

Definition at line 20 of file HcalRawTowerBuilder.h.

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

Member Function Documentation

void HcalRawTowerBuilder::checkenergy ( const int  i = 1)
inline

Definition at line 26 of file HcalRawTowerBuilder.h.

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

References m_ChkEnergyConservationFlag.

void HcalRawTowerBuilder::CreateNodes ( PHCompositeNode topNode)
private

Definition at line 389 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 389 of file HcalRawTowerBuilder.cc

References PHCompositeNode::addNode(), RawTowerDefs::convert_name_to_caloid(), g4zmq::exit(), PHNodeIterator::findFirst(), m_Detector, m_SimTowerNodePrefix, m_TowerNodeName, m_Towers, and PHWHERE.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 24 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 24 of file HcalRawTowerBuilder.h

References d, and m_Detector.

Referenced by HCALInner_Towers(), and HCALOuter_Towers().

+ Here is the caller graph for this function:

void HcalRawTowerBuilder::EminCut ( const double  e)
inline

Definition at line 25 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 25 of file HcalRawTowerBuilder.h

References e, and m_Emin.

std::string HcalRawTowerBuilder::get_sim_tower_node_prefix ( ) const
inline

Definition at line 48 of file HcalRawTowerBuilder.h.

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

References m_SimTowerNodePrefix.

int HcalRawTowerBuilder::get_tower_energy_src ( ) const
inline

Definition at line 42 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 42 of file HcalRawTowerBuilder.h

References m_TowerEnergySrc.

short HcalRawTowerBuilder::get_tower_row ( const short  cellrow) const

Definition at line 436 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 436 of file HcalRawTowerBuilder.cc

References m_NcellToTower.

Referenced by process_event().

+ Here is the caller graph for this function:

int HcalRawTowerBuilder::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 SubsysReco.

Definition at line 55 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 55 of file HcalRawTowerBuilder.cc

References Fun4AllReturnCodes::ABORTRUN, RawTowerGeomContainer::add_tower_geometry(), PHCompositeNode::addNode(), RawTowerDefs::convert_name_to_caloid(), CreateNodes(), e, RawTowerDefs::encode_towerid(), KF_timing::etabin, Fun4AllReturnCodes::EVENT_OK, Acts::concept::exists, g4zmq::exit(), PHNodeIterator::findFirst(), RawTowerGeom::get_center_x(), PHParameterInterface::get_double_param(), RawTowerGeomContainer::get_etabins(), RawTowerGeomContainer::get_etacenter(), PHParameterInterface::get_int_param(), RawTowerGeomContainer::get_phibins(), RawTowerGeomContainer::get_phicenter(), PHG4Utils::get_theta(), RawTowerGeomContainer::get_tower_geometry(), RawTowerGeomContainer::identify(), in, PHG4HcalDefs::innerrad, isfinite, kEnergyDeposition, kIonizationEnergy, kLightYield, m, m_DecalArray, m_DeCalibrationFileName, m_Detector, m_Emin, m_NcellToTower, M_PI, m_RawTowerGeom, m_TowerDecalFactors, m_TowerEnergySrc, m_TowerGeomNodeName, n, PHG4HcalDefs::n_towers, PHG4HcalDefs::outerrad, PHWHERE, PHParameterInterface::PutOnParNode(), ReadParamsFromNodeTree(), PHParameterInterface::SaveToNodeTree(), RawTowerGeomContainer::set_etabins(), RawTowerGeomContainer::set_etabounds(), RawTowerGeomContainer::set_phibins(), RawTowerGeomContainer::set_phibounds(), RawTowerGeomContainer::set_radius(), RawTowerGeomContainer::set_thickness(), SetTowerDecalFactors(), thickness, PHParameterInterface::UpdateParametersWithMacro(), Fun4AllBase::Verbosity(), x, y, and z.

+ Here is the call graph for this function:

void HcalRawTowerBuilder::ReadParamsFromNodeTree ( PHCompositeNode topNode)
private

Definition at line 458 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 458 of file HcalRawTowerBuilder.cc

References PHParameters::FillFrom(), PHParameters::get_double_param(), PHParameters::get_int_param(), PHG4HcalDefs::innerrad, Fun4AllServer::instance(), m_DecalArray, m_Detector, PHG4HcalDefs::n_scinti_tiles, PHG4HcalDefs::n_scinti_tiles_neg, PHG4HcalDefs::n_scinti_tiles_pos, PHG4HcalDefs::n_towers, PHG4HcalDefs::outerrad, Fun4AllServer::Print(), PHG4HcalDefs::scipertwr, PHParameterInterface::set_double_param(), and PHParameterInterface::set_int_param().

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void HcalRawTowerBuilder::set_cell_decal_factor ( const int  etabin,
const int  phibin,
const double  d 
)

Definition at line 492 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 492 of file HcalRawTowerBuilder.cc

References d, and m_DecalArray.

void HcalRawTowerBuilder::set_decal_filename ( const std::string &  fname)
inline

Definition at line 61 of file HcalRawTowerBuilder.h.

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

References test::fname, and m_DeCalibrationFileName.

void HcalRawTowerBuilder::set_sim_tower_node_prefix ( const std::string &  simTowerNodePrefix)
inline

Definition at line 54 of file HcalRawTowerBuilder.h.

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

References m_SimTowerNodePrefix.

Referenced by HCALInner_Towers(), and HCALOuter_Towers().

+ Here is the caller graph for this function:

void HcalRawTowerBuilder::set_tower_decal_factor ( const int  etabin,
const int  phibin,
const double  d 
)

Definition at line 505 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 505 of file HcalRawTowerBuilder.cc

References d, and m_TowerDecalFactors.

void HcalRawTowerBuilder::set_tower_decal_factor_real ( const int  etabin,
const int  phibin,
const double  d 
)
private

Definition at line 513 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 513 of file HcalRawTowerBuilder.cc

References d, m_DecalArray, and m_NcellToTower.

Referenced by SetTowerDecalFactors().

+ Here is the caller graph for this function:

void HcalRawTowerBuilder::SetDefaultParameters ( )
overridevirtual

Implements PHParameterInterface.

Definition at line 442 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 442 of file HcalRawTowerBuilder.cc

References e, PHG4HcalDefs::innerrad, kLightYield, PHG4HcalDefs::n_towers, PHG4HcalDefs::outerrad, PHG4HcalDefs::scipertwr, PHParameterInterface::set_default_double_param(), and PHParameterInterface::set_default_int_param().

+ Here is the call graph for this function:

void HcalRawTowerBuilder::SetTowerDecalFactors ( )
private

Definition at line 497 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 497 of file HcalRawTowerBuilder.cc

References m_TowerDecalFactors, and set_tower_decal_factor_real().

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int HcalRawTowerBuilder::m_ChkEnergyConservationFlag = 0
private

Definition at line 78 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 78 of file HcalRawTowerBuilder.h

Referenced by checkenergy(), and process_event().

std::vector<std::vector <double> > HcalRawTowerBuilder::m_DecalArray
private

Definition at line 87 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 87 of file HcalRawTowerBuilder.h

Referenced by InitRun(), process_event(), ReadParamsFromNodeTree(), set_cell_decal_factor(), and set_tower_decal_factor_real().

std::string HcalRawTowerBuilder::m_DeCalibrationFileName
private

Definition at line 86 of file HcalRawTowerBuilder.h.

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

Referenced by InitRun(), and set_decal_filename().

std::string HcalRawTowerBuilder::m_Detector = "NONE"
private

Definition at line 82 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), Detector(), InitRun(), process_event(), and ReadParamsFromNodeTree().

double HcalRawTowerBuilder::m_Emin = NAN
private

Definition at line 77 of file HcalRawTowerBuilder.h.

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

Referenced by EminCut(), InitRun(), and process_event().

int HcalRawTowerBuilder::m_NcellToTower = -1
private

Definition at line 80 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 80 of file HcalRawTowerBuilder.h

Referenced by get_tower_row(), InitRun(), and set_tower_decal_factor_real().

RawTowerGeomContainer* HcalRawTowerBuilder::m_RawTowerGeom = nullptr
private

Definition at line 75 of file HcalRawTowerBuilder.h.

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

Referenced by InitRun().

std::string HcalRawTowerBuilder::m_SimTowerNodePrefix
private

Definition at line 85 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), get_sim_tower_node_prefix(), and set_sim_tower_node_prefix().

std::map<std::pair<int,int>,double> HcalRawTowerBuilder::m_TowerDecalFactors
private

Definition at line 88 of file HcalRawTowerBuilder.h.

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

Referenced by InitRun(), set_tower_decal_factor(), and SetTowerDecalFactors().

int HcalRawTowerBuilder::m_TowerEnergySrc = enu_tower_energy_src::unknown
private

Definition at line 79 of file HcalRawTowerBuilder.h.

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

Referenced by get_tower_energy_src(), InitRun(), and process_event().

std::string HcalRawTowerBuilder::m_TowerGeomNodeName
private

Definition at line 84 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 84 of file HcalRawTowerBuilder.h

Referenced by InitRun().

std::string HcalRawTowerBuilder::m_TowerNodeName
private

Definition at line 83 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 83 of file HcalRawTowerBuilder.h

Referenced by CreateNodes().

RawTowerContainer* HcalRawTowerBuilder::m_Towers = nullptr
private

Definition at line 74 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), and process_event().


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