BOSS 7.0.2
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)
 
 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
 
virtual void calculate (RecordSet *&data, unsigned int icounter)=0
 
void fillTxt (const char *file)
 
void fillRoot (const char *file)
 
HepVector tcorrelation ()
 
void setTCorrelation (HepVector tc)
 
 TofCalibFit (bool isbarrel, const int npar)
 
 ~TofCalibFit ()
 
const string & name () const
 
virtual void calculate (RecordSet *&data, unsigned int icounter)=0
 
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

Constructor & Destructor Documentation

◆ calib_barrel_q0() [1/2]

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)

◆ ~calib_barrel_q0() [1/2]

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}

◆ calib_barrel_q0() [2/2]

calib_barrel_q0::calib_barrel_q0 ( )

◆ ~calib_barrel_q0() [2/2]

calib_barrel_q0::~calib_barrel_q0 ( )

Member Function Documentation

◆ calculate() [1/2]

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

◆ calculate() [2/2]

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

Implements TofCalibFit.


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