1#include "GaudiKernel/MsgStream.h"
10 TofCalibData::TofCalibData(std::vector<bTofCalibBase>* bTofCal,std::vector<bTofCommonCalibBase>* bTofComCal,std::vector<eTofCalibBase>* eTofCal,std::vector<etfCalibBase>* etfCal,std::vector<etfBunchCalibBase>* etfBunchCal,std::vector<tofCalibInfoBase>* tofInfoCal){
12 m_bTofCalibData =
new std::vector<bTofCalibBase>(*bTofCal);
15 m_bTofCommonCalibData =
new std::vector<bTofCommonCalibBase>(*bTofComCal);
18 m_eTofCalibData =
new std::vector<eTofCalibBase>(*eTofCal);
22 m_etfCalibData =
NULL;
23 if( etfCal->size() > 0 ) {
25 m_etfCalibData =
new std::vector<etfCalibBase>(*etfCal);
27 m_hasEtfBunch =
false;
28 m_etfBunchCalibData =
NULL;
29 if( etfBunchCal->size() > 0 ) {
31 m_etfBunchCalibData =
new std::vector<etfBunchCalibBase>(*etfBunchCal);
35 m_tofCalibInfoData =
new std::vector<tofCalibInfoBase>(*tofInfoCal);
39 TofCalibData::TofCalibData(std::vector<bTofCalibBase>* bTofCal,std::vector<bTofCommonCalibBase>* bTofComCal,std::vector<eTofCalibBase>* eTofCal,std::vector<etfCalibBase>* etfCal,std::vector<tofCalibInfoBase>* tofInfoCal){
41 m_bTofCalibData =
new std::vector<bTofCalibBase>(*bTofCal);
44 m_bTofCommonCalibData =
new std::vector<bTofCommonCalibBase>(*bTofComCal);
47 m_eTofCalibData =
new std::vector<eTofCalibBase>(*eTofCal);
51 m_etfCalibData =
NULL;
52 if( etfCal->size() > 0 ) {
54 m_etfCalibData =
new std::vector<etfCalibBase>(*etfCal);
56 m_hasEtfBunch =
false;
57 m_etfBunchCalibData =
NULL;
60 m_tofCalibInfoData =
new std::vector<tofCalibInfoBase>(*tofInfoCal);
64 TofCalibData::TofCalibData(std::vector<bTofCalibBase>* bTofCal,std::vector<bTofCommonCalibBase>* bTofComCal,std::vector<eTofCalibBase>* eTofCal,std::vector<tofCalibInfoBase>* tofInfoCal){
66 m_bTofCalibData =
new std::vector<bTofCalibBase>(*bTofCal);
69 m_bTofCommonCalibData =
new std::vector<bTofCommonCalibBase>(*bTofComCal);
72 m_eTofCalibData =
new std::vector<eTofCalibBase>(*eTofCal);
75 m_tofCalibInfoData =
new std::vector<tofCalibInfoBase>(*tofInfoCal);
78 m_etfCalibData =
NULL;
79 m_hasEtfBunch =
false;
80 m_etfBunchCalibData =
NULL;
86 std::cout<<
"========================================"<<
"\n"<<
"here is the update in the TofCalibData"<<
"\n"<<
"========================================"<<std::endl;
88 delete m_bTofCalibData;
89 m_bTofCalibData =
new std::vector<bTofCalibBase>(*(other1.m_bTofCalibData));
90 delete m_bTofCommonCalibData;
91 m_bTofCommonCalibData =
new std::vector<bTofCommonCalibBase>(*(other1.m_bTofCommonCalibData));
92 delete m_eTofCalibData;
93 m_eTofCalibData =
new std::vector<eTofCalibBase>(*(other1.m_eTofCalibData));
94 delete m_tofCalibInfoData;
95 m_tofCalibInfoData =
new std::vector<tofCalibInfoBase>(*(other1.m_tofCalibInfoData));
97 if( m_etfCalibData ) {
delete m_etfCalibData; }
98 if( other1.m_etfCalibData ) {
99 if( (other1.m_etfCalibData)->size() > 0 ) {
100 m_etfCalibData =
new std::vector<etfCalibBase>(*(other1.m_etfCalibData));
105 m_etfCalibData =
NULL;
109 if( m_etfBunchCalibData ) {
delete m_etfBunchCalibData; }
110 if( other1.m_etfBunchCalibData ) {
111 if( (other1.m_etfBunchCalibData)->size() > 0 ) {
112 m_etfBunchCalibData =
new std::vector<etfBunchCalibBase>(*(other1.m_etfBunchCalibData));
113 m_hasEtfBunch =
true;
117 m_etfBunchCalibData =
NULL;
118 m_hasEtfBunch =
false;
121 return StatusCode::SUCCESS;
126 return m_bTofCalibData->size();
130 std::vector<bTofCalibBase>::iterator it = m_bTofCalibData->begin();
131 for(
int i=0;i!=cnt;i++,it++) {
137 return m_bTofCommonCalibData->size();
141 std::vector<bTofCommonCalibBase>::iterator it = m_bTofCommonCalibData->begin();
142 for(
int i=0;i!=cnt;i++,it++) {
148 return m_eTofCalibData->size();
152 std::vector<eTofCalibBase>::iterator it = m_eTofCalibData->begin();
153 for(
int i=0;i!=cnt;i++,it++) {
159 unsigned int size = 72*12;
161 size = m_etfCalibData->size();
167 std::vector<etfCalibBase>::iterator it = m_etfCalibData->begin();
168 for(
int i=0;i!=cnt;i++) {
169 for(
int j=0;j!=12;j++,it++) {
172 for(
int j=0;j!=strip;j++,it++) {
178 unsigned int size = 0;
179 if( m_hasEtfBunch ) {
180 size = m_etfBunchCalibData->size();
186 std::vector<etfBunchCalibBase>::iterator it = m_etfBunchCalibData->begin();
187 for(
int i=0;i!=cnt;i++,it++) {
193 return m_tofCalibInfoData->size();
197 std::vector<tofCalibInfoBase>::iterator it = m_tofCalibInfoData->begin();
198 for(
int i=0;i!=cnt;i++,it++) {
215 return bTof.
getP1(pardex);
220 return bTof.
getP2(pardex);
300 return eTof.
getP(pardex);
305 return eTof.
getFP(pardex);
309 if( !m_hasEtf ) {
return 1.0; }
315 if( !m_hasEtf ) {
return 1.0; }
317 return etf.
getP(pardex);
321 if( !m_hasEtf ) {
return 1.0; }
323 return etf.
getP1(pardex);
327 if( !m_hasEtf ) {
return 1.0; }
329 return etf.
getP2(pardex);
333 if( !m_hasEtfBunch ) {
return 0.0; }
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
double getETofFP(int index, int pardex)
double getBTofPoffleft_bunch1(int index, int pardex)
unsigned int getEtfBunchSize() const
unsigned int getEtfSize() const
double getBTofPoffleft_bunch3(int index, int pardex)
double getBTofSpeed(int index, int pardex)
double getBTofOffset(int cnt, int pardex)
double getETofP(int index, int pardex)
double getBTofPoffright_bunch3(int index, int pardex)
unsigned int getETofSize() const
double getEtfPBunch(int cnx, int pardex)
unsigned int getTofInfoSize() const
double getBTofSigmaCorr(int cnt, int pardex)
tofCalibInfoBase getTofInfo(int cnt) const
int getBTofComSize() const
double getBTofPoffright_bunch2(int index, int pardex)
int getBrWest(int cnt, int index)
double getBTofFleft(int index, int pardex)
double getBTofPoffright_bunch0(int index, int pardex)
etfCalibBase getEtf(int cnt, int strip) const
eTofCalibBase getETof(int cnt) const
double getBTofPoffright_bunch1(int index, int pardex)
double getEtfSpeed(int index, int strip, int pardex)
double getBTofFright(int index, int pardex)
double getBTofFcounter(int index, int pardex)
int getEventFrom(int cnt)
int getEndcap(int cnt, int index)
double getBTofPoffleft_bunch2(int index, int pardex)
etfBunchCalibBase getEtfBunch(int cnt) const
double getEtfPleft(int index, int strip, int pardex)
double getEtfPcombine(int index, int strip, int pardex)
double getETofAtten(int index, int pardex)
double getBTofAtten(int index, int pardex)
int getBrEast(int cnt, int index)
bTofCommonCalibBase getBTofCom(int cnt) const
virtual StatusCode update(CalibBase1 &other, MsgStream *log)
unsigned int getBTofSize() const
double getBTofPoffleft_bunch0(int index, int pardex)
double getEtfPright(int index, int strip, int pardex)
double getBTofPleft(int index, int pardex)
bTofCalibBase getBTof(int cnt) const
double getETofSpeed(int index, int pardex)
double getBTofPright(int index, int pardex)
double getPoff1_bunch2(int No) const
double getFcounter(int No) const
double getP2(int No) const
double getPoff2_bunch3(int No) const
double getP1(int No) const
double getFleft(int No) const
double getFright(int No) const
double getPoff1_bunch1(int No) const
double getPoff1_bunch3(int No) const
double getAtten(int No) const
double getSpeed(int No) const
double getPoff2_bunch1(int No) const
double getPoff1_bunch0(int No) const
double getPoff2_bunch2(int No) const
double getPoff2_bunch0(int No) const
double getOffset(int No) const
double getSigmaCorr(int No) const
double getSpeed(int No) const
double getAtten(int No) const
double getFP(int No) const
double getP(int No) const
double getPBunch(int No) const
double getP(int No) const
double getP2(int No) const
double getP1(int No) const
double getSpeed(int No) const
int getBrEast(int No) const
int getBrWest(int No) const
int getEndcap(int No) const