CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcCalibConst Class Reference

#include <MdcCalibConst.h>

Public Member Functions

 MdcCalibConst ()
 
 MdcCalibConst (const MdcCalibConst &calconst)
 
void initCalibConst ()
 
void fillXtpar (int key, double val)
 
void resetXtpar (int lay, int entr, int lr, int order, double val)
 
int getXtSize () const
 
void setXtBegin ()
 
int getNextXtpar (int &key, double &xtpar)
 
double getXtpar (int lay, int entr, int lr, int order)
 
int getXtKey (int lay, int entr, int lr, int order) const
 
void fillT0 (double val)
 
void fillDelT0 (double val)
 
void resetT0 (int wireid, double val)
 
void resetDelT0 (int wireid, double val)
 
double getT0 (int wireid) const
 
double getDelT0 (int wireid) const
 
int getT0Size () const
 
void fillQtpar (int order, double val)
 
void fillQtpar0 (double val)
 
void fillQtpar1 (double val)
 
void resetQtpar (int lay, int order, double val)
 
void resetQtpar0 (int lay, double val)
 
void resetQtpar1 (int lay, double val)
 
double getQtpar (int lay, int order) const
 
double getQtpar0 (int lay) const
 
double getQtpar1 (int lay) const
 
int getQtSize () const
 
void fillSdpar (int key, double val)
 
void resetSdpar (int lay, int entr, int lr, int bin, double val)
 
int getSdSize () const
 
void setSdBegin ()
 
int getNextSdpar (int &key, double &sdpar)
 
double getSdpar (int lay, int entr, int lr, int bin)
 
int getSdKey (int lay, int entr, int lr, int bin) const
 
void clear ()
 
 MdcCalibConst ()
 
 MdcCalibConst (const MdcCalibConst &calconst)
 
void fillXtpar (int key, double val)
 
void resetXtpar (int lay, int entr, int lr, int order, double val)
 
int getXtSize () const
 
void setXtBegin ()
 
int getNextXtpar (int &key, double &xtpar)
 
double getXtpar (int lay, int entr, int lr, int order)
 
int getXtKey (int lay, int entr, int lr, int order) const
 
void fillT0 (double val)
 
void fillDelT0 (double val)
 
void resetT0 (int wireid, double val)
 
void resetDelT0 (int wireid, double val)
 
double getT0 (int wireid) const
 
double getDelT0 (int wireid) const
 
int getT0Size () const
 
void fillQtpar (int order, double val)
 
void fillQtpar0 (double val)
 
void fillQtpar1 (double val)
 
void resetQtpar (int lay, int order, double val)
 
void resetQtpar0 (int lay, double val)
 
void resetQtpar1 (int lay, double val)
 
double getQtpar (int lay, int order) const
 
double getQtpar0 (int lay) const
 
double getQtpar1 (int lay) const
 
int getQtSize () const
 
void fillSdpar (int key, double val)
 
void resetSdpar (int lay, int entr, int lr, int bin, double val)
 
int getSdSize () const
 
void setSdBegin ()
 
int getNextSdpar (int &key, double &sdpar)
 
double getSdpar (int lay, int entr, int lr, int bin)
 
int getSdKey (int lay, int entr, int lr, int bin) const
 
void clear ()
 

Detailed Description

Definition at line 7 of file MdcCalibAlg/MdcCalibConst.h.

Constructor & Destructor Documentation

◆ MdcCalibConst() [1/4]

MdcCalibConst::MdcCalibConst ( )

Definition at line 7 of file MdcCalibConst.cpp.

7 {
8 // constructor
9}

◆ MdcCalibConst() [2/4]

MdcCalibConst::MdcCalibConst ( const MdcCalibConst & calconst)

Definition at line 11 of file MdcCalibConst.cpp.

11 {
12 m_xtmap = calconst.m_xtmap;
13 m_t0 = calconst.m_t0;
14 m_delt0 = calconst.m_delt0;
15// m_wshift = calconst.m_wshift;
16// m_delwshift = calconst.m_delwshift;
17 m_qtpar0 = calconst.m_qtpar0;
18 m_qtpar1 = calconst.m_qtpar1;
19 m_sdmap = calconst.m_sdmap;
20}

