BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_etf_left.h
Go to the documentation of this file.
1#ifndef CALIB_ETF_LEFT_H
2#define CALIB_ETF_LEFT_H
3
4#include "TofCalib.h"
5
6// const int nEtfLeft = 2; // event start time
7const int nEtfLeft = 13; // end cap tof calibration
8
9class calib_etf_left : public TofCalib {
10public:
11 calib_etf_left() : TofCalib( nEtfLeft ) { m_name = string( "calib_etf_left" ); }
12
13 void calculate_funcs( const Record* r ) {
14 double q = r->qleft();
15 double z = r->zrhit();
16
17 if ( q < 0.0 )
18 {
19 for ( int i = 0; i < nEtfLeft; i++ ) { funcs[i] = 1.0; }
20 }
21 else
22 {
23 funcs[0] = 1.0;
24 // funcs[1] = z; // event start time
25 funcs[1] = 1. / sqrt( q );
26 funcs[2] = q;
27 funcs[3] = q * q;
28 funcs[4] = q * q * q;
29 funcs[5] = q * q * q * q;
30 funcs[6] = z / sqrt( q );
31 funcs[7] = 1.0 / q;
32 funcs[8] = z / q;
33 funcs[9] = z * q;
34 funcs[10] = z;
35 funcs[11] = z * z;
36 funcs[12] = z * z * z;
37 }
38
39 return;
40 }
41
42 void calculate_y( const Record* r ) {
43 y = r->tleft() - r->texp();
44 return;
45 }
46
48 if ( data->size() > 0 )
49 {
50 std::vector<Record*>::iterator iter = data->begin();
51 for ( ; iter != data->end(); iter++ )
52 {
53 calculate_funcs( ( *iter ) );
54 double tcorr = 0.0;
55 for ( int i = 0; i < X.num_row(); i++ ) { tcorr += X[i] * funcs[i]; }
56 ( *iter )->settleft( ( *iter )->tleft() - tcorr - ( *iter )->texp() );
57 }
58 }
59 return;
60 }
61};
62
63#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:97
const int nEtfLeft
double texp() const
Definition TofDataSet.h:63
double qleft() const
Definition TofDataSet.h:57
double tleft() const
Definition TofDataSet.h:59
double zrhit() const
Definition TofDataSet.h:61
HepVector funcs
Definition TofCalib.h:41
string m_name
Definition TofCalib.h:36
TofCalib(const int npar)
Definition TofCalib.h:13
HepVector X
Definition TofCalib.h:39
double y
Definition TofCalib.h:42
void calculate_funcs(const Record *r)
void calculate_y(const Record *r)
void updateData(RecordSet *&data)