BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TofCheckDigi Class Reference

#include <TofCheckDigi.h>

Public Member Functions

 TofCheckDigi (NTuple::Tuple *&digi, NTuple::Tuple *&barrel, NTuple::Tuple *&endcap, NTuple::Tuple *&mrpc, NTuple::Tuple *&ext, NTuple::Tuple *&tof, NTuple::Tuple *&bhabha)
 
 ~TofCheckDigi ()
 
void Fill_Barrel (Event::EventHeader &, TofData *&, double, int)
 
void Fill_Endcap (Event::EventHeader &, TofData *&, double, int)
 
void Fill_MRPC (Event::EventHeader &, TofData *&, double, int)
 
void Fill (Event::EventHeader &, RecMdcTrack *&, RecMdcKalTrack *&, RecExtTrack *&)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int, TrigData &)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int, RecMdcKalTrackCol &)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int, RecMdcKalTrackCol &, TofMcHitCol &, McParticleCol &, std::string)
 
void FillCol (Event::EventHeader &, TofDigiCol &, double, int)
 
void FillCol (Event::EventHeader &, TofDataMap &, double, int)
 
void FillCol (Event::EventHeader &, TofDataVector &, double, int)
 
void FillCol (Event::EventHeader &, RecMdcTrackCol &, RecMdcKalTrackCol &, RecExtTrackCol &)
 
void FillCol (Event::EventHeader &, RecExtTrackCol &, RecMdcTrackCol &, RecEmcShowerCol &, RecMdcKalTrackCol &)
 
 TofCheckDigi (NTuple::Tuple *&digi, NTuple::Tuple *&barrel, NTuple::Tuple *&endcap, NTuple::Tuple *&mrpc, NTuple::Tuple *&ext, NTuple::Tuple *&tof, NTuple::Tuple *&bhabha)
 
 ~TofCheckDigi ()
 
void Fill_Barrel (Event::EventHeader &, TofData *&, double, int)
 
void Fill_Endcap (Event::EventHeader &, TofData *&, double, int)
 
void Fill_MRPC (Event::EventHeader &, TofData *&, double, int)
 
void Fill (Event::EventHeader &, RecMdcTrack *&, RecMdcKalTrack *&, RecExtTrack *&)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int, TrigData &)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int, RecMdcKalTrackCol &)
 
void Fill_TofTrack (Event::EventHeader &, TofTrack *&, double, int, RecMdcKalTrackCol &, TofMcHitCol &, McParticleCol &, std::string)
 
void FillCol (Event::EventHeader &, TofDigiCol &, double, int)
 
void FillCol (Event::EventHeader &, TofDataMap &, double, int)
 
void FillCol (Event::EventHeader &, TofDataVector &, double, int)
 
void FillCol (Event::EventHeader &, RecMdcTrackCol &, RecMdcKalTrackCol &, RecExtTrackCol &)
 
void FillCol (Event::EventHeader &, RecExtTrackCol &, RecMdcTrackCol &, RecEmcShowerCol &, RecMdcKalTrackCol &)
 

Detailed Description

Constructor & Destructor Documentation

◆ TofCheckDigi() [1/2]

TofCheckDigi::TofCheckDigi ( NTuple::Tuple *&  digi,
NTuple::Tuple *&  barrel,
NTuple::Tuple *&  endcap,
NTuple::Tuple *&  mrpc,
NTuple::Tuple *&  ext,
NTuple::Tuple *&  tof,
NTuple::Tuple *&  bhabha 
)

Definition at line 14 of file TofCheckDigi.cxx.

