BOSS 8.0.0
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
2// 00:33:53 huangb Exp $
3
4#include "CalibData/Tof/TofSimData.h"
5#include "GaudiKernel/MsgStream.h"
6
7namespace CalibData {
8
9 TofSimData::TofSimData( std::vector<TofSimConstBase>* fTofConst,
10 std::vector<BTofSimBase>* fBTofSim,
11 std::vector<ETofSimBase>* fETofSim ) {
12 if ( fTofConst ) { m_TofSimConstData = new std::vector<TofSimConstBase>( *fTofConst ); }
13 if ( fBTofSim ) { m_BTofSimData = new std::vector<BTofSimBase>( *fBTofSim ); }
14 if ( fETofSim ) { m_ETofSimData = new std::vector<ETofSimBase>( *fETofSim ); }
15 }
16
17 StatusCode TofSimData::update( CalibBase1& other, MsgStream* log ) {
18 TofSimData& other1 = dynamic_cast<TofSimData&>( other );
19 std::cout << "========================================"
20 << "\n"
21 << "here is the update in the TofSimData"
22 << "\n"
23 << "==================================================" << std::endl;
24 CalibBase1::update( other, log );
25 delete m_TofSimConstData;
26 m_TofSimConstData = new std::vector<TofSimConstBase>( *( other1.m_TofSimConstData ) );
27 delete m_BTofSimData;
28 m_BTofSimData = new std::vector<BTofSimBase>( *( other1.m_BTofSimData ) );
29 delete m_ETofSimData;
30 m_ETofSimData = new std::vector<ETofSimBase>( *( other1.m_ETofSimData ) );
31
32 return StatusCode::SUCCESS;
33 }
34
35 // get the Simulation Data
36
38 std::vector<TofSimConstBase>::iterator it = m_TofSimConstData->begin();
39 return *it;
40 }
41
43 std::vector<BTofSimBase>::iterator it = m_BTofSimData->begin();
44 for ( int i = 0; i != cnt; i++, it++ ) {}
45 return *it;
46 }
47
49 std::vector<ETofSimBase>::iterator it = m_ETofSimData->begin();
50 for ( int i = 0; i != cnt; i++, it++ ) {}
51 return *it;
52 }
53
55 TofSimConstBase tofConst = getTofConst();
56 return tofConst.getBarLowThres();
57 }
58
60 TofSimConstBase tofConst = getTofConst();
61 return tofConst.getBarHighThres();
62 }
63
65 TofSimConstBase tofConst = getTofConst();
66 return tofConst.getEndLowThres();
67 }
68
70 TofSimConstBase tofConst = getTofConst();
71 return tofConst.getEndHighThres();
72 }
73
75 TofSimConstBase tofConst = getTofConst();
76 return tofConst.getBarPMTGain();
77 }
78
80 TofSimConstBase tofConst = getTofConst();
81 return tofConst.getEndPMTGain();
82 }
83
85 TofSimConstBase tofConst = getTofConst();
86 return tofConst.getBarConstant();
87 }
88
90 TofSimConstBase tofConst = getTofConst();
91 return tofConst.getEndConstant();
92 }
93
95 TofSimConstBase tofConst = getTofConst();
96 return tofConst.getEndNoiseSwitch();
97 }
98
99 double TofSimData::getBarGain( int cnt ) {
100 BTofSimBase bTof = getBTofSim( cnt );
101 return bTof.getGain();
102 }
103
104 double TofSimData::getBarRatio( int cnt ) {
105 BTofSimBase bTof = getBTofSim( cnt );
106 return bTof.getRatio();
107 }
108
110 BTofSimBase bTof = getBTofSim( cnt );
111 return bTof.getAttenLength();
112 }
113
114 double TofSimData::getEndGain( int cnt ) {
115 ETofSimBase eTof = getETofSim( cnt );
116 return eTof.getGain();
117 }
118
120 ETofSimBase eTof = getETofSim( cnt );
121 return eTof.getAttenLength();
122 }
123
125 ETofSimBase eTof = getETofSim( cnt );
126 return eTof.getNoiseSmear();
127 }
128
129} // namespace CalibData
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
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)