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

Typedefs

typedef unsigned int keytype
 

Enumerations

enum  CalorimeterId {
  NONE = 0, ZDC_Crystal = 1, ZDC_SiPixel = 2, ZDC_SiPad =3,
  ZDC_Sci = 4
}
 

Functions

CalorimeterId decode_caloid (const unsigned int calo_tower_id)
 
unsigned int decode_index1zdc (const unsigned int calo_tower_id)
 
unsigned int decode_index2zdc (const unsigned int calo_tower_id)
 
unsigned int decode_index3zdc (const unsigned int calo_tower_id)
 
RawTowerZDCDefs::keytype encode_towerid_zdc (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 RawTowerZDCDefs::CalorimeterId calo_id)
 
RawTowerZDCDefs::CalorimeterId convert_name_to_caloid (const std::string &caloname)
 

Variables

static unsigned int calo_idbits = 4
 
static unsigned int tower_idbits = sizeof(keytype) * 8 - calo_idbits
 
static unsigned int bitsIndex2 = 10
 
static unsigned int bitsIndex3 = 8
 
static unsigned int maxbitsCaloId = 0xF
 
static unsigned int maxbitsIndex1 = 0x3FF
 
static unsigned int maxbitsIndex2 = 0x3FF
 
static unsigned int maxbitsIndex3 = 0xFF
 

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 RawTowerZDCDefs::keytype

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

Definition at line 17 of file RawTowerZDCDefs.h.

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

Enumeration Type Documentation

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

Enumerator:
NONE 
ZDC_Crystal 
ZDC_SiPixel 
ZDC_SiPad 
ZDC_Sci 

Definition at line 34 of file RawTowerZDCDefs.h.

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

Function Documentation

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

Convert calorimeter ID to name string

Definition at line 110 of file RawTowerZDCDefs.h.

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

References g4zmq::exit(), NONE, ZDC_Crystal, ZDC_Sci, ZDC_SiPad, and ZDC_SiPixel.

+ Here is the call graph for this function:

RawTowerZDCDefs::CalorimeterId RawTowerZDCDefs::convert_name_to_caloid ( const std::string &  caloname)
inline

Convert name string to calorimeter ID

Definition at line 145 of file RawTowerZDCDefs.h.

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

References g4zmq::exit(), NONE, ZDC_Crystal, ZDC_Sci, ZDC_SiPad, and ZDC_SiPixel.

Referenced by EICG4ZDCRawTowerBuilderByHitIndex::SubDetector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CalorimeterId RawTowerZDCDefs::decode_caloid ( const unsigned int  calo_tower_id)
inline

Extract calorimeter ID from CaloTowerID

Definition at line 46 of file RawTowerZDCDefs.h.

View newest version in sPHENIX GitHub at line 46 of file RawTowerZDCDefs.h

References maxbitsCaloId, and tower_idbits.

Referenced by RawTowerZDCGeomContainer::add_tower_geometry(), and RawTowerZDCContainer::AddTower().

+ Here is the caller graph for this function:

unsigned int RawTowerZDCDefs::decode_index1zdc ( const unsigned int  calo_tower_id)
inline

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

Definition at line 54 of file RawTowerZDCDefs.h.

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

References bitsIndex2, bitsIndex3, and maxbitsIndex1.

Referenced by RawTowerZDCGeomv1::get_bineta(), and RawTowerZDCv1::get_bineta().

+ Here is the caller graph for this function:

unsigned int RawTowerZDCDefs::decode_index2zdc ( const unsigned int  calo_tower_id)
inline

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

Definition at line 63 of file RawTowerZDCDefs.h.

View newest version in sPHENIX GitHub at line 63 of file RawTowerZDCDefs.h

References bitsIndex3, and maxbitsIndex2.

Referenced by RawTowerZDCGeomv1::get_binphi(), and RawTowerZDCv1::get_binphi().

+ Here is the caller graph for this function:

unsigned int RawTowerZDCDefs::decode_index3zdc ( const unsigned int  calo_tower_id)
inline

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

Definition at line 72 of file RawTowerZDCDefs.h.

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

References maxbitsIndex3.

Referenced by RawTowerZDCGeomv1::get_binl(), and RawTowerZDCv1::get_binl().

+ Here is the caller graph for this function:

RawTowerZDCDefs::keytype RawTowerZDCDefs::encode_towerid_zdc ( 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 82 of file RawTowerZDCDefs.h.

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

References bitsIndex2, bitsIndex3, g4zmq::exit(), maxbitsIndex1, maxbitsIndex2, maxbitsIndex3, and tower_idbits.

Referenced by RawTowerZDCContainer::getTower(), EICG4ZDCRawTowerBuilderByHitIndex::process_event(), and EICG4ZDCRawTowerBuilderByHitIndex::ReadGeometryFromTable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

unsigned int RawTowerZDCDefs::bitsIndex2 = 10
static

Definition at line 24 of file RawTowerZDCDefs.h.

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

Referenced by RawTowerDefs::decode_index1v2(), decode_index1zdc(), RawTowerDefs::encode_towerid(), and encode_towerid_zdc().

unsigned int RawTowerZDCDefs::bitsIndex3 = 8
static
unsigned int RawTowerZDCDefs::calo_idbits = 4
static

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

Definition at line 21 of file RawTowerZDCDefs.h.

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

unsigned int RawTowerZDCDefs::maxbitsCaloId = 0xF
static

Definition at line 26 of file RawTowerZDCDefs.h.

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

Referenced by decode_caloid().

unsigned int RawTowerZDCDefs::maxbitsIndex1 = 0x3FF
static

Definition at line 27 of file RawTowerZDCDefs.h.

View newest version in sPHENIX GitHub at line 27 of file RawTowerZDCDefs.h

Referenced by decode_index1zdc(), and encode_towerid_zdc().

unsigned int RawTowerZDCDefs::maxbitsIndex2 = 0x3FF
static

Definition at line 28 of file RawTowerZDCDefs.h.

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

Referenced by decode_index2zdc(), and encode_towerid_zdc().

unsigned int RawTowerZDCDefs::maxbitsIndex3 = 0xFF
static

Definition at line 29 of file RawTowerZDCDefs.h.

View newest version in sPHENIX GitHub at line 29 of file RawTowerZDCDefs.h

Referenced by decode_index3zdc(), and encode_towerid_zdc().

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

Definition at line 22 of file RawTowerZDCDefs.h.

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

Referenced by decode_caloid(), and encode_towerid_zdc().