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