BOSS 6.6.4.p01
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.9 2010/10/08 01:12:53 huangb 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
36 setrunNO(other1.getrunNO());
37 int entries = other1.getrunNO();
38 for(i=0;i<4;i++) {
39 for(j=0;j<entries;j++) {
40 setrung(other1.getrung(i,j),i,j);
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,int j)
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 }
143
144 void DedxCalibData::setrunNO(const int runNO)
145 {
146 m_runNO = runNO;
147 }
148}
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:88
double get_ip_eangle(int i) const
Definition: DedxCalibData.h:84
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:81
double getrung(int i, int j) const
Definition: DedxCalibData.h:73
double get_id_doca(int i) const
Definition: DedxCalibData.h:80
double getresol() const
Definition: DedxCalibData.h:66
double get_out_gain(int i) const
Definition: DedxCalibData.h:86
double get_hadron(int i) const
Definition: DedxCalibData.h:91
double get_enangle(int i) const
Definition: DedxCalibData.h:94
void setwireg(const double wireg, int i)
void setgain(const double gain)
double get_out_hits(int i) const
Definition: DedxCalibData.h:87
void setrung(const double rung, int i, int j)
double getlayerg(int i) const
Definition: DedxCalibData.h:68
double get_iner_hits(int i) const
Definition: DedxCalibData.h:83
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:89
virtual StatusCode update(CalibBase1 &other, MsgStream *log)
double get_out_chi(int i) const
Definition: DedxCalibData.h:85
double getgain() const
Definition: DedxCalibData.h:62
double get_iner_gain(int i) const
Definition: DedxCalibData.h:82
double get_dedx(int i) const
Definition: DedxCalibData.h:90