CGEM BOSS 6.6.5.h
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 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< TGraphErrors * > 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( static_cast<string>("Most Probable Value of Q0 vs TOF counter Number (Barrel part)") );
19 CanvasName.push_back( static_cast<string>("Sigma of Q0 vs TOF Counter Number (Barrel part)") );
20 nGraphPerCanvas.push_back(1);
21 nGraphPerCanvas.push_back(1);
22
23 m_name = string("calib_barrel_q0");
24
25 int numGraphs = 0;
26 std::vector<unsigned int>::iterator iter = nGraphPerCanvas.begin();
27 for( ; iter!=nGraphPerCanvas.end(); iter++ ) {
28 numGraphs = numGraphs + (*iter);
29 }
30 if( numGraphs != nGraphTotalQ0 ) {
31 cout << "tofcalgsec::calib_barrel_q0: the number of Graphs is NOT reasonable!!!" << endl;
32 exit(0);
33 }
34
35 const int qbin = 100;
36 const double qbegin = 0.0;
37 const double qend = 5000.0;
38
39 // histograms
40 char hname[256];
41 for( unsigned int i=0; i<NBarrel; i++ ) {
42 m_result.push_back( HepVector(nBarrelQ0,0) );
43
44 sprintf( hname, "Q0-tofid-%i", i );
45 m_histograms.push_back( new TH1F( hname, hname, qbin, qbegin, qend ) );
46
47 m_fitresult.push_back( HepVector(nParQ0,0) );
48 }
49
50 itofid.resize( NBarrel );
51 itofiderr.resize( NBarrel );
52 itofidstep = 1.0;
53 for( unsigned int i=0; i<NBarrel; i++ ) {
54 itofid[i] = i*1.0;
55 itofiderr[i] = 0.5;
56 }
57}
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:52
std::vector< HepVector > m_result
Definition TofCalibFit.h:57
unsigned int nCanvas
Definition TofCalibFit.h:49
std::vector< TH1F * > m_histograms
Definition TofCalibFit.h:55
unsigned int nBinPerCounter
Definition TofCalibFit.h:43
unsigned int nKind
Definition TofCalibFit.h:42
unsigned int nCanvasPerCounter
Definition TofCalibFit.h:46
unsigned int nHistPerCounter
Definition TofCalibFit.h:45
std::vector< unsigned int > nGraphPerCanvas
Definition TofCalibFit.h:50
std::vector< string > CanvasName
Definition TofCalibFit.h:61
unsigned int nHistogram
Definition TofCalibFit.h:48
TofCalibFit(bool isbarrel, const int npar)

◆ ~calib_barrel_q0()

calib_barrel_q0::~calib_barrel_q0 ( )

Definition at line 60 of file calib_barrel_q0.cxx.

60 {
61 m_fitresult.clear();
62 itofid.clear();
63 itofiderr.clear();
64}

Member Function Documentation

◆ calculate()

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

Implements TofCalibFit.

Definition at line 67 of file calib_barrel_q0.cxx.

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

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