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

Typedefs

typedef unsigned int keytype
 

Enumerations

enum  CalorimeterId {
  NONE = 0, CEMC = 1, HCALOUT = 2, HCALIN = 3,
  EEMC = 4, FEMC = 5, FHCAL = 6, DRCALO = 7,
  EHCAL = 8, EEMC_crystal = 9, EEMC_glass = 10, LFHCAL = 11,
  BECAL = 12, ZDC = 13, B0ECAL = 14, BWD_0 = 15,
  BWD_1 = 16, BWD_2 = 17, BWD_3 = 18, BWD_4 = 19
}
 

Functions

RawTowerDefs::keytype encode_towerid (const CalorimeterId calo_id, const unsigned int tower_index_1, const unsigned int tower_index_2)
 
RawTowerDefs::keytype encode_towerid (const CalorimeterId calo_id, const unsigned int tower_index)
 
CalorimeterId decode_caloid (const unsigned int calo_tower_id)
 
unsigned int decode_index (const unsigned int calo_tower_id)
 
unsigned int decode_index1 (const unsigned int calo_tower_id)
 
unsigned int decode_index2 (const unsigned int calo_tower_id)
 
unsigned int decode_index1v2 (const unsigned int calo_tower_id)
 
unsigned int decode_index2v2 (const unsigned int calo_tower_id)
 
unsigned int decode_index3v2 (const unsigned int calo_tower_id)
 
RawTowerDefs::keytype encode_towerid (const CalorimeterId calo_id, const unsigned int tower_index_1, const unsigned int tower_index_2, const unsigned int tower_index_3)
 
std::string convert_caloid_to_name (const RawTowerDefs::CalorimeterId calo_id)
 
RawTowerDefs::CalorimeterId convert_name_to_caloid (const std::string &caloname)
 

Variables

static unsigned int calo_idbits = 8
 
static unsigned int tower_idbits = sizeof(keytype) * 8 - calo_idbits
 
static unsigned int index1_idbits = tower_idbits / 2
 

Detailed Description

Namespace with functions to encode / decode CaloTowerID. The highest 8 bits of the tower ID encode a unique ID for the calorimeter the tower is in. The lower 24 bits uniquely identify the tower within a calorimeter.

Typedef Documentation

typedef unsigned int RawTowerDefs::keytype

Define data type of unique tower ID, i.e. for CaloTowerID

Definition at line 17 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 17 of file RawTowerDefs.h

Enumeration Type Documentation

Enum with all available calorimeter IDs. This enum can be extended up to 254 entries. If adding new CalorimeterIDs, please also add them to the decode_caloname function below.

Enumerator:
NONE 
CEMC 
HCALOUT 
HCALIN 
EEMC 
FEMC 
FHCAL 
DRCALO 
EHCAL 
EEMC_crystal 
EEMC_glass 
LFHCAL 
BECAL 
ZDC 
B0ECAL 
BWD_0 
BWD_1 
BWD_2 
BWD_3 
BWD_4 

Definition at line 28 of file RawTowerDefs.h.

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

Function Documentation

std::string RawTowerDefs::convert_caloid_to_name ( const RawTowerDefs::CalorimeterId  calo_id)
inline

Convert calorimeter ID to name string

Definition at line 197 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 197 of file RawTowerDefs.h

References B0ECAL, BECAL, BWD_0, BWD_1, BWD_2, BWD_3, BWD_4, CEMC, DRCALO, EEMC, EEMC_crystal, EEMC_glass, EHCAL, FEMC, FHCAL, HCALIN, HCALOUT, LFHCAL, NONE, and ZDC.

Referenced by ExclusiveReco::AddInvariantMassInformation(), TrackProjectionTools::FindClosestTrack(), TrackProjectorPlaneECAL::get_detector_from_cluster(), and LeptoquarksReco::process_event().

+ Here is the caller graph for this function:

CalorimeterId RawTowerDefs::decode_caloid ( const unsigned int  calo_tower_id)
inline
unsigned int RawTowerDefs::decode_index ( const unsigned int  calo_tower_id)
inline

Extract tower index of calorimeter tower from CaloTowerID

Definition at line 108 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 108 of file RawTowerDefs.h

unsigned int RawTowerDefs::decode_index1v2 ( const unsigned int  calo_tower_id)
inline

Extract tower index 1 of calorimeter tower from CaloTowerID with 3 indices

Definition at line 132 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 132 of file RawTowerDefs.h

Referenced by RawTowerGeomv3::get_bineta(), and RawTowerv1::get_bineta().

