BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_barrel_atten.h
Go to the documentation of this file.
1#ifndef CALIB_BARREL_ATTEN_H
2#define CALIB_BARREL_ATTEN_H
3
5
6const int nBarrelAtten = 2;
7
9 public:
11 m_name = string("calib_barrel_atten");
12 }
13
14 void calculate_funcs( const Record* r ) {
15 double z = r->zrhit();
16 double q1 = r->qleft();
17 double q2 = r->qright();
18
19 if( q1>0.0 && q2>0.0 ) {
20 funcs[0] = 2.0*z;
21 funcs[1] = 1.0;
22 }
23 else {
24 funcs[0] = 0.0;
25 funcs[1] = 0.0;
26 }
27
28 return;
29 }
30
31 void calculate_y(const Record* r) {
32 double q1 = r->qleft();
33 double q2 = r->qright();
34 if( q1>0.0 && q2>0.0 ) {
35 y = log(q1/q2);
36 }
37 else {
38 y = 0.0;
39 }
40 return;
41 }
42
44 if( data->size() > 0 ) {
45 std::vector<Record*>::iterator iter = data->begin();
46 for( ; iter!=data->end(); iter++ ) {
47 double z = (*iter)->zrhit();
48 double sintheta = (*iter)->theta();
49 double q1 = (*iter)->qleft();
50 double q2 = (*iter)->qright();
51 double latten = 1.0/X[0];
52 double a1overa2 = exp(X[1]);
53 double q0 = sintheta*(q1*exp((115.0-z)/latten)+q2*exp((115.0+z)/latten))/(1.0+a1overa2);
54 (*iter)->setQ0( q0 );
55 }
56 }
57 return;
58 }
59
60};
61
62#endif
TTree * data
EvtComplex exp(const EvtComplex &c)
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
std::vector< Record * > RecordSet
Definition TofDataSet.h:98
const int nBarrelAtten
double qleft() const
Definition TofDataSet.h:57
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 updateData(RecordSet *&data)
void calculate_funcs(const Record *r)
void calculate_y(const Record *r)