BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DedxCalibData.cxx
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/CalibData/src/Dedx/DedxCalibData.cxx,v 1.12 2022/03/22 03:45:33 fangwx Exp $
2
3/** @class DedxCalibData
4 * Implementation of DedxCalibData calibration TCDS class
5 */
6
8#include "GaudiKernel/MsgStream.h"
10namespace CalibData {
11
12
13 StatusCode DedxCalibData::update(CalibBase1& other, MsgStream* log)
14 {
15 DedxCalibData& other1 = dynamic_cast<DedxCalibData& >(other);
16 std::cout<<"========================================"<<"\n"<<"here is the update in the DedxCalibData"<<"\n"<<"=================================================="<<std::endl;
17 CalibBase1::update(other, log);
18 int i;
19 int j;
20 for(i=0;i<4;i++) {
21 for(j=0;j<43;j++) {
22 /* setddg(other1.m_ddg[i][j],i,j);
23 setggs(other1.m_ggs[i][j],i,j);
24 setzdep(other1.m_zdep[i][j],i,j);
25 setenta(other1.m_enta[i][j],i,j);
26*/
27 // getddg(int i,int j)
28 // std::cout<<"other1.getddg("<<i<<","<<j<<")="<<other1.getddg(i,j)<<std::endl;
29 setddg(other1.getddg(i,j),i,j);
30 setggs(other1.getggs(i,j),i,j);
31 setzdep(other1.getzdep(i,j),i,j);
32 setenta(other1.getenta(i,j),i,j);
33 }
34 }
35 clear();//wxfang
36
37 setrunNO(other1.getrunNO());
38 int entries = other1.getrunNO();
39 for(i=0;i<6;i++) {
40 for(j=0;j<entries;j++) {
41 setrung(other1.getrung(i,j),i);
42 }
43 }
44
45
46 for(i=0;i<6796;i++){
47 // setwireg(other1.m_wireg[i],i);
48 setwireg(other1.getwireg(i),i);
49 }
50
51 for(i=0;i<43;i++){
52 // setlayerg(other1.m_layerg[i],i);
53 setlayerg(other1.getlayerg(i),i);
54 }
55
56 // setgain(other1.m_gain);
57 // setresol(other1.m_resol);
58 setgain(other1.getgain());
59 setresol(other1.getresol());
60
61 for(int i=0;i<1600;i++){
62 m_id_doca[i]=other1.get_id_doca(i);
63 m_iner_chi[i]=other1.get_iner_chi(i);
64 m_iner_gain[i]=other1.get_iner_gain(i);
65 m_iner_hits[i]=other1.get_iner_hits(i);
66 m_ip_eangle[i]=other1.get_ip_eangle(i);
67 m_out_chi[i]=other1.get_out_chi(i);
68 m_out_gain[i]=other1.get_out_gain(i);
69 m_out_hits[i]=other1.get_out_hits(i);
70 }
71
72 for(int i=0;i<80;i++){
73 m_costheta[i]=other1.get_costheta(i);
74 }
75 for(int i=0;i<35;i++){
76 m_t0[i] = other1.get_t0(i);
77 m_dedx[i]=other1.get_dedx(i);
78 }
79
80 for(int i=0;i<20;i++){
81 m_hadron[i] = other1.get_hadron(i);
82 }
83
84 m_enanglesize=other1.get_enanglesize();
85 for(int i=0;i<m_enanglesize;i++){
86 m_enangle[i]=other1.get_enangle(i);
87 }
88
89 std::cout<<"updata dedx calib constnts complete================="<<std::endl;
90 return StatusCode::SUCCESS;
91}
92
93 //set the Calibration Data
94
95
96 void DedxCalibData::setddg(const double ddg,int i,int j)
97 {
98 m_ddg[i][j] = ddg;
99 }
100
101 void DedxCalibData::setggs(const double ggs,int i,int j)
102 {
103 m_ggs[i][j] = ggs;
104 }
105
106 void DedxCalibData::setwireg(const double wireg,int i)
107 {
108 m_wireg[i] = wireg;
109 }
110
111 void DedxCalibData::setgain(const double gain)
112 {
113 m_gain = gain;
114 }
115
116 void DedxCalibData::setzdep(const double zdep,int i,int j)
117 {
118 m_zdep[i][j] = zdep;
119 }
120
121 void DedxCalibData::setresol(const double resol)
122 {
123 m_resol = resol;
124 }
125
126 void DedxCalibData::setlayerg(const double layerg,int i)
127 {
128 m_layerg[i] = layerg;
129 }
130
131 void DedxCalibData::setenta(const double enta,int i,int j)
132 {
133 m_enta[i][j] = enta;
134 }
135
136 void DedxCalibData::setrung(const double rung,int i)
137 {
138 double aaa=rung;
139 if(i==0) m_rung1.push_back(aaa);
140 if(i==1) m_rung2.push_back(aaa);
141 if(i==2) m_rung3.push_back(aaa);
142 if(i==3) m_rung4.push_back(aaa);
143 if(i==4) m_rung5.push_back(aaa);
144 if(i==5) m_rung6.push_back(aaa);
145 }
146
147 void DedxCalibData::setrunNO(const int runNO)
148 {
149 m_runNO = runNO;
150 }
151 /////wxfang
153 m_rung1.clear();
154 m_rung2.clear();
155 m_rung3.clear();
156 m_rung4.clear();
157 m_rung5.clear();
158 m_rung6.clear();
159 m_runNO = 0;
160 }
161 ////
162}
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
Definition: CalibBase1.cxx:33
void setlayerg(const double layerg, int i)
void setggs(const double ggs, int i, int j)
void setenta(const double enta, int i, int j)
double getenta(int i, int j) const
Definition: DedxCalibData.h:70
double get_costheta(int i) const
Definition: DedxCalibData.h:91
double get_ip_eangle(int i) const
Definition: DedxCalibData.h:87
double getzdep(int i, int j) const
Definition: DedxCalibData.h:64
void setresol(const double resol)
void setddg(const double ddg, int i, int j)
double get_iner_chi(int i) const
Definition: DedxCalibData.h:84
double getrung(int i, int j) const
Definition: DedxCalibData.h:73
double get_id_doca(int i) const
Definition: DedxCalibData.h:83
double getresol() const
Definition: DedxCalibData.h:66
double get_out_gain(int i) const
Definition: DedxCalibData.h:89
double get_hadron(int i) const
Definition: DedxCalibData.h:94
double get_enangle(int i) const
Definition: DedxCalibData.h:97
void setwireg(const double wireg, int i)
void setgain(const double gain)
double get_out_hits(int i) const
Definition: DedxCalibData.h:90
double getlayerg(int i) const
Definition: DedxCalibData.h:68
double get_iner_hits(int i) const
Definition: DedxCalibData.h:86
void setzdep(const double zdep, int i, int j)
void setrunNO(const int run_NO)
double getwireg(int i) const
Definition: DedxCalibData.h:60
double getddg(int i, int j) const
Definition: DedxCalibData.h:56
double getggs(int i, int j) const
Definition: DedxCalibData.h:58
double get_t0(int i) const
Definition: DedxCalibData.h:92
virtual StatusCode update(CalibBase1 &other, MsgStream *log)
double get_out_chi(int i) const
Definition: DedxCalibData.h:88
double getgain() const
Definition: DedxCalibData.h:62
double get_iner_gain(int i) const
Definition: DedxCalibData.h:85
void setrung(const double rung, int i)
double get_dedx(int i) const
Definition: DedxCalibData.h:93