BOSS 7.0.5
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.10 2019/09/08 23:32:49 zhuk Exp $
2
3/** @class DedxCalibData
4 * Implementation of DedxCalibData calibration TCDS class
5 */
6
7#include "CalibData/Dedx/DedxCalibData.h"
8#include "GaudiKernel/MsgStream.h"
9#include "CalibData/Mdc/MdcCalStruct.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
36 setrunNO(other1.getrunNO());
37 int entries = other1.getrunNO();
38 for(i=0;i<6;i++) {
39 for(j=0;j<entries;j++) {
40 setrung(other1.getrung(i,j),i);
41 }
42 }
43
44
45 for(i=0;i<6796;i++){
46 // setwireg(other1.m_wireg[i],i);
47 setwireg(other1.getwireg(i),i);
48 }
49
50 for(i=0;i<43;i++){
51 // setlayerg(other1.m_layerg[i],i);
52 setlayerg(other1.getlayerg(i),i);
53 }
54
55 // setgain(other1.m_gain);
56 // setresol(other1.m_resol);
57 setgain(other1.getgain());
58 setresol(other1.getresol());
59
60 for(int i=0;i<1600;i++){
61 m_id_doca[i]=other1.get_id_doca(i);
62 m_iner_chi[i]=other1.get_iner_chi(i);
63 m_iner_gain[i]=other1.get_iner_gain(i);
64 m_iner_hits[i]=other1.get_iner_hits(i);
65 m_ip_eangle[i]=other1.get_ip_eangle(i);
66 m_out_chi[i]=other1.get_out_chi(i);
67 m_out_gain[i]=other1.get_out_gain(i);
68 m_out_hits[i]=other1.get_out_hits(i);
69 }
70
71 for(int i=0;i<80;i++){
72 m_costheta[i]=other1.get_costheta(i);
73 }
74 for(int i=0;i<35;i++){
75 m_t0[i] = other1.get_t0(i);
76 m_dedx[i]=other1.get_dedx(i);
77 }
78
79 for(int i=0;i<20;i++){
80 m_hadron[i] = other1.get_hadron(i);
81 }
82
83 m_enanglesize=other1.get_enanglesize();
84 for(int i=0;i<m_enanglesize;i++){
85 m_enangle[i]=other1.get_enangle(i);
86 }
87
88 std::cout<<"updata dedx calib constnts complete================="<<std::endl;
89 return StatusCode::SUCCESS;
90}
91
92 //set the Calibration Data
93
94
95 void DedxCalibData::setddg(const double ddg,int i,int j)
96 {
97 m_ddg[i][j] = ddg;
98 }
99
100 void DedxCalibData::setggs(const double ggs,int i,int j)
101 {
102 m_ggs[i][j] = ggs;
103 }
104
105 void DedxCalibData::setwireg(const double wireg,int i)
106 {
107 m_wireg[i] = wireg;
108 }
109
110 void DedxCalibData::setgain(const double gain)
111 {
112 m_gain = gain;
113 }
114
115 void DedxCalibData::setzdep(const double zdep,int i,int j)
116 {
117 m_zdep[i][j] = zdep;
118 }
119
120 void DedxCalibData::setresol(const double resol)
121 {
122 m_resol = resol;
123 }
124
125 void DedxCalibData::setlayerg(const double layerg,int i)
126 {
127 m_layerg[i] = layerg;
128 }
129
130 void DedxCalibData::setenta(const double enta,int i,int j)
131 {
132 m_enta[i][j] = enta;
133 }
134
135 void DedxCalibData::setrung(const double rung,int i)
136 {
137 double aaa=rung;
138 if(i==0) m_rung1.push_back(aaa);
139 if(i==1) m_rung2.push_back(aaa);
140 if(i==2) m_rung3.push_back(aaa);
141 if(i==3) m_rung4.push_back(aaa);
142 if(i==4) m_rung5.push_back(aaa);
143 if(i==5) m_rung6.push_back(aaa);
144 }
145
146 void DedxCalibData::setrunNO(const int runNO)
147 {
148 m_runNO = runNO;
149 }
150}
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)
void setresol(const double resol)
void setddg(const double ddg, int i, int j)
void setwireg(const double wireg, int i)
void setgain(const double gain)
void setzdep(const double zdep, int i, int j)
void setrunNO(const int run_NO)
virtual StatusCode update(CalibBase1 &other, MsgStream *log)
void setrung(const double rung, int i)