BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-00-02-17/test/main.cxx
Go to the documentation of this file.
1#include <iostream>
2
4#include "Identifier/EmcID.h"
5#include "Identifier/HltID.h"
6
7using namespace std;
8
9int main()
10{
11 Identifier id;
12 id=0;
13
14
15 int x=1,y=2,z=3;
16
17 cout<<id;
18
19 cout.width(8);
20 cout.fill('*');
21 cout<<"Hello"<<endl;
22
23 cout<<"==============EmcID Test================="<<endl;
24
25 id=EmcID::crystal_id(x,y,z);
26
27 cout<<"Identifier id="<<id<<endl;
28
29 cout<<"barrel_ec ="<<EmcID::barrel_ec(id)<<endl;
30 cout<<"theta_module ="<<EmcID::theta_module(id)<<endl;
31 cout<<"phi_module ="<<EmcID::phi_module(id)<<endl;
32 cout<<"is barrel? "<<EmcID::is_barrel(id)<<endl;
33
34 for ( int theta=-5; theta<=10; theta++ ) {
35 cout<<"PHI_MAX(theta="<<theta<<"):"<<EmcID::getPHI_ENDCAP_MAX(theta)<<endl;
36 }
37
38 cout<<"ENDCAP_EAST ="<<EmcID::getENDCAP_EAST()<<endl;
39 cout<<"ENDCAP_WEST ="<<EmcID::getENDCAP_WEST()<<endl;
40
41 cout<<"===============HltID Test================="<<endl;
42
43 x=0;y=2;
45
46 cout<<"Identifier id="<<id<<endl;
47
48 cout<<"detector ="<<HltID::detector(id)<<endl;
49 cout<<"id_in_sub ="<<HltID::id_sub(id)<<endl;
50 cout<<"is ef_result? "<<HltID::is_ef_result(id)<<endl;
51 cout<<"is eventtype? "<<HltID::is_eventtype(id)<<endl;
52 cout<<"is energy? "<<HltID::is_energy(id)<<endl;
53 cout<<"is algorithm? "<<HltID::is_algorithm(id)<<endl;
54 cout<<"is mdc inf? "<<HltID::is_mdc_inf(id)<<endl;
55
56 cout<<"EMC ="<<HltID::EMC<<endl;
57 cout<<"DETECTOR_MAX ="<<HltID::getDETECTOR_MAX()<<endl;
58 cout<<"this id's max="<<HltID::id_sub_max(id)<<endl;
59 cout<<"ID_MDC_MAX ="<<HltID::getID_MDC_MAX()<<endl;
60
61}
Double_t x[10]
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
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 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 phi_module(const Identifier &id)
Definition EmcID.cxx:48
@ EMC
Definition HltID.h:21
static bool is_ef_result(const Identifier &id)
Test for data type.
Definition HltID.cxx:67
static bool is_eventtype(const Identifier &id)
Definition HltID.cxx:72
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
Definition HltID.cxx:172
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0)
Definition HltID.cxx:140
static unsigned int getDETECTOR_MAX()
Definition HltID.h:70
static bool is_algorithm(const Identifier &id)
Definition HltID.cxx:78
static unsigned int getID_MDC_MAX()
Definition HltID.h:63
static unsigned int id_sub_max(const Identifier &id)
Definition HltID.cxx:150
static bool is_mdc_inf(const Identifier &id)
Definition HltID.cxx:114
static unsigned int id_sub(const Identifier &id)
Definition HltID.cxx:145
static bool is_energy(const Identifier &id)
Definition HltID.cxx:96
double y[1000]