+ Here is the caller graph for this function:

unsigned int RawTowerDefs::decode_index2v2 ( const unsigned int  calo_tower_id)
inline

Extract tower index 2 of calorimeter tower from CaloTowerID with 3 indices

Definition at line 145 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 145 of file RawTowerDefs.h

Referenced by RawTowerGeomv3::get_binphi(), and RawTowerv1::get_binphi().

+ Here is the caller graph for this function:

unsigned int RawTowerDefs::decode_index3v2 ( const unsigned int  calo_tower_id)
inline

Extract tower index 3 of calorimeter tower from CaloTowerID with 3 indices

Definition at line 155 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 155 of file RawTowerDefs.h

Referenced by RawTowerGeomv3::get_binl(), and RawTowerv1::get_binl().

+ Here is the caller graph for this function:

RawTowerDefs::keytype RawTowerDefs::encode_towerid ( const CalorimeterId  calo_id,
const unsigned int  tower_index_1,
const unsigned int  tower_index_2 
)
inline

Returns CaloTowerID for given calorimeter ID, tower index 1, and tower index 2

Definition at line 55 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 55 of file RawTowerDefs.h

References index1_idbits, and tower_idbits.

Referenced by PHG4OHCalDetector::AddGeometryNode(), PHG4IHCalDetector::AddGeometryNode(), PHG4OuterHcalDetector::AddGeometryNode(), PHG4InnerHcalDetector::AddGeometryNode(), PHG4SpacalDetector::AddTowerGeometryNode(), CaloGeomMapping::CreateGeomNode(), RawTowerBuilder::CreateNodes(), RawTowerCombiner::CreateNodes(), EpFinderEval::fill_tree(), HCalJetPhiShift::FillTTree(), TowerInfoDefs::get_emcal_geokey_at_channel(), TowerInfoDefs::get_hcalin_geokey_at_channel(), TowerInfoDefs::get_hcalout_geokey_at_channel(), TowerJetInput::get_input(), TrackProjectionTools::getE33Forward(), RawTowerContainer::getTower(), Prototype2RawTowerBuilder::InitRun(), HcalRawTowerBuilder::InitRun(), RawTowerDeadMapv1::isDeadTower(), RawClusterBuilderTemplate::process_event(), RawClusterBuilderTopo::process_event(), RawTowerBuilderByHitIndex::process_event(), ClusterIso::process_event(), SubtractTowers::process_event(), CopyAndSubtractJets::process_event(), RetowerCEMC::process_event(), caloTowerEmbed::process_event(), CaloTriggerSim::process_event(), DetermineTowerBackground::process_event(), JetBkgdSub::process_event(), JetValidation::process_event(), EMJetVal::process_event(), RawTower_Prototype2::RawTower_Prototype2(), RawTower_Prototype3::RawTower_Prototype3(), RawTower_Prototype4::RawTower_Prototype4(), RawTower_Temperature::RawTower_Temperature(), RawTowerv1::RawTowerv1(), and RawTowerBuilderByHitIndex::ReadGeometryFromTable().

+ Here is the caller graph for this function:

RawTowerDefs::keytype RawTowerDefs::encode_towerid ( const CalorimeterId  calo_id,
const unsigned int  tower_index 
)
inline

Returns CaloTowerID for given calorimeter ID, tower index

Definition at line 79 of file RawTowerDefs.h.

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

References tower_idbits.

RawTowerDefs::keytype RawTowerDefs::encode_towerid ( const CalorimeterId  calo_id,
const unsigned int  tower_index_1,
const unsigned int  tower_index_2,
const unsigned int  tower_index_3 
)
inline

Returns CaloTowerID for given calorimeter ID, tower index 1, tower index 2 and tower index 3

Definition at line 164 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 164 of file RawTowerDefs.h

References tower_idbits.

Variable Documentation

unsigned int RawTowerDefs::calo_idbits = 8
static

Bit ranges for encoding calorimeter ID and tower indices in combined tower ID

Definition at line 21 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 21 of file RawTowerDefs.h

unsigned int RawTowerDefs::index1_idbits = tower_idbits / 2
static

Definition at line 23 of file RawTowerDefs.h.

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

Referenced by decode_index1(), and encode_towerid().

unsigned int RawTowerDefs::tower_idbits = sizeof(keytype) * 8 - calo_idbits
static

Definition at line 22 of file RawTowerDefs.h.

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

Referenced by decode_caloid(), and encode_towerid().