◆ MdcCalibConst() [3/4]

MdcCalibConst::MdcCalibConst ( )

◆ MdcCalibConst() [4/4]

MdcCalibConst::MdcCalibConst ( const MdcCalibConst & calconst)

Member Function Documentation

◆ clear() [1/2]

void MdcCalibConst::clear ( )

Definition at line 141 of file MdcCalibConst.cpp.

141 {
142 m_xtmap.clear();
143 m_t0.clear();
144 m_delt0.clear();
145// m_wshift.clear();
146// m_delwshift.clear();
147 m_qtpar0.clear();
148 m_qtpar1.clear();
149 m_sdmap.clear();
150}

◆ clear() [2/2]

void MdcCalibConst::clear ( )

◆ fillDelT0() [1/2]

void MdcCalibConst::fillDelT0 ( double val)
inline

Definition at line 24 of file MdcCalibAlg/MdcCalibConst.h.

24{ m_delt0.push_back( val ); }

Referenced by main().

◆ fillDelT0() [2/2]

void MdcCalibConst::fillDelT0 ( double val)
inline

Definition at line 22 of file share/distcalib/src/include/MdcCalibConst.h.

22{ m_delt0.push_back( val ); }

◆ fillQtpar() [1/2]

void MdcCalibConst::fillQtpar ( int order,
double val )

Definition at line 65 of file MdcCalibConst.cpp.

65 {
66 if( 0 == order ){
67 m_qtpar0.push_back( val );
68 } else if( 1 == order ){
69 m_qtpar1.push_back( val );
70 } else {
71 std::cout << "Order of Qtpar Error in fillQtpar()!" << std::endl;
72 }
73}

◆ fillQtpar() [2/2]

void MdcCalibConst::fillQtpar ( int order,
double val )

◆ fillQtpar0() [1/2]

void MdcCalibConst::fillQtpar0 ( double val)
inline

Definition at line 32 of file MdcCalibAlg/MdcCalibConst.h.

32{ m_qtpar0.push_back( val ); }

Referenced by main().

◆ fillQtpar0() [2/2]

void MdcCalibConst::fillQtpar0 ( double val)
inline

Definition at line 38 of file share/distcalib/src/include/MdcCalibConst.h.

38{ m_qtpar0.push_back( val ); }

◆ fillQtpar1() [1/2]

void MdcCalibConst::fillQtpar1 ( double val)
inline

Definition at line 33 of file MdcCalibAlg/MdcCalibConst.h.

33{ m_qtpar1.push_back( val ); }

Referenced by main().

◆ fillQtpar1() [2/2]

void MdcCalibConst::fillQtpar1 ( double val)
inline

Definition at line 39 of file share/distcalib/src/include/MdcCalibConst.h.

39{ m_qtpar1.push_back( val ); }

◆ fillSdpar() [1/2]

void MdcCalibConst::fillSdpar ( int key,
double val )

Definition at line 96 of file MdcCalibConst.cpp.

96 {
97 m_sdmap.insert( valType( key, val) );
98}
std::map< int, double >::value_type valType
*************DOUBLE PRECISION m_pi *DOUBLE PRECISION m_HvecTau2 DOUBLE PRECISION m_HvClone2 DOUBLE PRECISION m_gamma1 DOUBLE PRECISION m_gamma2 DOUBLE PRECISION m_thet1 DOUBLE PRECISION m_thet2 INTEGER m_IFPHOT *COMMON c_Taupair $ !Spin Polarimeter vector first Tau $ !Spin Polarimeter vector second Tau $ !Clone Spin Polarimeter vector first Tau $ !Clone Spin Polarimeter vector second Tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !phi of HvecTau1 $ !theta of HvecTau1 $ !phi of HvecTau2 $ !theta of HvecTau2 $ !super key
Definition Taupair.h:42

Referenced by main().

◆ fillSdpar() [2/2]

void MdcCalibConst::fillSdpar ( int key,
double val )

◆ fillT0() [1/2]

void MdcCalibConst::fillT0 ( double val)
inline

Definition at line 23 of file MdcCalibAlg/MdcCalibConst.h.

23{ m_t0.push_back( val ); }

Referenced by main().

◆ fillT0() [2/2]

void MdcCalibConst::fillT0 ( double val)
inline

Definition at line 21 of file share/distcalib/src/include/MdcCalibConst.h.

21{ m_t0.push_back( val ); }

◆ fillXtpar() [1/2]

void MdcCalibConst::fillXtpar ( int key,
double val )

Definition at line 22 of file MdcCalibConst.cpp.

22 {
23 m_xtmap.insert( valType( key, val ) );
24}

Referenced by main().

◆ fillXtpar() [2/2]

void MdcCalibConst::fillXtpar ( int key,
double val )

◆ getDelT0() [1/2]

double MdcCalibConst::getDelT0 ( int wireid) const
inline

Definition at line 28 of file MdcCalibAlg/MdcCalibConst.h.

28{ return m_delt0[wireid]; }

Referenced by writeConst().

◆ getDelT0() [2/2]

double MdcCalibConst::getDelT0 ( int wireid) const
inline

Definition at line 26 of file share/distcalib/src/include/MdcCalibConst.h.

26{ return m_delt0[wireid]; }

◆ getNextSdpar() [1/2]

int MdcCalibConst::getNextSdpar ( int & key,
double & sdpar )

Definition at line 131 of file MdcCalibConst.cpp.

131 {
132 if( m_sditer != m_sdmap.end() ){
133 key = (*m_sditer).first;
134 sdpar = (*m_sditer).second;
135 m_sditer++;
136 return 1;
137 }
138 else return 0;
139}

◆ getNextSdpar() [2/2]

int MdcCalibConst::getNextSdpar ( int & key,
double & sdpar )

◆ getNextXtpar() [1/2]

int MdcCalibConst::getNextXtpar ( int & key,
double & xtpar )

Definition at line 55 of file MdcCalibConst.cpp.

55 {
56 if( m_xtiter != m_xtmap.end() ){
57 key = (*m_xtiter).first;
58 xtpar = (*m_xtiter).second;
59 m_xtiter++;
60 return 1;
61 }
62 else return 0;
63}

◆ getNextXtpar() [2/2]

int MdcCalibConst::getNextXtpar ( int & key,
double & xtpar )

◆ getQtpar() [1/2]

double MdcCalibConst::getQtpar ( int lay,
int order ) const

Definition at line 85 of file MdcCalibConst.cpp.

85 {
86 if( 0 == order ){
87 return m_qtpar0[lay];
88 } else if( 1 == order ){
89 return m_qtpar1[lay];
90 } else{
91 std::cout << "Order of Qtpar Error in getQtpar()!" << std::endl;
92 return -9999.0;
93 }
94}

Referenced by QtCalib::calib().

◆ getQtpar() [2/2]

double MdcCalibConst::getQtpar ( int lay,
int order ) const

◆ getQtpar0() [1/2]

double MdcCalibConst::getQtpar0 ( int lay) const
inline

Definition at line 38 of file MdcCalibAlg/MdcCalibConst.h.

38{ return m_qtpar0[lay]; }

Referenced by writeConst().

◆ getQtpar0() [2/2]

double MdcCalibConst::getQtpar0 ( int lay) const
inline

Definition at line 44 of file share/distcalib/src/include/MdcCalibConst.h.

44{ return m_qtpar0[lay]; }

◆ getQtpar1() [1/2]

double MdcCalibConst::getQtpar1 ( int lay) const
inline

Definition at line 39 of file MdcCalibAlg/MdcCalibConst.h.

39{ return m_qtpar1[lay]; }

Referenced by writeConst().

◆ getQtpar1() [2/2]

double MdcCalibConst::getQtpar1 ( int lay) const
inline

Definition at line 45 of file share/distcalib/src/include/MdcCalibConst.h.

45{ return m_qtpar1[lay]; }

◆ getQtSize() [1/2]

int MdcCalibConst::getQtSize ( ) const
inline

Definition at line 40 of file MdcCalibAlg/MdcCalibConst.h.

40{ return m_qtpar0.size(); }

◆ getQtSize() [2/2]

int MdcCalibConst::getQtSize ( ) const
inline

Definition at line 46 of file share/distcalib/src/include/MdcCalibConst.h.

46{ return m_qtpar0.size(); }

◆ getSdKey() [1/2]

int MdcCalibConst::getSdKey ( int lay,
int entr,
int lr,
int bin ) const

Definition at line 116 of file MdcCalibConst.cpp.

116 {
117 int key;
118
119 key = ( (lay << SDLAYER_INDEX) & SDLAYER_MASK ) |
120 ( (entr << SDENTRA_INDEX) & SDENTRA_MASK ) |
121 ( (lr << SDLR_INDEX) & SDLR_MASK ) |
122 ( (bin << SDBIN_INDEX) & SDBIN_MASK );
123
124 return key;
125}
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per bin
Definition FoamA.h:85

Referenced by getSdpar(), initCalibConst(), resetSdpar(), and writeConst().

◆ getSdKey() [2/2]

int MdcCalibConst::getSdKey ( int lay,
int entr,
int lr,
int bin ) const

◆ getSdpar() [1/2]

double MdcCalibConst::getSdpar ( int lay,
int entr,
int lr,
int bin )

Definition at line 105 of file MdcCalibConst.cpp.

105 {
106
107 double sdpar = -999.0;
108 int key = getSdKey(lay, entr, lr, bin);
109 if( 1 == m_sdmap.count(key) ){
110 return m_sdmap[key];
111 }
112
113 return sdpar;
114}
int getSdKey(int lay, int entr, int lr, int bin) const

Referenced by CalibBase::calib(), MdcCalib::updateConst(), and writeConst().

◆ getSdpar() [2/2]

double MdcCalibConst::getSdpar ( int lay,
int entr,
int lr,
int bin )

◆ getSdSize() [1/2]

int MdcCalibConst::getSdSize ( ) const
inline

Definition at line 44 of file MdcCalibAlg/MdcCalibConst.h.

44{ return m_sdmap.size(); }

◆ getSdSize() [2/2]

int MdcCalibConst::getSdSize ( ) const
inline

Definition at line 50 of file share/distcalib/src/include/MdcCalibConst.h.

50{ return m_sdmap.size(); }

◆ getT0() [1/2]

double MdcCalibConst::getT0 ( int wireid) const
inline

◆ getT0() [2/2]

double MdcCalibConst::getT0 ( int wireid) const
inline

Definition at line 25 of file share/distcalib/src/include/MdcCalibConst.h.

25{ return m_t0[wireid]; }

◆ getT0Size() [1/2]

int MdcCalibConst::getT0Size ( ) const
inline

Definition at line 29 of file MdcCalibAlg/MdcCalibConst.h.

29{ return m_t0.size(); }

◆ getT0Size() [2/2]

int MdcCalibConst::getT0Size ( ) const
inline

Definition at line 27 of file share/distcalib/src/include/MdcCalibConst.h.

27{ return m_t0.size(); }

◆ getXtKey() [1/2]

int MdcCalibConst::getXtKey ( int lay,
int entr,
int lr,
int order ) const

Definition at line 40 of file MdcCalibConst.cpp.

40 {
41 int key;
42
43 key = ( (lay << XTLAYER_INDEX) & XTLAYER_MASK ) |
44 ( (entr << XTENTRA_INDEX) & XTENTRA_MASK ) |
45 ( (lr << XTLR_INDEX) & XTLR_MASK ) |
46 ( (order << XTORDER_INDEX) & XTORDER_MASK );
47
48 return key;
49}

Referenced by getXtpar(), initCalibConst(), resetXtpar(), and writeConst().

◆ getXtKey() [2/2]

int MdcCalibConst::getXtKey ( int lay,
int entr,
int lr,
int order ) const

◆ getXtpar() [1/2]

double MdcCalibConst::getXtpar ( int lay,
int entr,
int lr,
int order )

Definition at line 31 of file MdcCalibConst.cpp.

31 {
32 double xtpar = -999.0;
33 int key = getXtKey(lay, entr, lr, order);
34 if( 1 == m_xtmap.count(key) )
35 xtpar = m_xtmap[key];
36
37 return xtpar;
38}
int getXtKey(int lay, int entr, int lr, int order) const

Referenced by IniCalib::calib(), PreT0Calib::calib(), PreXtCalib::calib(), IniMdcCalib::updateConst(), PreT0MdcCalib::updateConst(), PreXtMdcCalib::updateConst(), and writeConst().

◆ getXtpar() [2/2]

double MdcCalibConst::getXtpar ( int lay,
int entr,
int lr,
int order )

◆ getXtSize() [1/2]

int MdcCalibConst::getXtSize ( ) const
inline

Definition at line 17 of file MdcCalibAlg/MdcCalibConst.h.

17{ return m_xtmap.size(); }

◆ getXtSize() [2/2]

int MdcCalibConst::getXtSize ( ) const
inline

Definition at line 15 of file share/distcalib/src/include/MdcCalibConst.h.

15{ return m_xtmap.size(); }

◆ initCalibConst()

void MdcCalibConst::initCalibConst ( )

Definition at line 22 of file MdcCalibConst.cxx.

22 {
23 int lay;
24 int lr;
25 int entr;
26 int ord;
27 int key;
28 double val;
29 for(lay=0; lay<MdcCalNLayer; lay++){
30 for(entr=0; entr<MdcCalNENTRXT; entr++){
31 for(lr=0; lr<MdcCalLR; lr++){
32 for(ord=0; ord<MdcCalXtNPars; ord++){
33 key = getXtKey(lay, entr, lr, ord);
34 if(1 == ord){
35 val = 0.03;
36 } else if(6 == ord){
37 val = 999.0;
38 } else{
39 val = 0.0;
40 }
41 m_xtmap.insert( valType(key, val) );
42 }
43 }
44 }
45 }
46
47 int wir;
48 double t0 = 0.0;
49 double dt0 = 0.0;
50 for(wir=0; wir<MdcCalTotCell; wir++){
51 m_t0.push_back(t0);
52 m_delt0.push_back(dt0);
53 }
54
55 double qtpar0 = 0.0;
56 double qtpar1 = 0.0;
57 for(lay=0; lay<MdcCalNLayer; lay++){
58 m_qtpar0.push_back(qtpar0);
59 m_qtpar1.push_back(qtpar1);
60 }
61
62 int bin;
63 double sdpar = 0.16;
64 for(lay=0; lay<MdcCalNLayer; lay++){
65 for(entr=0; entr<MdcCalNENTRSD; entr++){
66 for(lr=0; lr<2; lr++){
67 for(bin=0; bin<MdcCalSdNBIN; bin++){
68 key = getSdKey(lay, entr, lr, ord);
69 m_sdmap.insert( valType( key, sdpar) );
70 }
71 }
72 }
73 }
74}
const int MdcCalNLayer
Definition MdcCalParams.h:6
const int MdcCalNENTRSD
const int MdcCalXtNPars
const int MdcCalSdNBIN
const int MdcCalNENTRXT
const int MdcCalTotCell
Definition MdcCalParams.h:9
const int MdcCalLR

◆ resetDelT0() [1/2]

void MdcCalibConst::resetDelT0 ( int wireid,
double val )
inline

Definition at line 26 of file MdcCalibAlg/MdcCalibConst.h.

26{ m_delt0[wireid] = val; }

Referenced by T0Calib::calib().

◆ resetDelT0() [2/2]

void MdcCalibConst::resetDelT0 ( int wireid,
double val )
inline

