BOSS 6.6.4.p03
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)
 
- 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)
 

Additional Inherited Members

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

Definition at line 8 of file calib_barrel_atten.h.

Constructor & Destructor Documentation

◆ calib_barrel_atten()

calib_barrel_atten::calib_barrel_atten ( )
inline

Definition at line 10 of file calib_barrel_atten.h.

11 m_name = string("calib_barrel_atten");
12 }
const int nBarrelAtten
string m_name
Definition: TofCalib.h:36

Member Function Documentation

◆ calculate_funcs()

void calib_barrel_atten::calculate_funcs ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 14 of file 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 }
double qleft() const
Definition: TofDataSet.h:51
double zrhit() const
Definition: TofDataSet.h:55
double qright() const
Definition: TofDataSet.h:52
HepVector funcs
Definition: TofCalib.h:41

◆ calculate_y()

void calib_barrel_atten::calculate_y ( const Record r)
inlinevirtual

Implements TofCalib.

Definition at line 31 of file 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 }
double y
Definition: TofCalib.h:42

◆ updateData()

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

Implements TofCalib.

Definition at line 43 of file 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)
HepVector X
Definition: TofCalib.h:39

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