14 :digi_tuple(digi),barrel_tuple(barrel),endcap_tuple(endcap),mrpc_tuple(mrpc),ext_tuple(ext),tof_tuple(tof),bb_tuple(bhabha) {
15 if(!digi_tuple) {
16 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for digi_tuple "<<std::endl;
17 }
18 else{
19 digi_tuple->addItem("run", digi_run );
20 digi_tuple->addItem("event", digi_event );
21 digi_tuple->addItem("barrel", digi_barrel );
22 digi_tuple->addItem("endcap", digi_endcap );
23 digi_tuple->addItem("layer", digi_layer );
24 digi_tuple->addItem("tofid", digi_tofId );
25 digi_tuple->addItem("strip", digi_strip );
26 digi_tuple->addItem("end", digi_end );
27 digi_tuple->addItem("adc", digi_adc );
28 digi_tuple->addItem("tdc", digi_tdc );
29 digi_tuple->addItem("qclock", digi_qclock );
30 digi_tuple->addItem("tclock", digi_tclock );
31 digi_tuple->addItem("over", digi_overflow );
32 digi_tuple->addItem("noq", digi_noq );
33 digi_tuple->addItem("not", digi_not );
34 digi_tuple->addItem("multiq", digi_multiq );
35 digi_tuple->addItem("multit", digi_multit );
36 digi_tuple->addItem("overq", digi_overq );
37 digi_tuple->addItem("overt", digi_overt );
38 digi_tuple->addItem("t0", digi_t0 );
39 digi_tuple->addItem("t0stat", digi_t0stat );
40 digi_tuple->addItem("crate", digi_crate );
41 digi_tuple->addItem("geo", digi_geo );
42 digi_tuple->addItem("tdcnum", digi_tdcnum );
43 digi_tuple->addItem("err", digi_err );
44 }
45
46 if(!barrel_tuple) {
47 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for barrel_tuple "<<std::endl;
48 }
49 else{
50 barrel_tuple->addItem("run", barrel_run );
51 barrel_tuple->addItem("event", barrel_event );
52 barrel_tuple->addItem("tofid", barrel_tofId );
53 barrel_tuple->addItem("icluster", barrel_tofTrackId );
54 barrel_tuple->addItem("layer", barrel_layer );
55 barrel_tuple->addItem("qch1", barrel_qchannel1 );
56 barrel_tuple->addItem("tch1", barrel_tchannel1 );
57 barrel_tuple->addItem("qch2", barrel_qchannel2 );
58 barrel_tuple->addItem("tch2", barrel_tchannel2 );
59 barrel_tuple->addItem("qtc1", barrel_qtc1 );
60 barrel_tuple->addItem("adc1", barrel_adc1 );
61 barrel_tuple->addItem("tdc1", barrel_tdc1 );
62 barrel_tuple->addItem("qtc2", barrel_qtc2 );
63 barrel_tuple->addItem("adc2", barrel_adc2 );
64 barrel_tuple->addItem("tdc2", barrel_tdc2 );
65 barrel_tuple->addItem("qclock1", barrel_qclock1 );
66 barrel_tuple->addItem("tclock1", barrel_tclock1 );
67 barrel_tuple->addItem("qclock2", barrel_qclock2 );
68 barrel_tuple->addItem("tclock2", barrel_tclock2 );
69 barrel_tuple->addItem("qual", barrel_quality );
70 barrel_tuple->addItem("tmatched", barrel_tmatched );
71 barrel_tuple->addItem("qtimes1", barrel_qtimes1 );
72 barrel_tuple->addItem("ttimes1", barrel_ttimes1 );
73 barrel_tuple->addItem("qtimes2", barrel_qtimes2 );
74 barrel_tuple->addItem("ttimes2", barrel_ttimes2 );
75 barrel_tuple->addItem("times1", barrel_times1 );
76 barrel_tuple->addItem("times2", barrel_times2 );
77 barrel_tuple->addItem("times", barrel_times );
78 barrel_tuple->addItem("qnum1", barrel_qnum1 );
79 barrel_tuple->addItem("tnum1", barrel_tnum1 );
80 barrel_tuple->addItem("qnum2", barrel_qnum2 );
81 barrel_tuple->addItem("tnum2", barrel_tnum2 );
82 barrel_tuple->addItem("tsum", barrel_tsum );
83 barrel_tuple->addItem("tsub", barrel_tsub );
84 barrel_tuple->addItem("ztdc", barrel_ztdc );
85 barrel_tuple->addItem("zadc", barrel_zadc );
86 barrel_tuple->addItem("t0", barrel_t0 );
87 barrel_tuple->addItem("t0stat", barrel_t0stat );
88 }
89
90 if(!endcap_tuple) {
91 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for endcap_tuple "<<std::endl;
92 }
93 else{
94 endcap_tuple->addItem("run", endcap_run );
95 endcap_tuple->addItem("event", endcap_event );
96 endcap_tuple->addItem("tofid", endcap_tofId );
97 endcap_tuple->addItem("icluster", endcap_tofTrackId );
98 endcap_tuple->addItem("qch", endcap_qchannel );
99 endcap_tuple->addItem("tch", endcap_tchannel );
100 endcap_tuple->addItem("qtc", endcap_qtc );
101 endcap_tuple->addItem("adc", endcap_adc );
102 endcap_tuple->addItem("tdc", endcap_tdc );
103 endcap_tuple->addItem("qual", endcap_quality );
104 endcap_tuple->addItem("qclock", endcap_qclock );
105 endcap_tuple->addItem("tclock", endcap_tclock );
106 endcap_tuple->addItem("qtimes", endcap_qtimes );
107 endcap_tuple->addItem("ttimes", endcap_ttimes );
108 endcap_tuple->addItem("times", endcap_times );
109 endcap_tuple->addItem("qnum", endcap_qnum );
110 endcap_tuple->addItem("tnum", endcap_tnum );
111 endcap_tuple->addItem("t0", endcap_t0 );
112 endcap_tuple->addItem("t0stat", endcap_t0stat );
113 }
114
115 if(!mrpc_tuple) {
116 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for mrpc_tuple "<<std::endl;
117 }
118 else{
119 mrpc_tuple->addItem("run", mrpc_run );
120 mrpc_tuple->addItem("event", mrpc_event );
121 mrpc_tuple->addItem("tofid", mrpc_tofId );
122 mrpc_tuple->addItem("strip", mrpc_strip );
123 mrpc_tuple->addItem("icluster", mrpc_tofTrackId );
124 mrpc_tuple->addItem("ttch1", mrpc_ttch1 );
125 mrpc_tuple->addItem("tlch1", mrpc_tlch1 );
126 mrpc_tuple->addItem("ttch2", mrpc_ttch2 );
127 mrpc_tuple->addItem("tlch2", mrpc_tlch2 );
128 mrpc_tuple->addItem("tt1", mrpc_tt1 );
129 mrpc_tuple->addItem("tl1", mrpc_tl1 );
130 mrpc_tuple->addItem("tt2", mrpc_tt2 );
131 mrpc_tuple->addItem("tl2", mrpc_tl2 );
132 mrpc_tuple->addItem("tot1", mrpc_tot1 );
133 mrpc_tuple->addItem("tot2", mrpc_tot2 );
134 mrpc_tuple->addItem("qual", mrpc_quality );
135 mrpc_tuple->addItem("tmatched", mrpc_tmatched );
136 mrpc_tuple->addItem("tttimes1", mrpc_tttimes1 );
137 mrpc_tuple->addItem("tltimes1", mrpc_tltimes1 );
138 mrpc_tuple->addItem("tttimes2", mrpc_tttimes2 );
139 mrpc_tuple->addItem("tltimes2", mrpc_tltimes2 );
140 mrpc_tuple->addItem("times1", mrpc_times1 );
141 mrpc_tuple->addItem("times2", mrpc_times2 );
142 mrpc_tuple->addItem("times", mrpc_times );
143 mrpc_tuple->addItem("ttnum1", mrpc_ttnum1 );
144 mrpc_tuple->addItem("tlnum1", mrpc_tlnum1 );
145 mrpc_tuple->addItem("ttnum2", mrpc_ttnum2 );
146 mrpc_tuple->addItem("tlnum2", mrpc_tlnum2 );
147 mrpc_tuple->addItem("tsum", mrpc_tsum );
148 mrpc_tuple->addItem("tsub", mrpc_tsub );
149 mrpc_tuple->addItem("ztdc", mrpc_ztdc );
150 mrpc_tuple->addItem("zadc", mrpc_zadc );
151 mrpc_tuple->addItem("t0", mrpc_t0 );
152 mrpc_tuple->addItem("t0stat", mrpc_t0stat );
153 }
154
155 if(!ext_tuple) {
156 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for ext_tple"<<std::endl;
157 }
158 else{
159 ext_tuple->addItem("run", ext_run );
160 ext_tuple->addItem("event", ext_event );
161 ext_tuple->addItem("track", ext_trackid );
162 ext_tuple->addItem("costheta", ext_costheta );
163 ext_tuple->addItem("kal", 5, ext_kalman );
164 ext_tuple->addItem("x1", 5, ext_x1 );
165 ext_tuple->addItem("x2", 5, ext_x2 );
166 ext_tuple->addItem("y1", 5, ext_y1 );
167 ext_tuple->addItem("y2", 5, ext_y2 );
168 ext_tuple->addItem("z1", 5, ext_z1 );
169 ext_tuple->addItem("z2", 5, ext_z2 );
170 ext_tuple->addItem("tofid1", 5, ext_tofid1 );
171 ext_tuple->addItem("tofid2", 5, ext_tofid2 );
172 ext_tuple->addItem("strip1", 5, ext_strip1 );
173 ext_tuple->addItem("strip2", 5, ext_strip2 );
174 ext_tuple->addItem("texp1", 5, ext_texp1 );
175 ext_tuple->addItem("texp2", 5, ext_texp2 );
176 ext_tuple->addItem("p", ext_p );
177 ext_tuple->addItem("path1", 5, ext_path1 );
178 ext_tuple->addItem("path2", 5, ext_path2 );
179 ext_tuple->addItem("zrhit1", 5, ext_zrhit1 );
180 ext_tuple->addItem("zrhit2", 5, ext_zrhit2 );
181 ext_tuple->addItem("errzr1", 5, ext_errzr1 );
182 ext_tuple->addItem("errzr2", 5, ext_errzr2 );
183 ext_tuple->addItem("cost1", 5, ext_theta1 );
184 ext_tuple->addItem("cost2", 5, ext_theta2 );
185 ext_tuple->addItem("phi1", 5, ext_phi1 );
186 ext_tuple->addItem("phi2", 5, ext_phi2 );
187 ext_tuple->addItem("hitcase1", 5, ext_hitcase1 );
188 ext_tuple->addItem("hitcase2", 5, ext_hitcase2 );
189 ext_tuple->addItem("hitcase", 5, ext_hitcase );
190 ext_tuple->addItem("qual", 5, ext_quality );
191 }
192
193 if(!tof_tuple) {
194 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for tof_tple"<<std::endl;
195 }
196 else{
197 tof_tuple->addItem("run", tof_run );
198 tof_tuple->addItem("event", tof_event );
199 tof_tuple->addItem("toftrack", tof_toftrackid );
200 tof_tuple->addItem("track", tof_trackid );
201 tof_tuple->addItem("charge", tof_charge );
202 tof_tuple->addItem("pt", 5, tof_pt );
203 tof_tuple->addItem("p", 5, tof_p );
204 tof_tuple->addItem("id1", tof_id1 );
205 tof_tuple->addItem("id2", tof_id2 );
206 tof_tuple->addItem("istrip1", tof_istrip1 );
207 tof_tuple->addItem("istrip2", tof_istrip2 );
208 tof_tuple->addItem("dstrip1", tof_dstrip1 );
209 tof_tuple->addItem("dstrip2", tof_dstrip2 );
210 tof_tuple->addItem("barrel", tof_barrel );
211 tof_tuple->addItem("hitcase", tof_hitcase );
212 tof_tuple->addItem("mom", tof_momentum );
213 tof_tuple->addItem("path1", tof_path1 );
214 tof_tuple->addItem("path2", tof_path2 );
215 tof_tuple->addItem("zrhit1", tof_zrhit1 );
216 tof_tuple->addItem("zrhit2", tof_zrhit2 );
217 tof_tuple->addItem("errzr1", tof_errzr1 );
218 tof_tuple->addItem("errzr2", tof_errzr2 );
219 tof_tuple->addItem("xhit1", tof_xhit1 );
220 tof_tuple->addItem("yhit1", tof_yhit1 );
221 tof_tuple->addItem("xhit2", tof_xhit2 );
222 tof_tuple->addItem("yhit2", tof_yhit2 );
223 tof_tuple->addItem("kal", 5, tof_kal );
224 tof_tuple->addItem("zr1", 5, tof_zr1 );
225 tof_tuple->addItem("zr2", 5, tof_zr2 );
226 tof_tuple->addItem("ztdc1", tof_ztdc1 );
227 tof_tuple->addItem("ztdc2", tof_ztdc2 );
228 tof_tuple->addItem("zadc1", tof_zadc1 );
229 tof_tuple->addItem("zadc2", tof_zadc2 );
230 tof_tuple->addItem("zt1", tof_zt1 );
231 tof_tuple->addItem("zt2", tof_zt2 );
232 tof_tuple->addItem("zt3", tof_zt3 );
233 tof_tuple->addItem("zt4", tof_zt4 );
234 tof_tuple->addItem("zq1", tof_zq1 );
235 tof_tuple->addItem("zq2", tof_zq2 );
236 tof_tuple->addItem("zq3", tof_zq3 );
237 tof_tuple->addItem("zq4", tof_zq4 );
238 tof_tuple->addItem("size1", tof_size1 );
239 tof_tuple->addItem("size2", tof_size2 );
240 tof_tuple->addItem("size3", tof_size3 );
241 tof_tuple->addItem("size4", tof_size4 );
242 tof_tuple->addItem("theta1", tof_theta1 );
243 tof_tuple->addItem("theta2", tof_theta2 );
244 tof_tuple->addItem("phi1", tof_phi1 );
245 tof_tuple->addItem("phi2", tof_phi2 );
246 tof_tuple->addItem("qual1", tof_quality1 );
247 tof_tuple->addItem("qual2", tof_quality2 );
248 tof_tuple->addItem("qual", tof_quality );
249 tof_tuple->addItem("change", tof_changed );
250 tof_tuple->addItem("tofid1", tof_tofid1 );
251 tof_tuple->addItem("tofid2", tof_tofid2 );
252 tof_tuple->addItem("strip1", tof_strip1 );
253 tof_tuple->addItem("strip2", tof_strip2 );
254 tof_tuple->addItem("board1", tof_board1 );
255 tof_tuple->addItem("board2", tof_board2 );
256 tof_tuple->addItem("crate1", tof_crate1 );
257 tof_tuple->addItem("crate2", tof_crate2 );
258 tof_tuple->addItem("fee1", tof_fee1 );
259 tof_tuple->addItem("fee2", tof_fee2 );
260 tof_tuple->addItem("channel1", tof_channel1 );
261 tof_tuple->addItem("channel2", tof_channel2 );
262 tof_tuple->addItem("channel3", tof_channel3 );
263 tof_tuple->addItem("channel4", tof_channel4 );
264 tof_tuple->addItem("ph11", tof_ph11 );
265 tof_tuple->addItem("ph12", tof_ph12 );
266 tof_tuple->addItem("ph21", tof_ph21 );
267 tof_tuple->addItem("ph22", tof_ph22 );
268 tof_tuple->addItem("ph1", tof_ph1 );
269 tof_tuple->addItem("ph2", tof_ph2 );
270 tof_tuple->addItem("ph", tof_ph );
271 tof_tuple->addItem("tofe11", tof_tofe11 );
272 tof_tuple->addItem("tofe12", tof_tofe12 );
273 tof_tuple->addItem("tofe21", tof_tofe21 );
274 tof_tuple->addItem("tofe22", tof_tofe22 );
275 tof_tuple->addItem("tofe1", tof_tofe1 );
276 tof_tuple->addItem("tofe2", tof_tofe2 );
277 tof_tuple->addItem("tofe", tof_tofe );
278 tof_tuple->addItem("tofmu11", tof_tofmu11 );
279 tof_tuple->addItem("tofmu12", tof_tofmu12 );
280 tof_tuple->addItem("tofmu21", tof_tofmu21 );
281 tof_tuple->addItem("tofmu22", tof_tofmu22 );
282 tof_tuple->addItem("tofmu1", tof_tofmu1 );
283 tof_tuple->addItem("tofmu2", tof_tofmu2 );
284 tof_tuple->addItem("tofmu", tof_tofmu );
285 tof_tuple->addItem("tofpi11", tof_tofpi11 );
286 tof_tuple->addItem("tofpi12", tof_tofpi12 );
287 tof_tuple->addItem("tofpi21", tof_tofpi21 );
288 tof_tuple->addItem("tofpi22", tof_tofpi22 );
289 tof_tuple->addItem("tofpi1", tof_tofpi1 );
290 tof_tuple->addItem("tofpi2", tof_tofpi2 );
291 tof_tuple->addItem("tofpi", tof_tofpi );
292 tof_tuple->addItem("tofk11", tof_tofk11 );
293 tof_tuple->addItem("tofk12", tof_tofk12 );
294 tof_tuple->addItem("tofk21", tof_tofk21 );
295 tof_tuple->addItem("tofk22", tof_tofk22 );
296 tof_tuple->addItem("tofk1", tof_tofk1 );
297 tof_tuple->addItem("tofk2", tof_tofk2 );
298 tof_tuple->addItem("tofk", tof_tofk );
299 tof_tuple->addItem("tofp11", tof_tofp11 );
300 tof_tuple->addItem("tofp12", tof_tofp12 );
301 tof_tuple->addItem("tofp21", tof_tofp21 );
302 tof_tuple->addItem("tofp22", tof_tofp22 );
303 tof_tuple->addItem("tofp1", tof_tofp1 );
304 tof_tuple->addItem("tofp2", tof_tofp2 );
305 tof_tuple->addItem("tofp", tof_tofp );
306 tof_tuple->addItem("qch1", tof_qch1 );
307 tof_tuple->addItem("qch2", tof_qch2 );
308 tof_tuple->addItem("qch3", tof_qch3 );
309 tof_tuple->addItem("qch4", tof_qch4 );
310 tof_tuple->addItem("adc1", tof_adc1 );
311 tof_tuple->addItem("adc2", tof_adc2 );
312 tof_tuple->addItem("adc3", tof_adc3 );
313 tof_tuple->addItem("adc4", tof_adc4 );
314 tof_tuple->addItem("tdc1", tof_tdc1 );
315 tof_tuple->addItem("tdc2", tof_tdc2 );
316 tof_tuple->addItem("tdc3", tof_tdc3 );
317 tof_tuple->addItem("tdc4", tof_tdc4 );
318 tof_tuple->addItem("texpe1", tof_texpe1 );
319 tof_tuple->addItem("texpmu1", tof_texpmu1 );
320 tof_tuple->addItem("texppi1", tof_texppi1 );
321 tof_tuple->addItem("texpk1", tof_texpk1 );
322 tof_tuple->addItem("texpp1", tof_texpp1 );
323 tof_tuple->addItem("texpe2", tof_texpe2 );
324 tof_tuple->addItem("texpmu2", tof_texpmu2 );
325 tof_tuple->addItem("texppi2", tof_texppi2 );
326 tof_tuple->addItem("texpk2", tof_texpk2 );
327 tof_tuple->addItem("texpp2", tof_texpp2 );
328 tof_tuple->addItem("texpe", tof_texpe );
329 tof_tuple->addItem("texpmu", tof_texpmu );
330 tof_tuple->addItem("texppi", tof_texppi );
331 tof_tuple->addItem("texpk", tof_texpk );
332 tof_tuple->addItem("texpp", tof_texpp );
333 tof_tuple->addItem("tdiff1", tof_tdiff1 );
334 tof_tuple->addItem("tdiff2", tof_tdiff2 );
335 tof_tuple->addItem("trig", tof_trig );
336 tof_tuple->addItem("t0", tof_estime );
337 tof_tuple->addItem("t0stat", tof_t0stat );
338 tof_tuple->addItem("mctrkid", tof_mctrkid );
339 tof_tuple->addItem("mcp", tof_mcp );
340 tof_tuple->addItem("mctofp", tof_mctofp );
341 tof_tuple->addItem("mczrhit", tof_mczrhit );
342 tof_tuple->addItem("mcpath", tof_mcpath );
343 tof_tuple->addItem("mctexp", tof_mctexp );
344 }
345
346 if(!bb_tuple) {
347 std::cerr<<" Error: invalid pionter in TofCheckDigi(NTuple::Tuple*) for bb_tple"<<std::endl;
348 }
349 else{
350 bb_tuple->addItem("run", bb_run );
351 bb_tuple->addItem("event", bb_event );
352 bb_tuple->addItem("trksize", bb_trksize );
353 bb_tuple->addItem("mdcsize", bb_mdcsize );
354 bb_tuple->addItem("emcsize", bb_emcsize );
355 bb_tuple->addItem("trk1", bb_trk1 );
356 bb_tuple->addItem("pmdc1", bb_pmdc1 );
357 bb_tuple->addItem("ptmdc1", bb_ptmdc1 );
358 bb_tuple->addItem("theta1", bb_theta1 );
359 bb_tuple->addItem("phi1", bb_phi1 );
360 bb_tuple->addItem("x1", bb_x1 );
361 bb_tuple->addItem("y1", bb_y1 );
362 bb_tuple->addItem("z1", bb_z1 );
363 bb_tuple->addItem("r1", bb_r1 );
364 bb_tuple->addItem("charge1", bb_charge1 );
365 bb_tuple->addItem("chi1", bb_chi1 );
366 bb_tuple->addItem("ndof1", bb_ndof1 );
367 bb_tuple->addItem("layer1", bb_layer1 );
368 bb_tuple->addItem("trk2", bb_trk2 );
369 bb_tuple->addItem("pmdc2", bb_pmdc2 );
370 bb_tuple->addItem("ptmdc2", bb_ptmdc2 );
371 bb_tuple->addItem("theta2", bb_theta2 );
372 bb_tuple->addItem("phi2", bb_phi2 );
373 bb_tuple->addItem("x2", bb_x2 );
374 bb_tuple->addItem("y2", bb_y2 );
375 bb_tuple->addItem("z2", bb_z2 );
376 bb_tuple->addItem("r2", bb_r2 );
377 bb_tuple->addItem("charge2", bb_charge2 );
378 bb_tuple->addItem("chi2", bb_chi2 );
379 bb_tuple->addItem("ndof2", bb_ndof2 );
380 bb_tuple->addItem("layer2", bb_layer2 );
381 bb_tuple->addItem("dang", bb_dang );
382 bb_tuple->addItem("dphi", bb_dphi );
383 bb_tuple->addItem("pe1", bb_pe1 );
384 bb_tuple->addItem("pte1", bb_pte1 );
385 bb_tuple->addItem("pe2", bb_pe2 );
386 bb_tuple->addItem("pte2", bb_pte2 );
387 bb_tuple->addItem("pmu1", bb_pmu1 );
388 bb_tuple->addItem("ptmu1", bb_ptmu1 );
389 bb_tuple->addItem("pmu2", bb_pmu2 );
390 bb_tuple->addItem("ptmu2", bb_ptmu2 );
391 bb_tuple->addItem("extx1", bb_extx1 );
392 bb_tuple->addItem("exty1", bb_exty1 );
393 bb_tuple->addItem("extz1", bb_extz1 );
394 bb_tuple->addItem("extx2", bb_extx2 );
395 bb_tuple->addItem("exty2", bb_exty2 );
396 bb_tuple->addItem("extz2", bb_extz2 );
397 bb_tuple->addItem("emctrk1", bb_emctrk1 );
398 bb_tuple->addItem("emcx1", bb_emcx1 );
399 bb_tuple->addItem("emcy1", bb_emcy1 );
400 bb_tuple->addItem("emcz1", bb_emcz1 );
401 bb_tuple->addItem("e1", bb_e1 );
402 bb_tuple->addItem("th1", bb_th1 );
403 bb_tuple->addItem("ph1", bb_ph1 );
404 bb_tuple->addItem("emctrk2", bb_emctrk2 );
405 bb_tuple->addItem("emcx2", bb_emcx2 );
406 bb_tuple->addItem("emcy2", bb_emcy2 );
407 bb_tuple->addItem("emcz2", bb_emcz2 );
408 bb_tuple->addItem("e2", bb_e2 );
409 bb_tuple->addItem("th2", bb_th2 );
410 bb_tuple->addItem("ph2", bb_ph2 );
411 bb_tuple->addItem("dr1", bb_dr1 );
412 bb_tuple->addItem("drxy1", bb_drxy1 );
413 bb_tuple->addItem("dz1", bb_dz1 );
414 bb_tuple->addItem("dr2", bb_dr2 );
415 bb_tuple->addItem("drxy2", bb_drxy2 );
416 bb_tuple->addItem("dz2", bb_dz2 );
417 bb_tuple->addItem("etot", bb_etot );
418 }
419
420 return;
421}

