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