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

#include <calib_barrel_atten.h>

+ Inheritance diagram for calib_barrel_atten:

Public Member Functions

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

calib_barrel_atten::calib_barrel_atten ( )
inline

◆ calib_barrel_atten() [2/2]

calib_barrel_atten::calib_barrel_atten ( )
inline

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

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

Member Function Documentation

◆ calculate_funcs() [1/2]

void calib_barrel_atten::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

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

14 {
15 double z = r->zrhit();
16 double q1 = r->qleft();
17 double q2 = r->qright();
18
19 if( q1>0.0 && q2>0.0 ) {
20 funcs[0] = 2.0*z;
21 funcs[1] = 1.0;
22 }
23 else {
24 funcs[0] = 0.0;
25 funcs[1] = 0.0;
26 }
27
28 return;
29 }

◆ calculate_funcs() [2/2]

void calib_barrel_atten::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

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

14 {
15 double z = r->zrhit();
16 double q1 = r->qleft();
17 double q2 = r->qright();
18
19 if( q1>0.0 && q2>0.0 ) {
20 funcs[0] = 2.0*z;
21 funcs[1] = 1.0;
22 }
23 else {
24 funcs[0] = 0.0;
25 funcs[1] = 0.0;
26 }
27
28 return;
29 }

◆ calculate_y() [1/2]

void calib_barrel_atten::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 31 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_barrel_atten.h.

31 {
32 double q1 = r->qleft();
33 double q2 = r->qright();
34 if( q1>0.0 && q2>0.0 ) {
35 y = log(q1/q2);
36 }
37 else {
38 y = 0.0;
39 }
40 return;
41 }

◆ calculate_y() [2/2]

void calib_barrel_atten::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 31 of file Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_barrel_atten.h.

31 {
32 double q1 = r->qleft();
33 double q2 = r->qright();
34 if( q1>0.0 && q2>0.0 ) {
35 y = log(q1/q2);
36 }
37 else {
38 y = 0.0;
39 }
40 return;
41 }

◆ updateData() [1/2]

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

Implements TofCalib.

Definition at line 43 of file InstallArea/include/tofcalgsec/tofcalgsec/calib_barrel_atten.h.

43 {
44 if( data->size() > 0 ) {
45 std::vector<Record*>::iterator iter = data->begin();
46 for( ; iter!=data->end(); iter++ ) {
47 double z = (*iter)->zrhit();
48 double sintheta = (*iter)->theta();
49 double q1 = (*iter)->qleft();
50 double q2 = (*iter)->qright();
51 double latten = 1.0/X[0];
52 double a1overa2 = exp(X[1]);
53 double q0 = sintheta*(q1*exp((115.0-z)/latten)+q2*exp((115.0+z)/latten))/(1.0+a1overa2);
54 (*iter)->setQ0( q0 );
55 }
56 }
57 return;
58 }
TTree * data
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ updateData() [2/2]

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

Implements TofCalib.

Definition at line 43 of file Tof/tofcalgsec/tofcalgsec-00-02-23/tofcalgsec/calib_barrel_atten.h.

43 {
44 if( data->size() > 0 ) {
45 std::vector<Record*>::iterator iter = data->begin();
46 for( ; iter!=data->end(); iter++ ) {
47 double z = (*iter)->zrhit();
48 double sintheta = (*iter)->theta();
49 double q1 = (*iter)->qleft();
50 double q2 = (*iter)->qright();
51 double latten = 1.0/X[0];
52 double a1overa2 = exp(X[1]);
53 double q0 = sintheta*(q1*exp((115.0-z)/latten)+q2*exp((115.0+z)/latten))/(1.0+a1overa2);
54 (*iter)->setQ0( q0 );
55 }
56 }
57 return;
58 }

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