◆ ~TofCheckDigi() [1/2]

TofCheckDigi::~TofCheckDigi ( )
inline

Definition at line 24 of file InstallArea/include/TofRec/TofRec/TofCheckDigi.h.

24{}

◆ TofCheckDigi() [2/2]

TofCheckDigi::TofCheckDigi ( NTuple::Tuple *&  digi,
NTuple::Tuple *&  barrel,
NTuple::Tuple *&  endcap,
NTuple::Tuple *&  mrpc,
NTuple::Tuple *&  ext,
NTuple::Tuple *&  tof,
NTuple::Tuple *&  bhabha 
)

◆ ~TofCheckDigi() [2/2]

TofCheckDigi::~TofCheckDigi ( )
inline

Member Function Documentation

◆ Fill() [1/2]

void TofCheckDigi::Fill ( Event::EventHeader eventHeader,
RecMdcTrack *&  mdcTrack,
RecMdcKalTrack *&  mdcKalTrack,
RecExtTrack *&  extTrack 
)

Definition at line 653 of file TofCheckDigi.cxx.

653 {
654
655 ext_run = eventHeader.runNumber();
656 ext_event = eventHeader.eventNumber();
657 ext_trackid = extTrack->trackId();
658 ext_p = mdcTrack->p();
659 ext_costheta= cos( mdcTrack->theta() );
660
661 int hitcase1[5], hitcase2[5], hitcase[5];
662 int tofId1[5], tofId2[5];
663
664 for( unsigned int i=0; i<5; i++ ) {
665
666 ext_tofid1[i] = -9;
667 ext_tofid2[i] = -9;
668 ext_strip1[i] = -9;
669 ext_strip2[i] = -9;
670 ext_zrhit1[i] = -99.;
671 ext_zrhit2[i] = -99.;
672 ext_x1[i] = -999.;
673 ext_x2[i] = -999.;
674 ext_y1[i] = -999.;
675 ext_y2[i] = -999.;
676 ext_z1[i] = -999.;
677 ext_z2[i] = -999.;
678
679 hitcase1[i] = 7;
680 hitcase2[i] = 7;
681 hitcase[i] = 7;
682
683 ext_kalman[i] = mdcKalTrack->getStat( 1, i );
684 ext_x1[i] = (extTrack->tof1Position(i)).x();
685 ext_x2[i] = (extTrack->tof2Position(i)).x();
686 ext_y1[i] = (extTrack->tof1Position(i)).y();
687 ext_y2[i] = (extTrack->tof2Position(i)).y();
688 ext_z1[i] = (extTrack->tof1Position(i)).z();
689 ext_z2[i] = (extTrack->tof2Position(i)).z();
690
691 tofId1[i] = extTrack->tof1VolumeNumber( i );
692 tofId2[i] = extTrack->tof2VolumeNumber( i );
693
694 if( tofId1[i]>=0 && tofId1[i]<=87 ) {
695 ext_tofid1[i] = tofId1[i];
696 hitcase1[i] = 0;
697 }
698 else if( tofId1[i]>=176 && tofId1[i]<=223 ) {
699 ext_tofid1[i] = tofId1[i] - 176 + 48;
700 hitcase1[i] = 4;
701 }
702 else if( tofId1[i]>=224 && tofId1[i]<=271 ) {
703 ext_tofid1[i] = tofId1[i] - 176 - 48;
704 hitcase1[i] = 3;
705 }
706 else if( tofId1[i]>=272 && tofId1[i]<=1135 ) {
707 int module = tofId1[i] - 176 - 96;
708 ext_strip1[i] = module%12;
709 ext_tofid1[i] = module/12;
710 if( tofId1[i]>=272 && tofId1[i]<=703 ) {
711 hitcase1[i] = 5;
712 }
713 else if( tofId1[i]>=704 && tofId1[i]<=1135 ) {
714 hitcase1[i] = 6;
715 }
716 }
717
718 if( tofId2[i]>=88 && tofId2[i]<=175 ) {
719 ext_tofid2[i] = tofId2[i];
720 hitcase2[i] = 1;
721 }
722 else if( tofId2[i]>=272 && tofId2[i]<=1135 ) {
723 int module = tofId2[i] - 176 - 96;
724 ext_strip2[i] = module%12;
725 ext_tofid2[i] = module/12;
726 if( tofId2[i]>=272 && tofId2[i]<=703 ) {
727 hitcase2[i] = 5;
728 }
729 else if( tofId2[i]>=704 && tofId2[i]<=1135 ) {
730 hitcase2[i] = 6;
731 }
732 }
733
734 /*
735 ext_p[i] = extTrack->tof1Momentum( i ).r();
736 if( tofId1[i]<0 ) {
737 ext_p[i] = extTrack->tof2Momentum( i ).r();
738 }
739 */
740
741 if( ( hitcase1[i] == 0 ) || ( hitcase1[i] == 2 ) ) {
742 ext_texp1[i] = extTrack->tof1( i );
743 ext_path1[i] = extTrack->tof1Path( i );
744 ext_zrhit1[i] = extTrack->tof1Position( i ).z();
745 ext_errzr1[i] = extTrack->tof1PosSigmaAlongZ( i );
746 ext_theta1[i] = extTrack->tof1Momentum( i ).rho()/extTrack->tof1Momentum( i ).r();
747 ext_phi1[i] = extTrack->tof1Position( i ).phi();
748 }
749 else if( ( hitcase1[i] == 3 ) || ( hitcase1[i] == 4 ) ) {
750 ext_texp1[i] = extTrack->tof1( i );
751 ext_path1[i] = extTrack->tof1Path( i );
752 ext_zrhit1[i] = extTrack->tof1Position( i ).rho();
753 ext_errzr1[i] = sqrt( extTrack->tof1PosSigmaAlongX( i )*extTrack->tof1PosSigmaAlongX( i ) + extTrack->tof1PosSigmaAlongY( i )*extTrack->tof1PosSigmaAlongY( i ) );
754 ext_theta1[i] = extTrack->tof1Momentum( i ).z()/extTrack->tof1Momentum( i ).r();
755 ext_phi1[i] = extTrack->tof1Position( i ).phi();
756 }
757 else if( ( hitcase1[i] == 5 ) || ( hitcase1[i] == 6 ) ) {
758 ext_texp1[i] = extTrack->tof1( i );
759 ext_path1[i] = extTrack->tof1Path( i );
760 ext_zrhit1[i] = extTrack->tof1Position( i ).x();
761 ext_errzr1[i] = extTrack->tof1PosSigmaAlongX( i );
762 ext_theta1[i] = extTrack->tof1Momentum( i ).z()/extTrack->tof1Momentum( i ).r();
763 ext_phi1[i] = extTrack->tof1Position( i ).phi();
764 }
765
766 if( ( hitcase2[i] == 5 ) || ( hitcase2[i] == 6 ) ) {
767 ext_texp2[i] = extTrack->tof2( i );
768 ext_path2[i] = extTrack->tof2Path( i );
769 ext_zrhit2[i] = extTrack->tof2Position( i ).x();
770 ext_errzr2[i] = extTrack->tof2PosSigmaAlongX( i );
771 ext_theta1[i] = extTrack->tof2Momentum( i ).z()/extTrack->tof1Momentum( i ).r();
772 ext_phi2[i] = extTrack->tof2Position( i ).phi();
773 }
774 else if( hitcase2[i] == 1 ) {
775 ext_texp2[i] = extTrack->tof2( i );
776 ext_path2[i] = extTrack->tof2Path( i );
777 ext_zrhit2[i] = extTrack->tof2Position( i ).z();
778 ext_errzr2[i] = extTrack->tof2PosSigmaAlongZ( i );
779 ext_theta2[i] = extTrack->tof2Momentum( i ).rho()/extTrack->tof2Momentum( i ).r();
780 ext_phi2[i] = extTrack->tof2Position( i ).phi();
781 }
782
783 if( ( hitcase1[i] == 7 ) && ( hitcase2[i] == 7 ) ) { ext_quality[i] = 3; }
784 else { ext_quality[i] = 0; }
785
786 if( hitcase1[i] == 0 ) {
787 if( hitcase2[i] == 1 ) { hitcase[i] = 2; }
788 else if( hitcase2[i] == 7 ) { hitcase[i] = 0; }
789 }
790 else if( ( hitcase1[i] == 3 ) || ( hitcase1[i] == 4 ) ) {
791 if( hitcase2[i] == 7 ) { hitcase[i] == hitcase1[i]; }
792 }
793 else if( ( hitcase1[i] == 5 ) || ( hitcase1[i] == 6 ) ) {
794 if( hitcase2[i] == 7 ) { hitcase[i] == hitcase1[i]; }
795 }
796
797 if( hitcase2[i] == 1 ) {
798 if( hitcase1[i] == 7 ) { hitcase[i] = 1; }
799 }
800 else if( ( hitcase2[i] == 5 ) || ( hitcase2[i] == 6 ) ) {
801 if( hitcase1[i] == 7 ) { hitcase[i] == hitcase2[i]; }
802 else if( hitcase1[i] == hitcase2[i] ) { hitcase[i] == hitcase2[i]; }
803 }
804
805 ext_hitcase1[i] = hitcase1[i];
806 ext_hitcase2[i] = hitcase2[i];
807 ext_hitcase[i] = hitcase[i];
808 }
809
810 ext_tuple->write();
811
812 return;
813}
Double_t x[10]
double cos(const BesAngle a)

