BOSS
7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_etf_weight.h
Go to the documentation of this file.
1
#ifndef CALIB_ETF_WEIGHT_H
2
#define CALIB_ETF_WEIGHT_H
3
4
#include "tofcalgsec/TofCalib.h"
5
6
const
int
nEtfWeight
= 4;
7
8
class
calib_etf_weight
:
public
TofCalib
{
9
public
:
10
calib_etf_weight
():
TofCalib
(
nEtfWeight
) {
11
m_name
= string(
"calib_etf_weight"
);
12
}
13
14
void
calculate_funcs
(
const
Record
* r ) {
15
double
tleft = r->
tleft
();
16
double
tright = r->
tright
();
17
double
z = r->
zrhit
();
18
19
funcs
[0] = tright-tleft;
20
funcs
[1] =
funcs
[0]*z;
21
funcs
[2] =
funcs
[1]*z;
22
funcs
[3] =
funcs
[2]*z;
23
24
return
;
25
}
26
27
void
calculate_y
(
const
Record
* r) {
28
y
= 0.0 - (r->
tright
());
29
return
;
30
}
31
32
void
updateData
(
RecordSet
*&
data
) {
33
if
(
data
->size() > 0 ) {
34
std::vector<Record*>::iterator
iter
=
data
->begin();
35
for
( ;
iter
!=
data
->end();
iter
++ ) {
36
calculate_funcs
( (*
iter
) );
37
double
tcorr = 0.0;
38
for
(
int
i=0; i<
X
.num_row(); i++ ) {
39
tcorr +=
X
[i]*
funcs
[i];
40
}
41
(*iter)->setT0( tcorr + (*iter)->tright() );
42
}
43
}
44
return
;
45
}
46
47
};
48
49
#endif
data
TTree * data
Definition:
DataBase/tau_mode.c:5
iter
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
Definition:
EvtStreamInputIterator.hh:100
RecordSet
std::vector< Record * > RecordSet
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofDataSet.h:98
nEtfWeight
const int nEtfWeight
Definition:
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_etf_weight.h:6
Record
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofDataSet.h:39
Record::tleft
double tleft() const
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofDataSet.h:59
Record::tright
double tright() const
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofDataSet.h:60
Record::zrhit
double zrhit() const
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofDataSet.h:61
TofCalib
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofCalib.h:11
TofCalib::funcs
HepVector funcs
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofCalib.h:41
TofCalib::m_name
string m_name
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofCalib.h:36
TofCalib::X
HepVector X
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofCalib.h:39
TofCalib::y
double y
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/TofCalib.h:42
calib_etf_weight
Definition:
InstallArea/include/tofcalgsec/tofcalgsec/calib_etf_weight.h:8
calib_etf_weight::updateData
void updateData(RecordSet *&data)
Definition:
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_etf_weight.h:32
calib_etf_weight::calculate_y
void calculate_y(const Record *r)
Definition:
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_etf_weight.h:27
calib_etf_weight::calib_etf_weight
calib_etf_weight()
Definition:
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_etf_weight.h:10
calib_etf_weight::calculate_funcs
void calculate_funcs(const Record *r)
Definition:
Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_etf_weight.h:14
source
Tof
tofcalgsec
tofcalgsec-00-02-23
tofcalgsec
calib_etf_weight.h
Generated by
1.9.6