BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_etf_combine.h
Go to the documentation of this file.
1#ifndef CALIB_ETF_COMBINE_H
2#define CALIB_ETF_COMBINE_H
3
5
6// const int nEtfCombine = 1; // event start time
7const int nEtfCombine = 7; // end cap tof calibration
8
10 public:
12 m_name = string("calib_etf_combine");
13 }
14
15 void calculate_funcs( const Record* r ) {
16 double q = ( r->qleft() + r->qright() )/2.0;
17 double z = r->zrhit();
18
19 if( q<0.0 ) {
20 for( int i=0; i<nEtfCombine; i++ ) {
21 funcs[i] = 1.0;
22 }
23 }
24 else {
25 funcs[0] = 1.0;
26 funcs[1] = 1.0/sqrt(q);
27 funcs[2] = 1.0/q;
28 funcs[3] = q;
29 funcs[4] = q*q;
30 funcs[5] = q*q*q;
31 funcs[6] = q*q*q*q;
32 }
33
34 return;
35 }
36
37 void calculate_y(const Record* r) {
38 y = ( r->tleft() + r->tright() )/2.0 - r->texp();
39 return;
40 }
41
43 if( data->size() > 0 ) {
44 std::vector<Record*>::iterator iter = data->begin();
45 for( ; iter!=data->end(); iter++ ) {
47 double tcorr = 0.0;
48 for( int i=0; i<X.num_row(); i++ ) {
49 tcorr += X[i]*funcs[i];
50 }
51 (*iter)->setT0( ( (*iter)->tleft() + (*iter)->tright() )/2.0 - tcorr - (*iter)->texp() );
52 }
53 }
54 return;
55 }
56
57};
58
59#endif
TTree * data
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition KKsem.h:33
std::vector< Record * > RecordSet
Definition TofDataSet.h:98
const int nEtfCombine
double texp() const
Definition TofDataSet.h:63
double qleft() const
Definition TofDataSet.h:57
double tleft() const
Definition TofDataSet.h:59
double tright() const
Definition TofDataSet.h:60
double zrhit() const
Definition TofDataSet.h:61
double qright() const
Definition TofDataSet.h:58
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 calculate_y(const Record *r)
void calculate_funcs(const Record *r)
void updateData(RecordSet *&data)