EIC 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 198 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 198 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, exit(), FEMC, FHCAL, HCALIN, HCALOUT, LFHCAL, NONE, and ZDC.

+ Here is the call graph for this function:

RawTowerDefs::CalorimeterId RawTowerDefs::convert_name_to_caloid ( const std::string &  caloname)
inline
CalorimeterId RawTowerDefs::decode_caloid ( const unsigned int  calo_tower_id)
inline

Extract calorimeter ID from CaloTowerID

Definition at line 100 of file RawTowerDefs.h.

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

References tower_idbits.

Referenced by RawTowerGeomContainerv1::add_tower_geometry(), RawTowerDeadMapv1::addDeadTower(), RawTowerContainer::AddTower(), RawTowerGeomv3::get_bineta(), RawTowerv1::get_bineta(), RawTowerGeomv3::get_binphi(), RawTowerv1::get_binphi(), RawTowerv1::identify(), RawTowerCalibration::process_event(), RawTowerDigitizer::process_event(), and ParticleFlowReco::process_event().

+ Here is the caller graph for this function:

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_index1 ( const unsigned int  calo_tower_id)
inline

Extract tower index 1 of calorimeter tower from CaloTowerID

Definition at line 116 of file RawTowerDefs.h.

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

References index1_idbits.

Referenced by RawTowerGeomv2::get_bineta(), RawTowerGeomv3::get_bineta(), RawTowerGeomv1::get_bineta(), RawTowerGeomv4::get_bineta(), RawTowerv1::get_bineta(), RawTowerGeomv2::get_column(), RawTowerGeomv1::get_column(), RawTowerGeomv4::get_column(), RawClusterBuilderTemplate::InitRun(), and RawClusterBuilderTemplate::process_event().

+ Here is the caller graph for this function:

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 133 of file RawTowerDefs.h.

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

References RawTowerZDCDefs::bitsIndex2, and RawTowerZDCDefs::bitsIndex3.

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

+ Here is the caller graph for this function:

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

Extract tower index 2 of calorimeter tower from CaloTowerID

Definition at line 124 of file RawTowerDefs.h.

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

Referenced by RawTowerGeomv2::get_binphi(), RawTowerGeomv3::get_binphi(), RawTowerGeomv1::get_binphi(), RawTowerGeomv4::get_binphi(), RawTowerv1::get_binphi(), RawTowerGeomv2::get_row(), RawTowerGeomv1::get_row(), RawTowerGeomv4::get_row(), RawClusterBuilderTemplate::InitRun(), and RawClusterBuilderTemplate::process_event().

+ 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 146 of file RawTowerDefs.h.

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

References RawTowerZDCDefs::bitsIndex3.

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 156 of file RawTowerDefs.h.

View newest version in sPHENIX GitHub at line 156 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
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 exit(), and tower_idbits.

+ Here is the call 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,
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 165 of file RawTowerDefs.h.

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

References RawTowerZDCDefs::bitsIndex2, RawTowerZDCDefs::bitsIndex3, exit(), and tower_idbits.

+ Here is the call graph for this function:

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().