1#include "Identifier/EmcID.h"
14 if (
barrel_ec > BARREL_EC_MAX )
return false;
18 if (
phi_module > PHI_BARREL_MAX )
return false;
31 unsigned int pos = (
id.get_value() & EmcID::BARREL_EC_MASK ) >> EmcID::BARREL_EC_INDEX;
32 return ( pos == BARREL ) ? true :
false;
37 return ( (
id.get_value() & EmcID::BARREL_EC_MASK ) >> EmcID::BARREL_EC_INDEX );
42 return (
id.get_value() & EmcID::THETA_MASK ) >> EmcID::THETA_INDEX;
47 return (
id.get_value() & EmcID::PHI_MASK ) >> EmcID::PHI_INDEX;
52 if (
is_barrel(
id ) ) {
return THETA_BARREL_MAX; }
53 else {
return THETA_ENDCAP_MAX; }
58 if (
is_barrel(
id ) ) {
return PHI_BARREL_MAX; }
86 if ( theta == 0 || theta == 1 ) {
return PHI_ENDCAP_MAX1; }
87 if ( theta == 2 || theta == 3 ) {
return PHI_ENDCAP_MAX2; }
88 if ( theta == 4 || theta == 5 ) {
return PHI_ENDCAP_MAX3; }
static const unsigned int EMC_INDEX
static const unsigned int EMC_ID
static unsigned int getPHI_BARREL_MAX()
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
static unsigned int getENDCAP_WEST()
static bool values_ok(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static unsigned int getBARREL_EC_MIN()
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0).
static bool is_barrel(const Identifier &id)
Test for barrel.
static unsigned int getENDCAP_EAST()
static unsigned int getBARREL_EC_MAX()
static unsigned int getTHETA_ENDCAP_MIN()
static unsigned int getTHETA_ENDCAP_MAX()
static unsigned int getBARREL()
unsigned int theta_module_max(const Identifier &id)
Max/Min values for each field (error returns -999).
unsigned int phi_module_max(const Identifier &id)
static unsigned int getTHETA_BARREL_MIN()
static unsigned int getIntID(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static unsigned int getTHETA_BARREL_MAX()
static unsigned int theta_module(const Identifier &id)
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
static unsigned int getPHI_ENDCAP_MIN()
static unsigned int getPHI_BARREL_MIN()
static unsigned int phi_module(const Identifier &id)