Analysis Software
Documentation for sPHENIX simulation 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, kRawLightYield,
  unknown = -1
}
 
enum  ProcessTowerType { kRawTowerOnly = 0, kTowerInfoOnly = 1, kBothTowers =2 }
 

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 InDetector (const std::string &d)
 
void OutDetector (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)
 
void Print (const std::string &what="ALL") const override
 
void set_towerinfo (HcalRawTowerBuilder::ProcessTowerType UseTowerInfo)
 
- 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.
 
- 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
 
PHParameterInterfaceoperator= (PHParameterInterface const &)=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)
 
void Print () const
 

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
 
HcalRawTowerBuilder::ProcessTowerType m_UseTowerInfo = HcalRawTowerBuilder::ProcessTowerType::kBothTowers
 
std::string m_OutputDetector
 
std::string m_InputDetector
 
std::string m_TowerNodeName
 
std::string m_TowerInfoNodeName
 
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 18 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 18 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

kRawLightYield 

save raw light yield (before Mephi map) as the weight of the cells

unknown 

initialization value

Definition at line 36 of file HcalRawTowerBuilder.h.

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

Enumerator:
kRawTowerOnly 
kTowerInfoOnly 
kBothTowers 

Definition at line 53 of file HcalRawTowerBuilder.h.

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

Constructor & Destructor Documentation

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

Definition at line 51 of file HcalRawTowerBuilder.cc.

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

References PHParameterInterface::InitializeParameters().

+ Here is the call graph for this function:

HcalRawTowerBuilder::~HcalRawTowerBuilder ( )
inlineoverride

Definition at line 22 of file HcalRawTowerBuilder.h.

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

Member Function Documentation

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

Definition at line 34 of file HcalRawTowerBuilder.h.

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

References i, and m_ChkEnergyConservationFlag.

void HcalRawTowerBuilder::CreateNodes ( PHCompositeNode topNode)
private

Definition at line 439 of file HcalRawTowerBuilder.cc.

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

References PHCompositeNode::addNode(), Enable::CEMC, RawTowerDefs::convert_name_to_caloid(), PHNodeIterator::findFirst(), RawTowerDefs::HCALIN, RawTowerDefs::HCALOUT, m_InputDetector, m_OutputDetector, m_SimTowerNodePrefix, m_TowerInfoNodeName, m_TowerNodeName, m_Towers, m_UseTowerInfo, 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 26 of file HcalRawTowerBuilder.h.

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

References m_InputDetector, and m_OutputDetector.

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

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

References Acts::UnitConstants::e, and m_Emin.

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

Definition at line 67 of file HcalRawTowerBuilder.h.

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

References m_SimTowerNodePrefix.

int HcalRawTowerBuilder::get_tower_energy_src ( ) const
inline

Definition at line 61 of file HcalRawTowerBuilder.h.

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

References m_TowerEnergySrc.

short HcalRawTowerBuilder::get_tower_row ( const short  cellrow) const

Definition at line 527 of file HcalRawTowerBuilder.cc.

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

References m_NcellToTower.

Referenced by process_event().

+ Here is the caller graph for this function:

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

Definition at line 31 of file HcalRawTowerBuilder.h.

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

References m_InputDetector.

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 58 of file HcalRawTowerBuilder.cc.

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

References Fun4AllReturnCodes::ABORTRUN, RawTowerGeomContainer::add_tower_geometry(), PHCompositeNode::addNode(), RawTowerDefs::convert_name_to_caloid(), CreateNodes(), Acts::UnitConstants::e, RawTowerDefs::encode_towerid(), KF_timing::etabin, Fun4AllReturnCodes::EVENT_OK, Acts::Concepts::exists, 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(), i, RawTowerGeomContainer::identify(), in, PHG4HcalDefs::innerrad, j, kEnergyDeposition, kIonizationEnergy, kLightYield, kRawLightYield, Acts::UnitConstants::m, m_DecalArray, m_DeCalibrationFileName, m_Emin, m_InputDetector, m_NcellToTower, m_OutputDetector, m_RawTowerGeom, m_TowerDecalFactors, m_TowerEnergySrc, m_TowerGeomNodeName, n, PHG4HcalDefs::n_towers, PHG4HcalDefs::outerrad, G4HCALIN::phistart, 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(), tg, thickness, PHParameterInterface::UpdateParametersWithMacro(), Fun4AllBase::Verbosity(), ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

