BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_mc_etf_combine Class Reference

#include <calib_mc_etf_combine.h>

+ Inheritance diagram for calib_mc_etf_combine:

Public Member Functions

 calib_mc_etf_combine ()
 
void calculate_funcs (const Record *r)
 
void calculate_y (const Record *r)
 
void updateData (RecordSet *&data)
 
 calib_mc_etf_combine ()
 
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_mc_etf_combine() [1/2]

calib_mc_etf_combine::calib_mc_etf_combine ( )
inline

◆ calib_mc_etf_combine() [2/2]

calib_mc_etf_combine::calib_mc_etf_combine ( )
inline

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

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

Member Function Documentation

◆ calculate_funcs() [1/2]

void calib_mc_etf_combine::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

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

14 {
15 double q = ( r->qleft() + r->qright() )/2.0;
16 double z = r->zrhit();
17
18 if( q<0.0 ) {
19 for( int i=0; i<nEtfCombine; i++ ) {
20 funcs[i] = 1.0;
21 }
22 }
23 else {
24 funcs[0] = 1.0;
25 funcs[1] = 1.0/sqrt(q);
26 }
27
28 return;
29 }
****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

Referenced by updateData().

◆ calculate_funcs() [2/2]

void calib_mc_etf_combine::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

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

14 {
15 double q = ( r->qleft() + r->qright() )/2.0;
16 double z = r->zrhit();
17
18 if( q<0.0 ) {
19 for( int i=0; i<nEtfCombine; i++ ) {
20 funcs[i] = 1.0;
21 }
22 }
23 else {
24 funcs[0] = 1.0;
25 funcs[1] = 1.0/sqrt(q);
26 }
27
28 return;
29 }

◆ calculate_y() [1/2]

void calib_mc_etf_combine::calculate_y ( const Record r)
inlinevirtual

◆ calculate_y() [2/2]

void calib_mc_etf_combine::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 31 of file Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/calib_mc_etf_combine.h.

31 {
32 y = ( r->tleft() + r->tright() )/2.0 - r->texp();
33 return;
34 }

◆ updateData() [1/2]

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

Implements TofCalib.

Definition at line 36 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_mc_etf_combine.h.

36 {
37 if( data->size() > 0 ) {
38 std::vector<Record*>::iterator iter = data->begin();
39 for( ; iter!=data->end(); iter++ ) {
41 double tcorr = 0.0;
42 for( int i=0; i<X.num_row(); i++ ) {
43 tcorr += X[i]*funcs[i];
44 }
45 (*iter)->setT0( ( (*iter)->tleft() + (*iter)->tright() )/2.0 - tcorr - (*iter)->texp() );
46 }
47 }
48 return;
49 }
TTree * data
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ updateData() [2/2]

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

Implements TofCalib.

Definition at line 36 of file Tof/tofcalgsec/tofcalgsec-00-02-21/tofcalgsec/calib_mc_etf_combine.h.

36 {
37 if( data->size() > 0 ) {
38 std::vector<Record*>::iterator iter = data->begin();
39 for( ; iter!=data->end(); iter++ ) {
41 double tcorr = 0.0;
42 for( int i=0; i<X.num_row(); i++ ) {
43 tcorr += X[i]*funcs[i];
44 }
45 (*iter)->setT0( ( (*iter)->tleft() + (*iter)->tright() )/2.0 - tcorr - (*iter)->texp() );
46 }
47 }
48 return;
49 }

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