CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MucCalibData.h
Go to the documentation of this file.
1#ifndef CalibData_Muc_MucCalibData_h
2#define CalibData_Muc_MucCalibData_h
3
4/* @class CalibData_MucCalibData_h
5
6 calibration data class
7 calibration infrastructure
8
9 @author ChunXiu Liu
10*/
14#include <vector>
15#include <cmath>
16
17using namespace std;
18
19namespace CalibData {
20 class MucCalibData: public CalibBase1{
21
22 public:
24 virtual ~MucCalibData(){}
25
26 // Re-implemented from DataObject
27 inline virtual const CLID& clID() const { return classID(); }
28
29 inline static const CLID& classID() { return CLID_Calib_MucCal; }
30
31 virtual StatusCode update(CalibBase1& other, MsgStream* log);
32
33 // int setDefault(); // set default uniform constants value
34
35 //--------- Access by users -------------
36 inline double getUniformEff() const { return m_uniformEff;}
37 inline double getUniformNos() const { return m_uniformNos;}
38 inline double getUniformClst() const { return m_uniformClst;} // probability = 1(biggest strip window for tracking)
39 inline double getUniformCnt() const {return m_uniformCnt;}
40 inline double getUniformNosRatio() const{return m_uniformNosRatio;}
41
42 inline double getLayerEff( int layer ) const { return m_layerEff[layer];}
43 inline double getLayerNos( int layer ) const {return m_layerNos[layer];}
44 inline double getLayerNosRatio( int layer ) const{return m_layerNosRatio[layer];}
45 inline double getLayerCnt( int layer ) const{return m_layerCnt[layer];}
46 inline double getLayerClstPro( int layer, int size ) const{ return m_layerClstPro[layer][size]; }
47 inline double getLayerClst( int layer, double prob ) const{
48 double diff = 2.0;
49 int size = 0;
50 for(int i=0; i<CLST_MAX; i++)
51 {
52 if( fabs(prob - m_layerClstPro[layer][i] ) < diff ) {
53 diff = fabs(prob - m_layerClstPro[layer][i]);
54 size = i+1;
55 }
56 }
57 return size;
58}
59
60 inline double getBoxEff( int part, int segment, int layer ) const{ return m_boxEff[part][segment][layer];}
61 inline double getBoxNos( int part, int segment, int layer ) const{ return m_boxNos[part][segment][layer];}
62 inline double getBoxCnt( int part, int segment, int layer ) const{ return m_boxCnt[part][segment][layer];}
63 inline double getBoxNosRatio( int part, int segment, int layer ) const{return m_boxNosRatio[part][segment][layer];}
64 inline double getBoxClstPro( int part, int segment, int layer, int size ) const{ return m_boxClstPro[part][segment][layer][size]; }
65 inline double getBoxClst( int part, int segment, int layer, double prob ) const{
66 double diff = 2.0;
67 int size = 0;
68 for(int i=0; i<CLST_MAX; i++)
69 {
70 if( fabs(prob - m_boxClstPro[part][segment][layer][i]) < diff ) {
71 diff = fabs(prob - m_boxClstPro[part][segment][layer][i]);
72 size = i+1;
73 }
74 }
75 return size;
76}
77
78 inline double getStripEff( int part, int segment, int layer, int strip ) const{ return m_stripEff[part][segment][layer][strip];}
79 inline double getStripNos( int part, int segment, int layer, int strip ) const{ return m_stripNos[part][segment][layer][strip];}
80 inline double getStripCnt( int part, int segment, int layer, int strip ) const{ return m_stripCnt[part][segment][layer][strip];}
81 inline double getStripNosRatio( int part, int segment, int layer, int strip ) const{ return m_stripNosRatio[part][segment][layer][strip];}
82
83 // set uniform constants for all detector units manually
84 void setUniformEff( double eff ) {m_uniformEff=eff;}
85 void setUniformNos( double nos ) {m_uniformNos=nos;}
86 void setUniformClst( double clst ) {m_uniformClst=clst;}
87 void setUniformCnt( double cnt ){m_uniformCnt=cnt;}
88 void setUniformNosRatio(double nosratio){m_uniformNosRatio=nosratio;}
89
90 //set value
91 void setLayerEff(const double layereff,int i){ m_layerEff[i]=layereff;}
92 void setLayerNos(const double layernos,int i){ m_layerNos[i]=layernos;}
93 void setLayerCnt(const double layercnt,int i){ m_layerCnt[i]=layercnt;}
94 void setLayerNosRatio(const double layernosratio,int i){ m_layerNosRatio[i]=layernosratio;}
95 void setLayerClstPro(const double layerpro,int i,int j){m_layerClstPro[i][j]= layerpro;}
96
97 void setBoxEff(const double boxeff,int i,int j, int k){m_boxEff[i][j][k] = boxeff;}
98 void setBoxNos(const double boxnos,int i,int j, int k){m_boxNos[i][j][k] = boxnos;}
99 void setBoxCnt(const double boxcnt,int i,int j, int k){m_boxCnt[i][j][k] = boxcnt;}
100 void setBoxNosRatio(const double boxratio,int i,int j, int k){m_boxNosRatio[i][j][k]=boxratio;}
101 void setBoxClstPro(const double boxpro,int i,int j,int k,int l){m_boxClstPro[i][j][k][l]=boxpro;}
102
103 void setStripEff(const double stripeff,int i,int j,int k,int l){m_stripEff[i][j][k][l]=stripeff;}
104 void setStripNos(const double stripnos,int i,int j,int k,int l){m_stripNos[i][j][k][l]=stripnos;}
105 void setStripCnt(const double stripcnt,int i,int j,int k,int l){m_stripCnt[i][j][k][l]=stripcnt;}
106 void setStripNosRatio(const double stripnosratio,int i,int j,int k,int l){m_stripNosRatio[i][j][k][l]=stripnosratio;}
107
108 private:
109 // MucIdTransform* m_ptrIdTr;
110
111 double m_uniformEff;
112 double m_uniformNos;
113 double m_uniformClst;
114 double m_uniformCnt;
115 double m_uniformNosRatio;
116// double m_average[3][3];
117
118 double m_layerEff[LAYER_MAX];
119 double m_layerNos[LAYER_MAX];
120 double m_layerClstPro[LAYER_MAX][CLST_MAX];
121 double m_layerCnt[LAYER_MAX];
122 double m_layerNosRatio[LAYER_MAX];
123
124 double m_boxEff[PART_MAX][SEGMENT_MAX][LAYER_MAX];
125 double m_boxNos[PART_MAX][SEGMENT_MAX][LAYER_MAX];
126 double m_boxClstPro[PART_MAX][SEGMENT_MAX][LAYER_MAX][CLST_MAX];
127 double m_boxCnt[PART_MAX][SEGMENT_MAX][LAYER_MAX];
128 double m_boxNosRatio[PART_MAX][SEGMENT_MAX][LAYER_MAX];
129
130 double m_stripEff[PART_MAX][SEGMENT_MAX][LAYER_MAX][STRIP_INBOX_MAX];
131 double m_stripNos[PART_MAX][SEGMENT_MAX][LAYER_MAX][STRIP_INBOX_MAX];
132 double m_stripCnt[PART_MAX][SEGMENT_MAX][LAYER_MAX][STRIP_INBOX_MAX];
133 double m_stripNosRatio[PART_MAX][SEGMENT_MAX][LAYER_MAX][STRIP_INBOX_MAX];
134 };
135}
136
137
138#endif //CalibData_MucCalibData_h
const CLID CLID_Calib_MucCal
Definition CalibModel.h:49
void setLayerClstPro(const double layerpro, int i, int j)
double getLayerNosRatio(int layer) const
void setLayerNos(const double layernos, int i)
double getUniformNosRatio() const
double getUniformEff() const
double getBoxClst(int part, int segment, int layer, double prob) const
double getBoxNos(int part, int segment, int layer) const
void setLayerCnt(const double layercnt, int i)
double getBoxClstPro(int part, int segment, int layer, int size) const
double getStripNos(int part, int segment, int layer, int strip) const
double getStripCnt(int part, int segment, int layer, int strip) const
void setUniformCnt(double cnt)
double getBoxNosRatio(int part, int segment, int layer) const
void setUniformClst(double clst)
double getStripNosRatio(int part, int segment, int layer, int strip) const
void setBoxCnt(const double boxcnt, int i, int j, int k)
void setStripNos(const double stripnos, int i, int j, int k, int l)
double getBoxCnt(int part, int segment, int layer) const
double getUniformNos() const
void setBoxNosRatio(const double boxratio, int i, int j, int k)
void setStripEff(const double stripeff, int i, int j, int k, int l)
void setUniformEff(double eff)
double getUniformCnt() const
void setStripNosRatio(const double stripnosratio, int i, int j, int k, int l)
void setStripCnt(const double stripcnt, int i, int j, int k, int l)
void setUniformNosRatio(double nosratio)
double getBoxEff(int part, int segment, int layer) const
double getLayerNos(int layer) const
void setBoxEff(const double boxeff, int i, int j, int k)
double getLayerClstPro(int layer, int size) const
double getStripEff(int part, int segment, int layer, int strip) const
double getLayerClst(int layer, double prob) const
double getLayerEff(int layer) const
double getLayerCnt(int layer) const
static const CLID & classID()
virtual const CLID & clID() const
void setUniformNos(double nos)
double getUniformClst() const
void setBoxNos(const double boxnos, int i, int j, int k)
void setLayerEff(const double layereff, int i)
void setLayerNosRatio(const double layernosratio, int i)
void setBoxClstPro(const double boxpro, int i, int j, int k, int l)