+ Here is the call graph for this function:

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

Definition at line 32 of file HcalRawTowerBuilder.h.

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

References m_OutputDetector.

void HcalRawTowerBuilder::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from SubsysReco.

Definition at line 613 of file HcalRawTowerBuilder.cc.

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

References Fun4AllBase::Name(), and PHParameterInterface::Print().

+ Here is the call graph for this function:

int HcalRawTowerBuilder::process_event ( PHCompositeNode )
overridevirtual
void HcalRawTowerBuilder::ReadParamsFromNodeTree ( PHCompositeNode topNode)
private

Definition at line 549 of file HcalRawTowerBuilder.cc.

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

References PHParameters::FillFrom(), PHParameters::get_double_param(), PHParameters::get_int_param(), PHG4HcalDefs::innerrad, Fun4AllServer::instance(), m_DecalArray, m_InputDetector, PHG4HcalDefs::n_scinti_tiles, PHG4HcalDefs::n_scinti_tiles_neg, PHG4HcalDefs::n_scinti_tiles_pos, PHG4HcalDefs::n_towers, PHG4HcalDefs::outerrad, pars, 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 583 of file HcalRawTowerBuilder.cc.

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

References m_DecalArray.

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

Definition at line 80 of file HcalRawTowerBuilder.h.

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

References INTTVtxZ::fname, and m_DeCalibrationFileName.

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

Definition at line 73 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 73 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 596 of file HcalRawTowerBuilder.cc.

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

References m_TowerDecalFactors.

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

Definition at line 604 of file HcalRawTowerBuilder.cc.

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

References i, m_DecalArray, and m_NcellToTower.

Referenced by SetTowerDecalFactors().

+ Here is the caller graph for this function:

void HcalRawTowerBuilder::set_towerinfo ( HcalRawTowerBuilder::ProcessTowerType  UseTowerInfo)
inline

Definition at line 88 of file HcalRawTowerBuilder.h.

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

References m_UseTowerInfo.

void HcalRawTowerBuilder::SetDefaultParameters ( )
overridevirtual

Implements PHParameterInterface.

Definition at line 533 of file HcalRawTowerBuilder.cc.

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

References Acts::UnitConstants::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 588 of file HcalRawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 588 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 103 of file HcalRawTowerBuilder.h.

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

Referenced by checkenergy(), and process_event().

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

Definition at line 117 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 117 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 116 of file HcalRawTowerBuilder.h.

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

Referenced by InitRun(), and set_decal_filename().

double HcalRawTowerBuilder::m_Emin = NAN
private

Definition at line 102 of file HcalRawTowerBuilder.h.

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

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

std::string HcalRawTowerBuilder::m_InputDetector
private

Definition at line 111 of file HcalRawTowerBuilder.h.

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

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

int HcalRawTowerBuilder::m_NcellToTower = -1
private

Definition at line 105 of file HcalRawTowerBuilder.h.

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

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

std::string HcalRawTowerBuilder::m_OutputDetector
private

Definition at line 110 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), Detector(), InitRun(), and OutDetector().

RawTowerGeomContainer* HcalRawTowerBuilder::m_RawTowerGeom = nullptr
private

Definition at line 100 of file HcalRawTowerBuilder.h.

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

Referenced by InitRun().

std::string HcalRawTowerBuilder::m_SimTowerNodePrefix
private

Definition at line 115 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 115 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 118 of file HcalRawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 118 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 104 of file HcalRawTowerBuilder.h.

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

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

std::string HcalRawTowerBuilder::m_TowerGeomNodeName
private

Definition at line 114 of file HcalRawTowerBuilder.h.

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

Referenced by InitRun().

std::string HcalRawTowerBuilder::m_TowerInfoNodeName
private

Definition at line 113 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), and process_event().

std::string HcalRawTowerBuilder::m_TowerNodeName
private

Definition at line 112 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes().

RawTowerContainer* HcalRawTowerBuilder::m_Towers = nullptr
private

Definition at line 99 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), and process_event().

HcalRawTowerBuilder::ProcessTowerType HcalRawTowerBuilder::m_UseTowerInfo = HcalRawTowerBuilder::ProcessTowerType::kBothTowers
private

Definition at line 106 of file HcalRawTowerBuilder.h.

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

Referenced by CreateNodes(), process_event(), and set_towerinfo().


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