BOSS 7.0.8
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)
Definition: MucCalibData.h:95
double getLayerNosRatio(int layer) const
Definition: MucCalibData.h:44
void setLayerNos(const double layernos, int i)
Definition: MucCalibData.h:92
double getUniformNosRatio() const
Definition: MucCalibData.h:40
double getUniformEff() const
Definition: MucCalibData.h:36
double getBoxClst(int part, int segment, int layer, double prob) const
Definition: MucCalibData.h:65
double getBoxNos(int part, int segment, int layer) const
Definition: MucCalibData.h:61
void setLayerCnt(const double layercnt, int i)
Definition: MucCalibData.h:93
double getBoxClstPro(int part, int segment, int layer, int size) const
Definition: MucCalibData.h:64
double getStripNos(int part, int segment, int layer, int strip) const
Definition: MucCalibData.h:79
double getStripCnt(int part, int segment, int layer, int strip) const
Definition: MucCalibData.h:80
void setUniformCnt(double cnt)
Definition: MucCalibData.h:87
double getBoxNosRatio(int part, int segment, int layer) const
Definition: MucCalibData.h:63
void setUniformClst(double clst)
Definition: MucCalibData.h:86
double getStripNosRatio(int part, int segment, int layer, int strip) const
Definition: MucCalibData.h:81
void setBoxCnt(const double boxcnt, int i, int j, int k)
Definition: MucCalibData.h:99
void setStripNos(const double stripnos, int i, int j, int k, int l)
Definition: MucCalibData.h:104
double getBoxCnt(int part, int segment, int layer) const
Definition: MucCalibData.h:62
double getUniformNos() const
Definition: MucCalibData.h:37
void setBoxNosRatio(const double boxratio, int i, int j, int k)
Definition: MucCalibData.h:100
void setStripEff(const double stripeff, int i, int j, int k, int l)
Definition: MucCalibData.h:103
void setUniformEff(double eff)
Definition: MucCalibData.h:84
double getUniformCnt() const
Definition: MucCalibData.h:39
void setStripNosRatio(const double stripnosratio, int i, int j, int k, int l)
Definition: MucCalibData.h:106
void setStripCnt(const double stripcnt, int i, int j, int k, int l)
Definition: MucCalibData.h:105
void setUniformNosRatio(double nosratio)
Definition: MucCalibData.h:88
double getBoxEff(int part, int segment, int layer) const
Definition: MucCalibData.h:60
double getLayerNos(int layer) const
Definition: MucCalibData.h:43
void setBoxEff(const double boxeff, int i, int j, int k)
Definition: MucCalibData.h:97
double getLayerClstPro(int layer, int size) const
Definition: MucCalibData.h:46
double getStripEff(int part, int segment, int layer, int strip) const
Definition: MucCalibData.h:78
double getLayerClst(int layer, double prob) const
Definition: MucCalibData.h:47
double getLayerEff(int layer) const
Definition: MucCalibData.h:42
double getLayerCnt(int layer) const
Definition: MucCalibData.h:45
static const CLID & classID()
Definition: MucCalibData.h:29
virtual const CLID & clID() const
Definition: MucCalibData.h:27
void setUniformNos(double nos)
Definition: MucCalibData.h:85
double getUniformClst() const
Definition: MucCalibData.h:38
void setBoxNos(const double boxnos, int i, int j, int k)
Definition: MucCalibData.h:98
void setLayerEff(const double layereff, int i)
Definition: MucCalibData.h:91
void setLayerNosRatio(const double layernosratio, int i)
Definition: MucCalibData.h:94
void setBoxClstPro(const double boxpro, int i, int j, int k, int l)
Definition: MucCalibData.h:101