BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_barrel_right_offset2_bunch1_3 Class Reference

#include <calib_barrel_right_offset2_bunch1_3.h>

+ Inheritance diagram for calib_barrel_right_offset2_bunch1_3:

Public Member Functions

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

calib_barrel_right_offset2_bunch1_3::calib_barrel_right_offset2_bunch1_3 ( )
inline

◆ calib_barrel_right_offset2_bunch1_3() [2/2]

calib_barrel_right_offset2_bunch1_3::calib_barrel_right_offset2_bunch1_3 ( )
inline

Definition at line 10 of file Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_barrel_right_offset2_bunch1_3.h.

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

Member Function Documentation

◆ calculate_funcs() [1/2]

void calib_barrel_right_offset2_bunch1_3::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

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

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

Referenced by updateData().

◆ calculate_funcs() [2/2]

void calib_barrel_right_offset2_bunch1_3::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 14 of file Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_barrel_right_offset2_bunch1_3.h.

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

◆ calculate_y() [1/2]

void calib_barrel_right_offset2_bunch1_3::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 42 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_barrel_right_offset2_bunch1_3.h.

42 {
43 if( r->run()<0 || (static_cast<int>((r->phi())/(8.0*12000./499.8/8./3. )+0.1))%3==1){
44 if( r->zrhit() < 5.0 ) {
45 y = r->tright();
46 }
47 else {
48 y = 0.0;
49 }
50 }
51 return;
52 }

◆ calculate_y() [2/2]

void calib_barrel_right_offset2_bunch1_3::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 42 of file Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_barrel_right_offset2_bunch1_3.h.

42 {
43 if( r->run()<0 || (static_cast<int>((r->phi())/(8.0*12000./499.8/8./3. )+0.1))%3==1){
44 if( r->zrhit() < 5.0 ) {
45 y = r->tright();
46 }
47 else {
48 y = 0.0;
49 }
50 }
51 return;
52 }

◆ updateData() [1/2]

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

Implements TofCalib.

Definition at line 54 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_barrel_right_offset2_bunch1_3.h.

54 {
55 if( data->size() > 0 ) {
56 std::vector<Record*>::iterator iter = data->begin();
57 for( ; iter!=data->end(); iter++ ) {
58 if( (*iter)->run() < 0 ) return;
59 if ((static_cast<int>(((*iter)->phi())/(8.0*12000./499.8/8./3. )+0.1))%3==1){
60 if( (*iter)->zrhit() >= 0.0 ) continue;
62 double tcorr = 0.0;
63 for( int i=0; i<X.num_row(); i++ ) {
64 tcorr += X[i]*funcs[i];
65 }
66 (*iter)->settright( (*iter)->tright() - tcorr );
67 }
68 }
69 }
70 return;
71 }
TTree * data
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ updateData() [2/2]

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

Implements TofCalib.

Definition at line 54 of file Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_barrel_right_offset2_bunch1_3.h.

54 {
55 if( data->size() > 0 ) {
56 std::vector<Record*>::iterator iter = data->begin();
57 for( ; iter!=data->end(); iter++ ) {
58 if( (*iter)->run() < 0 ) return;
59 if ((static_cast<int>(((*iter)->phi())/(8.0*12000./499.8/8./3. )+0.1))%3==1){
60 if( (*iter)->zrhit() >= 0.0 ) continue;
62 double tcorr = 0.0;
63 for( int i=0; i<X.num_row(); i++ ) {
64 tcorr += X[i]*funcs[i];
65 }
66 (*iter)->settright( (*iter)->tright() - tcorr );
67 }
68 }
69 }
70 return;
71 }

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