BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_barrel_right_offset1_bunch0_3.h
Go to the documentation of this file.
1#ifndef CALIB_BARREL_RIGHT_OFFSET1_BUNCH0_3_H
2#define CALIB_BARREL_RIGHT_OFFSET1_BUNCH0_3_H
3
5
7
9 public:
11 m_name = string("calib_barrel_right_offset1_bunch0");
12 }
13
14 void calculate_funcs( const Record* r ) {
15 double z = r->zrhit();
16 double t = r->tright();
17 double t0 = r->phi();
18 if ((static_cast<int>(t0/(8.0*12000./499.8/8./3. )+0.1))%3==0){
19 if( z>-5.0 && abs(t)<10.0 ) {
20 funcs[0] = 1.0;
21 funcs[1] = z;
22 funcs[2] = z*z;
23 funcs[3] = z*z*z;
24 funcs[4] = z*z*z*z;
25 funcs[5] = z*z*z*z*z;
26 funcs[6] = z*z*z*z*z*z;
27 }
28 else {
29 funcs[0] = 0.0;
30 funcs[1] = 0.0;
31 funcs[2] = 0.0;
32 funcs[3] = 0.0;
33 funcs[4] = 0.0;
34 funcs[5] = 0.0;
35 funcs[6] = 0.0;
36 }
37 }
38 return;
39 }
40
41 void calculate_y(const Record* r) {
42 if ((static_cast<int>((r->phi())/(8.0*12000./499.8/8./3. )+0.1))%3==0){
43 if( r->zrhit() > -5.0 ) {
44 y = r->tright();
45 }
46 else {
47 y = 0.0;
48 }
49 }
50 return;
51 }
52
54 if( data->size() > 0 ) {
55 std::vector<Record*>::iterator iter = data->begin();
56 for( ; iter!=data->end(); iter++ ) {
57 if ((static_cast<int>(((*iter)->phi())/(8.0*12000./499.8/8./3. )+0.1))%3==0){
58 if( (*iter)->zrhit() < 0.0 ) continue;
60 double tcorr = 0.0;
61 for( int i=0; i<X.num_row(); i++ ) {
62 tcorr += X[i]*funcs[i];
63 }
64 (*iter)->settright( (*iter)->tright() - tcorr );
65 }
66 }
67 }
68 return;
69 }
70
71};
72
73#endif
TTree * data
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:212
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
std::vector< Record * > RecordSet
Definition: TofDataSet.h:89
const int nBarrelRight_Offset1_bunch0_3
double tright() const
Definition: TofDataSet.h:54
double phi() const
Definition: TofDataSet.h:58
double zrhit() const
Definition: TofDataSet.h:55
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
int t()
Definition: t.c:1