BOSS 7.1.2
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
5
6const int nEtfWeight = 4;
7
9 public:
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
33 if( data->size() > 0 ) {
34 std::vector<Record*>::iterator iter = data->begin();
35 for( ; iter!=data->end(); 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
TTree * data
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
std::vector< Record * > RecordSet
Definition TofDataSet.h:98
const int nEtfWeight
double tleft() const
Definition TofDataSet.h:59
double tright() const
Definition TofDataSet.h:60
double zrhit() const
Definition TofDataSet.h:61
HepVector funcs
Definition TofCalib.h:41
string m_name
Definition TofCalib.h:36
HepVector X
Definition TofCalib.h:39
double y
Definition TofCalib.h:42
void updateData(RecordSet *&data)
void calculate_y(const Record *r)
void calculate_funcs(const Record *r)