CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-01-02-15/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
16
17 /// destructor
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 barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static unsigned int getIntID(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static unsigned int getPHI_BARREL_MIN()
static unsigned int getBARREL_EC_MIN()
~EmcID()
destructor
static unsigned int getTHETA_BARREL_MIN()
static unsigned int getPHI_ENDCAP_MIN()
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
EmcID()
constructor
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 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 getPHI_BARREL_MAX()
static unsigned int theta_module(const Identifier &id)
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 phi_module(const Identifier &id)
static unsigned int getTHETA_BARREL_MAX()
static unsigned int getBARREL_EC_MAX()
static unsigned int getENDCAP_EAST()
static unsigned int theta_module(const Identifier &id)
static unsigned int getBARREL()
static unsigned int getTHETA_ENDCAP_MAX()
static bool values_ok(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static unsigned int getTHETA_ENDCAP_MIN()
static unsigned int getENDCAP_WEST()
static unsigned int phi_module(const Identifier &id)