BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_endcap_left.h
Go to the documentation of this file.
1#ifndef CALIB_ENDCAP_LEFT_H
2#define CALIB_ENDCAP_LEFT_H
3
4#include "TofCalib.h"
5
6const int nEndcapLeft = 7;
7
8class calib_endcap_left : public TofCalib {
9public:
10 calib_endcap_left() : TofCalib( nEndcapLeft ) { m_name = string( "calib_endcap_left" ); }
11
12 void calculate_funcs( const Record* r ) {
13 double q = r->qleft();
14 double z = r->zrhit();
15
16 funcs[0] = 1.0;
17 funcs[1] = 1.0 / sqrt( q );
18 funcs[2] = 1.0 / q;
19 funcs[3] = q;
20 funcs[4] = z;
21 funcs[5] = z * z;
22 funcs[6] = z * z * z;
23
24 return;
25 }
26
27 void calculate_y( const Record* r ) {
28 y = r->tleft() - r->texp();
29 return;
30 }
31
33 if ( data->size() > 0 )
34 {
35 std::vector<Record*>::iterator iter = data->begin();
36 for ( ; iter != data->end(); iter++ )
37 {
38 calculate_funcs( ( *iter ) );
39 double tcorr = 0.0;
40 for ( int i = 0; i < X.num_row(); i++ ) { tcorr += X[i] * funcs[i]; }
41 ( *iter )->settleft( ( *iter )->tleft() - tcorr - ( *iter )->texp() );
42 }
43 }
44 return;
45 }
46};
47
48#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 nEndcapLeft
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)