CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
bak_Identifier-01-02-14/src/BesDetectorID.cxx
Go to the documentation of this file.
1#include "Identifier/BesDetectorID.h"
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
17{
18}
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}
bool is_mdc(const Identifier &id) const
bool is_hlt(const Identifier &id) const
bool is_muc(const Identifier &id) const
bool is_emc(const Identifier &id) const
bool is_tof(const Identifier &id) const
bool is_cgem(const Identifier &id) const