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

#include <calib_etf_weight.h>

Inheritance diagram for calib_etf_weight:

Public Member Functions

 calib_etf_weight ()
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_etf_weight.h.

Constructor & Destructor Documentation

◆ calib_etf_weight()

calib_etf_weight::calib_etf_weight ( )
inline

Definition at line 10 of file calib_etf_weight.h.

10: TofCalib( nEtfWeight ) { m_name = string( "calib_etf_weight" ); }
const int nEtfWeight
string m_name
Definition TofCalib.h:36
TofCalib(const int npar)
Definition TofCalib.h:13

Member Function Documentation

◆ calculate_funcs()

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

Implements TofCalib.

Definition at line 12 of file calib_etf_weight.h.

12 {
13 double tleft = r->tleft();
14 double tright = r->tright();
15 double z = r->zrhit();
16
17 funcs[0] = tright - tleft;
18 funcs[1] = funcs[0] * z;
19 funcs[2] = funcs[1] * z;
20 funcs[3] = funcs[2] * z;
21
22 return;
23 }
double tleft() const
Definition TofDataSet.h:59
double tright() const
Definition TofDataSet.h:60
double zrhit() const
Definition TofDataSet.h:61
HepVector funcs
Definition TofCalib.h:41

Referenced by updateData().

◆ calculate_y()

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

Implements TofCalib.

Definition at line 25 of file calib_etf_weight.h.

25 {
26 y = 0.0 - ( r->tright() );
27 return;
28 }
double y
Definition TofCalib.h:42

◆ updateData()

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

Implements TofCalib.

Definition at line 30 of file calib_etf_weight.h.

30 {
31 if ( data->size() > 0 )
32 {
33 std::vector<Record*>::iterator iter = data->begin();
34 for ( ; iter != data->end(); iter++ )
35 {
36 calculate_funcs( ( *iter ) );
37 double tcorr = 0.0;
38 for ( int i = 0; i < X.num_row(); i++ ) { tcorr += X[i] * funcs[i]; }
39 ( *iter )->setT0( tcorr + ( *iter )->tright() );
40 }
41 }
42 return;
43 }
TTree * data
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
HepVector X
Definition TofCalib.h:39
void calculate_funcs(const Record *r)

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