BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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 "
TofCalib.h
"
5
6
const
int
nEtfWeight
= 4;
7
8
class
calib_etf_weight
:
public
TofCalib
{
9
public
:
10
calib_etf_weight
() :
TofCalib
(
nEtfWeight
) {
m_name
= string(
"calib_etf_weight"
); }
11
12
void
calculate_funcs
(
const
Record
* r ) {
13
double
tleft = r->
tleft
();
14
double
tright = r->
tright
();
15
double
z = r->
zrhit
();
16
17
funcs
[0] = tright - tleft;
18
funcs
[1] =
funcs
[0] * z;
19
funcs
[2] =
funcs
[1] * z;
20
funcs
[3] =
funcs
[2] * z;
21
22
return
;
23
}
24
25
void
calculate_y
(
const
Record
* r ) {
26
y
= 0.0 - ( r->
tright
() );
27
return
;
28
}
29
30
void
updateData
(
RecordSet
*&
data
) {
31
if
(
data
->size() > 0 )
32
{
33
std::vector<Record*>::iterator
iter
=
data
->begin();
34
for
( ;
iter
!=
data
->end();
iter
++ )
35
{
36
calculate_funcs
( ( *
iter
) );
37
double
tcorr = 0.0;
38
for
(
int
i = 0; i <
X
.num_row(); i++ ) { tcorr +=
X
[i] *
funcs
[i]; }
39
( *iter )->setT0( tcorr + ( *iter )->tright() );
40
}
41
}
42
return
;
43
}
44
};
45
46
#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:83
TofCalib.h
RecordSet
std::vector< Record * > RecordSet
Definition
TofDataSet.h:97
nEtfWeight
const int nEtfWeight
Definition
calib_etf_weight.h:6
Record
Definition
TofDataSet.h:38
Record::tleft
double tleft() const
Definition
TofDataSet.h:59
Record::tright
double tright() const
Definition
TofDataSet.h:60
Record::zrhit
double zrhit() const
Definition
TofDataSet.h:61
TofCalib::funcs
HepVector funcs
Definition
TofCalib.h:41
TofCalib::m_name
string m_name
Definition
TofCalib.h:36
TofCalib::TofCalib
TofCalib(const int npar)
Definition
TofCalib.h:13
TofCalib::X
HepVector X
Definition
TofCalib.h:39
TofCalib::y
double y
Definition
TofCalib.h:42
calib_etf_weight::updateData
void updateData(RecordSet *&data)
Definition
calib_etf_weight.h:30
calib_etf_weight::calculate_y
void calculate_y(const Record *r)
Definition
calib_etf_weight.h:25
calib_etf_weight::calib_etf_weight
calib_etf_weight()
Definition
calib_etf_weight.h:10
calib_etf_weight::calculate_funcs
void calculate_funcs(const Record *r)
Definition
calib_etf_weight.h:12
8.0.0
BOSS_Source
Tof
tofcalgsec
src
calib_etf_weight.h
Generated by
1.16.1