BOSS 7.0.2
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)
 
 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 void updateData (RecordSet *&data)=0
 
virtual const string & name () const
 
void fillTxt (const char *file)
 
 TofCalib (const int npar)
 
 ~TofCalib ()
 
void reset ()
 
virtual void calculate (RecordSet *&data, unsigned int icounter)
 
virtual void updateData (RecordSet *&data)=0
 
virtual const string & name () const
 
void fillTxt (const char *file)
 

Additional Inherited Members

virtual void calculate_funcs (const Record *r)=0
 
virtual void calculate_y (const Record *r)=0
 
virtual void calculate_funcs (const Record *r)=0
 
virtual void calculate_y (const Record *r)=0
 
- 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

Constructor & Destructor Documentation

◆ calib_etf_weight() [1/2]

calib_etf_weight::calib_etf_weight ( )
inline

◆ calib_etf_weight() [2/2]

calib_etf_weight::calib_etf_weight ( )
inline

Definition at line 10 of file Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/calib_etf_weight.h.

11 m_name = string("calib_etf_weight");
12 }

Member Function Documentation

◆ calculate_funcs() [1/2]

void calib_etf_weight::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 14 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_etf_weight.h.

14 {
15 double tleft = r->tleft();
16 double tright = r->tright();
17 double z = r->zrhit();
18
19 funcs[0] = tright-tleft;
20 funcs[1] = funcs[0]*z;
21 funcs[2] = funcs[1]*z;
22 funcs[3] = funcs[2]*z;
23
24 return;
25 }

Referenced by updateData().

◆ calculate_funcs() [2/2]

void calib_etf_weight::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 14 of file Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/calib_etf_weight.h.

14 {
15 double tleft = r->tleft();
16 double tright = r->tright();
17 double z = r->zrhit();
18
19 funcs[0] = tright-tleft;
20 funcs[1] = funcs[0]*z;
21 funcs[2] = funcs[1]*z;
22 funcs[3] = funcs[2]*z;
23
24 return;
25 }

◆ calculate_y() [1/2]

void calib_etf_weight::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 27 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_etf_weight.h.

27 {
28 y = 0.0 - (r->tright());
29 return;
30 }

◆ calculate_y() [2/2]

void calib_etf_weight::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 27 of file Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/calib_etf_weight.h.

27 {
28 y = 0.0 - (r->tright());
29 return;
30 }

◆ updateData() [1/2]

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

Implements TofCalib.

Definition at line 32 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_etf_weight.h.

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

◆ updateData() [2/2]

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

Implements TofCalib.

Definition at line 32 of file Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/calib_etf_weight.h.

32 {
33 if( data->size() > 0 ) {
34 std::vector<Record*>::iterator iter = data->begin();
35 for( ; iter!=data->end(); iter++ ) {
37 double tcorr = 0.0;
38 for( int i=0; i<X.num_row(); i++ ) {
39 tcorr += X[i]*funcs[i];
40 }
41 (*iter)->setT0( tcorr + (*iter)->tright() );
42 }
43 }
44 return;
45 }

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