BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TofSimData.cxx
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/CalibData/src/Tof/TofSimData.cxx,v 1.2 2010/02/03 00:33:53 huangb Exp $
2
3#include "GaudiKernel/MsgStream.h"
5
6namespace CalibData {
7
8 TofSimData::TofSimData(std::vector<TofSimConstBase>* fTofConst,std::vector<BTofSimBase>* fBTofSim,std::vector<ETofSimBase>* fETofSim) {
9 if(fTofConst) {
10 m_TofSimConstData = new std::vector<TofSimConstBase>(*fTofConst);
11 }
12 if(fBTofSim){
13 m_BTofSimData = new std::vector<BTofSimBase>(*fBTofSim);
14 }
15 if(fETofSim){
16 m_ETofSimData = new std::vector<ETofSimBase>(*fETofSim);
17 }
18 }
19
20 StatusCode TofSimData::update(CalibBase1& other, MsgStream* log) {
21 TofSimData& other1 = dynamic_cast<TofSimData& >(other);
22 std::cout<<"========================================"<<"\n"<<"here is the update in the TofSimData"<<"\n"<<"=================================================="<<std::endl;
23 CalibBase1::update(other, log);
24 delete m_TofSimConstData;
25 m_TofSimConstData = new std::vector<TofSimConstBase>(*(other1.m_TofSimConstData));
26 delete m_BTofSimData;
27 m_BTofSimData = new std::vector<BTofSimBase>(*(other1.m_BTofSimData));
28 delete m_ETofSimData;
29 m_ETofSimData = new std::vector<ETofSimBase>(*(other1.m_ETofSimData));
30
31 return StatusCode::SUCCESS;
32 }
33
34 //get the Simulation Data
35
37 std::vector<TofSimConstBase>::iterator it = m_TofSimConstData->begin();
38 return *it;
39 }
40
42 std::vector<BTofSimBase>::iterator it = m_BTofSimData->begin();
43 for(int i=0;i!=cnt;i++,it++) {}
44 return *it;
45 }
46
48 std::vector<ETofSimBase>::iterator it = m_ETofSimData->begin();
49 for(int i=0;i!=cnt;i++,it++) {}
50 return *it;
51 }
52
54 TofSimConstBase tofConst = getTofConst();
55 return tofConst.getBarLowThres();
56 }
57
59 TofSimConstBase tofConst = getTofConst();
60 return tofConst.getBarHighThres();
61 }
62
64 TofSimConstBase tofConst = getTofConst();
65 return tofConst.getEndLowThres();
66 }
67
69 TofSimConstBase tofConst = getTofConst();
70 return tofConst.getEndHighThres();
71 }
72
74 TofSimConstBase tofConst = getTofConst();
75 return tofConst.getBarPMTGain();
76 }
77
79 TofSimConstBase tofConst = getTofConst();
80 return tofConst.getEndPMTGain();
81 }
82
84 TofSimConstBase tofConst = getTofConst();
85 return tofConst.getBarConstant();
86 }
87
89 TofSimConstBase tofConst = getTofConst();
90 return tofConst.getEndConstant();
91 }
92
94 TofSimConstBase tofConst = getTofConst();
95 return tofConst.getEndNoiseSwitch();
96 }
97
98 double TofSimData::getBarGain(int cnt) {
99 BTofSimBase bTof = getBTofSim(cnt);
100 return bTof.getGain();
101 }
102
103 double TofSimData::getBarRatio(int cnt) {
104 BTofSimBase bTof = getBTofSim(cnt);
105 return bTof.getRatio();
106 }
107
109 BTofSimBase bTof = getBTofSim(cnt);
110 return bTof.getAttenLength();
111 }
112
113 double TofSimData::getEndGain(int cnt) {
114 ETofSimBase eTof = getETofSim(cnt);
115 return eTof.getGain();
116 }
117
119 ETofSimBase eTof = getETofSim(cnt);
120 return eTof.getAttenLength();
121 }
122
124 ETofSimBase eTof = getETofSim(cnt);
125 return eTof.getNoiseSmear();
126 }
127
128}
129
130
double getRatio() const
Definition BTofSimBase.h:21
double getAttenLength() const
Definition BTofSimBase.h:22
double getGain() const
Definition BTofSimBase.h:20
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
double getAttenLength() const
Definition ETofSimBase.h:20
double getNoiseSmear() const
Definition ETofSimBase.h:21
double getGain() const
Definition ETofSimBase.h:19
double getEndGain(int cnt)
double getBarAttenLength(int cnt)
double getEndAttenLength(int cnt)
double getBarRatio(int cnt)
TofSimConstBase getTofConst() const
BTofSimBase getBTofSim(int cnt) const
ETofSimBase getETofSim(int cnt) const
double getEndNoiseSmear(int cnt)
double getBarGain(int cnt)
virtual StatusCode update(CalibBase1 &other, MsgStream *log)