BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-00-02-17/Identifier/EmcID.h
Go to the documentation of this file.
1#ifndef __EmcID_h__
2#define __EmcID_h__
3
4#include "Identifier/BesDetectorID.h"
5#include <string>
6#include <assert.h>
7
8class EmcID : public BesDetectorID
9{
10 public:
13
14 /// constructor
15 EmcID();
16
17 /// destructor
18 ~EmcID();
19
20 /// For a single crystal
21 static Identifier crystal_id (const unsigned int barrel_ec,
22 const unsigned int theta_module,
23 const unsigned int phi_module
24 );
25
26 static unsigned int getIntID (const unsigned int barrel_ec,
27 const unsigned int theta_module,
28 const unsigned int phi_module
29 );
30
31 static bool values_ok (const unsigned int barrel_ec,
32 const unsigned int theta_module,
33 const unsigned int phi_module
34 );
35
36 /// Test for barrel
37 static bool is_barrel (const Identifier& id);
38
39 /// Values of different levels (failure returns 0)
40 static unsigned int barrel_ec (const Identifier& id) ;
41 static unsigned int theta_module (const Identifier& id) ;
42 static unsigned int phi_module (const Identifier& id) ;
43
44
45 /// Max/Min values for each field (error returns -999)
46 unsigned int theta_module_max (const Identifier& id) ;
47 unsigned int phi_module_max (const Identifier& id) ;
48
49 static unsigned int getTHETA_BARREL_MAX();
50 static unsigned int getTHETA_BARREL_MIN();
51 static unsigned int getTHETA_ENDCAP_MAX();
52 static unsigned int getTHETA_ENDCAP_MIN();
53 static unsigned int getPHI_BARREL_MAX();
54 static unsigned int getPHI_BARREL_MIN();
55 static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta);
56 static unsigned int getPHI_ENDCAP_MIN();
57 static unsigned int getBARREL_EC_MAX();
58 static unsigned int getBARREL_EC_MIN();
59 static unsigned int getENDCAP_EAST();
60 static unsigned int getBARREL();
61 static unsigned int getENDCAP_WEST();
62
63 private:
64 static const unsigned int BARREL_EC_INDEX = 16;
65 static const unsigned int BARREL_EC_MASK = 0x000F0000;
66
67 static const unsigned int THETA_INDEX = 8;
68 static const unsigned int THETA_MASK = 0x00003F00;
69
70 static const unsigned int PHI_INDEX = 0;
71 static const unsigned int PHI_MASK = 0x000000FF;
72
73 static const unsigned int THETA_BARREL_MAX = 43;
74 static const unsigned int THETA_BARREL_MIN = 0;
75 static const unsigned int THETA_ENDCAP_MAX = 5;
76 static const unsigned int THETA_ENDCAP_MIN = 0;
77
78 static const unsigned int PHI_BARREL_MAX = 119;
79 static const unsigned int PHI_BARREL_MIN = 0;
80 static const unsigned int PHI_ENDCAP_MAX1 = 63;
81 static const unsigned int PHI_ENDCAP_MAX2 = 79;
82 static const unsigned int PHI_ENDCAP_MAX3 = 95;
83 static const unsigned int PHI_ENDCAP_MIN = 0;
84
85 static const unsigned int BARREL_EC_MAX = 2;
86 static const unsigned int BARREL_EC_MIN = 0;
87 static const unsigned int ENDCAP_EAST = 0;
88 static const unsigned int BARREL = 1;
89 static const unsigned int ENDCAP_WEST = 2;
90};
91
92#endif
static unsigned int getPHI_BARREL_MAX()
Definition: EmcID.cxx:107
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
Definition: EmcID.cxx:71
static unsigned int getENDCAP_WEST()
Definition: EmcID.cxx:151
~EmcID()
destructor
Definition: EmcID.cxx:7
static bool values_ok(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
Definition: EmcID.cxx:11
static unsigned int getBARREL_EC_MIN()
Definition: EmcID.cxx:136
EmcID()
constructor
Definition: EmcID.cxx:4
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: EmcID.cxx:38
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition: EmcID.cxx:32
static unsigned int getENDCAP_EAST()
Definition: EmcID.cxx:141
static unsigned int getBARREL_EC_MAX()
Definition: EmcID.cxx:132
static unsigned int getTHETA_ENDCAP_MIN()
Definition: EmcID.cxx:103
static unsigned int getTHETA_ENDCAP_MAX()
Definition: EmcID.cxx:99
static unsigned int getBARREL()
Definition: EmcID.cxx:146
unsigned int theta_module_max(const Identifier &id)
Max/Min values for each field (error returns -999)
Definition: EmcID.cxx:53
unsigned int phi_module_max(const Identifier &id)
Definition: EmcID.cxx:62
static unsigned int getTHETA_BARREL_MIN()
Definition: EmcID.cxx:95
static unsigned int getIntID(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
Definition: EmcID.cxx:81
static unsigned int getTHETA_BARREL_MAX()
Definition: EmcID.cxx:91
static unsigned int theta_module(const Identifier &id)
Definition: EmcID.cxx:43
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
Definition: EmcID.cxx:115
static unsigned int getPHI_ENDCAP_MIN()
Definition: EmcID.cxx:128
static unsigned int getPHI_BARREL_MIN()
Definition: EmcID.cxx:111
static unsigned int phi_module(const Identifier &id)
Definition: EmcID.cxx:48