Referenced by FillCol().

◆ Fill() [2/2]

void TofCheckDigi::Fill ( Event::EventHeader ,
RecMdcTrack *&  ,
RecMdcKalTrack *&  ,
RecExtTrack *&   
)

◆ Fill_Barrel() [1/2]

void TofCheckDigi::Fill_Barrel ( Event::EventHeader eventHeader,
TofData *&  bTof,
double  estime,
int  t0stat 
)

Definition at line 508 of file TofCheckDigi.cxx.

508 {
509 barrel_run = eventHeader.runNumber();
510 barrel_event = eventHeader.eventNumber();
511 barrel_tofId = bTof->tofId();
512 barrel_tofTrackId = bTof->tofTrackId();
513 barrel_layer = bTof->layer();
514 barrel_qchannel1 = bTof->adcChannelEast();
515 barrel_tchannel1 = bTof->tdcChannelEast();
516 barrel_qchannel2 = bTof->adcChannelWest();
517 barrel_tchannel2 = bTof->tdcChannelWest();
518 barrel_qtc1 = bTof->qtc1();
519 barrel_adc1 = bTof->adc1();
520 barrel_tdc1 = bTof->tdc1();
521 barrel_qtc2 = bTof->qtc2();
522 barrel_adc2 = bTof->adc2();
523 barrel_tdc2 = bTof->tdc2();
524 barrel_qclock1 = bTof->qclock1();
525 barrel_tclock1 = bTof->tclock1();
526 barrel_qclock2 = bTof->qclock2();
527 barrel_tclock2 = bTof->tclock2();
528 barrel_quality = bTof->quality();
529 barrel_tmatched = bTof->tmatched();
530 barrel_qtimes1 = bTof->qtimes1();
531 barrel_ttimes1 = bTof->ttimes1();
532 barrel_qtimes2 = bTof->qtimes2();
533 barrel_ttimes2 = bTof->ttimes2();
534 barrel_times1 = bTof->eastTimes();
535 barrel_times2 = bTof->westTimes();
536 barrel_times = bTof->times();
537 barrel_qnum1 = bTof->qnumber1();
538 barrel_tnum1 = bTof->tnumber1();
539 barrel_qnum2 = bTof->qnumber2();
540 barrel_tnum2 = bTof->tnumber2();
541 barrel_tsum = ( bTof->tdc1() + bTof->tdc2() )/2.0;
542 barrel_tsub = ( bTof->tdc1() - bTof->tdc2() )/2.0;
543 barrel_ztdc = tofCaliSvc->ZTDC( bTof->tdc1(), bTof->tdc2(), bTof->tofId() );
544 barrel_zadc = tofCaliSvc->ZADC( bTof->adc1(), bTof->adc2(), bTof->tofId() );
545 barrel_t0 = estime;
546 barrel_t0stat = t0stat;
547 barrel_tuple->write();
548 return;
549}
ITofCaliSvc * tofCaliSvc
virtual const double ZTDC(double tleft, double tright, unsigned id)=0
virtual const double ZADC(double qleft, double qright, unsigned id)=0
double qtc2()
Definition: TofData.cxx:701
int qnumber2()
Definition: TofData.cxx:899
int qtimes2()
Definition: TofData.cxx:845
unsigned int westTimes()
Definition: TofData.cxx:872
int ttimes1()
Definition: TofData.cxx:836
double adc2()
Definition: TofData.cxx:656
int tclock1()
Definition: TofData.cxx:782
int qclock1()
Definition: TofData.cxx:773
double tdc2()
Definition: TofData.cxx:665
double qtc1()
Definition: TofData.cxx:692
int tdcChannelWest()
Definition: TofData.cxx:746
int qtimes1()
Definition: TofData.cxx:827
int tnumber1()
Definition: TofData.cxx:890
int adcChannelWest()
Definition: TofData.cxx:737
double tdc1()
Definition: TofData.cxx:647
int qnumber1()
Definition: TofData.cxx:881
int adcChannelEast()
Definition: TofData.cxx:719
int ttimes2()
Definition: TofData.cxx:854
double adc1()
Definition: TofData.cxx:638
int qclock2()
Definition: TofData.cxx:791
unsigned int eastTimes()
Definition: TofData.cxx:863
int tnumber2()
Definition: TofData.cxx:908
int tclock2()
Definition: TofData.cxx:800
int tdcChannelEast()
Definition: TofData.cxx:728

Referenced by FillCol().

◆ Fill_Barrel() [2/2]

void TofCheckDigi::Fill_Barrel ( Event::EventHeader ,
TofData *&  ,
double  ,
int   
)

◆ Fill_Endcap() [1/2]

void TofCheckDigi::Fill_Endcap ( Event::EventHeader eventHeader,
TofData *&  eTof,
double  estime,
int  t0stat 
)

Definition at line 552 of file TofCheckDigi.cxx.

552 {
553 endcap_run = eventHeader.runNumber();
554 endcap_event = eventHeader.eventNumber();
555 endcap_tofId = eTof->tofId();
556 endcap_tofTrackId = eTof->tofTrackId();
557 endcap_qchannel = eTof->adcChannel();
558 endcap_tchannel = eTof->tdcChannel();
559 endcap_qtc = eTof->qtc();
560 endcap_adc = eTof->adc();
561 endcap_tdc = eTof->tdc();
562 endcap_quality = eTof->quality();
563 endcap_qclock = eTof->qclock();
564 endcap_tclock = eTof->tclock();
565 endcap_qtimes = eTof->qtimes1();
566 endcap_ttimes = eTof->ttimes1();
567 endcap_times = eTof->times();
568 endcap_qnum = eTof->qnumber1();
569 endcap_tnum = eTof->tnumber1();
570 endcap_t0 = estime;
571 endcap_t0stat = t0stat;
572 endcap_tuple->write();
573 return;
574}
int tdcChannel()
Definition: TofData.cxx:764
int tclock()
Definition: TofData.cxx:818
double adc()
Definition: TofData.cxx:674
int adcChannel()
Definition: TofData.cxx:755
int qclock()
Definition: TofData.cxx:809
double tdc()
Definition: TofData.cxx:683
double qtc()
Definition: TofData.cxx:710

Referenced by FillCol().

◆ Fill_Endcap() [2/2]

void TofCheckDigi::Fill_Endcap ( Event::EventHeader ,
TofData *&  ,
double  ,
int   
)

◆ Fill_MRPC() [1/2]

void TofCheckDigi::Fill_MRPC ( Event::EventHeader eventHeader,
TofData *&  mrpcTof,
double  estime,
int  t0stat 
)

Definition at line 577 of file TofCheckDigi.cxx.

577 {
578 mrpc_run = eventHeader.runNumber();
579 mrpc_event = eventHeader.eventNumber();
580 mrpc_tofId = mrpcTof->tofId();
581 mrpc_strip = mrpcTof->strip();
582 mrpc_tofTrackId = mrpcTof->tofTrackId();
583 mrpc_ttch1 = mrpcTof->adcChannelEast();
584 mrpc_tlch1 = mrpcTof->tdcChannelEast();
585 mrpc_ttch2 = mrpcTof->adcChannelWest();
586 mrpc_tlch2 = mrpcTof->tdcChannelWest();
587 mrpc_tt1 = mrpcTof->qtc1();
588 mrpc_tl1 = mrpcTof->tdc1();
589 mrpc_tt2 = mrpcTof->qtc2();
590 mrpc_tl2 = mrpcTof->tdc2();
591 mrpc_tot1 = mrpcTof->adc1();
592 mrpc_tot2 = mrpcTof->adc2();
593 mrpc_quality = mrpcTof->quality();
594 mrpc_tmatched = mrpcTof->tmatched();
595 mrpc_tttimes1 = mrpcTof->qtimes1();
596 mrpc_tltimes1 = mrpcTof->ttimes1();
597 mrpc_tttimes2 = mrpcTof->qtimes2();
598 mrpc_tltimes2 = mrpcTof->ttimes2();
599 mrpc_times1 = mrpcTof->eastTimes();
600 mrpc_times2 = mrpcTof->westTimes();
601 mrpc_times = mrpcTof->times();
602 mrpc_ttnum1 = mrpcTof->qnumber1();
603 mrpc_tlnum1 = mrpcTof->tnumber1();
604 mrpc_ttnum2 = mrpcTof->qnumber2();
605 mrpc_tlnum2 = mrpcTof->tnumber2();
606 mrpc_tsum = ( mrpcTof->tdc1() + mrpcTof->tdc2() )/2.0;
607 mrpc_tsub = ( mrpcTof->tdc1() - mrpcTof->tdc2() )/2.0;
608 mrpc_ztdc = tofCaliSvc->ZTDC( mrpcTof->tdc1(), mrpcTof->tdc2(), mrpcTof->tofId() );
609 mrpc_zadc = tofCaliSvc->ZADC( mrpcTof->adc1(), mrpcTof->adc2(), mrpcTof->tofId() );
610 mrpc_t0 = estime;
611 mrpc_t0stat = t0stat;
612 mrpc_tuple->write();
613 return;
614}

Referenced by FillCol().

◆ Fill_MRPC() [2/2]

void TofCheckDigi::Fill_MRPC ( Event::EventHeader ,
TofData *&  ,
double  ,
int   
)

◆ Fill_TofTrack() [1/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader eventHeader,
TofTrack *&  tof,
double  estime,
int  t0stat 
)

Definition at line 816 of file TofCheckDigi.cxx.

816 {
817
818 tof_run = eventHeader.runNumber();
819 tof_event = eventHeader.eventNumber();
820 tof_toftrackid = tof->tofTrackId();
821 tof_trackid = tof->trackId();
822 tof_id1 = tof->id1();
823 tof_id2 = tof->id2();
824 tof_istrip1 = tof->istrip1();
825 tof_istrip2 = tof->istrip2();
826 tof_barrel = tof->barrel();
827 tof_hitcase = tof->hitCase();
828 tof_momentum = tof->p();
829 tof_path1 = tof->path1();
830 tof_path2 = tof->path2();
831 tof_zrhit1 = tof->zrhit1();
832 tof_zrhit2 = tof->zrhit2();
833 tof_errzr1 = tof->errzrhit1();
834 tof_errzr2 = tof->errzrhit2();
835 tof_xhit1 = tof->xhit1();
836 tof_yhit1 = tof->yhit1();
837 tof_xhit2 = tof->xhit2();
838 tof_yhit2 = tof->yhit2();
839 for( unsigned int i=0; i<5; i++ ) {
840 tof_kal[i] = tof->kal(i);
841 tof_zr1[i] = tof->zr1(i);
842 tof_zr2[i] = tof->zr2(i);
843 }
844 tof_ztdc1 = tof->ztdc1();
845 tof_ztdc2 = tof->ztdc2();
846 tof_zadc1 = tof->zadc1();
847 tof_zadc2 = tof->zadc2();
848 tof_zt1 = -999.0;
849 tof_zt2 = -999.0;
850 tof_zt3 = -999.0;
851 tof_zt4 = -999.0;
852 tof_zq1 = -999.0;
853 tof_zq2 = -999.0;
854 tof_zq3 = -999.0;
855 tof_zq4 = -999.0;
856 if( tof->hitCase() == 0 || tof->hitCase() == 2 ) {
857 tof_zt1 = tofCaliSvc->ZTDC1( tof->tdc2(), tof->tofId1(), tof->zrhit1() );
858 tof_zt2 = tofCaliSvc->ZTDC2( tof->tdc1(), tof->tofId1(), tof->zrhit1() );
859 tof_zq1 = tofCaliSvc->ZADC1( tof->adc2(), tof->tofId1(), tof->zrhit1() );
860 tof_zq2 = tofCaliSvc->ZADC2( tof->adc1(), tof->tofId1(), tof->zrhit1() );
861 }
862 if( tof->hitCase() == 1 || tof->hitCase() == 2 ) {
863 tof_zt3 = tofCaliSvc->ZTDC1( tof->tdc4(), tof->tofId2(), tof->zrhit2() );
864 tof_zt4 = tofCaliSvc->ZTDC2( tof->tdc3(), tof->tofId2(), tof->zrhit2() );
865 tof_zq3 = tofCaliSvc->ZADC1( tof->adc4(), tof->tofId2(), tof->zrhit2() );
866 tof_zq4 = tofCaliSvc->ZADC2( tof->adc3(), tof->tofId2(), tof->zrhit2() );
867 }
868 tof_size1 = tof->size1();
869 tof_size2 = tof->size2();
870 tof_size3 = tof->size3();
871 tof_size4 = tof->size4();
872 tof_theta1 = tof->theta1();
873 tof_theta2 = tof->theta2();
874 tof_phi1 = tof->phi1();
875 tof_phi2 = tof->phi2();
876 tof_quality1 = tof->quality1();
877 tof_quality2 = tof->quality2();
878 tof_quality = tof->quality();
879 tof_tofid1 = tof->tofId1();
880 tof_tofid2 = tof->tofId2();
881 tof_strip1 = tof->strip1();
882 tof_strip2 = tof->strip2();
883 /*
884 tof_board1 = tofQElecSvc->Board( tof->hitCase()<3, tof->tofId1(), true );
885 tof_board2 = tofQElecSvc->Board( tof->hitCase()<3, tof->tofId2(), true );
886 tof_crate1 = tofQElecSvc->Crate( tof->hitCase()<3, tof->tofId1(), true );
887 tof_crate2 = tofQElecSvc->Crate( tof->hitCase()<3, tof->tofId2(), true );
888 tof_fee1 = tofQElecSvc->Fee( tof->hitCase()<3, tof->tofId1(), true );
889 tof_fee2 = tofQElecSvc->Fee( tof->hitCase()<3, tof->tofId2(), true );
890 tof_channel1 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId1(),true );
891 tof_channel2 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId1(),false );
892 tof_channel3 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId2(),true );
893 tof_channel4 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId2(),false );
894 */
895 tof_ph11 = tof->ph11();
896 tof_ph12 = tof->ph12();
897 tof_ph21 = tof->ph21();
898 tof_ph22 = tof->ph22();
899 tof_ph1 = tof->ph1();
900 tof_ph2 = tof->ph2();
901 tof_ph = tof->ph();
902 tof_tofe11 = tof->tof11(0);
903 tof_tofe12 = tof->tof12(0);
904 tof_tofe21 = tof->tof21(0);
905 tof_tofe22 = tof->tof22(0);
906 tof_tofe1 = tof->tof1(0);
907 tof_tofe2 = tof->tof2(0);
908 tof_tofe = tof->tof(0);
909 tof_tofmu11 = tof->tof11(1);
910 tof_tofmu12 = tof->tof12(1);
911 tof_tofmu21 = tof->tof21(1);
912 tof_tofmu22 = tof->tof22(1);
913 tof_tofmu1 = tof->tof1(1);
914 tof_tofmu2 = tof->tof2(1);
915 tof_tofmu = tof->tof(1);
916 tof_tofpi11 = tof->tof11(2);
917 tof_tofpi12 = tof->tof12(2);
918 tof_tofpi21 = tof->tof21(2);
919 tof_tofpi22 = tof->tof22(2);
920 tof_tofpi1 = tof->tof1(2);
921 tof_tofpi2 = tof->tof2(2);
922 tof_tofpi = tof->tof(2);
923 tof_tofk11 = tof->tof11(3);
924 tof_tofk12 = tof->tof12(3);
925 tof_tofk21 = tof->tof21(3);
926 tof_tofk22 = tof->tof22(3);
927 tof_tofk1 = tof->tof1(3);
928 tof_tofk2 = tof->tof2(3);
929 tof_tofk = tof->tof(3);
930 tof_tofp11 = tof->tof11(4);
931 tof_tofp12 = tof->tof12(4);
932 tof_tofp21 = tof->tof21(4);
933 tof_tofp22 = tof->tof22(4);
934 tof_tofp1 = tof->tof1(4);
935 tof_tofp2 = tof->tof2(4);
936 tof_tofp = tof->tof(4);
937 tof_qch1 = tof->qch1();
938 tof_qch2 = tof->qch2();
939 tof_qch3 = tof->qch3();
940 tof_qch4 = tof->qch4();
941 tof_adc1 = tof->adc1();
942 tof_adc2 = tof->adc2();
943 tof_adc3 = tof->adc3();
944 tof_adc4 = tof->adc4();
945 tof_tdc1 = tof->tdc1();
946 tof_tdc2 = tof->tdc2();
947 tof_tdc3 = tof->tdc3();
948 tof_tdc4 = tof->tdc4();
949 tof_texpe1 = tof->texpInner(0);
950 tof_texpmu1 = tof->texpInner(1);
951 tof_texppi1 = tof->texpInner(2);
952 tof_texpk1 = tof->texpInner(3);
953 tof_texpp1 = tof->texpInner(4);
954 tof_texpe2 = tof->texpOuter(0);
955 tof_texpmu2 = tof->texpOuter(1);
956 tof_texppi2 = tof->texpOuter(2);
957 tof_texpk2 = tof->texpOuter(3);
958 tof_texpp2 = tof->texpOuter(4);
959 tof_texpe = tof->texp(0);
960 tof_texpmu = tof->texp(1);
961 tof_texppi = tof->texp(2);
962 tof_texpk = tof->texp(3);
963 tof_texpp = tof->texp(4);
964 tof_tdiff1 = tof->tdiff1();
965 tof_tdiff2 = tof->tdiff2();
966 tof_estime = estime;
967 tof_t0stat = t0stat;
968 tof_tuple->write();
969
970 return;
971}
virtual const double ZTDC2(double tleft, unsigned id, double z)=0
virtual const double ZTDC1(double tright, unsigned id, double z)=0
virtual const double ZADC2(double qleft, unsigned id, double z)=0
virtual const double ZADC1(double qright, unsigned id, double z)=0
double tof2(unsigned int i) const
double tof11(unsigned int i) const
double tof12(unsigned int i) const
double zr1(unsigned int i) const
int kal(unsigned int i) const
double tof(unsigned int i) const
double texpInner(unsigned int i) const
double tof21(unsigned int i) const
double tof1(unsigned int i) const
double texpOuter(unsigned int i) const
double texp(unsigned int i) const
double tof22(unsigned int i) const
double zr2(unsigned int i) const

Referenced by TofRec::execute().

◆ Fill_TofTrack() [2/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader ,
TofTrack *&  ,
double  ,
int   
)

◆ Fill_TofTrack() [3/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader eventHeader,
TofTrack *&  tof,
double  estime,
int  t0stat,
RecMdcKalTrackCol mdcKalTrackCol 
)

Definition at line 1137 of file TofCheckDigi.cxx.

