BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_barrel_left_offset2_bunch1_4 Class Reference

#include <calib_barrel_left_offset2_bunch1_4.h>

Inheritance diagram for calib_barrel_left_offset2_bunch1_4:

Public Member Functions

 calib_barrel_left_offset2_bunch1_4 ()
void calculate_funcs (const Record *r)
void calculate_y (const Record *r)
void updateData (RecordSet *&data)
Public Member Functions inherited from TofCalib
 TofCalib (const int npar)
 ~TofCalib ()
void reset ()
virtual void calculate (RecordSet *&data, unsigned int icounter)
virtual const string & name () const
void fillTxt (const char *file)

Additional Inherited Members

Protected Attributes inherited from TofCalib
string m_name
int Npar
HepMatrix F
HepVector X
HepVector Y
HepVector funcs
double y
std::vector< HepVector > m_result

Detailed Description

Definition at line 8 of file calib_barrel_left_offset2_bunch1_4.h.

Constructor & Destructor Documentation

◆ calib_barrel_left_offset2_bunch1_4()

calib_barrel_left_offset2_bunch1_4::calib_barrel_left_offset2_bunch1_4 ( )
inline

Definition at line 10 of file calib_barrel_left_offset2_bunch1_4.h.

11 m_name = string( "calib_barrel_left_offset2_bunch1" );
12 }
const int nBarrelLeft_Offset2_bunch1_4
string m_name
Definition TofCalib.h:36
TofCalib(const int npar)
Definition TofCalib.h:13

Member Function Documentation

◆ calculate_funcs()

void calib_barrel_left_offset2_bunch1_4::calculate_funcs ( const Record * r)
inlinevirtual

Implements TofCalib.

Definition at line 14 of file calib_barrel_left_offset2_bunch1_4.h.

14 {
15 double z = r->zrhit();
16 double t = r->tleft();
17 double t0 = r->phi();
18 if ( r->run() < 0 ||
19 ( ( static_cast<int>( t0 / ( 8.0 * 12000. / 499.8 / 8. / 4. ) + 0.1 ) ) % 4 == 1 ) )
20 {
21 if ( z < 5.0 && abs( t ) < 10.0 )
22 {
23 funcs[0] = 1.0;
24 funcs[1] = z;
25 funcs[2] = z * z;
26 funcs[3] = z * z * z;
27 funcs[4] = z * z * z * z;
28 funcs[5] = z * z * z * z * z;
29 funcs[6] = z * z * z * z * z * z;
30 }
31 else
32 {
33 funcs[0] = 0.0;
34 funcs[1] = 0.0;
35 funcs[2] = 0.0;
36 funcs[3] = 0.0;
37 funcs[4] = 0.0;
38 funcs[5] = 0.0;
39 funcs[6] = 0.0;
40 }
41 }
42 return;
43 }
double tleft() const
Definition TofDataSet.h:59
double phi() const
Definition TofDataSet.h:65
int run() const
Definition TofDataSet.h:53
double zrhit() const
Definition TofDataSet.h:61
HepVector funcs
Definition TofCalib.h:41
int t()
Definition t.c:1

Referenced by updateData().

◆ calculate_y()

void calib_barrel_left_offset2_bunch1_4::calculate_y ( const Record * r)
inlinevirtual

Implements TofCalib.

Definition at line 45 of file calib_barrel_left_offset2_bunch1_4.h.

45 {
46 if ( r->run() < 0 ||
47 ( ( static_cast<int>( ( r->phi() ) / ( 8.0 * 12000. / 499.8 / 8. / 4. ) + 0.1 ) ) %
48 4 ==
49 1 ) )
50 {
51 if ( r->zrhit() < 5.0 ) { y = r->tleft(); }
52 else { y = 0.0; }
53 }
54 return;
55 }
double y
Definition TofCalib.h:42

◆ updateData()

void calib_barrel_left_offset2_bunch1_4::updateData ( RecordSet *& data)
inlinevirtual

Implements TofCalib.

Definition at line 57 of file calib_barrel_left_offset2_bunch1_4.h.

57 {
58 if ( data->size() > 0 )
59 {
60 std::vector<Record*>::iterator iter = data->begin();
61 for ( ; iter != data->end(); iter++ )
62 {
63 if ( ( *iter )->run() < 0 ) return;
64 if ( ( static_cast<int>( ( ( *iter )->phi() ) / ( 8.0 * 12000. / 499.8 / 8. / 4. ) +
65 0.1 ) ) %
66 4 ==
67 1 )
68 {
69 if ( ( *iter )->zrhit() >= 0.0 ) continue;
70 calculate_funcs( ( *iter ) );
71 double tcorr = 0.0;
72 for ( int i = 0; i < X.num_row(); i++ ) { tcorr += X[i] * funcs[i]; }
73 ( *iter )->settleft( ( *iter )->tleft() - tcorr );
74 }
75 }
76 }
77 return;
78 }
TTree * data
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
HepVector X
Definition TofCalib.h:39

The documentation for this class was generated from the following file: