BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
CalibData::MdcCalibData Class Reference

#include <MdcCalibData.h>

+ Inheritance diagram for CalibData::MdcCalibData:

Public Member Functions

 MdcCalibData ()
 
 ~MdcCalibData ()
 
virtual const CLID & clID () const
 
virtual StatusCode update (CalibBase1 &other, MsgStream *log)
 
void setXtpar (int xtkey, double val)
 
void setNewXtpar (TObjArray *newXtTrees)
 
void setR2tpar (TObjArray *r2tTrees)
 
void setT0 (double val)
 
void setDelT0 (double val)
 
void setQtpar0 (double val)
 
void setQtpar1 (double val)
 
void setSdpar (int sdkey, double val)
 
double getXtpar (int layid, int entr, int lr, int order)
 
TTree * getNewXtpar (int layid, int entr, int lr)
 
TTree * getR2tpar (int layid)
 
double getT0 (int wireid)
 
double getDelT0 (int wireid)
 
double getQtpar0 (int layid)
 
double getQtpar1 (int layid)
 
double getSdpar (int layid, int entr, int lr, int bin)
 
void clear ()
 
int getXtKey (int layid, int entr, int lr, int order)
 
void setXtBegin ()
 
int getNextXtpar (int &key, double &xtpar)
 
int getSdKey (int layid, int entr, int lr, int bin)
 
void setSdBegin ()
 
int getNextSdpar (int &key, double &sdpar)
 
int getqtparNo ()
 
int getxtNo ()
 
int gett0No ()
 
 MdcCalibData ()
 
 ~MdcCalibData ()
 
virtual const CLID & clID () const
 
virtual StatusCode update (CalibBase1 &other, MsgStream *log)
 
void setXtpar (int xtkey, double val)
 
void setNewXtpar (TObjArray *newXtTrees)
 
void setR2tpar (TObjArray *r2tTrees)
 
void setT0 (double val)
 
void setDelT0 (double val)
 
void setQtpar0 (double val)
 
void setQtpar1 (double val)
 
void setSdpar (int sdkey, double val)
 
double getXtpar (int layid, int entr, int lr, int order)
 
TTree * getNewXtpar (int layid, int entr, int lr)
 
TTree * getR2tpar (int layid)
 
double getT0 (int wireid)
 
double getDelT0 (int wireid)
 
double getQtpar0 (int layid)
 
double getQtpar1 (int layid)
 
double getSdpar (int layid, int entr, int lr, int bin)
 
void clear ()
 
int getXtKey (int layid, int entr, int lr, int order)
 
void setXtBegin ()
 
int getNextXtpar (int &key, double &xtpar)
 
int getSdKey (int layid, int entr, int lr, int bin)
 
void setSdBegin ()
 
int getNextSdpar (int &key, double &sdpar)
 
int getqtparNo ()
 
int getxtNo ()
 
int gett0No ()
 
- Public Member Functions inherited from CalibData::CalibBase1
 CalibBase1 ()
 
 CalibBase1 (int serNo, int runfrm, int runto)
 
 CalibBase1 (int runfrm, int runto)
 
 CalibBase1 (const CalibBase1 &obj)
 
virtual StatusCode update (CalibBase1 &obj, MsgStream *)
 
virtual int getSerNo () const
 Following is intended for deep copy.
 
virtual int getrunfrm () const
 
virtual int getrunto () const
 
void setSerNo (int ser)
 
void setrunfrm (int runfrm)
 
void setrunto (int runto)
 
 CalibBase1 ()
 
 CalibBase1 (int serNo, int runfrm, int runto)
 
 CalibBase1 (int runfrm, int runto)
 
 CalibBase1 (const CalibBase1 &obj)
 
virtual StatusCode update (CalibBase1 &obj, MsgStream *)
 
virtual int getSerNo () const
 Following is intended for deep copy.
 
virtual int getrunfrm () const
 
virtual int getrunto () const
 
void setSerNo (int ser)
 
void setrunfrm (int runfrm)
 
void setrunto (int runto)
 

Static Public Member Functions

static const CLID & classID ()
 
static const CLID & classID ()
 

Additional Inherited Members

- Protected Attributes inherited from CalibData::CalibBase1
int m_serNo
 
int m_runfrm
 
int m_runto
 

Detailed Description

Constructor & Destructor Documentation

◆ MdcCalibData() [1/2]

CalibData::MdcCalibData::MdcCalibData ( )

Definition at line 5 of file MdcCalibData.cxx.

5 {
6 newXtTreesBuf = NULL;
7 r2tTreesBuf = NULL;
8 newXtTreesArray = NULL;
9 r2tTreesArray = NULL;
10 for(int layid=0; layid<43; layid++){
11 m_r2t[layid] = NULL;
12 for(int entr=0; entr<18; entr++){
13 for(int lr=0; lr<2; lr++){
14 m_newxt[layid][entr][lr] = NULL;
15 }//end lr
16 }//end entr
17 }//end for layid
18 }

◆ ~MdcCalibData() [1/2]

CalibData::MdcCalibData::~MdcCalibData ( )

Definition at line 20 of file MdcCalibData.cxx.

20 {
21 for(int layid=0; layid<43; layid++){
22 delete m_r2t[layid];
23 for(int entr=0; entr<18; entr++){
24 for(int lr=0; lr<2; lr++){
25 if(m_newxt[layid][entr][lr]!=NULL) delete m_newxt[layid][entr][lr];
26 }
27 }
28 }
29 if(newXtTreesBuf!=NULL) newXtTreesBuf->Clear();
30 if(r2tTreesBuf!=NULL) r2tTreesBuf->Clear();
31 if(newXtTreesArray!=NULL) delete newXtTreesArray;
32 if(r2tTreesArray!=NULL) delete r2tTreesArray;
33 }

◆ MdcCalibData() [2/2]

CalibData::MdcCalibData::MdcCalibData ( )

◆ ~MdcCalibData() [2/2]

CalibData::MdcCalibData::~MdcCalibData ( )

Member Function Documentation

◆ classID() [1/2]

static const CLID & CalibData::MdcCalibData::classID ( )
inlinestatic

◆ classID() [2/2]

static const CLID & CalibData::MdcCalibData::classID ( )
inlinestatic

◆ clear() [1/2]

void CalibData::MdcCalibData::clear ( )

Definition at line 197 of file MdcCalibData.cxx.

197 {
198 m_xtmap.clear();
199 m_t0.clear();
200 m_delt0.clear();
201 m_qtpar0.clear();
202 m_qtpar1.clear();
203 m_sdmap.clear();
204}

Referenced by update().

◆ clear() [2/2]

void CalibData::MdcCalibData::clear ( )

◆ clID() [1/2]

virtual const CLID & CalibData::MdcCalibData::clID ( ) const
inlinevirtual

◆ clID() [2/2]

virtual const CLID & CalibData::MdcCalibData::clID ( ) const
inlinevirtual

Definition at line 20 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

20{ return classID(); }

◆ getDelT0() [1/2]

double CalibData::MdcCalibData::getDelT0 ( int  wireid)
inline

Definition at line 40 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

40{ return m_delt0[wireid]; }

◆ getDelT0() [2/2]

double CalibData::MdcCalibData::getDelT0 ( int  wireid)
inline

Definition at line 40 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

40{ return m_delt0[wireid]; }

◆ getNewXtpar() [1/2]

TTree * CalibData::MdcCalibData::getNewXtpar ( int  layid,
int  entr,
int  lr 
)

Definition at line 126 of file MdcCalibData.cxx.

126 {
127 return m_newxt[layid][entr][lr];
128}

◆ getNewXtpar() [2/2]

TTree * CalibData::MdcCalibData::getNewXtpar ( int  layid,
int  entr,
int  lr 
)

◆ getNextSdpar() [1/2]

int CalibData::MdcCalibData::getNextSdpar ( int &  key,
double &  sdpar 
)

Definition at line 188 of file MdcCalibData.cxx.

188 {
189 if( m_sditer != m_sdmap.end() ){
190 key = (*m_sditer).first;
191 sdpar = (*m_sditer).second;
192 m_sditer++;
193 return 1;
194 }
195 else return 0;
196}
*************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

◆ getNextSdpar() [2/2]

int CalibData::MdcCalibData::getNextSdpar ( int &  key,
double &  sdpar 
)

◆ getNextXtpar() [1/2]

int CalibData::MdcCalibData::getNextXtpar ( int &  key,
double &  xtpar 
)

Definition at line 174 of file MdcCalibData.cxx.

174 {
175 if( m_xtiter != m_xtmap.end() ){
176 key = (*m_xtiter).first;
177 xtpar = (*m_xtiter).second;
178 m_xtiter++;
179 return 1;
180 }
181 else return 0;
182}

◆ getNextXtpar() [2/2]

int CalibData::MdcCalibData::getNextXtpar ( int &  key,
double &  xtpar 
)

◆ getQtpar0() [1/2]

double CalibData::MdcCalibData::getQtpar0 ( int  layid)
inline

Definition at line 41 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

41{ return m_qtpar0[layid]; }

◆ getQtpar0() [2/2]

double CalibData::MdcCalibData::getQtpar0 ( int  layid)
inline

Definition at line 41 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

41{ return m_qtpar0[layid]; }

◆ getQtpar1() [1/2]

double CalibData::MdcCalibData::getQtpar1 ( int  layid)
inline

Definition at line 42 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

42{ return m_qtpar1[layid]; }

◆ getQtpar1() [2/2]

double CalibData::MdcCalibData::getQtpar1 ( int  layid)
inline

Definition at line 42 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

42{ return m_qtpar1[layid]; }

◆ getqtparNo() [1/2]

int CalibData::MdcCalibData::getqtparNo ( )
inline

Definition at line 57 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

57{return m_qtpar0.size();}

◆ getqtparNo() [2/2]

int CalibData::MdcCalibData::getqtparNo ( )
inline

Definition at line 57 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

57{return m_qtpar0.size();}

◆ getR2tpar() [1/2]

TTree * CalibData::MdcCalibData::getR2tpar ( int  layid)

Definition at line 131 of file MdcCalibData.cxx.

131 {
132 return m_r2t[layid];
133}

◆ getR2tpar() [2/2]

TTree * CalibData::MdcCalibData::getR2tpar ( int  layid)

◆ getSdKey() [1/2]

int CalibData::MdcCalibData::getSdKey ( int  layid,
int  entr,
int  lr,
int  bin 
)

Definition at line 159 of file MdcCalibData.cxx.

159 {
160 int key;
161
162 key = ( (layid << SDLAYER_INDEX) & SDLAYER_MASK ) |
163 ( (entr << SDENTRA_INDEX) & SDENTRA_MASK ) |
164 ( (lr << SDLR_INDEX) & SDLR_MASK ) |
165 ( (bin << SDBIN_INDEX) & SDBIN_MASK );
166
167 return key;
168}
*******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().

◆ getSdKey() [2/2]

int CalibData::MdcCalibData::getSdKey ( int  layid,
int  entr,
int  lr,
int  bin 
)

◆ getSdpar() [1/2]

double CalibData::MdcCalibData::getSdpar ( int  layid,
int  entr,
int  lr,
int  bin 
)

Definition at line 136 of file MdcCalibData.cxx.

136 {
137 double sdpar = -999.0;
138 int key = getSdKey(layid, entr, lr, bin);
139 if( 1 == m_sdmap.count(key) ){
140 return m_sdmap[key];
141 }
142
143 return sdpar;
144}
int getSdKey(int layid, int entr, int lr, int bin)

◆ getSdpar() [2/2]

double CalibData::MdcCalibData::getSdpar ( int  layid,
int  entr,
int  lr,
int  bin 
)

◆ getT0() [1/2]

double CalibData::MdcCalibData::getT0 ( int  wireid)
inline

Definition at line 39 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

39{ return m_t0[wireid]; }

◆ getT0() [2/2]

double CalibData::MdcCalibData::getT0 ( int  wireid)
inline

Definition at line 39 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

39{ return m_t0[wireid]; }

◆ gett0No() [1/2]

int CalibData::MdcCalibData::gett0No ( )
inline

Definition at line 59 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

59{ return m_t0.size(); }

◆ gett0No() [2/2]

int CalibData::MdcCalibData::gett0No ( )
inline

Definition at line 59 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

59{ return m_t0.size(); }

◆ getXtKey() [1/2]

int CalibData::MdcCalibData::getXtKey ( int  layid,
int  entr,
int  lr,
int  order 
)

Definition at line 147 of file MdcCalibData.cxx.

147 {
148 int key;
149
150 key = ( (layid << XTLAYER_INDEX) & XTLAYER_MASK ) |
151 ( (entr << XTENTRA_INDEX) & XTENTRA_MASK ) |
152 ( (lr << XTLR_INDEX) & XTLR_MASK ) |
153 ( (order << XTORDER_INDEX) & XTORDER_MASK );
154
155 return key;
156}

Referenced by getXtpar().

◆ getXtKey() [2/2]

int CalibData::MdcCalibData::getXtKey ( int  layid,
int  entr,
int  lr,
int  order 
)

◆ getxtNo() [1/2]

int CalibData::MdcCalibData::getxtNo ( )
inline

Definition at line 58 of file Calibration/CalibData/CalibData-00-01-18/CalibData/Mdc/MdcCalibData.h.

58{ return m_xtmap.size(); }

◆ getxtNo() [2/2]

int CalibData::MdcCalibData::getxtNo ( )
inline

Definition at line 58 of file InstallArea/include/CalibData/CalibData/Mdc/MdcCalibData.h.

58{ return m_xtmap.size(); }

◆ getXtpar() [1/2]

double CalibData::MdcCalibData::getXtpar ( int  layid,
int  entr,
int  lr,
int  order 
)

Definition at line 116 of file MdcCalibData.cxx.

116 {
117 double xtpar = -999.0;
118 int key = getXtKey(layid, entr, lr, order);
119 if( 1 == m_xtmap.count(key) )
120 xtpar = m_xtmap[key];
121
122 return xtpar;
123}
int getXtKey(int layid, int entr, int lr, int order)

◆ getXtpar() [2/2]

double CalibData::MdcCalibData::getXtpar ( int  layid,
int  entr,
int  lr,
int  order 
)

◆ setDelT0() [1/2]

void CalibData::MdcCalibData::setDelT0 ( double  val)

Definition at line 99 of file MdcCalibData.cxx.

99 {
100 m_delt0.push_back( val );
101}

◆ setDelT0() [2/2]

void CalibData::MdcCalibData::setDelT0 ( double  val)

◆ setNewXtpar() [1/2]

void CalibData::MdcCalibData::setNewXtpar ( TObjArray *  newXtTrees)

Definition at line 54 of file MdcCalibData.cxx.

54 {
55 //put TObjArray to temp buffer
56 TBufferFile* tempBuf = new TBufferFile(TBuffer::kWrite);
57 newXtTrees->Streamer(*tempBuf);
58
59 //put content of buffer to array
60 newXtTreesBuf = new TBufferFile(TBuffer::kRead);
61 newXtTreesBuf->SetBuffer(tempBuf->Buffer(), tempBuf->BufferSize());
62
63 newXtTreesArray = new TObjArray();
64 newXtTreesArray->Streamer(*newXtTreesBuf);
65 for(int layid=0; layid<43; layid++){
66 for(int entr=0; entr<18; entr++){
67 for(int lr=0; lr<2; lr++){
68 char newXtTreeName[20];
69 sprintf(newXtTreeName,"trNewXt%02d_%02d_%d",layid,entr,lr);
70 m_newxt[layid][entr][lr] = (TTree*)newXtTreesArray->FindObject(newXtTreeName);;
71 }
72 }
73 }
74 delete tempBuf;
75}
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)

Referenced by RootMdcCalibDataCnv::i_createObj(), and TreeMdcCalibDataCnv::i_createObj().

◆ setNewXtpar() [2/2]

void CalibData::MdcCalibData::setNewXtpar ( TObjArray *  newXtTrees)

◆ setQtpar0() [1/2]

void CalibData::MdcCalibData::setQtpar0 ( double  val)

Definition at line 103 of file MdcCalibData.cxx.

103 {
104 m_qtpar0.push_back( val );
105}

◆ setQtpar0() [2/2]

void CalibData::MdcCalibData::setQtpar0 ( double  val)

◆ setQtpar1() [1/2]

void CalibData::MdcCalibData::setQtpar1 ( double  val)

Definition at line 107 of file MdcCalibData.cxx.

107 {
108 m_qtpar1.push_back( val );
109}

◆ setQtpar1() [2/2]

void CalibData::MdcCalibData::setQtpar1 ( double  val)

◆ setR2tpar() [1/2]

void CalibData::MdcCalibData::setR2tpar ( TObjArray *  r2tTrees)

Definition at line 77 of file MdcCalibData.cxx.

77 {
78 //put TObjArray to temp buffer
79 TBufferFile* tempBuf = new TBufferFile(TBuffer::kWrite);
80 r2tTrees->Streamer(*tempBuf);
81
82 //put content of buffer to array
83 r2tTreesBuf = new TBufferFile(TBuffer::kRead);
84 r2tTreesBuf->SetBuffer(tempBuf->Buffer(), tempBuf->BufferSize());
85
86 r2tTreesArray = new TObjArray();
87 r2tTreesArray->Streamer(*r2tTreesBuf);
88 for(int layid=0; layid<43; layid++){
89 char r2tTreeName[20];
90 sprintf(r2tTreeName,"r2t%02d",layid);
91 m_r2t[layid] = (TTree*)r2tTreesArray->FindObject(r2tTreeName);;
92 }
93 delete tempBuf;
94}

Referenced by RootMdcCalibDataCnv::i_createObj(), and TreeMdcCalibDataCnv::i_createObj().

◆ setR2tpar() [2/2]

void CalibData::MdcCalibData::setR2tpar ( TObjArray *  r2tTrees)

◆ setSdBegin() [1/2]

void CalibData::MdcCalibData::setSdBegin ( )

Definition at line 184 of file MdcCalibData.cxx.

184 {
185 m_sditer = m_sdmap.begin();
186}

◆ setSdBegin() [2/2]

void CalibData::MdcCalibData::setSdBegin ( )

◆ setSdpar() [1/2]

void CalibData::MdcCalibData::setSdpar ( int  sdkey,
double  val 
)

Definition at line 111 of file MdcCalibData.cxx.

111 {
112 m_sdmap.insert( valType( int(sdkey), val) );
113}
std::map< int, double >::value_type valType

◆ setSdpar() [2/2]

void CalibData::MdcCalibData::setSdpar ( int  sdkey,
double  val 
)

◆ setT0() [1/2]

void CalibData::MdcCalibData::setT0 ( double  val)

Definition at line 96 of file MdcCalibData.cxx.

96 {
97 m_t0.push_back( val );
98}

◆ setT0() [2/2]

void CalibData::MdcCalibData::setT0 ( double  val)

◆ setXtBegin() [1/2]

void CalibData::MdcCalibData::setXtBegin ( )

Definition at line 170 of file MdcCalibData.cxx.

170 {
171 m_xtiter = m_xtmap.begin();
172}

◆ setXtBegin() [2/2]

void CalibData::MdcCalibData::setXtBegin ( )

◆ setXtpar() [1/2]

void CalibData::MdcCalibData::setXtpar ( int  xtkey,
double  val 
)

Definition at line 50 of file MdcCalibData.cxx.

50 {
51 m_xtmap.insert( valType( int(xtkey), val) );
52}

◆ setXtpar() [2/2]

void CalibData::MdcCalibData::setXtpar ( int  xtkey,
double  val 
)

◆ update() [1/2]

StatusCode CalibData::MdcCalibData::update ( CalibBase1 other,
MsgStream *  log 
)
virtual

Reimplemented from CalibData::CalibBase1.

Definition at line 35 of file MdcCalibData.cxx.

36 {
37 MdcCalibData& other1 = dynamic_cast<MdcCalibData& >(other);
38 std::cout<<"\n"<<"here is the update in the MdcCalConst"<<std::endl;
39 CalibBase1::update(other, log);
40 clear();
41 m_xtmap = other1.m_xtmap;
42 m_t0 = other1.m_t0;
43 m_delt0 = other1.m_delt0;
44 m_qtpar0 = other1.m_qtpar0;
45 m_qtpar1 = other1.m_qtpar1;
46 m_sdmap = other1.m_sdmap;
47 return StatusCode::SUCCESS;
48}
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
Definition: CalibBase1.cxx:33
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ update() [2/2]

virtual StatusCode CalibData::MdcCalibData::update ( CalibBase1 other,
MsgStream *  log 
)
virtual

Reimplemented from CalibData::CalibBase1.


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