1137 {
1138
1139 tof_run = eventHeader.runNumber();
1140 tof_event = eventHeader.eventNumber();
1141 tof_toftrackid = tof->tofTrackId();
1142 tof_trackid = tof->trackId();
1143 RecMdcKalTrackCol::iterator iter = mdcKalTrackCol.begin();
1144 for( ; iter != mdcKalTrackCol.end(); iter++ ) {
1145 if( (*iter)->trackId() == tof->trackId() ) {
1146 double kappa = 10000.0;
1147 double tanl = -10000.0;
1148
1149 (*iter)->setPidType( RecMdcKalTrack::electron );
1150 kappa = (*iter)->kappa();
1151 tanl = (*iter)->tanl();
1152 if( kappa>0 ) { tof_charge = 1; }
1153 else { tof_charge = -1; }
1154 if( abs(kappa)<1.0e-6 ) { kappa = 1.0e-6; }
1155 tof_pt[0] = 1.0/kappa;
1156 tof_p[0] = abs(sqrt(1.0+tanl*tanl)*tof_pt[0]);
1157
1158 (*iter)->setPidType( RecMdcKalTrack::muon );
1159 kappa = (*iter)->kappa();
1160 tanl = (*iter)->tanl();
1161 if( abs(kappa)<1.0e-6 ) { kappa = 1.0e-6; }
1162 tof_pt[1] = 1.0/kappa;
1163 tof_p[1] = abs(sqrt(1.0+tanl*tanl)*tof_pt[1]);
1164
1165 (*iter)->setPidType( RecMdcKalTrack::pion );
1166 kappa = (*iter)->kappa();
1167 tanl = (*iter)->tanl();
1168 if( abs(kappa)<1.0e-6 ) { kappa = 1.0e-6; }
1169 tof_pt[2] = 1.0/kappa;
1170 tof_p[2] = abs(sqrt(1.0+tanl*tanl)*tof_pt[2]);
1171
1172 (*iter)->setPidType( RecMdcKalTrack::kaon );
1173 kappa = (*iter)->kappa();
1174 tanl = (*iter)->tanl();
1175 if( abs(kappa)<1.0e-6 ) { kappa = 1.0e-6; }
1176 tof_pt[3] = 1.0/kappa;
1177 tof_p[3] = abs(sqrt(1.0+tanl*tanl)*tof_pt[3]);
1178
1179 (*iter)->setPidType( RecMdcKalTrack::proton );
1180 kappa = (*iter)->kappa();
1181 tanl = (*iter)->tanl();
1182 if( abs(kappa)<1.0e-6 ) { kappa = 1.0e-6; }
1183 tof_pt[4] = 1.0/kappa;
1184 tof_p[4] = abs(sqrt(1.0+tanl*tanl)*tof_pt[4]);
1185
1186 break;
1187 }
1188 }
1189 tof_id1 = tof->id1();
1190 tof_id2 = tof->id2();
1191 tof_istrip1 = tof->istrip1();
1192 tof_istrip2 = tof->istrip2();
1193 tof_dstrip1 = tof->dstrip1();
1194 tof_dstrip2 = tof->dstrip2();
1195 tof_barrel = tof->barrel();
1196 tof_hitcase = tof->hitCase();
1197 tof_momentum = tof->p();
1198 tof_path1 = tof->path1();
1199 tof_path2 = tof->path2();
1200 tof_zrhit1 = tof->zrhit1();
1201 tof_zrhit2 = tof->zrhit2();
1202 tof_errzr1 = tof->errzrhit1();
1203 tof_errzr2 = tof->errzrhit2();
1204 tof_xhit1 = tof->xhit1();
1205 tof_yhit1 = tof->yhit1();
1206 tof_xhit2 = tof->xhit2();
1207 tof_yhit2 = tof->yhit2();
1208 for( unsigned int i=0; i<5; i++ ) {
1209 tof_kal[i] = tof->kal(i);
1210 tof_zr1[i] = tof->zr1(i);
1211 tof_zr2[i] = tof->zr2(i);
1212 }
1213 tof_ztdc1 = tof->ztdc1();
1214 tof_ztdc2 = tof->ztdc2();
1215 tof_zadc1 = tof->zadc1();
1216 tof_zadc2 = tof->zadc2();
1217 tof_zt1 = -999.0;
1218 tof_zt2 = -999.0;
1219 tof_zt3 = -999.0;
1220 tof_zt4 = -999.0;
1221 tof_zq1 = -999.0;
1222 tof_zq2 = -999.0;
1223 tof_zq3 = -999.0;
1224 tof_zq4 = -999.0;
1225 if( tof->hitCase() == 0 || tof->hitCase() == 2 ) {
1226 tof_zt1 = tofCaliSvc->ZTDC1( tof->tdc2(), tof->tofId1(), tof->zrhit1() );
1227 tof_zt2 = tofCaliSvc->ZTDC2( tof->tdc1(), tof->tofId1(), tof->zrhit1() );
1228 tof_zq1 = tofCaliSvc->ZADC1( tof->adc2(), tof->tofId1(), tof->zrhit1() );
1229 tof_zq2 = tofCaliSvc->ZADC2( tof->adc1(), tof->tofId1(), tof->zrhit1() );
1230 }
1231 if( tof->hitCase() == 1 || tof->hitCase() == 2 ) {
1232 tof_zt3 = tofCaliSvc->ZTDC1( tof->tdc4(), tof->tofId2(), tof->zrhit2() );
1233 tof_zt4 = tofCaliSvc->ZTDC2( tof->tdc3(), tof->tofId2(), tof->zrhit2() );
1234 tof_zq3 = tofCaliSvc->ZADC1( tof->adc4(), tof->tofId2(), tof->zrhit2() );
1235 tof_zq4 = tofCaliSvc->ZADC2( tof->adc3(), tof->tofId2(), tof->zrhit2() );
1236 }
1237 tof_size1 = tof->size1();
1238 tof_size2 = tof->size2();
1239 tof_size3 = tof->size3();
1240 tof_size4 = tof->size4();
1241 tof_theta1 = tof->theta1();
1242 tof_theta2 = tof->theta2();
1243 tof_phi1 = tof->phi1();
1244 tof_phi2 = tof->phi2();
1245 tof_quality1 = tof->quality1();
1246 tof_quality2 = tof->quality2();
1247 tof_quality = tof->quality();
1248 tof_tofid1 = tof->tofId1();
1249 tof_tofid2 = tof->tofId2();
1250 tof_strip1 = tof->strip1();
1251 tof_strip2 = tof->strip2();
1252 /*
1253 tof_board1 = tofQElecSvc->Board( tof->hitCase()<3, tof->tofId1(), true );
1254 tof_board2 = tofQElecSvc->Board( tof->hitCase()<3, tof->tofId2(), true );
1255 tof_crate1 = tofQElecSvc->Crate( tof->hitCase()<3, tof->tofId1(), true );
1256 tof_crate2 = tofQElecSvc->Crate( tof->hitCase()<3, tof->tofId2(), true );
1257 tof_fee1 = tofQElecSvc->Fee( tof->hitCase()<3, tof->tofId1(), true );
1258 tof_fee2 = tofQElecSvc->Fee( tof->hitCase()<3, tof->tofId2(), true );
1259 tof_channel1 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId1(),true );
1260 tof_channel2 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId1(),false );
1261 tof_channel3 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId2(),true );
1262 tof_channel4 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId2(),false );
1263 */
1264 tof_ph11 = tof->ph11();
1265 tof_ph12 = tof->ph12();
1266 tof_ph21 = tof->ph21();
1267 tof_ph22 = tof->ph22();
1268 tof_ph1 = tof->ph1();
1269 tof_ph2 = tof->ph2();
1270 tof_ph = tof->ph();
1271 tof_tofe11 = tof->tof11(0);
1272 tof_tofe12 = tof->tof12(0);
1273 tof_tofe21 = tof->tof21(0);
1274 tof_tofe22 = tof->tof22(0);
1275 tof_tofe1 = tof->tof1(0);
1276 tof_tofe2 = tof->tof2(0);
1277 tof_tofe = tof->tof(0);
1278 tof_tofmu11 = tof->tof11(1);
1279 tof_tofmu12 = tof->tof12(1);
1280 tof_tofmu21 = tof->tof21(1);
1281 tof_tofmu22 = tof->tof22(1);
1282 tof_tofmu1 = tof->tof1(1);
1283 tof_tofmu2 = tof->tof2(1);
1284 tof_tofmu = tof->tof(1);
1285 tof_tofpi11 = tof->tof11(2);
1286 tof_tofpi12 = tof->tof12(2);
1287 tof_tofpi21 = tof->tof21(2);
1288 tof_tofpi22 = tof->tof22(2);
1289 tof_tofpi1 = tof->tof1(2);
1290 tof_tofpi2 = tof->tof2(2);
1291 tof_tofpi = tof->tof(2);
1292 tof_tofk11 = tof->tof11(3);
1293 tof_tofk12 = tof->tof12(3);
1294 tof_tofk21 = tof->tof21(3);
1295 tof_tofk22 = tof->tof22(3);
1296 tof_tofk1 = tof->tof1(3);
1297 tof_tofk2 = tof->tof2(3);
1298 tof_tofk = tof->tof(3);
1299 tof_tofp11 = tof->tof11(4);
1300 tof_tofp12 = tof->tof12(4);
1301 tof_tofp21 = tof->tof21(4);
1302 tof_tofp22 = tof->tof22(4);
1303 tof_tofp1 = tof->tof1(4);
1304 tof_tofp2 = tof->tof2(4);
1305 tof_tofp = tof->tof(4);
1306 tof_qch1 = tof->qch1();
1307 tof_qch2 = tof->qch2();
1308 tof_qch3 = tof->qch3();
1309 tof_qch4 = tof->qch4();
1310 tof_adc1 = tof->adc1();
1311 tof_adc2 = tof->adc2();
1312 tof_adc3 = tof->adc3();
1313 tof_adc4 = tof->adc4();
1314 tof_tdc1 = tof->tdc1();
1315 tof_tdc2 = tof->tdc2();
1316 tof_tdc3 = tof->tdc3();
1317 tof_tdc4 = tof->tdc4();
1318 tof_texpe1 = tof->texpInner(0);
1319 tof_texpmu1 = tof->texpInner(1);
1320 tof_texppi1 = tof->texpInner(2);
1321 tof_texpk1 = tof->texpInner(3);
1322 tof_texpp1 = tof->texpInner(4);
1323 tof_texpe2 = tof->texpOuter(0);
1324 tof_texpmu2 = tof->texpOuter(1);
1325 tof_texppi2 = tof->texpOuter(2);
1326 tof_texpk2 = tof->texpOuter(3);
1327 tof_texpp2 = tof->texpOuter(4);
1328 tof_texpe = tof->texp(0);
1329 tof_texpmu = tof->texp(1);
1330 tof_texppi = tof->texp(2);
1331 tof_texpk = tof->texp(3);
1332 tof_texpp = tof->texp(4);
1333 tof_tdiff1 = tof->tdiff1();
1334 tof_tdiff2 = tof->tdiff2();
1335 tof_estime = estime;
1336 tof_t0stat = t0stat;
1337 tof_tuple->write();
1338
1339 return;
1340}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ Fill_TofTrack() [4/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader ,
TofTrack *&  ,
double  ,
int  ,
RecMdcKalTrackCol  
)

◆ Fill_TofTrack() [5/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader ,
TofTrack *&  ,
double  ,
int  ,
RecMdcKalTrackCol ,
TofMcHitCol ,
McParticleCol ,
std::string   
)

◆ Fill_TofTrack() [6/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader ,
TofTrack *&  ,
double  ,
int  ,
RecMdcKalTrackCol ,
TofMcHitCol ,
McParticleCol ,
std::string   
)

◆ Fill_TofTrack() [7/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader eventHeader,
TofTrack *&  tof,
double  estime,
int  t0stat,
TrigData trigData 
)

Definition at line 974 of file TofCheckDigi.cxx.

974 {
975
976 tof_run = eventHeader.runNumber();
977 tof_event = eventHeader.eventNumber();
978 tof_toftrackid = tof->tofTrackId();
979 tof_trackid = tof->trackId();
980 tof_id1 = tof->id1();
981 tof_id2 = tof->id2();
982 tof_istrip1 = tof->istrip1();
983 tof_istrip2 = tof->istrip2();
984 tof_barrel = tof->barrel();
985 tof_hitcase = tof->hitCase();
986 tof_momentum = tof->p();
987 tof_path1 = tof->path1();
988 tof_path2 = tof->path2();
989 tof_zrhit1 = tof->zrhit1();
990 tof_zrhit2 = tof->zrhit2();
991 tof_errzr1 = tof->errzrhit1();
992 tof_errzr2 = tof->errzrhit2();
993 tof_xhit1 = tof->xhit1();
994 tof_yhit1 = tof->yhit1();
995 tof_xhit2 = tof->xhit2();
996 tof_yhit2 = tof->yhit2();
997 for( unsigned int i=0; i<5; i++ ) {
998 tof_kal[i] = tof->kal(i);
999 tof_zr1[i] = tof->zr1(i);
1000 tof_zr2[i] = tof->zr2(i);
1001 }
1002 tof_ztdc1 = tof->ztdc1();
1003 tof_ztdc2 = tof->ztdc2();
1004 tof_zadc1 = tof->zadc1();
1005 tof_zadc2 = tof->zadc2();
1006 tof_zt1 = -999.0;
1007 tof_zt2 = -999.0;
1008 tof_zt3 = -999.0;
1009 tof_zt4 = -999.0;
1010 tof_zq1 = -999.0;
1011 tof_zq2 = -999.0;
1012 tof_zq3 = -999.0;
1013 tof_zq4 = -999.0;
1014 if( tof->hitCase() == 0 || tof->hitCase() == 2 ) {
1015 tof_zt1 = tofCaliSvc->ZTDC1( tof->tdc2(), tof->tofId1(), tof->zrhit1() );
1016 tof_zt2 = tofCaliSvc->ZTDC2( tof->tdc1(), tof->tofId1(), tof->zrhit1() );
1017 tof_zq1 = tofCaliSvc->ZADC1( tof->adc2(), tof->tofId1(), tof->zrhit1() );
1018 tof_zq2 = tofCaliSvc->ZADC2( tof->adc1(), tof->tofId1(), tof->zrhit1() );
1019 }
1020 if( tof->hitCase() == 1 || tof->hitCase() == 2 ) {
1021 tof_zt3 = tofCaliSvc->ZTDC1( tof->tdc4(), tof->tofId2(), tof->zrhit2() );
1022 tof_zt4 = tofCaliSvc->ZTDC2( tof->tdc3(), tof->tofId2(), tof->zrhit2() );
1023 tof_zq3 = tofCaliSvc->ZADC1( tof->adc4(), tof->tofId2(), tof->zrhit2() );
1024 tof_zq4 = tofCaliSvc->ZADC2( tof->adc3(), tof->tofId2(), tof->zrhit2() );
1025 }
1026 tof_size1 = tof->size1();
1027 tof_size2 = tof->size2();
1028 tof_size3 = tof->size3();
1029 tof_size4 = tof->size4();
1030 tof_theta1 = tof->theta1();
1031 tof_theta2 = tof->theta2();
1032 tof_phi1 = tof->phi1();
1033 tof_phi2 = tof->phi2();
1034 tof_quality1 = tof->quality1();
1035 tof_quality2 = tof->quality2();
1036 tof_quality = tof->quality();
1037 tof_tofid1 = tof->tofId1();
1038 tof_tofid2 = tof->tofId2();
1039 tof_strip1 = tof->strip1();
1040 tof_strip2 = tof->strip2();
1041 /*
1042 tof_board1 = tofQElecSvc->Board( tof->hitCase()<3, tof->tofId1(), true );
1043 tof_board2 = tofQElecSvc->Board( tof->hitCase()<3, tof->tofId2(), true );
1044 tof_crate1 = tofQElecSvc->Crate( tof->hitCase()<3, tof->tofId1(), true );
1045 tof_crate2 = tofQElecSvc->Crate( tof->hitCase()<3, tof->tofId2(), true );
1046 tof_fee1 = tofQElecSvc->Fee( tof->hitCase()<3, tof->tofId1(), true );
1047 tof_fee2 = tofQElecSvc->Fee( tof->hitCase()<3, tof->tofId2(), true );
1048 tof_channel1 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId1(),true );
1049 tof_channel2 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId1(),false );
1050 tof_channel3 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId2(),true );
1051 tof_channel4 = tofQElecSvc->Channel(tof->hitCase()<3,tof->tofId2(),false );
1052 */
1053 tof_ph11 = tof->ph11();
1054 tof_ph12 = tof->ph12();
1055 tof_ph21 = tof->ph21();
1056 tof_ph22 = tof->ph22();
1057 tof_ph1 = tof->ph1();
1058 tof_ph2 = tof->ph2();
1059 tof_ph = tof->ph();
1060 tof_tofe11 = tof->tof11(0);
1061 tof_tofe12 = tof->tof12(0);
1062 tof_tofe21 = tof->tof21(0);
1063 tof_tofe22 = tof->tof22(0);
1064 tof_tofe1 = tof->tof1(0);
1065 tof_tofe2 = tof->tof2(0);
1066 tof_tofe = tof->tof(0);
1067 tof_tofmu11 = tof->tof11(1);
1068 tof_tofmu12 = tof->tof12(1);
1069 tof_tofmu21 = tof->tof21(1);
1070 tof_tofmu22 = tof->tof22(1);
1071 tof_tofmu1 = tof->tof1(1);
1072 tof_tofmu2 = tof->tof2(1);
1073 tof_tofmu = tof->tof(1);
1074 tof_tofpi11 = tof->tof11(2);
1075 tof_tofpi12 = tof->tof12(2);
1076 tof_tofpi21 = tof->tof21(2);
1077 tof_tofpi22 = tof->tof22(2);
1078 tof_tofpi1 = tof->tof1(2);
1079 tof_tofpi2 = tof->tof2(2);
1080 tof_tofpi = tof->tof(2);
1081 tof_tofk11 = tof->tof11(3);
1082 tof_tofk12 = tof->tof12(3);
1083 tof_tofk21 = tof->tof21(3);
1084 tof_tofk22 = tof->tof22(3);
1085 tof_tofk1 = tof->tof1(3);
1086 tof_tofk2 = tof->tof2(3);
1087 tof_tofk = tof->tof(3);
1088 tof_tofp11 = tof->tof11(4);
1089 tof_tofp12 = tof->tof12(4);
1090 tof_tofp21 = tof->tof21(4);
1091 tof_tofp22 = tof->tof22(4);
1092 tof_tofp1 = tof->tof1(4);
1093 tof_tofp2 = tof->tof2(4);
1094 tof_tofp = tof->tof(4);
1095 tof_qch1 = tof->qch1();
1096 tof_qch2 = tof->qch2();
1097 tof_qch3 = tof->qch3();
1098 tof_qch4 = tof->qch4();
1099 tof_adc1 = tof->adc1();
1100 tof_adc2 = tof->adc2();
1101 tof_adc3 = tof->adc3();
1102 tof_adc4 = tof->adc4();
1103 tof_tdc1 = tof->tdc1();
1104 tof_tdc2 = tof->tdc2();
1105 tof_tdc3 = tof->tdc3();
1106 tof_tdc4 = tof->tdc4();
1107 tof_texpe1 = tof->texpInner(0);
1108 tof_texpmu1 = tof->texpInner(1);
1109 tof_texppi1 = tof->texpInner(2);
1110 tof_texpk1 = tof->texpInner(3);
1111 tof_texpp1 = tof->texpInner(4);
1112 tof_texpe2 = tof->texpOuter(0);
1113 tof_texpmu2 = tof->texpOuter(1);
1114 tof_texppi2 = tof->texpOuter(2);
1115 tof_texpk2 = tof->texpOuter(3);
1116 tof_texpp2 = tof->texpOuter(4);
1117 tof_texpe = tof->texp(0);
1118 tof_texpmu = tof->texp(1);
1119 tof_texppi = tof->texp(2);
1120 tof_texpk = tof->texp(3);
1121 tof_texpp = tof->texp(4);
1122 tof_tdiff1 = tof->tdiff1();
1123 tof_tdiff2 = tof->tdiff2();
1124 unsigned int trigChannel = 0;
1125 for( int i=0 ; i < 16; i++ ) {
1126 trigChannel = ( trigChannel | ( ( trigData.getTrigChannel(i) ) << i ) );
1127 }
1128 tof_trig = trigChannel;
1129 tof_estime = estime;
1130 tof_t0stat = t0stat;
1131 tof_tuple->write();
1132
1133 return;
1134}

◆ Fill_TofTrack() [8/8]

void TofCheckDigi::Fill_TofTrack ( Event::EventHeader ,
TofTrack *&  ,
double  ,
int  ,
TrigData  
)

◆ FillCol() [1/10]

void TofCheckDigi::FillCol ( Event::EventHeader eventHeader,
RecExtTrackCol extTrackCol,
RecMdcTrackCol mdcTrackCol,
RecEmcShowerCol emcShowerCol,
RecMdcKalTrackCol mdcKalTrackCol 
)

Definition at line 1619 of file TofCheckDigi.cxx.

1619 {
1620 bb_run = eventHeader.runNumber();
1621 bb_event = eventHeader.eventNumber();
1622 bb_trksize = extTrackCol.size();
1623 bb_mdcsize = mdcTrackCol.size();
1624 bb_emcsize = emcShowerCol.size();
1625
1626 RecMdcTrackCol::iterator iter_mdc1 = mdcTrackCol.begin();
1627 RecMdcTrackCol::iterator iter_mdc2 = mdcTrackCol.begin() + 1;
1628
1629 Hep3Vector p1 = (*iter_mdc1)->p3();
1630 Hep3Vector p2 = (*iter_mdc2)->p3();
1631
1632 bb_trk1 = (*iter_mdc1)->trackId();
1633 bb_pmdc1 = (*iter_mdc1)->p();
1634 bb_ptmdc1 = (*iter_mdc1)->pxy();
1635 bb_theta1 = (*iter_mdc1)->theta();
1636 bb_phi1 = (*iter_mdc1)->phi();
1637 bb_x1 = (*iter_mdc1)->x();
1638 bb_y1 = (*iter_mdc1)->y();
1639 bb_z1 = (*iter_mdc1)->z();
1640 bb_r1 = (*iter_mdc1)->r();
1641 bb_charge1 = (*iter_mdc1)->charge();
1642 bb_chi1 = (*iter_mdc1)->chi2();
1643 bb_ndof1 = (*iter_mdc1)->ndof();
1644 bb_layer1 = (*iter_mdc1)->lastLayer();
1645 bb_trk2 = (*iter_mdc2)->trackId();
1646 bb_pmdc2 = (*iter_mdc2)->p();
1647 bb_ptmdc2 = (*iter_mdc2)->pxy();
1648 bb_theta2 = (*iter_mdc2)->theta();
1649 bb_phi2 = (*iter_mdc2)->phi();
1650 bb_x2 = (*iter_mdc2)->x();
1651 bb_y2 = (*iter_mdc2)->y();
1652 bb_z2 = (*iter_mdc2)->z();
1653 bb_r2 = (*iter_mdc2)->r();
1654 bb_charge2 = (*iter_mdc2)->charge();
1655 bb_chi2 = (*iter_mdc2)->chi2();
1656 bb_ndof2 = (*iter_mdc2)->ndof();
1657 bb_layer2 = (*iter_mdc2)->lastLayer();
1658
1659 bb_dang = 180.0 - p1.angle( p2.unit() )*180.0/pi;
1660 bb_dphi = abs( (*iter_mdc1)->phi() - (*iter_mdc2)->phi() )*180.0/pi;
1661
1662 RecMdcKalTrackCol::iterator iter_kal1 = mdcKalTrackCol.begin();
1663 RecMdcKalTrackCol::iterator iter_kal2 = mdcKalTrackCol.begin() + 1;
1664
1665 if( ( (*iter_kal1)->trackId() == (*iter_mdc2)->trackId() ) && ( (*iter_kal2)->trackId() == (*iter_mdc1)->trackId() ) ) {
1666 RecMdcKalTrackCol::iterator iter_tmp = iter_kal1;
1667 iter_kal1 = iter_kal2;
1668 iter_kal2 = iter_tmp;
1669 }
1670
1671 // RecMdcKalTrack::setPidType (RecMdcKalTrack::electron);
1672 (*iter_kal1)->setPidType( RecMdcKalTrack::electron );
1673 (*iter_kal2)->setPidType( RecMdcKalTrack::electron );
1674 double tanl1 = (*iter_kal1)->tanl();
1675 double kappa1 = (*iter_kal1)->kappa();
1676 double tanl2 = (*iter_kal2)->tanl();
1677 double kappa2 = (*iter_kal2)->kappa();
1678 bb_pe1 = sqrt(1.0+tanl1*tanl1)/kappa1;
1679 bb_pte1 = 1.0/kappa1;
1680 bb_pe2 = sqrt(1.0+tanl2*tanl2)/kappa2;
1681 bb_pte2 = 1.0/kappa2;
1682 // RecMdcKalTrack::setPidType (RecMdcKalTrack::muon);
1683 (*iter_kal1)->setPidType( RecMdcKalTrack::muon );
1684 (*iter_kal2)->setPidType( RecMdcKalTrack::muon );
1685 tanl1 = (*iter_kal1)->tanl();
1686 kappa1 = (*iter_kal1)->kappa();
1687 tanl2 = (*iter_kal2)->tanl();
1688 kappa2 = (*iter_kal2)->kappa();
1689 bb_pmu1 = sqrt(1.0+tanl1*tanl1)/kappa1;
1690 bb_ptmu1 = 1.0/kappa1;
1691 bb_pmu2 = sqrt(1.0+tanl2*tanl2)/kappa2;
1692 bb_ptmu2 = 1.0/kappa2;
1693
1694 RecExtTrackCol::iterator iter_ext1 = extTrackCol.begin();
1695 RecExtTrackCol::iterator iter_ext2 = extTrackCol.begin() + 1;
1696
1697 Hep3Vector extPos1 = (*iter_ext1)->emcPosition();
1698 Hep3Vector extPos2 = (*iter_ext2)->emcPosition();
1699
1700 bb_extx1 = extPos1.x();
1701 bb_exty1 = extPos1.y();
1702 bb_extz1 = extPos1.z();
1703 bb_extx2 = extPos2.x();
1704 bb_exty2 = extPos2.y();
1705 bb_extz2 = extPos2.z();
1706
1707 RecEmcShowerCol::iterator iter_emc1 = emcShowerCol.begin();
1708 RecEmcShowerCol::iterator iter_emc2 = emcShowerCol.begin() + 1;
1709
1710 Hep3Vector emcPos1((*iter_emc1)->x(),(*iter_emc1)->y(),(*iter_emc1)->z());
1711 Hep3Vector emcPos2((*iter_emc2)->x(),(*iter_emc2)->y(),(*iter_emc2)->z());
1712
1713 // cout << "ext 1 --- " << extPos1 << " ext 2 --- " << extPos2 <<
1714 // "emc 1 --- " << emcPos1 << " emc 2 --- " << emcPos2 << endl;
1715
1716 Hep3Vector dis1 = extPos1 - emcPos1;
1717 Hep3Vector dis2 = extPos2 - emcPos1;
1718
1719 // cout << " r1 = " << dis1.r() << " r2 = " << dis2.r() << endl;
1720
1721 if( dis1.r() > dis2.r() ) {
1722 RecEmcShowerCol::iterator iter_tmp = iter_emc1;
1723 iter_emc1 = iter_emc2;
1724 iter_emc2 = iter_tmp;
1725 Hep3Vector emc_tmp = emcPos1;
1726 emcPos1 = emcPos2;
1727 emcPos2 = emc_tmp;
1728 }
1729 dis1 = extPos1 - emcPos1;
1730 dis2 = extPos2 - emcPos2;
1731
1732 bb_emctrk1 = (*iter_emc1)->trackId();
1733 bb_emcx1 = (*iter_emc1)->x();
1734 bb_emcy1 = (*iter_emc1)->y();
1735 bb_emcz1 = (*iter_emc1)->z();
1736 bb_e1 = (*iter_emc1)->energy()/(*iter_mdc1)->p();;
1737 bb_th1 = (*iter_emc1)->theta();
1738 bb_ph1 = (*iter_emc1)->phi();
1739 bb_emctrk2 = (*iter_emc2)->trackId();
1740 bb_emcx2 = (*iter_emc2)->x();
1741 bb_emcy2 = (*iter_emc2)->y();
1742 bb_emcz2 = (*iter_emc2)->z();
1743 bb_e2 = (*iter_emc2)->energy()/(*iter_mdc2)->p();;
1744 bb_th2 = (*iter_emc2)->theta();
1745 bb_ph2 = (*iter_emc2)->phi();
1746 bb_dr1 = dis1.r();
1747 bb_drxy1 = dis1.rho();
1748 bb_dz1 = dis1.z();
1749 bb_dr2 = dis2.r();
1750 bb_drxy2 = dis2.rho();
1751 bb_dz2 = dis2.z();
1752
1753 double etot = 0.0;
1754 RecEmcShowerCol::iterator iter_emc = emcShowerCol.begin();
1755 for( ; iter_emc != emcShowerCol.end(); iter_emc++ ) {
1756 etot += (*iter_emc)->energy();
1757 }
1758 bb_etot = etot - (*iter_emc1)->energy() - (*iter_emc2)->energy();
1759
1760 bb_tuple->write();
1761
1762 return;
1763}
Double_t etot

