BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
TofCalibCheck.cxx
Go to the documentation of this file.
2#include <cmath>
3
4TofCalibCheck::TofCalibCheck( NTuple::Tuple*& tuple ):m_tuple(tuple) {
5 if( !m_tuple ) {
6 std::cerr << " Error: invalid pionter in TofCalibCheck(NTuple::Tuple*) for m_tuple " << std::endl;
7 }
8 else {
9 m_tuple->addItem("run", m_run );
10 m_tuple->addItem("event", m_event );
11 m_tuple->addItem("tofid", m_tofid );
12 m_tuple->addItem("strip", m_strip );
13 m_tuple->addItem("qleft", m_q1 );
14 m_tuple->addItem("qright", m_q2 );
15 m_tuple->addItem("tleft", m_t1 );
16 m_tuple->addItem("tright", m_t2 );
17 m_tuple->addItem("zrhit", m_zrhit );
18 m_tuple->addItem("dt", m_dt );
19 m_tuple->addItem("texp", m_texp );
20 m_tuple->addItem("path", m_path );
21 m_tuple->addItem("phi", m_phi );
22 m_tuple->addItem("theta", m_theta );
23 m_tuple->addItem("p", m_p );
24 m_tuple->addItem("t0", m_t0 );
25 m_tuple->addItem("q0", m_q0 );
26 m_tuple->addItem("hitcase", m_hitcase );
27 }
28}
29
30
32 if( m_tuple ) {
33 RecBTofCalHitCol::iterator iter = bhitcol.begin();
34 for( ; iter!=bhitcol.end(); iter++ ) {
35 if( fabs( (*iter)->dzHit() - 1.0 )>1.0e-6 ) continue;
36 m_run = (*iter)->run();
37 m_event = (*iter)->event();
38 m_tofid = (*iter)->mod();
39 m_strip = -1;
40 m_q1 = (*iter)->adc1();
41 m_q2 = (*iter)->adc2();
42 m_t1 = (*iter)->tdc1();
43 m_t2 = (*iter)->tdc2();
44 m_zrhit = (*iter)->zHit();
45 m_dt = -99.0;
46 m_texp = (*iter)->tpred();
47 m_path = (*iter)->path();
48 m_phi = (*iter)->deltaPhi();
49 m_theta = (*iter)->sinTheta();
50 m_p = (*iter)->p();
51 m_t0 = -99.0;
52 m_q0 = -99.0;
53 m_hitcase = (*iter)->qual();
54 m_tuple->write();
55 }
56 }
57 return;
58}
59
60
62 if( m_tuple ) {
63 RecETofCalHitCol::iterator iter = ehitcol.begin();
64 for( ; iter!=ehitcol.end(); iter++ ) {
65 m_run = (*iter)->run();
66 m_event = (*iter)->event();
67 m_tofid = (*iter)->mod();
68 m_strip = -1;
69 m_q1 = (*iter)->adc();
70 m_q2 = -99.0;
71 m_t1 = (*iter)->tdc();
72 m_t2 = -99.0;
73 m_zrhit = (*iter)->rHit();
74 m_dt = -99.0;
75 m_texp = (*iter)->tpred();
76 m_path = (*iter)->path();
77 m_phi = (*iter)->deltaPhi();
78 m_theta = (*iter)->cosTheta();
79 m_p = (*iter)->p();
80 m_t0 = -99.0;
81 m_q0 = -99.0;
82 m_hitcase = (*iter)->qual();
83 m_tuple->write();
84 }
85 }
86 return;
87}
88
89
91 if( m_tuple ) {
92 RecBTofCalHitCol::iterator iter = bhitcol.begin();
93 for( ; iter!=bhitcol.end(); iter++ ) {
94 if( fabs( (*iter)->dzHit() )>1.0e-6 ) continue;
95 m_run = (*iter)->run();
96 m_event = (*iter)->event();
97 m_tofid = (*iter)->mod();
98 m_strip = (*iter)->sinTheta();
99 m_q1 = (*iter)->adc1();
100 m_q2 = (*iter)->adc2();
101 m_t1 = (*iter)->tdc1();
102 m_t2 = (*iter)->tdc2();
103 m_zrhit = (*iter)->zHit();
104 m_dt = ( (*iter)->tdc2() - (*iter)->tdc1() )/2.0;
105 m_texp = (*iter)->tpred();
106 m_path = (*iter)->path();
107 m_phi = (*iter)->deltaPhi();
108 m_theta = (*iter)->sinTheta();
109 m_p = (*iter)->p();
110 m_t0 = -99.0;
111 m_q0 = -99.0;
112 m_hitcase = (*iter)->qual();
113 m_tuple->write();
114 }
115 }
116 return;
117}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
ObjectVector< RecBTofCalHit > RecBTofCalHitCol
Definition: RecBTofCalHit.h:94
ObjectVector< RecETofCalHit > RecETofCalHitCol
Definition: RecETofCalHit.h:82
void FillEndcapCol(RecETofCalHitCol &)
void FillBarrelCol(RecBTofCalHitCol &)
TofCalibCheck(NTuple::Tuple *&tuple)
void FillEtfCol(RecBTofCalHitCol &)