BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
calib_barrel_q0 Class Reference

#include <calib_barrel_q0.h>

Inheritance diagram for calib_barrel_q0:

Public Member Functions

 calib_barrel_q0 ()
 ~calib_barrel_q0 ()
void calculate (RecordSet *&data, unsigned int icounter)
Public Member Functions inherited from TofCalibFit
 TofCalibFit (bool isbarrel, const int npar)
 ~TofCalibFit ()
const std::string & name () const
void fillTxt (const char *file)
void fillRoot (const char *file)
HepVector tcorrelation ()
void setTCorrelation (HepVector tc)

Additional Inherited Members

Protected Attributes inherited from TofCalibFit
int m_npar
unsigned int nKind
unsigned int nBinPerCounter
unsigned int nHistPerCounter
unsigned int nCanvasPerCounter
std::vector< unsigned int > nGraphPerCanvasPerCounter
unsigned int nHistogram
unsigned int nCanvas
std::vector< unsigned int > nGraphPerCanvas
string m_name
HepVector X
std::vector< TH1F * > m_histograms
std::vector< TH1F * > m_graphs
std::vector< HepVector > m_result
std::vector< string > CanvasPerCounterName
std::vector< string > CanvasName
HepVector m_tcorrelation

Detailed Description

Definition at line 10 of file calib_barrel_q0.h.

Constructor & Destructor Documentation

◆ calib_barrel_q0()

calib_barrel_q0::calib_barrel_q0 ( )

Definition at line 6 of file calib_barrel_q0.cxx.

6 : TofCalibFit( true, nBarrelQ0 ) {
7
8 nKind = 1;
10
13
16 nHistogram = NBarrel * nKind * nBinPerCounter; // NO directory
17 nCanvas = 2;
18 CanvasName.push_back(
19 static_cast<string>( "Most Probable Value of Q0 vs TOF counter Number (Barrel part)" ) );
20 CanvasName.push_back(
21 static_cast<string>( "Sigma of Q0 vs TOF Counter Number (Barrel part)" ) );
22 nGraphPerCanvas.push_back( 1 );
23 nGraphPerCanvas.push_back( 1 );
24
25 m_name = string( "calib_barrel_q0" );
26
27 int numGraphs = 0;
28 std::vector<unsigned int>::iterator iter = nGraphPerCanvas.begin();
29 for ( ; iter != nGraphPerCanvas.end(); iter++ ) { numGraphs = numGraphs + ( *iter ); }
30 if ( numGraphs != nGraphTotalQ0 )
31 {
32 cout << "tofcalgsec::calib_barrel_q0: the number of Graphs is NOT reasonable!!!" << endl;
33 exit( 0 );
34 }
35
36 const int qbin = 100;
37 const double qbegin = 0.0;
38 const double qend = 5000.0;
39
40 // histograms
41 char hname[256];
42 for ( unsigned int i = 0; i < NBarrel; i++ )
43 {
44 m_result.push_back( HepVector( nBarrelQ0, 0 ) );
45
46 sprintf( hname, "Q0-tofid-%i", i );
47 m_histograms.push_back( new TH1F( hname, hname, qbin, qbegin, qend ) );
48
49 m_fitresult.push_back( HepVector( nParQ0, 0 ) );
50 }
51
52 itofid.resize( NBarrel );
53 itofiderr.resize( NBarrel );
54 itofidstep = 1.0;
55 for ( unsigned int i = 0; i < NBarrel; i++ )
56 {
57 itofid[i] = i * 1.0;
58 itofiderr[i] = 0.5;
59 }
60}
sprintf(cut, "kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_" "pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
const unsigned int NBarrel
Definition TofDataSet.h:12
const int nBarrelQ0
const int nParQ0
const int nGraphTotalQ0
string m_name
Definition TofCalibFit.h:50
std::vector< HepVector > m_result
Definition TofCalibFit.h:55
unsigned int nCanvas
Definition TofCalibFit.h:47
std::vector< TH1F * > m_histograms
Definition TofCalibFit.h:53
unsigned int nBinPerCounter
Definition TofCalibFit.h:41
unsigned int nKind
Definition TofCalibFit.h:40
unsigned int nCanvasPerCounter
Definition TofCalibFit.h:44
unsigned int nHistPerCounter
Definition TofCalibFit.h:43
std::vector< unsigned int > nGraphPerCanvas
Definition TofCalibFit.h:48
std::vector< string > CanvasName
Definition TofCalibFit.h:58
unsigned int nHistogram
Definition TofCalibFit.h:46
TofCalibFit(bool isbarrel, const int npar)

◆ ~calib_barrel_q0()

calib_barrel_q0::~calib_barrel_q0 ( )

Definition at line 62 of file calib_barrel_q0.cxx.

62 {
63 m_fitresult.clear();
64 itofid.clear();
65 itofiderr.clear();
66}

Member Function Documentation

◆ calculate()

void calib_barrel_q0::calculate ( RecordSet *& data,
unsigned int icounter )
virtual

Implements TofCalibFit.

Definition at line 68 of file calib_barrel_q0.cxx.

68 {
69
70 std::cout << setiosflags( ios::left ) << setw( 10 ) << icounter << setw( 8 ) << data->size()
71 << setw( 30 ) << name() << std::endl;
72
73 if ( data->size() > 0 )
74 {
75 std::vector<Record*>::iterator iter = data->begin();
76 for ( ; iter != data->end(); iter++ ) { fillRecord( ( *iter ), icounter ); }
77 }
78 fitHistogram( icounter );
79
80 if ( icounter == ( NBarrel - 1 ) )
81 {
82 fillGraph();
83 fitGraph();
84 }
85
86 return;
87}
TTree * data
const std::string & name() const
Definition TofCalibFit.h:27

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