Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerBuilder Class Reference

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

+ Inheritance diagram for RawTowerBuilder:
+ Collaboration diagram for RawTowerBuilder:

Public Types

enum  enu_tower_energy_src { kEnergyDeposition, kLightYield }
 
enum  ProcessTowerType { kRawTowerOnly = 0, kTowerInfoOnly = 1, kBothTowers =2 }
 

Public Member Functions

 RawTowerBuilder (const std::string &name="RawTowerBuilder")
 
 ~RawTowerBuilder () 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)
 
enu_tower_energy_src get_tower_energy_src () const
 
void set_tower_energy_src (enu_tower_energy_src towerEnergySrc)
 
std::string get_sim_tower_node_prefix () const
 
void set_sim_tower_node_prefix (const std::string &simTowerNodePrefix)
 
void set_towerinfo (RawTowerBuilder::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.
 
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.
 

Protected Member Functions

void CreateNodes (PHCompositeNode *topNode)
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Protected Attributes

RawTowerContainerm_TowerContainer = nullptr
 
RawTowerGeomContainerm_RawTowerGeomContainer = nullptr
 
std::string m_Detector = "NONE"
 
std::string m_TowerNodeName
 
std::string m_TowerInfoNodeName
 
std::string m_TowerGeomNodeName
 
std::string m_SimTowerNodePrefix
 
enu_tower_energy_src m_TowerEnergySrcEnum = kLightYield
 
int m_CellBinning = PHG4CellDefs::undefined
 
int m_ChkEnergyConservationFlag = 0
 
int m_NumLayers = -1
 
int m_NumPhiBins = -1
 
int m_NumEtaBins = -1
 
double m_Emin = 1e-6
 
double m_EtaMin = NAN
 
double m_PhiMin = NAN
 
double m_EtaStep = NAN
 
double m_PhiStep = NAN
 
RawTowerBuilder::ProcessTowerType m_UseTowerInfo = RawTowerBuilder::ProcessTowerType::kBothTowers
 

Detailed Description

Definition at line 15 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 15 of file RawTowerBuilder.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

Definition at line 25 of file RawTowerBuilder.h.

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

Enumerator:
kRawTowerOnly 
kTowerInfoOnly 
kBothTowers 

Definition at line 32 of file RawTowerBuilder.h.

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

Constructor & Destructor Documentation

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

Definition at line 44 of file RawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 44 of file RawTowerBuilder.cc

RawTowerBuilder::~RawTowerBuilder ( )
inlineoverride

Definition at line 19 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 19 of file RawTowerBuilder.h

Member Function Documentation

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

Definition at line 24 of file RawTowerBuilder.h.

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

References i, and m_ChkEnergyConservationFlag.

void RawTowerBuilder::CreateNodes ( PHCompositeNode topNode)
protected

Definition at line 266 of file RawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 266 of file RawTowerBuilder.cc

References RawTowerGeomContainer::add_tower_geometry(), PHCompositeNode::addNode(), Enable::CEMC, RawTowerDefs::convert_name_to_caloid(), Acts::UnitConstants::e, RawTowerDefs::encode_towerid(), PHG4CellDefs::etaphibinning, PHG4CellDefs::etaslatbinning, PHNodeIterator::findFirst(), PHG4CylinderCellGeomContainer::get_begin_end(), PHG4CylinderCellGeom::get_binning(), RawTowerGeom::get_center_x(), PHG4CylinderCellGeom::get_etabins(), RawTowerGeomContainer::get_etabins(), PHG4CylinderCellGeom::get_etabounds(), RawTowerGeomContainer::get_etacenter(), PHG4CylinderCellGeom::get_etamin(), PHG4CylinderCellGeom::get_etastep(), PHG4CylinderCellGeom::get_layer(), PHG4CylinderCellGeomContainer::get_NLayers(), PHG4CylinderCellGeom::get_phibins(), RawTowerGeomContainer::get_phibins(), PHG4CylinderCellGeom::get_phibounds(), RawTowerGeomContainer::get_phicenter(), PHG4CylinderCellGeom::get_phimin(), PHG4CylinderCellGeom::get_phistep(), PHG4CylinderCellGeom::get_radius(), PHG4Utils::get_theta(), PHG4CylinderCellGeom::get_thickness(), RawTowerGeomContainer::get_tower_geometry(), PHG4CylinderCellGeom::get_zbins(), PHG4CylinderCellGeom::get_zbounds(), PHG4CylinderCellGeom::get_zcenter(), RawTowerDefs::HCALIN, RawTowerDefs::HCALOUT, configureMap::ibin, PHG4CylinderCellGeom::identify(), RawTowerGeomContainer::identify(), G4CEMCALBEDO::inner_radius, m_CellBinning, m_Detector, m_EtaMin, m_EtaStep, m_NumEtaBins, m_NumLayers, m_NumPhiBins, m_PhiMin, m_PhiStep, m_RawTowerGeomContainer, m_SimTowerNodePrefix, m_TowerContainer, m_TowerGeomNodeName, m_TowerInfoNodeName, m_TowerNodeName, m_UseTowerInfo, Fun4AllBase::Name(), PHWHERE, physmon_track_finding_ttbar::r, RawTowerGeomContainer::set_etabins(), RawTowerGeomContainer::set_etabounds(), RawTowerGeomContainer::set_phibins(), RawTowerGeomContainer::set_phibounds(), RawTowerGeomContainer::set_radius(), RawTowerGeomContainer::set_thickness(), PHG4CellDefs::sizebinning, PHG4CellDefs::spacalbinning, tg, thickness, Fun4AllBase::Verbosity(), ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 22 of file RawTowerBuilder.h.

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

References m_Detector.

Referenced by CEMC_Towers(), Fun4All_G4_Clusters(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), and Fun4All_G4_Prototype4().

+ Here is the caller graph for this function:

void RawTowerBuilder::EminCut ( const double  e)
inline

Definition at line 23 of file RawTowerBuilder.h.

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

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

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

Definition at line 53 of file RawTowerBuilder.h.

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

References m_SimTowerNodePrefix.

enu_tower_energy_src RawTowerBuilder::get_tower_energy_src ( ) const
inline

Definition at line 41 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 41 of file RawTowerBuilder.h

References m_TowerEnergySrcEnum.

int RawTowerBuilder::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 49 of file RawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 49 of file RawTowerBuilder.cc

References CreateNodes(), Acts::UnitConstants::e, Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), PHG4CylinderCellGeomContainer::get_NLayers(), kEnergyDeposition, kLightYield, m_Detector, m_NumLayers, m_TowerEnergySrcEnum, PHWHERE, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int RawTowerBuilder::process_event ( PHCompositeNode )
overridevirtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

Definition at line 100 of file RawTowerBuilder.cc.

View newest version in sPHENIX GitHub at line 100 of file RawTowerBuilder.cc

References Fun4AllReturnCodes::ABORTEVENT, RawTower::add_ecell(), RawTower::add_eshower(), RawTowerContainer::AddTower(), RawTowerContainer::compress(), Acts::UnitConstants::e, KF_timing::etabin, Fun4AllReturnCodes::EVENT_OK, PHG4CellDefs::get_binning(), PHG4Cell::get_cellid(), PHG4Cell::get_edep(), TowerInfo::get_energy(), RawTower::get_energy(), PHG4CellDefs::SpacalBinning::get_etabin(), PHG4Cell::get_g4showers(), PHG4Cell::get_light_yield(), PHG4CellDefs::SizeBinning::get_phibin(), PHG4CellDefs::SpacalBinning::get_phibin(), TowerInfoContainer::get_tower_at_key(), PHG4CellDefs::SizeBinning::get_zbin(), PHG4CellContainer::getCells(), RawTowerContainer::getTotalEdep(), PHG4CellContainer::getTotalEdep(), RawTowerContainer::getTower(), RawTowerContainer::getTowers(), PHG4Cell::has_binning(), RawTowerContainer::identify(), PHG4Cell::identify(), RawTower::identify(), kEnergyDeposition, kLightYield, m_ChkEnergyConservationFlag, m_Detector, m_Emin, m_RawTowerGeomContainer, m_TowerContainer, m_TowerEnergySrcEnum, m_TowerGeomNodeName, m_TowerInfoNodeName, m_UseTowerInfo, PHWHERE, TowerInfo::set_energy(), RawTower::set_energy(), PHG4CellDefs::sizebinning, PHG4CellDefs::spacalbinning, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

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

Definition at line 59 of file RawTowerBuilder.h.

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

References m_SimTowerNodePrefix.

Referenced by CEMC_Towers(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), and Fun4All_G4_Prototype4().

+ Here is the caller graph for this function:

void RawTowerBuilder::set_tower_energy_src ( enu_tower_energy_src  towerEnergySrc)
inline

Definition at line 47 of file RawTowerBuilder.h.

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

References m_TowerEnergySrcEnum.

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

Definition at line 64 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 64 of file RawTowerBuilder.h

References m_UseTowerInfo.

Member Data Documentation

int RawTowerBuilder::m_CellBinning = PHG4CellDefs::undefined
protected

Definition at line 83 of file RawTowerBuilder.h.

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

Referenced by CreateNodes().

int RawTowerBuilder::m_ChkEnergyConservationFlag = 0
protected

Definition at line 84 of file RawTowerBuilder.h.

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

Referenced by checkenergy(), and process_event().

std::string RawTowerBuilder::m_Detector = "NONE"
protected

Definition at line 76 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 76 of file RawTowerBuilder.h

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

double RawTowerBuilder::m_Emin = 1e-6
protected

Definition at line 88 of file RawTowerBuilder.h.

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

Referenced by EminCut(), and process_event().

double RawTowerBuilder::m_EtaMin = NAN
protected

Definition at line 89 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 89 of file RawTowerBuilder.h

Referenced by CreateNodes().

double RawTowerBuilder::m_EtaStep = NAN
protected

Definition at line 91 of file RawTowerBuilder.h.

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

Referenced by CreateNodes().

int RawTowerBuilder::m_NumEtaBins = -1
protected

Definition at line 87 of file RawTowerBuilder.h.

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

Referenced by CreateNodes().

int RawTowerBuilder::m_NumLayers = -1
protected

Definition at line 85 of file RawTowerBuilder.h.

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

Referenced by CreateNodes(), and InitRun().

int RawTowerBuilder::m_NumPhiBins = -1
protected

Definition at line 86 of file RawTowerBuilder.h.

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

Referenced by CreateNodes().

double RawTowerBuilder::m_PhiMin = NAN
protected

Definition at line 90 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 90 of file RawTowerBuilder.h

Referenced by CreateNodes().

double RawTowerBuilder::m_PhiStep = NAN
protected

Definition at line 92 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 92 of file RawTowerBuilder.h

Referenced by CreateNodes().

RawTowerGeomContainer* RawTowerBuilder::m_RawTowerGeomContainer = nullptr
protected

Definition at line 74 of file RawTowerBuilder.h.

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

Referenced by CreateNodes(), and process_event().

std::string RawTowerBuilder::m_SimTowerNodePrefix
protected

Definition at line 80 of file RawTowerBuilder.h.

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

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

RawTowerContainer* RawTowerBuilder::m_TowerContainer = nullptr
protected

Definition at line 72 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 72 of file RawTowerBuilder.h

Referenced by CreateNodes(), and process_event().

enu_tower_energy_src RawTowerBuilder::m_TowerEnergySrcEnum = kLightYield
protected

Definition at line 82 of file RawTowerBuilder.h.

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

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

std::string RawTowerBuilder::m_TowerGeomNodeName
protected

Definition at line 79 of file RawTowerBuilder.h.

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

Referenced by CreateNodes(), and process_event().

std::string RawTowerBuilder::m_TowerInfoNodeName
protected

Definition at line 78 of file RawTowerBuilder.h.

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

Referenced by CreateNodes(), and process_event().

std::string RawTowerBuilder::m_TowerNodeName
protected

Definition at line 77 of file RawTowerBuilder.h.

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

Referenced by CreateNodes().

RawTowerBuilder::ProcessTowerType RawTowerBuilder::m_UseTowerInfo = RawTowerBuilder::ProcessTowerType::kBothTowers
protected

Definition at line 93 of file RawTowerBuilder.h.

View newest version in sPHENIX GitHub at line 93 of file RawTowerBuilder.h

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


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