◆ FillCol() [2/10]

void TofCheckDigi::FillCol ( Event::EventHeader ,
RecExtTrackCol ,
RecMdcTrackCol ,
RecEmcShowerCol ,
RecMdcKalTrackCol  
)

◆ FillCol() [3/10]

void TofCheckDigi::FillCol ( Event::EventHeader eventHeader,
RecMdcTrackCol mdcTrackCol,
RecMdcKalTrackCol mdcKalTrackCol,
RecExtTrackCol recExtTrackCol 
)

Definition at line 1599 of file TofCheckDigi.cxx.

1599 {
1600 if( mdcTrackCol.size()<=0 || mdcKalTrackCol.size() <= 0 || recExtTrackCol.size() <= 0 ) return;
1601 RecExtTrackCol::iterator iter_ext = recExtTrackCol.begin();
1602 for( ; iter_ext!=recExtTrackCol.end(); iter_ext++ ) {
1603 RecMdcKalTrackCol::iterator iter_kal = mdcKalTrackCol.begin();
1604 for( ; iter_kal!=mdcKalTrackCol.end(); iter_kal++ ) {
1605 RecMdcTrackCol::iterator iter_mdc = mdcTrackCol.begin();
1606 for( ; iter_mdc!=mdcTrackCol.end(); iter_mdc++ ) {
1607 if( (*iter_kal)->getTrackId() != (*iter_mdc)->trackId() ) continue;
1608 if( (*iter_kal)->getTrackId() == (*iter_ext)->trackId() ) break;
1609 }
1610 if( iter_mdc != mdcTrackCol.end() ) {
1611 Fill( eventHeader, *iter_mdc, *iter_kal, *iter_ext );
1612 }
1613 }
1614 }
1615 return;
1616}
void Fill(Event::EventHeader &, RecMdcTrack *&, RecMdcKalTrack *&, RecExtTrack *&)

◆ FillCol() [4/10]

void TofCheckDigi::FillCol ( Event::EventHeader ,
RecMdcTrackCol ,
RecMdcKalTrackCol ,
RecExtTrackCol  
)

◆ FillCol() [5/10]

void TofCheckDigi::FillCol ( Event::EventHeader eventHeader,
TofDataMap tofDataMap,
double  estime,
int  t0stat 
)

Definition at line 617 of file TofCheckDigi.cxx.

617 {
618 if( tofDataMap.empty() ) return;
619 IterTofDataMap iter = tofDataMap.begin();
620 for( ; iter != tofDataMap.end(); iter++ ) {
621 Identifier iden = TofID::cell_id( (*iter).first );
622 if( TofID::is_scin( iden ) ) {
623 if( TofID::is_barrel( iden ) ) {
624 Fill_Barrel( eventHeader, (*iter).second, estime, t0stat );
625 }
626 else {
627 Fill_Endcap( eventHeader, (*iter).second, estime, t0stat );
628 }
629 }
630 if( TofID::is_mrpc( iden ) ) {
631 Fill_MRPC( eventHeader, (*iter).second, estime, t0stat );
632 }
633 }
634 return;
635}
std::multimap< unsignedint, TofData * >::iterator IterTofDataMap
void Fill_MRPC(Event::EventHeader &, TofData *&, double, int)
void Fill_Endcap(Event::EventHeader &, TofData *&, double, int)
void Fill_Barrel(Event::EventHeader &, TofData *&, double, int)
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition: TofID.cxx:143
static bool is_scin(const Identifier &id)
Definition: TofID.cxx:102
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition: TofID.cxx:49
static bool is_mrpc(const Identifier &id)
Definition: TofID.cxx:113

◆ FillCol() [6/10]

void TofCheckDigi::FillCol ( Event::EventHeader ,
TofDataMap ,
double  ,
int   
)

◆ FillCol() [7/10]

void TofCheckDigi::FillCol ( Event::EventHeader eventHeader,
TofDataVector tofDataVec,
double  estime,
int  t0stat 
)

Definition at line 638 of file TofCheckDigi.cxx.

638 {
639 if( tofDataVec.size() <= 0 ) return;
640 std::vector<TofData*>::iterator iter = tofDataVec.begin();
641 for( ; iter != tofDataVec.end(); iter++ ) {
642 if( (*iter)->barrel() ) {
643 Fill_Barrel( eventHeader, (*iter), estime, t0stat );
644 }
645 else {
646 Fill_Endcap( eventHeader, (*iter), estime, t0stat );
647 }
648 }
649 return;
650}

◆ FillCol() [8/10]

void TofCheckDigi::FillCol ( Event::EventHeader ,
TofDataVector ,
double  ,
int   
)

◆ FillCol() [9/10]

void TofCheckDigi::FillCol ( Event::EventHeader eventHeader,
TofDigiCol tofDigiCol,
double  estime,
int  t0stat 
)

Definition at line 424 of file TofCheckDigi.cxx.

424 {
425 if( tofDigiCol.size() <= 0 ) return;
426 TofDigiCol::iterator iter_digi = tofDigiCol.begin();
427 for( ; iter_digi!=tofDigiCol.end(); iter_digi++ ) {
428 unsigned int overflow = (*iter_digi)->getOverflow();
429 if( ( overflow & 0xfe000000 ) == 0xfe000000 ) {
430 if( digi_tuple ) {
431 digi_run = eventHeader.runNumber();
432 digi_event = eventHeader.eventNumber();
433 digi_barrel = -1;
434 digi_endcap = -1;
435 digi_layer = -1;
436 digi_tofId = -1;
437 digi_strip = -1;
438 digi_end = -1;
439 digi_adc = 0x7fffffff; // adc 13bits
440 digi_tdc = 0x7fffffff;
441 digi_qclock = 1000.0;
442 digi_tclock = 1000.0;
443 digi_overflow = overflow;
444 digi_noq = -1;
445 digi_not = -1;
446 digi_multiq = -1;
447 digi_multit = -1;
448 digi_overq = -1;
449 digi_overt = -1;
450 digi_t0 = -1;
451 digi_t0stat = -1;
452 digi_crate = ( ( overflow &0x1000000 ) >> 24 );
453 digi_geo = ( ( overflow &0x0f80000 ) >> 19 );
454 digi_tdcnum = ( ( overflow &0x0078000 ) >> 15 );
455 digi_err = ( overflow &0x0007fff );
456 digi_tuple->write();
457 }
458 }
459 else {
460 Identifier iden = (*iter_digi)->identify();
461 unsigned int adc = (*iter_digi)->getChargeChannel();
462 unsigned int tdc = (*iter_digi)->getTimeChannel();
463 if( digi_tuple ) {
464 digi_run = eventHeader.runNumber();
465 digi_event = eventHeader.eventNumber();
466 digi_barrel = TofID::barrel_ec(iden);
467 digi_endcap = TofID::endcap(iden);
468 digi_layer = TofID::layer(iden);
469 digi_strip = TofID::strip(iden);
470 digi_end = TofID::end(iden);
471 if( TofID::is_scin(iden) ) {
472 digi_tofId = TofID::phi_module(iden);
473 digi_adc = ( adc & 0x1fff ); // adc 13bits
474 }
475 if( TofID::is_mrpc(iden) ) {
476 digi_tofId = TofID::module(iden);
477 digi_adc = adc;
478 }
479 if( adc == 0x7fffffff ) digi_adc = adc;
480 digi_tdc = tdc;
481 digi_qclock = ( ( adc & 0x7e000 ) >> 13 ); // adc high 6 bits, time clock
482 if( adc == 0x7fffffff ) digi_qclock = 1000.;
483 digi_tclock = ( ( tdc & 0x7e000 ) >> 13 ); // tdc high 6 bits, time clock
484 if( tdc == 0x7fffffff ) digi_tclock = 1000.;
485 digi_overflow = overflow;
486 digi_noq = ( ( overflow & 0x20 ) >> 5 );
487 digi_not = ( ( overflow & 0x10 ) >> 4 );
488 digi_multiq = ( ( overflow & 0x08 ) >> 3 );
489 digi_multit = ( ( overflow & 0x04 ) >> 2 );
490 digi_overq = ( ( overflow & 0x02 ) >> 1 );
491 digi_overt = ( overflow & 0x01 );
492 digi_t0 = estime;
493 digi_t0stat = t0stat;
494 digi_crate = -1;
495 digi_geo = -1;
496 digi_tdcnum = -1;
497 digi_tdcnum = -1;
498 digi_err = -1;
499 digi_tuple->write();
500 }
501 }
502 }
503
504 return;
505}
static int endcap(const Identifier &id)
Definition: TofID.cxx:124
static int strip(const Identifier &id)
Definition: TofID.cxx:136
static int end(const Identifier &id)
Definition: TofID.cxx:79
static int phi_module(const Identifier &id)
Definition: TofID.cxx:73
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: TofID.cxx:61
static int layer(const Identifier &id)
Definition: TofID.cxx:66
static int module(const Identifier &id)
Definition: TofID.cxx:130

Referenced by TofRec::execute().

◆ FillCol() [10/10]

void TofCheckDigi::FillCol ( Event::EventHeader ,
TofDigiCol ,
double  ,
int   
)

The documentation for this class was generated from the following files: