CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
BesDetectorID.cxx
Go to the documentation of this file.
2#include <iostream>
3#include <stdio.h>
4#include <assert.h>
5
7 m_MdcId(BesDetectorID::MDC_ID),
8 m_CgemId(BesDetectorID::CGEM_ID),
9 m_TofId(BesDetectorID::TOF_ID),
10 m_EmcId(BesDetectorID::EMC_ID),
11 m_MucId(BesDetectorID::MUC_ID),
12 m_HltId(BesDetectorID::HLT_ID)
13{
14}
15
19
20bool BesDetectorID::is_mdc (const Identifier& id) const {
21 Identifier::value_type value = id.get_value();
22 return (value & MDC_MASK >> MDC_INDEX) == MDC_ID ? true : false;
23}
24
25bool BesDetectorID::is_cgem (const Identifier& id) const {
26 Identifier::value_type value = id.get_value();
27 return (value & CGEM_MASK >> CGEM_INDEX) == CGEM_ID ? true : false;
28}
29
30bool BesDetectorID::is_tof (const Identifier& id) const {
31 Identifier::value_type value = id.get_value();
32 return (value & TOF_MASK >> TOF_INDEX) == TOF_ID ? true : false;
33}
34
35bool BesDetectorID::is_emc (const Identifier& id) const {
36 Identifier::value_type value = id.get_value();
37 return (value & EMC_MASK >> EMC_INDEX) == EMC_ID ? true : false;
38}
39
40bool BesDetectorID::is_muc (const Identifier& id) const {
41 Identifier::value_type value = id.get_value();
42 return (value & MUC_MASK >> MUC_INDEX) == MUC_ID ? true : false;
43}
44
45bool BesDetectorID::is_hlt (const Identifier& id) const {
46 Identifier::value_type value = id.get_value();
47 return (value & HLT_MASK >> HLT_INDEX) == HLT_ID ? true : false;
48}
49
51 Identifier id = Identifier( m_MdcId << MDC_INDEX );
52 return id;
53}
54
56 Identifier id = Identifier( m_CgemId << CGEM_INDEX );
57 return id;
58}
59
61 Identifier id = Identifier( m_TofId << TOF_INDEX );
62 return id;
63}
64
66 Identifier id = Identifier( m_EmcId << EMC_INDEX );
67 return id;
68}
69
71 Identifier id = Identifier( m_MucId << MUC_INDEX );
72 return id;
73}
74
76 Identifier id = Identifier( m_HltId << HLT_INDEX );
77 return id;
78}
static const unsigned int EMC_INDEX
Identifier emc(void) const
bool is_mdc(const Identifier &id) const
bool is_hlt(const Identifier &id) const
static const unsigned int MUC_ID
bool is_muc(const Identifier &id) const
static const unsigned int CGEM_ID
static const unsigned int EMC_MASK
static const unsigned int CGEM_MASK
bool is_emc(const Identifier &id) const
static const unsigned int TOF_ID
static const unsigned int EMC_ID
Identifier cgem(void) const
Identifier tof(void) const
Identifier muc(void) const
static const unsigned int HLT_INDEX
static const unsigned int HLT_ID
bool is_tof(const Identifier &id) const
static const unsigned int MUC_INDEX
Identifier hlt(void) const
bool is_cgem(const Identifier &id) const
Identifier mdc(void) const
static const unsigned int TOF_INDEX
static const unsigned int HLT_MASK
static const unsigned int MDC_MASK
static const unsigned int TOF_MASK
static const unsigned int MDC_INDEX
static const unsigned int MDC_ID
static const unsigned int MUC_MASK
static const unsigned int CGEM_INDEX
unsigned int value_type
Definition Identifier.h:27