Definition at line 24 of file share/distcalib/src/include/MdcCalibConst.h.

24{ m_delt0[wireid] = val; }

◆ resetQtpar() [1/2]

void MdcCalibConst::resetQtpar ( int lay,
int order,
double val )

Definition at line 75 of file MdcCalibConst.cpp.

75 {
76 if( 0 == order ){
77 m_qtpar0[lay] = val;
78 } else if( 1 == order ){
79 m_qtpar1[lay] = val;
80 } else{
81 std::cout << "Order of Qtpar Error in resetQtpar()!" << std::endl;
82 }
83}

◆ resetQtpar() [2/2]

void MdcCalibConst::resetQtpar ( int lay,
int order,
double val )

◆ resetQtpar0() [1/2]

void MdcCalibConst::resetQtpar0 ( int lay,
double val )
inline

Definition at line 35 of file MdcCalibAlg/MdcCalibConst.h.

35{ m_qtpar0[lay] = val; }

◆ resetQtpar0() [2/2]

void MdcCalibConst::resetQtpar0 ( int lay,
double val )
inline

Definition at line 41 of file share/distcalib/src/include/MdcCalibConst.h.

41{ m_qtpar0[lay] = val; }

◆ resetQtpar1() [1/2]

void MdcCalibConst::resetQtpar1 ( int lay,
double val )
inline

Definition at line 36 of file MdcCalibAlg/MdcCalibConst.h.

36{ m_qtpar1[lay] = val; }

◆ resetQtpar1() [2/2]

void MdcCalibConst::resetQtpar1 ( int lay,
double val )
inline

Definition at line 42 of file share/distcalib/src/include/MdcCalibConst.h.

42{ m_qtpar1[lay] = val; }

◆ resetSdpar() [1/2]

void MdcCalibConst::resetSdpar ( int lay,
int entr,
int lr,
int bin,
double val )

Definition at line 100 of file MdcCalibConst.cpp.

100 {
101 int key = getSdKey(lay, entr, lr, bin);
102 m_sdmap[key] = val;
103}

Referenced by CalibBase::calib().

◆ resetSdpar() [2/2]

void MdcCalibConst::resetSdpar ( int lay,
int entr,
int lr,
int bin,
double val )

◆ resetT0() [1/2]

void MdcCalibConst::resetT0 ( int wireid,
double val )
inline

Definition at line 25 of file MdcCalibAlg/MdcCalibConst.h.

25{ m_t0[wireid] = val; }

Referenced by T0Calib::calib().

◆ resetT0() [2/2]

void MdcCalibConst::resetT0 ( int wireid,
double val )
inline

Definition at line 23 of file share/distcalib/src/include/MdcCalibConst.h.

23{ m_t0[wireid] = val; }

◆ resetXtpar() [1/2]

void MdcCalibConst::resetXtpar ( int lay,
int entr,
int lr,
int order,
double val )

Definition at line 26 of file MdcCalibConst.cpp.

26 {
27 int key = getXtKey(lay, entr, lr, order);
28 m_xtmap[key] = val;
29}

Referenced by GrXtCalib::calib(), XtCalib::calib(), GrXtMdcCalib::updateConst(), and XtMdcCalib::updateConst().

◆ resetXtpar() [2/2]

void MdcCalibConst::resetXtpar ( int lay,
int entr,
int lr,
int order,
double val )

◆ setSdBegin() [1/2]

void MdcCalibConst::setSdBegin ( )

Definition at line 127 of file MdcCalibConst.cpp.

127 {
128 m_sditer = m_sdmap.begin();
129}

◆ setSdBegin() [2/2]

void MdcCalibConst::setSdBegin ( )

◆ setXtBegin() [1/2]

void MdcCalibConst::setXtBegin ( )

Definition at line 51 of file MdcCalibConst.cpp.

51 {
52 m_xtiter = m_xtmap.begin();
53}

◆ setXtBegin() [2/2]

void MdcCalibConst::setXtBegin ( )

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