14 const unsigned int layer,
15 const unsigned int phi_module,
16 const unsigned int end
18 if (
barrel_ec > BARREL_EC_MAX )
return false;
20 if (
layer > LAYER_ENDCAP_MAX )
return false;
23 if (
layer > LAYER_BARREL_MAX )
return false;
25 if(
end > 1 )
return false;
33 const unsigned int endcap,
34 const unsigned int module,
35 const unsigned int strip,
36 const unsigned int end
38 if(
barrel_ec != BARREL_EC_MRPC )
return false;
39 if(
endcap > ENDCAP_MRPC_MAX )
return false;
40 if(
module > MODULE_MRPC_MAX )
return false;
41 if(
strip > STRIP_MRPC_MAX )
return false;
42 if(
end > 1 )
return false;
50 unsigned int pos = (
id.get_value() & TofID::BARREL_EC_MASK) >> TofID::BARREL_EC_INDEX;
51 return (pos == BARREL_EC_MAX || pos == BARREL_EC_MIN || pos == BARREL_EC_MRPC) ?
false :
true;
62 return ((
id.get_value() & TofID::BARREL_EC_MASK) >> TofID::BARREL_EC_INDEX);
68 return ((
id.get_value() & TofID::LAYER_MASK) >> TofID::LAYER_INDEX);
75 return ((
id.get_value() & TofID::PHI_MASK) >> TofID::PHI_INDEX);
80 return ((
id.get_value() & TofID::END_MASK) >> TofID::END_INDEX);
86 return LAYER_BARREL_MAX;
88 return LAYER_ENDCAP_MAX;
95 return PHI_BARREL_MAX;
97 return PHI_ENDCAP_MAX;
103 unsigned int pos = (
id.get_value() & TofID::BARREL_EC_MASK) >> TofID::BARREL_EC_INDEX;
104 return (pos == BARREL_EC_MRPC) ?
false :
true;
114 unsigned int pos = (
id.get_value() & TofID::BARREL_EC_MASK) >> TofID::BARREL_EC_INDEX;
115 return (pos == BARREL_EC_MRPC) ?
true :
false;
126 return ((
id.get_value() & TofID::ENDCAP_MASK) >> TofID::ENDCAP_INDEX);
132 return ((
id.get_value() & TofID::MODULE_MASK) >> TofID::MODULE_INDEX);
138 return ((
id.get_value() & TofID::STRIP_MASK) >> TofID::STRIP_INDEX);
173 (
strip << STRIP_INDEX) | (
end << END_INDEX);
202 (
strip << STRIP_INDEX) | (
end << END_INDEX);
209 return LAYER_BARREL_MAX;
214 return LAYER_ENDCAP_MAX;
219 return PHI_BARREL_MAX;
224 return PHI_ENDCAP_MAX;
228 return BARREL_EC_MAX;
233 return BARREL_EC_MIN;
238 return BARREL_EC_MRPC;
243 return ENDCAP_MRPC_MAX;
248 return MODULE_MRPC_MAX;
253 return STRIP_MRPC_MAX;
static const unsigned int TOF_ID
static const unsigned int TOF_INDEX
static int endcap(const Identifier &id)
static int strip(const Identifier &id)
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
static value_type getENDCAP_MRPC_MAX()
static bool is_scin(const Identifier &id)
static value_type getMODULE_MRPC_MAX()
static bool values_ok(const unsigned int barrel_ec, const unsigned int layer, const unsigned int phi_module, const unsigned int end)
static int end(const Identifier &id)
static value_type getPHI_BARREL_MAX()
static value_type getPHI_ENDCAP_MAX()
static value_type getSTRIP_MRPC_MAX()
static value_type getBARREL_EC_MIN()
static value_type getBARREL_EC_MAX()
static bool is_barrel(const Identifier &id)
Test for barrel.
static bool is_mrpc(const Identifier &id)
static int phi_module(const Identifier &id)
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
int phi_module_max(const Identifier &id)
Max/Min values for each field (error returns -999)
static value_type getLAYER_ENDCAP_MAX()
static value_type getBARREL_EC_MRPC()
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
static int layer(const Identifier &id)
int layer_max(const Identifier &id)
static int module(const Identifier &id)
static value_type getLAYER_BARREL_MAX()