11 #include "TLinearFitter.h"
43 #include "TMethodCall.h"
49 enum HarpoMonitorEventType {
75 if (plane != NULL )plane->
print();
86 FillHistogramsTrigger();
109 fXT= fYT=fXC= fYC = -1;
110 fXdT= fXdC=fYdT=fYdC= -500;
115 fTree =
new TTree(
"data",
"Harpo data");
116 fTree ->Branch(
"NEvent",&NEvent,
"NEvent/I");
117 fTree ->Branch(
"TimeSt",&TimeSt,
"TimeSt/I");
119 fTree ->Branch(
"fAlignmentX",&fAlignmentX,
"fAlignmentX/D");
120 fTree ->Branch(
"fAlignmentY",&fAlignmentY,
"fAlignmentY/D");
122 fTree ->Branch(
"fAlignmentZx",&fAlignmentZx,
"fAlignmentZx/D");
123 fTree ->Branch(
"fAlignmentZy",&fAlignmentZy,
"fAlignmentZy/D");
124 fTree ->Branch(
"fAlignmentZ",&fAlignmentZ,
"fAlignmentZ/D");
125 fTree ->Branch(
"ftriggerType",&ftriggerType,
"ftriggerType/I");
127 fTree ->SetDirectory(0);
133 Info(
"Init",
"Use default fQmin %d",fQmin);
140 Info(
"Init",
"Use default fQmax %d",fQmax);
147 Info(
"InitCfg",
"Use default fTmin %g",fTmin);
153 Info(
"InitCfg",
"Use default fLTpc %g",fLTpc);
164 sprintf(hname,
"h1_Qpix_x");
165 h1_Qpix_x = (TH1F *)gROOT->FindObject(hname);
166 if(h1_Qpix_x)
delete h1_Qpix_x;
167 h1_Qpix_x =
new TH1F(hname,
"",500,50,5000);
168 h1_Qpix_x->SetStats(0);
169 h1_Qpix_x->SetXTitle(
"Q[ADC]");
171 sprintf(hname,
"h1_Q_time_x");
172 h1_Q_time_x = (TH1F *)gROOT->FindObject(hname);
173 if(h1_Q_time_x)
delete h1_Q_time_x;
174 h1_Q_time_x =
new TH1F(hname,
"",511,0,511);
175 h1_Q_time_x->SetStats(0);
176 h1_Q_time_x->SetXTitle(
"t[time bin]");
178 sprintf(hname,
"h1_Q_channel_x");
179 h1_Q_channel_x = (TH1F *)gROOT->FindObject(hname);
180 if(h1_Q_channel_x)
delete h1_Q_channel_x;
181 h1_Q_channel_x =
new TH1F(hname,
"",288,0,288);
182 h1_Q_channel_x->SetStats(0);
183 h1_Q_channel_x->SetXTitle(
"channel[bin]");
185 sprintf(hname,
"h1_QtAssocN_time_x");
186 h1_QtAssocN_time_x = (TH1F *)gROOT->FindObject(hname);
187 if(h1_QtAssocN_time_x)
delete h1_QtAssocN_time_x;
188 h1_QtAssocN_time_x =
new TH1F(hname,
"",511,0,511);
189 h1_QtAssocN_time_x->SetStats(0);
190 h1_QtAssocN_time_x->SetXTitle(
"t[time bin]");
192 sprintf(hname,
"h1_QtAssocN_channel_x");
193 h1_QtAssocN_channel_x = (TH1F *)gROOT->FindObject(hname);
194 if(h1_QtAssocN_channel_x)
delete h1_QtAssocN_channel_x;
195 h1_QtAssocN_channel_x =
new TH1F(hname,
"",288,0,288);
196 h1_QtAssocN_channel_x->SetStats(0);
197 h1_QtAssocN_channel_x->SetXTitle(
"channel[bin]");
200 sprintf(hname,
"h1_QTcluster_x");
201 h1_QTcluster_x = (TH1F *)gROOT->FindObject(hname);
202 if(h1_QTcluster_x)
delete h1_QTcluster_x;
203 h1_QTcluster_x =
new TH1F(hname,
"",5000,500,25000);
204 h1_QTcluster_x->SetStats(0);
205 h1_QTcluster_x->SetXTitle(
"Q[ADC]");
207 sprintf(hname,
"h1_QCcluster_x");
208 h1_QCcluster_x = (TH1F *)gROOT->FindObject(hname);
209 if(h1_QCcluster_x)
delete h1_QCcluster_x;
210 h1_QCcluster_x =
new TH1F(hname,
"",2000,500,25000);
211 h1_QCcluster_x->SetStats(0);
212 h1_QCcluster_x->SetXTitle(
"Q[ADC]");
214 sprintf(hname,
"h1_SigTcluster_x");
215 h1_SigTcluster_x = (TH1F *)gROOT->FindObject(hname);
216 if(h1_SigTcluster_x)
delete h1_SigTcluster_x;
217 h1_SigTcluster_x =
new TH1F(hname,
"",100,0.0,10.0);
218 h1_SigTcluster_x->SetStats(0);
219 h1_SigTcluster_x->SetXTitle(
"#sigma[mm]");
221 sprintf(hname,
"h1_SigCcluster_x");
222 h1_SigCcluster_x = (TH1F *)gROOT->FindObject(hname);
223 if(h1_SigCcluster_x)
delete h1_SigCcluster_x;
224 h1_SigCcluster_x =
new TH1F(hname,
"",100,0.,10.0);
225 h1_SigCcluster_x->SetStats(0);
226 h1_SigCcluster_x->SetXTitle(
"#sigma[mm]");
228 sprintf(hname,
"h1_WidthTcluster_x");
229 h1_WidthTcluster_x = (TH1F *)gROOT->FindObject(hname);
230 if(h1_WidthTcluster_x)
delete h1_WidthTcluster_x;
231 h1_WidthTcluster_x =
new TH1F(hname,
"",100,0.0,100.0);
232 h1_WidthTcluster_x->SetStats(0);
233 h1_WidthTcluster_x->SetXTitle(
"width[n]");
235 sprintf(hname,
"h1_WidthCcluster_x");
236 h1_WidthCcluster_x = (TH1F *)gROOT->FindObject(hname);
237 if(h1_WidthCcluster_x)
delete h1_WidthCcluster_x;
238 h1_WidthCcluster_x =
new TH1F(hname,
"",100,0.0,100.0);
239 h1_WidthCcluster_x->SetStats(0);
240 h1_WidthCcluster_x->SetXTitle(
"width[n]");
242 sprintf(hname,
"h1_IndexTcluster_x");
243 h1_IndexTcluster_x = (TH1F *)gROOT->FindObject(hname);
244 if(h1_IndexTcluster_x)
delete h1_IndexTcluster_x;
245 h1_IndexTcluster_x =
new TH1F(hname,
"",511,0,511);
246 h1_IndexTcluster_x->SetStats(0);
247 h1_IndexTcluster_x->SetXTitle(
"Index");
249 sprintf(hname,
"h1_IndexCcluster_x");
250 h1_IndexCcluster_x = (TH1F *)gROOT->FindObject(hname);
251 if(h1_IndexCcluster_x)
delete h1_IndexCcluster_x;
252 h1_IndexCcluster_x =
new TH1F(hname,
"",288,0,288);
253 h1_IndexCcluster_x->SetStats(0);
254 h1_IndexCcluster_x->SetXTitle(
"Index");
256 sprintf(hname,
"h1_MeanTcluster_x");
257 h1_MeanTcluster_x = (TH1F *)gROOT->FindObject(hname);
258 if(h1_MeanTcluster_x)
delete h1_MeanTcluster_x;
259 h1_MeanTcluster_x =
new TH1F(hname,
"",288,0.0,288.0);
260 h1_MeanTcluster_x->SetStats(0);
261 h1_MeanTcluster_x->SetXTitle(
"Mean");
263 sprintf(hname,
"h1_MeanCcluster_x");
264 h1_MeanCcluster_x = (TH1F *)gROOT->FindObject(hname);
265 if(h1_MeanCcluster_x)
delete h1_MeanCcluster_x;
266 h1_MeanCcluster_x =
new TH1F(hname,
"",511,0.0,511.0);
267 h1_MeanCcluster_x->SetStats(0);
268 h1_MeanCcluster_x->SetXTitle(
"Mean");
272 sprintf(hname,
"h1_angleTrack_x");
273 h1_angleTrack_x = (TH1F *)gROOT->FindObject(hname);
274 if(h1_angleTrack_x)
delete h1_angleTrack_x;
275 h1_angleTrack_x =
new TH1F(hname,
"",100,0.0,3.15);
276 h1_angleTrack_x->SetStats(0);
277 h1_angleTrack_x->SetXTitle(
"#theta_{track}[rad]");
279 sprintf(hname,
"h1_theta_x");
280 h1_theta_x = (TH1F *)gROOT->FindObject(hname);
281 if(h1_theta_x)
delete h1_theta_x;
282 h1_theta_x =
new TH1F(hname,
"",50,-3.15,3.15);
283 h1_theta_x->SetStats(0);
284 h1_theta_x->SetXTitle(
"#theta[rad]");
286 sprintf(hname,
"h1_rho_x");
287 h1_rho_x = (TH1F *)gROOT->FindObject(hname);
288 if(h1_rho_x)
delete h1_rho_x;
289 h1_rho_x =
new TH1F(hname,
"",200,0.0,200.0);
290 h1_rho_x->SetStats(0);
291 h1_rho_x->SetXTitle(
"#rho[mm]");
293 sprintf(hname,
"h1_sigtheta_x");
294 h1_sigtheta_x = (TH1F *)gROOT->FindObject(hname);
295 if(h1_sigtheta_x)
delete h1_sigtheta_x;
296 h1_sigtheta_x =
new TH1F(hname,
"",50,0.0,0.1);
297 h1_sigtheta_x->SetStats(0);
298 h1_sigtheta_x->SetXTitle(
"#sigma_{#theta}[rad]");
300 sprintf(hname,
"h1_sigrho_x");
301 h1_sigrho_x = (TH1F *)gROOT->FindObject(hname);
302 if(h1_sigrho_x)
delete h1_sigrho_x;
303 h1_sigrho_x =
new TH1F(hname,
"",200,0.0,10.0);
304 h1_sigrho_x->SetStats(0);
305 h1_sigrho_x->SetXTitle(
"#sigma_{#rho}[mm]");
307 sprintf(hname,
"h1_QcAssoc_x");
308 h1_QcAssoc_x = (TH1F *)gROOT->FindObject(hname);
309 if(h1_QcAssoc_x)
delete h1_QcAssoc_x;
310 h1_QcAssoc_x =
new TH1F(hname,
"",5000,100,20000);
311 h1_QcAssoc_x->SetStats(0);
312 h1_QcAssoc_x->SetXTitle(
"Q[ADC]");
314 sprintf(hname,
"h1_QcNAssoc_x");
315 h1_QcNAssoc_x = (TH1F *)gROOT->FindObject(hname);
316 if(h1_QcNAssoc_x)
delete h1_QcNAssoc_x;
317 h1_QcNAssoc_x =
new TH1F(hname,
"",5000,100,20000);
318 h1_QcNAssoc_x->SetStats(0);
319 h1_QcNAssoc_x->SetXTitle(
"Q[ADC]");
321 sprintf(hname,
"h1_QtAssoc_x");
322 h1_QtAssoc_x = (TH1F *)gROOT->FindObject(hname);
323 if(h1_QtAssoc_x)
delete h1_QtAssoc_x;
324 h1_QtAssoc_x =
new TH1F(hname,
"",5000,1000,20000);
325 h1_QtAssoc_x->SetStats(0);
326 h1_QtAssoc_x->SetXTitle(
"Q[ADC]");
328 sprintf(hname,
"h1_QtAssocN_x");
329 h1_QtAssocN_x = (TH1F *)gROOT->FindObject(hname);
330 if(h1_QtAssocN_x)
delete h1_QtAssocN_x;
331 h1_QtAssocN_x =
new TH1F(hname,
"",5000,100,20000);
332 h1_QtAssocN_x->SetStats(0);
333 h1_QtAssocN_x->SetXTitle(
"Q[ADC]");
335 sprintf(hname,
"h1_QtNAssoc_x");
336 h1_QtNAssoc_x = (TH1F *)gROOT->FindObject(hname);
337 if(h1_QtNAssoc_x)
delete h1_QtNAssoc_x;
338 h1_QtNAssoc_x =
new TH1F(hname,
"",5000,100,20000);
339 h1_QtNAssoc_x->SetStats(0);
340 h1_QtNAssoc_x->SetXTitle(
"Q[ADC]");
343 sprintf(hname,
"h1_TypeTrack_x");
344 h1_TypeTrack_x = (TH1F *)gROOT->FindObject(hname);
345 if(h1_TypeTrack_x)
delete h1_TypeTrack_x;
346 h1_TypeTrack_x =
new TH1F(hname,
"",4,0,4);
347 h1_TypeTrack_x->SetStats(0);
348 h1_TypeTrack_x->SetXTitle(
"Type");
350 sprintf(hname,
"h1_distortion_dc_x");
352 h1_distortion_dc_x = (TH1F *)gROOT->FindObject(hname);
353 if(h1_distortion_dc_x)
delete h1_distortion_dc_x;
354 h1_distortion_dc_x =
new TH1F(hname,
"",200,-30.0,30.0);
355 h1_distortion_dc_x->SetStats(0);
357 h1_distortion_dc_x->SetXTitle(
"dc[mm]");
360 sprintf(hname,
"h1_distortion_dt_x");
362 h1_distortion_dt_x = (TH1F *)gROOT->FindObject(hname);
363 if(h1_distortion_dt_x)
delete h1_distortion_dt_x;
364 h1_distortion_dt_x =
new TH1F(hname,
"",200,-1.0,1.0);
365 h1_distortion_dt_x->SetStats(0);
367 h1_distortion_dt_x->SetXTitle(
"dt[mm]");
369 sprintf(hname,
"h2_distortion_dc_t_x");
371 h2_distortion_dc_t_x = (TH2F *)gROOT->FindObject(hname);
372 if(h2_distortion_dc_t_x)
delete h2_distortion_dc_t_x;
373 h2_distortion_dc_t_x =
new TH2F(hname,
"",511,0.0,511.0,200,-30.0,30.0);
374 h2_distortion_dc_t_x->SetStats(0);
375 h2_distortion_dc_t_x->SetYTitle(
"dc[mm]");
376 h2_distortion_dc_t_x->SetXTitle(
"t[time bin]");
378 sprintf(hname,
"h2_distortion_dc_c_x");
380 h2_distortion_dc_c_x = (TH2F *)gROOT->FindObject(hname);
381 if(h2_distortion_dc_c_x)
delete h2_distortion_dc_c_x;
382 h2_distortion_dc_c_x =
new TH2F(hname,
"",288,0.0,288.0,200,-30.0,30.0);
383 h2_distortion_dc_c_x->SetStats(0);
384 h2_distortion_dc_c_x->SetYTitle(
"dc[mm]");
385 h2_distortion_dc_c_x->SetXTitle(
"c[channel bin]");
387 sprintf(hname,
"h2_distortion_dt_c_x");
389 h2_distortion_dt_c_x = (TH2F *)gROOT->FindObject(hname);
390 if(h2_distortion_dt_c_x)
delete h2_distortion_dt_c_x;
391 h2_distortion_dt_c_x =
new TH2F(hname,
"",288,0.0,288.0,200,-1.0,1.0);
392 h2_distortion_dt_c_x->SetStats(0);
393 h2_distortion_dt_c_x->SetYTitle(
"dt[mm]");
394 h2_distortion_dt_c_x->SetXTitle(
"c[channel bin]");
396 sprintf(hname,
"h2_distortion_dt_t_x");
398 h2_distortion_dt_t_x = (TH2F *)gROOT->FindObject(hname);
399 if(h2_distortion_dt_t_x)
delete h2_distortion_dt_t_x;
400 h2_distortion_dt_t_x =
new TH2F(hname,
"",511,0.0,511.0,200,-1.0,1.0);
401 h2_distortion_dt_t_x->SetStats(0);
402 h2_distortion_dt_t_x->SetYTitle(
"dt[mm]");
403 h2_distortion_dt_t_x->SetXTitle(
"t[time bin]");
405 sprintf(hname,
"h1_Qassoc_time_x");
406 h1_Qassoc_time_x = (TH1F *)gROOT->FindObject(hname);
407 if(h1_Qassoc_time_x)
delete h1_Qassoc_time_x;
408 h1_Qassoc_time_x =
new TH1F(hname,
"",511,0,511);
409 h1_Qassoc_time_x->SetStats(0);
410 h1_Qassoc_time_x->SetXTitle(
"t[time bin]");
417 sprintf(hname,
"h1_Qpix_y");
418 h1_Qpix_y = (TH1F *)gROOT->FindObject(hname);
419 if(h1_Qpix_y)
delete h1_Qpix_y;
420 h1_Qpix_y =
new TH1F(hname,
"",500,50,5000);
421 h1_Qpix_y->SetStats(0);
422 h1_Qpix_y->SetXTitle(
"Q[ADC]");
424 sprintf(hname,
"h1_Q_time_y");
425 h1_Q_time_y = (TH1F *)gROOT->FindObject(hname);
426 if(h1_Q_time_y)
delete h1_Q_time_y;
427 h1_Q_time_y =
new TH1F(hname,
"",511,0,511);
428 h1_Q_time_y->SetStats(0);
429 h1_Q_time_y->SetXTitle(
"t[time bin]");
431 sprintf(hname,
"h1_Q_channel_y");
432 h1_Q_channel_y = (TH1F *)gROOT->FindObject(hname);
433 if(h1_Q_channel_y)
delete h1_Q_channel_y;
434 h1_Q_channel_y =
new TH1F(hname,
"",288,0,288);
435 h1_Q_channel_y->SetStats(0);
436 h1_Q_channel_y->SetXTitle(
"channel[bin]");
438 sprintf(hname,
"h1_QtAssocN_time_y");
439 h1_QtAssocN_time_y = (TH1F *)gROOT->FindObject(hname);
440 if(h1_QtAssocN_time_y)
delete h1_QtAssocN_time_y;
441 h1_QtAssocN_time_y =
new TH1F(hname,
"",511,0,511);
442 h1_QtAssocN_time_y->SetStats(0);
443 h1_QtAssocN_time_y->SetXTitle(
"t[time bin]");
445 sprintf(hname,
"h1_QtAssocN_channel_y");
446 h1_QtAssocN_channel_y = (TH1F *)gROOT->FindObject(hname);
447 if(h1_QtAssocN_channel_y)
delete h1_QtAssocN_channel_y;
448 h1_QtAssocN_channel_y =
new TH1F(hname,
"",288,0,288);
449 h1_QtAssocN_channel_y->SetStats(0);
450 h1_QtAssocN_channel_y->SetXTitle(
"channel[bin]");
453 sprintf(hname,
"h1_QTcluster_y");
454 h1_QTcluster_y = (TH1F *)gROOT->FindObject(hname);
455 if(h1_QTcluster_y)
delete h1_QTcluster_y;
456 h1_QTcluster_y =
new TH1F(hname,
"",5000,500,25000);
457 h1_QTcluster_y->SetStats(0);
458 h1_QTcluster_y->SetXTitle(
"Q[ADC]");
460 sprintf(hname,
"h1_QCcluster_y");
461 h1_QCcluster_y = (TH1F *)gROOT->FindObject(hname);
462 if(h1_QCcluster_y)
delete h1_QCcluster_y;
463 h1_QCcluster_y =
new TH1F(hname,
"",5000,500,25000);
464 h1_QCcluster_y->SetStats(0);
465 h1_QCcluster_y->SetXTitle(
"Q[ADC]");
467 sprintf(hname,
"h1_SigTcluster_y");
468 h1_SigTcluster_y = (TH1F *)gROOT->FindObject(hname);
469 if(h1_SigTcluster_y)
delete h1_SigTcluster_y;
470 h1_SigTcluster_y =
new TH1F(hname,
"",100,0.0,10.0);
471 h1_SigTcluster_y->SetStats(0);
472 h1_SigTcluster_y->SetXTitle(
"#sigma[mm]");
474 sprintf(hname,
"h1_SigCcluster_y");
475 h1_SigCcluster_y = (TH1F *)gROOT->FindObject(hname);
476 if(h1_SigCcluster_y)
delete h1_SigCcluster_y;
477 h1_SigCcluster_y =
new TH1F(hname,
"",100,0.,10.0);
478 h1_SigCcluster_y->SetStats(0);
479 h1_SigCcluster_y->SetXTitle(
"#sigma[mm]");
481 sprintf(hname,
"h1_WidthTcluster_y");
482 h1_WidthTcluster_y = (TH1F *)gROOT->FindObject(hname);
483 if(h1_WidthTcluster_y)
delete h1_WidthTcluster_y;
484 h1_WidthTcluster_y =
new TH1F(hname,
"",100,0.0,100.0);
485 h1_WidthTcluster_y->SetStats(0);
486 h1_WidthTcluster_y->SetXTitle(
"width[n]");
488 sprintf(hname,
"h1_WidthCcluster_y");
489 h1_WidthCcluster_y = (TH1F *)gROOT->FindObject(hname);
490 if(h1_WidthCcluster_y)
delete h1_WidthCcluster_y;
491 h1_WidthCcluster_y =
new TH1F(hname,
"",100,0.0,100.0);
492 h1_WidthCcluster_y->SetStats(0);
493 h1_WidthCcluster_y->SetXTitle(
"width[n]");
495 sprintf(hname,
"h1_IndexTcluster_y");
496 h1_IndexTcluster_y = (TH1F *)gROOT->FindObject(hname);
497 if(h1_IndexTcluster_y)
delete h1_IndexTcluster_y;
498 h1_IndexTcluster_y =
new TH1F(hname,
"",511,0,511);
499 h1_IndexTcluster_y->SetStats(0);
500 h1_IndexTcluster_y->SetXTitle(
"Index");
502 sprintf(hname,
"h1_IndexCcluster_y");
503 h1_IndexCcluster_y = (TH1F *)gROOT->FindObject(hname);
504 if(h1_IndexCcluster_y)
delete h1_IndexCcluster_y;
505 h1_IndexCcluster_y =
new TH1F(hname,
"",288,0,288);
506 h1_IndexCcluster_y->SetStats(0);
507 h1_IndexCcluster_y->SetXTitle(
"Index");
509 sprintf(hname,
"h1_MeanTcluster_y");
510 h1_MeanTcluster_y = (TH1F *)gROOT->FindObject(hname);
511 if(h1_MeanTcluster_y)
delete h1_MeanTcluster_y;
512 h1_MeanTcluster_y =
new TH1F(hname,
"",288,0.0,288.0);
513 h1_MeanTcluster_y->SetStats(0);
514 h1_MeanTcluster_y->SetXTitle(
"Mean");
516 sprintf(hname,
"h1_MeanCcluster_y");
517 h1_MeanCcluster_y = (TH1F *)gROOT->FindObject(hname);
518 if(h1_MeanCcluster_y)
delete h1_MeanCcluster_y;
519 h1_MeanCcluster_y =
new TH1F(hname,
"",511,0.0,511.0);
520 h1_MeanCcluster_y->SetStats(0);
521 h1_MeanCcluster_y->SetXTitle(
"Mean");
525 sprintf(hname,
"h1_angleTrack_y");
526 h1_angleTrack_y = (TH1F *)gROOT->FindObject(hname);
527 if(h1_angleTrack_y)
delete h1_angleTrack_y;
528 h1_angleTrack_y =
new TH1F(hname,
"",100,0.0,3.15);
529 h1_angleTrack_y->SetStats(0);
530 h1_angleTrack_y->SetXTitle(
"#theta_{track}[rad]");
532 sprintf(hname,
"h1_theta_y");
533 h1_theta_y = (TH1F *)gROOT->FindObject(hname);
534 if(h1_theta_y)
delete h1_theta_y;
535 h1_theta_y =
new TH1F(hname,
"",50,-3.15,3.15);
536 h1_theta_y->SetStats(0);
537 h1_theta_y->SetXTitle(
"#theta[rad]");
539 sprintf(hname,
"h1_rho_y");
540 h1_rho_y = (TH1F *)gROOT->FindObject(hname);
541 if(h1_rho_y)
delete h1_rho_y;
542 h1_rho_y =
new TH1F(hname,
"",200,0.0,200.0);
543 h1_rho_y->SetStats(0);
544 h1_rho_y->SetXTitle(
"#rho[mm]");
546 sprintf(hname,
"h1_sigtheta_y");
547 h1_sigtheta_y = (TH1F *)gROOT->FindObject(hname);
548 if(h1_sigtheta_y)
delete h1_sigtheta_y;
549 h1_sigtheta_y =
new TH1F(hname,
"",50,0.0,0.1);
550 h1_sigtheta_y->SetStats(0);
551 h1_sigtheta_y->SetXTitle(
"#sigma_{#theta}[rad]");
553 sprintf(hname,
"h1_sigrho_y");
554 h1_sigrho_y = (TH1F *)gROOT->FindObject(hname);
555 if(h1_sigrho_y)
delete h1_sigrho_y;
556 h1_sigrho_y =
new TH1F(hname,
"",200,0.0,10.0);
557 h1_sigrho_y->SetStats(0);
558 h1_sigrho_y->SetXTitle(
"#sigma_{#rho}[mm]");
560 sprintf(hname,
"h1_QcAssoc_y");
561 h1_QcAssoc_y = (TH1F *)gROOT->FindObject(hname);
562 if(h1_QcAssoc_y)
delete h1_QcAssoc_y;
563 h1_QcAssoc_y =
new TH1F(hname,
"",5000,0,20000);
564 h1_QcAssoc_y->SetStats(0);
565 h1_QcAssoc_y->SetXTitle(
"Q[ADC]");
567 sprintf(hname,
"h1_QcNAssoc_y");
568 h1_QcNAssoc_y = (TH1F *)gROOT->FindObject(hname);
569 if(h1_QcNAssoc_y)
delete h1_QcNAssoc_y;
570 h1_QcNAssoc_y =
new TH1F(hname,
"",5000,100,20000);
571 h1_QcNAssoc_y->SetStats(0);
572 h1_QcNAssoc_y->SetXTitle(
"Q[ADC]");
574 sprintf(hname,
"h1_QtAssoc_y");
575 h1_QtAssoc_y = (TH1F *)gROOT->FindObject(hname);
576 if(h1_QtAssoc_y)
delete h1_QtAssoc_y;
577 h1_QtAssoc_y =
new TH1F(hname,
"",5000,100,20000);
578 h1_QtAssoc_y->SetStats(0);
579 h1_QtAssoc_y->SetXTitle(
"Q[ADC]");
581 sprintf(hname,
"h1_QtAssocN_y");
582 h1_QtAssocN_y = (TH1F *)gROOT->FindObject(hname);
583 if(h1_QtAssocN_y)
delete h1_QtAssocN_y;
584 h1_QtAssocN_y =
new TH1F(hname,
"",5000,0,20000);
585 h1_QtAssocN_y->SetStats(0);
586 h1_QtAssocN_y->SetXTitle(
"Q[ADC]");
588 sprintf(hname,
"h1_QtNAssoc_y");
589 h1_QtNAssoc_y = (TH1F *)gROOT->FindObject(hname);
590 if(h1_QtNAssoc_y)
delete h1_QtNAssoc_y;
591 h1_QtNAssoc_y =
new TH1F(hname,
"",5000,100,20000);
592 h1_QtNAssoc_y->SetStats(0);
593 h1_QtNAssoc_y->SetXTitle(
"Q[ADC]");
596 sprintf(hname,
"h1_TypeTrack_y");
597 h1_TypeTrack_y = (TH1F *)gROOT->FindObject(hname);
598 if(h1_TypeTrack_y)
delete h1_TypeTrack_y;
599 h1_TypeTrack_y =
new TH1F(hname,
"",4,0,4);
600 h1_TypeTrack_y->SetStats(0);
601 h1_TypeTrack_y->SetXTitle(
"Type");
603 sprintf(hname,
"h1_distortion_dc_y");
605 h1_distortion_dc_y = (TH1F *)gROOT->FindObject(hname);
606 if(h1_distortion_dc_y)
delete h1_distortion_dc_y;
607 h1_distortion_dc_y =
new TH1F(hname,
"",200,-30.0,30.0);
608 h1_distortion_dc_y->SetStats(0);
610 h1_distortion_dc_y->SetXTitle(
"dc[mm]");
613 sprintf(hname,
"h1_distortion_dt_y");
615 h1_distortion_dt_y = (TH1F *)gROOT->FindObject(hname);
616 if(h1_distortion_dt_y)
delete h1_distortion_dt_y;
617 h1_distortion_dt_y =
new TH1F(hname,
"",200,-1.0,1.0);
618 h1_distortion_dt_y->SetStats(0);
620 h1_distortion_dt_y->SetXTitle(
"dt[mm]");
622 sprintf(hname,
"h2_distortion_dc_t_y");
624 h2_distortion_dc_t_y = (TH2F *)gROOT->FindObject(hname);
625 if(h2_distortion_dc_t_y)
delete h2_distortion_dc_t_y;
626 h2_distortion_dc_t_y =
new TH2F(hname,
"",511,0.0,511.0,200,-30.0,30.0);
627 h2_distortion_dc_t_y->SetStats(0);
628 h2_distortion_dc_t_y->SetYTitle(
"dc[mm]");
629 h2_distortion_dc_t_y->SetXTitle(
"t[time bin]");
631 sprintf(hname,
"h2_distortion_dc_c_y");
633 h2_distortion_dc_c_y = (TH2F *)gROOT->FindObject(hname);
634 if(h2_distortion_dc_c_y)
delete h2_distortion_dc_c_y;
635 h2_distortion_dc_c_y =
new TH2F(hname,
"",288,0.0,288.0,200,-30.0,30.0);
636 h2_distortion_dc_c_y->SetStats(0);
637 h2_distortion_dc_c_y->SetYTitle(
"dc[mm]");
638 h2_distortion_dc_c_y->SetXTitle(
"c[channel bin]");
640 sprintf(hname,
"h2_distortion_dt_c_y");
642 h2_distortion_dt_c_y = (TH2F *)gROOT->FindObject(hname);
643 if(h2_distortion_dt_c_y)
delete h2_distortion_dt_c_y;
644 h2_distortion_dt_c_y =
new TH2F(hname,
"",288,0.0,288.0,200,-1.0,1.0);
645 h2_distortion_dt_c_y->SetStats(0);
646 h2_distortion_dt_c_y->SetYTitle(
"dt[mm]");
647 h2_distortion_dt_c_y->SetXTitle(
"c[channel bin]");
649 sprintf(hname,
"h2_distortion_dt_t_y");
651 h2_distortion_dt_t_y = (TH2F *)gROOT->FindObject(hname);
652 if(h2_distortion_dt_t_y)
delete h2_distortion_dt_t_y;
653 h2_distortion_dt_t_y =
new TH2F(hname,
"",511,0.0,511.0,200,-1.0,1.0);
654 h2_distortion_dt_t_y->SetStats(0);
655 h2_distortion_dt_t_y->SetYTitle(
"dt[mm]");
656 h2_distortion_dt_t_y->SetXTitle(
"t[time bin]");
658 sprintf(hname,
"h1_Qassoc_time_y");
659 h1_Qassoc_time_y = (TH1F *)gROOT->FindObject(hname);
660 if(h1_Qassoc_time_y)
delete h1_Qassoc_time_y;
661 h1_Qassoc_time_y =
new TH1F(hname,
"",511,0,511);
662 h1_Qassoc_time_y->SetStats(0);
663 h1_Qassoc_time_y->SetXTitle(
"t[time bin]");
671 sprintf(hname,
"h1_tmin");
672 h1_tmin = (TH1F *)gROOT->FindObject(hname);
673 if(h1_tmin)
delete h1_tmin;
674 h1_tmin =
new TH1F(hname,
"",511,0,511);
675 h1_tmin->SetStats(0);
676 h1_tmin->SetXTitle(
"t_{min} [bin]");
678 sprintf(hname,
"h1_tmax");
679 h1_tmax = (TH1F *)gROOT->FindObject(hname);
680 if(h1_tmax)
delete h1_tmax;
681 h1_tmax =
new TH1F(hname,
"",511,0,511);
682 h1_tmax->SetStats(0);
683 h1_tmax->SetXTitle(
"t_{max} [bin]");
685 sprintf(hname,
"h1_xmin");
686 h1_xmin = (TH1F *)gROOT->FindObject(hname);
687 if(h1_xmin)
delete h1_xmin;
688 h1_xmin =
new TH1F(hname,
"",300,0,300);
689 h1_xmin->SetStats(0);
690 h1_xmin->SetXTitle(
"x[channel bin]");
692 sprintf(hname,
"h1_xmax");
693 h1_xmax = (TH1F *)gROOT->FindObject(hname);
694 if(h1_xmax)
delete h1_xmax;
695 h1_xmax =
new TH1F(hname,
"",300,0,300);
696 h1_xmax->SetStats(0);
697 h1_xmax->SetXTitle(
"x[channel bin]");
699 sprintf(hname,
"h1_ymin");
700 h1_ymin = (TH1F *)gROOT->FindObject(hname);
701 if(h1_ymin)
delete h1_ymin;
702 h1_ymin =
new TH1F(hname,
"",300,0,300);
703 h1_ymin->SetStats(0);
704 h1_ymin->SetXTitle(
"y[channel bin]");
706 sprintf(hname,
"h1_ymax");
707 h1_ymax = (TH1F *)gROOT->FindObject(hname);
708 if(h1_ymax)
delete h1_ymax;
709 h1_ymax =
new TH1F(hname,
"",300,0,300);
710 h1_ymax->SetStats(0);
711 h1_ymax->SetXTitle(
"y[channel bin]");
713 sprintf(hname,
"h1_dtime");
714 h1_dtime = (TH1F *)gROOT->FindObject(hname);
715 if(h1_dtime)
delete h1_dtime;
716 h1_dtime =
new TH1F(hname,
"",511,0,511);
717 h1_dtime->SetStats(0);
718 h1_dtime->SetXTitle(
"t_{drift} [bin]");
720 sprintf(hname,
"helen");
721 helen = (TH1F *)gROOT->FindObject(hname);
722 if(helen)
delete helen;
723 helen =
new TH1F(hname,
"",20,0.0,19.0);
725 helen->SetXTitle(
"n");
727 sprintf(hname,
"heprof");
728 heprof = (TH1F *)gROOT->FindObject(hname);
729 if(heprof)
delete heprof;
730 heprof =
new TH1F(hname,
"",20,0.0,19.0);
732 heprof->SetXTitle(
"n");
735 hPmm2 =
new TH1F(
"hPmm2",
"",16,0,16);
736 hadc[0] =
new TH1F(
"hAdcg0",
"All Adc counts Gain 0",256,0.0,1024.0);
737 hadc[1] =
new TH1F(
"hAdcg1",
"All Adc counts Gain 1",256,0.0,1024.0);
739 htvse =
new TH2F(
"hTvsE",
"Time Stamp vs Ev Num",512,0.0,0.0,512,0.0,0.0);
740 hramp =
new TH2F(
"hRamp",
"Fine Time vs TDC Ramp",4,0.0,3.0,256,0.0,0.0);
741 htdiff =
new TH1F(
"hTDiff",
"Time Diff",1024,0.0,1000000.0);
742 htdiff2 =
new TH1F(
"hTDiff2",
"Time Diff low",1024,0.0,15000.0);
743 hPmm2Triggered =
new TH1F(
"hPmm2Triggered",
";PM_{channel}",12,1,13);
744 hPmm2Missed =
new TH1F(
"hPmm2Missed",
";PM_{channel}",12,1,13);
745 hPmm2Spectrum2D =
new TH2F(
"hPmm2Spectrum2D",
";Channel;Charge [ADC]",12,1,13,1024,0,1024);
746 hPmm2Coincidence =
new TH2F(
"hPmm2Coincidence",
";Channel;Channel",12,1,13,12,1,13);
748 h2_QtAssocN_time_x=
new TH2F(
"h2_QtAssocN_time_x",
";t[time bin];<Q>[ADC]",511,0,511,3000,0,6000);
749 h2_QtAssocN_time_y=
new TH2F(
"h2_QtAssocN_time_y",
";t[time bin];<Q>[ADC]",511,0,511,3000,0,6000);
751 sprintf(hname,
"h2_prof_dt_c_x");
752 h2_prof_dt_c_x = (TProfile *)gROOT->FindObject(hname);
753 if(h2_prof_dt_c_x)
delete h2_prof_dt_c_x;
754 h2_prof_dt_c_x =
new TProfile(hname,
"",288,0.0,288.0);
755 h2_prof_dt_c_x->SetStats(0);
757 sprintf(hname,
"h2_prof_dc_c_x");
758 h2_prof_dc_c_x = (TProfile *)gROOT->FindObject(hname);
759 if(h2_prof_dc_c_x)
delete h2_prof_dc_c_x;
760 h2_prof_dc_c_x =
new TProfile(hname,
"",288,0.0,288.0);
761 h2_prof_dc_c_x->SetStats(0);
763 sprintf(hname,
"h2_prof_dt_t_x");
764 h2_prof_dt_t_x = (TProfile *)gROOT->FindObject(hname);
765 if(h2_prof_dt_t_x)
delete h2_prof_dt_t_x;
766 h2_prof_dt_t_x =
new TProfile(hname,
"",511,0.0,511.0);
767 h2_prof_dt_t_x->SetStats(0);
769 sprintf(hname,
"h2_prof_dc_t_x");
770 h2_prof_dc_t_x = (TProfile *)gROOT->FindObject(hname);
771 if(h2_prof_dc_t_x)
delete h2_prof_dc_t_x;
772 h2_prof_dc_t_x =
new TProfile(hname,
"",511,0.0,511.0);
773 h2_prof_dc_t_x->SetStats(0);
776 sprintf(hname,
"h2_prof_dt_c_y");
777 h2_prof_dt_c_y = (TProfile *)gROOT->FindObject(hname);
778 if(h2_prof_dt_c_y)
delete h2_prof_dt_c_y;
779 h2_prof_dt_c_y =
new TProfile(hname,
"",288,0.0,288.0);
780 h2_prof_dt_c_y->SetStats(0);
782 sprintf(hname,
"h2_prof_dc_c_y");
783 h2_prof_dc_c_y = (TProfile *)gROOT->FindObject(hname);
784 if(h2_prof_dc_c_y)
delete h2_prof_dc_c_y;
785 h2_prof_dc_c_y =
new TProfile(hname,
"",288,0.0,288.0);
786 h2_prof_dc_c_y->SetStats(0);
788 sprintf(hname,
"h2_prof_dt_t_y");
789 h2_prof_dt_t_y = (TProfile *)gROOT->FindObject(hname);
790 if(h2_prof_dt_t_y)
delete h2_prof_dt_t_y;
791 h2_prof_dt_t_y =
new TProfile(hname,
"",511,0.0,511.0);
792 h2_prof_dt_t_y->SetStats(0);
794 sprintf(hname,
"h2_prof_dc_t_y");
795 h2_prof_dc_t_y = (TProfile *)gROOT->FindObject(hname);
796 if(h2_prof_dc_t_y)
delete h2_prof_dc_t_y;
797 h2_prof_dc_t_y =
new TProfile(hname,
"",511,0.0,511.0);
798 h2_prof_dc_t_y->SetStats(0);
800 sprintf(hname,
"h2_Qprof_x");
801 h2_Qprof_x = (TProfile *)gROOT->FindObject(hname);
802 if(h2_Qprof_x)
delete h2_Qprof_x;
803 h2_Qprof_x =
new TProfile(hname,
"",511,0.0,511.0);
804 h2_Qprof_x->SetStats(0);
806 sprintf(hname,
"h2_Qprof_y");
807 h2_Qprof_y = (TProfile *)gROOT->FindObject(hname);
808 if(h2_Qprof_y)
delete h2_Qprof_y;
809 h2_Qprof_y =
new TProfile(hname,
"",511,0.0,511.0);
810 h2_Qprof_y->SetStats(0);
817 hTriggerCreated =
new TH1F(
"hTriggerCreated",
";",16,-1,15);
818 hTriggerTraversing =
new TH1F(
"hTriggerTraversing",
";",16,-1,15);
819 hTriggerEmpty =
new TH1F(
"hTriggerEmpty",
";",16,-1,15);
820 hTriggerShower =
new TH1F(
"hTriggerShower",
";",16,-1,15);
821 hTriggerOther =
new TH1F(
"hTriggerOther",
"",16,-1,15);
823 hTriggerTTZ=
new TH1F(
"hTriggerTTZ",
";",16,-1,15);
824 hTriggerContained =
new TH1F(
"hTriggerContained",
";",16,-1,15);
825 hTriggerDepot=
new TH1F(
"hTriggerDepot",
";",16,-1,15);
826 hTriggerTwoTrGamma=
new TH1F(
"hTriggerTwoTrGamma",
";",16,-1,15);
827 hTriggerTwoTrDelta=
new TH1F(
"hTriggerTwoTrDelta",
";",16,-1,15);
828 hTriggerTwoTrOther=
new TH1F(
"hTriggerTwoTrOther",
";",16,-1,15);
833 hTriggerType =
new TH1F(
"hTriggerType",
";",11,-1,10);
835 h1Doca =
new TH1F(
"h1Doca",
";Doca[mm]",50,0.,20.);
836 h1Poca_x =
new TH1F(
"h1Poca_x",
";Poca x/y",40,123.5,163.5);
837 h1Poca_y =
new TH1F(
"h1Poca_y",
";Poca x/y",40,123.5,163.5);
838 h1Poca_z =
new TH1F(
"h1Poca_z",
";Poca z",511,0.,511.);
840 h2Poca_xy =
new TH2F(
"h2Poca_xy",
";Poca x;Poca y",200,100.,200.,200,100.,200.);
841 h2Poca_xz =
new TH2F(
"h2Poca_xz",
";Poca z;Poca x",511,0.,511.,200,100.,200.);
842 h2Poca_yz =
new TH2F(
"h2Poca_yz",
";Poca z;Poca y",511,0.,511.,200,100.,200.);
845 sprintf(hname,
"h1Px");
846 h1Px = (TH1F *)gROOT->FindObject(hname);
847 if(h1Px)
delete h1Px;
848 h1Px =
new TH1F(hname,
"",100,-1.,1.);
850 h1Px->SetXTitle(
"Px");
852 h1Py =
new TH1F(
"h1Py",
";Py",100,-1.,1.);
853 h1Pz =
new TH1F(
"h1Pz",
";Pz",100,-1.,1.);
855 h2Pxy =
new TH2F(
"h2Pxy",
";",100,-1.,1.,100,-1.,1.);
856 h2Pxz =
new TH2F(
"h2Pxz",
";",100,-1.,1.,100,-1.,1.);
857 h2Pyz =
new TH2F(
"h2Pyz",
";",100,-1.,1.,100,-1.,1.);
862 sprintf(hname,
"h1AOpen");
863 h1AOpen = (TH1F *)gROOT->FindObject(hname);
864 if(h1AOpen)
delete h1AOpen;
865 h1AOpen =
new TH1F(hname,
"",50,0.,3.15);
866 h1AOpen->SetStats(0);
867 h1AOpen->SetXTitle(
"#theta_{open}(rad)");
869 sprintf(hname,
"h1Azimutal");
870 h1Azimutal = (TH1F *)gROOT->FindObject(hname);
871 if(h1Azimutal)
delete h1Azimutal;
872 h1Azimutal =
new TH1F(hname,
"",50,-3.15,3.15);
873 h1Azimutal->SetStats(0);
874 h1Azimutal->SetXTitle(
"#theta_{azimuth}(rad)");
877 sprintf(hname,
"h1zxd");
878 h1zxd = (TH1F *)gROOT->FindObject(hname);
879 if(h1zxd)
delete h1zxd;
880 h1zxd =
new TH1F(hname,
"",511,0.,511.);
882 h1zxd->SetXTitle(
"t_{0}[bin]");
884 sprintf(hname,
"h1zyd");
885 h1zyd = (TH1F *)gROOT->FindObject(hname);
886 if(h1zyd)
delete h1zyd;
887 h1zyd =
new TH1F(hname,
"",511,0.,511.);
889 h1zyd->SetXTitle(
"t_{0}[bin]");
891 sprintf(hname,
"h1xd");
892 h1xd = (TH1F *)gROOT->FindObject(hname);
893 if(h1xd)
delete h1xd;
894 h1xd =
new TH1F(hname,
"",100,114.,174.);
896 h1xd->SetXTitle(
"x_{0}/y_{0}[bin]");
898 sprintf(hname,
"h1yd");
899 h1yd = (TH1F *)gROOT->FindObject(hname);
900 if(h1yd)
delete h1yd;
901 h1yd =
new TH1F(hname,
"",100,114.,174.);
903 h1yd->SetXTitle(
"x_{0}/y_{0}[bin]");
905 sprintf(hname,
"h2xz");
907 h2xz = (TH2F *)gROOT->FindObject(hname);
908 if(h2xz)
delete h2xz;
909 h2xz =
new TH2F(hname,
"",511,0.,511.,100,114.0,174.0);
911 h2xz->SetXTitle(
"t_{0}[bin]");
912 h2xz->SetYTitle(
"x_{0}[bin]");
914 sprintf(hname,
"h2yz");
916 h2yz = (TH2F *)gROOT->FindObject(hname);
917 if(h2yz)
delete h2yz;
918 h2yz =
new TH2F(hname,
"",511,0.,511.,100,114.0,174.0);
920 h2yz->SetXTitle(
"t_{0}[bin]");
921 h2yz->SetYTitle(
"y_{0}[bin]");
923 sprintf(hname,
"h2xzn");
925 h2xzn = (TH2F *)gROOT->FindObject(hname);
926 if(h2xzn)
delete h2xzn;
927 h2xzn =
new TH2F(hname,
"",100,-150.,150.,100,-30.0,30.0);
929 h2xzn->SetXTitle(
"t_{center}[bin]");
930 h2xzn->SetYTitle(
"x_{center}[bin]");
932 sprintf(hname,
"h2yzn");
934 h2yzn = (TH2F *)gROOT->FindObject(hname);
935 if(h2yzn)
delete h2yzn;
936 h2yzn =
new TH2F(hname,
"",100,-150.,150.,100,-30.,30.0);
938 h2yzn->SetXTitle(
"t_{center}[bin]");
939 h2yzn->SetYTitle(
"y_{center}[bin]");
941 sprintf(hname,
"h2xyn");
943 h2xyn = (TH2F *)gROOT->FindObject(hname);
944 if(h2xyn)
delete h2xyn;
945 h2xyn =
new TH2F(hname,
"",100,-150.,150.,100,-150.,150.0);
947 h2xyn->SetXTitle(
"x_{center}[bin]");
948 h2xyn->SetYTitle(
"y_{center}[bin]");
952 sprintf(hname,
"h1zx3d");
953 h1zx3d = (TH1F *)gROOT->FindObject(hname);
954 if(h1zx3d)
delete h1zx3d;
955 h1zx3d =
new TH1F(hname,
"",511,0.,511.);
957 h1zx3d->SetXTitle(
"t_{0}[bin]");
959 sprintf(hname,
"h1zy3d");
960 h1zy3d = (TH1F *)gROOT->FindObject(hname);
961 if(h1zy3d)
delete h1zy3d;
962 h1zy3d =
new TH1F(hname,
"",511,0.,511.);
964 h1zy3d->SetXTitle(
"t_{0}[bin]");
966 sprintf(hname,
"h1x3d");
967 h1x3d = (TH1F *)gROOT->FindObject(hname);
968 if(h1x3d)
delete h1x3d;
969 h1x3d =
new TH1F(hname,
"",100,114.,174.);
971 h1x3d->SetXTitle(
"x_{0}/y_{0}[bin]");
973 sprintf(hname,
"h1y3d");
974 h1y3d = (TH1F *)gROOT->FindObject(hname);
975 if(h1y3d)
delete h1y3d;
976 h1y3d =
new TH1F(hname,
"",100,114.,174.);
978 h1y3d->SetXTitle(
"x_{0}/y_{0}[bin]");
982 sprintf(hname,
"h2xz3n");
984 h2xz3n = (TH2F *)gROOT->FindObject(hname);
985 if(h2xz3n)
delete h2xz3n;
986 h2xz3n =
new TH2F(hname,
"",100,-150.,150.,100,-30.0,30.0);
988 h2xz3n->SetXTitle(
"t_{center}[bin]");
989 h2xz3n->SetYTitle(
"x_{center}[bin]");
991 sprintf(hname,
"h2yz3n");
993 h2yz3n = (TH2F *)gROOT->FindObject(hname);
994 if(h2yz3n)
delete h2yz3n;
995 h2yz3n =
new TH2F(hname,
"",100,-150.,150.,100,-30.,30.0);
997 h2yz3n->SetXTitle(
"t_{center}[bin]");
998 h2yz3n->SetYTitle(
"y_{center}[bin]");
1000 sprintf(hname,
"h2xy3n");
1002 h2xy3n = (TH2F *)gROOT->FindObject(hname);
1003 if(h2xy3n)
delete h2xy3n;
1004 h2xy3n =
new TH2F(hname,
"",100,-150.,150.,100,-150.,150.0);
1005 h2xy3n->SetStats(0);
1006 h2xy3n->SetXTitle(
"x_{center}[bin]");
1007 h2xy3n->SetYTitle(
"y_{center}[bin]");
1015 sprintf(hname,
"h1NTrackX");
1016 h1NTrackX = (TH1F *)gROOT->FindObject(hname);
1017 if(h1NTrackX)
delete h1NTrackX;
1018 h1NTrackX =
new TH1F(hname,
"",13,-1.,12.);
1019 h1NTrackX->SetStats(0);
1020 h1NTrackX->SetXTitle(
"Ntr");
1023 sprintf(hname,
"h1NTrackXTest");
1024 h1NTrackXTest = (TH1F *)gROOT->FindObject(hname);
1025 if(h1NTrackXTest)
delete h1NTrackXTest;
1026 h1NTrackXTest =
new TH1F(hname,
"",13,-1.,12.);
1027 h1NTrackXTest->SetStats(0);
1028 h1NTrackXTest->SetXTitle(
"Ntr");
1031 sprintf(hname,
"h1NTrackY");
1032 h1NTrackY = (TH1F *)gROOT->FindObject(hname);
1033 if(h1NTrackY)
delete h1NTrackY;
1034 h1NTrackY =
new TH1F(hname,
"",13,-1.,12.);
1035 h1NTrackY->SetStats(0);
1036 h1NTrackY->SetXTitle(
"Ntr");
1038 sprintf(hname,
"h1NClusterX");
1039 h1NClusterX = (TH1F *)gROOT->FindObject(hname);
1040 if(h1NClusterX)
delete h1NClusterX;
1041 h1NClusterX =
new TH1F(hname,
"",120,20,600);
1042 h1NClusterX->SetStats(0);
1043 h1NClusterX->SetXTitle(
"N_{cluster}");
1045 sprintf(hname,
"h1NClusterY");
1046 h1NClusterY = (TH1F *)gROOT->FindObject(hname);
1047 if(h1NClusterY)
delete h1NClusterY;
1048 h1NClusterY =
new TH1F(hname,
"",120,20,600);
1049 h1NClusterY->SetStats(0);
1050 h1NClusterY->SetXTitle(
"N_{cluster}");
1052 sprintf(hname,
"h1NClusterNX");
1053 h1NClusterNX = (TH1F *)gROOT->FindObject(hname);
1054 if(h1NClusterNX)
delete h1NClusterNX;
1055 h1NClusterNX =
new TH1F(hname,
"",20,0,20);
1056 h1NClusterNX->SetStats(0);
1057 h1NClusterNX->SetXTitle(
"N_{cluster}");
1059 sprintf(hname,
"h1NClusterNY");
1060 h1NClusterNY = (TH1F *)gROOT->FindObject(hname);
1061 if(h1NClusterNY)
delete h1NClusterNY;
1062 h1NClusterNY =
new TH1F(hname,
"",20,0,20);
1063 h1NClusterNY->SetStats(0);
1064 h1NClusterNY->SetXTitle(
"N_{cluster}");
1066 alignmentx=
new TGraph();
1067 alignmenty=
new TGraph();
1069 sprintf(hname,
"total charges in time");
1070 h1_pro_timeX = (TH1F *)gROOT->FindObject(hname);
1071 if( h1_pro_timeX)
delete h1_pro_timeX;
1072 h1_pro_timeX =
new TH1F(hname,
"",
NADC,0.0,(
float)
NADC);
1073 h1_pro_timeX ->SetStats(0);
1074 h1_pro_timeX ->SetXTitle(
"t[bin]");
1075 h1_pro_timeX ->SetYTitle(
"Q");
1077 sprintf(hname,
"total charges in time");
1078 h1_pro_timeY = (TH1F *)gROOT->FindObject(hname);
1079 if( h1_pro_timeY)
delete h1_pro_timeY;
1080 h1_pro_timeY =
new TH1F(hname,
"",NADC,0.0,(
float)NADC);
1081 h1_pro_timeY ->SetStats(0);
1082 h1_pro_timeY ->SetXTitle(
"t[bin]");
1083 h1_pro_timeY ->SetYTitle(
"Q");
1085 sprintf(hname,
"h1_sigrho_gamma_x");
1086 h1_sigrho_gamma_x = (TH1F *)gROOT->FindObject(hname);
1087 if(h1_sigrho_gamma_x)
delete h1_sigrho_gamma_x;
1088 h1_sigrho_gamma_x =
new TH1F(hname,
"",200,0.0,10.0);
1089 h1_sigrho_gamma_x->SetStats(0);
1090 h1_sigrho_gamma_x->SetXTitle(
"#sigma_{#rho}[mm]");
1092 sprintf(hname,
"h1_sigrho_gamma_y");
1093 h1_sigrho_gamma_y = (TH1F *)gROOT->FindObject(hname);
1094 if(h1_sigrho_gamma_y)
delete h1_sigrho_gamma_y;
1095 h1_sigrho_gamma_y =
new TH1F(hname,
"",200,0.0,10.0);
1096 h1_sigrho_gamma_y->SetStats(0);
1097 h1_sigrho_gamma_y->SetXTitle(
"#sigma_{#rho}[mm]");
1099 sprintf(hname,
"h1_sigrho_TTZ_x");
1100 h1_sigrho_TTZ_x = (TH1F *)gROOT->FindObject(hname);
1101 if(h1_sigrho_TTZ_x)
delete h1_sigrho_TTZ_x;
1102 h1_sigrho_TTZ_x =
new TH1F(hname,
"",200,0.0,10.0);
1103 h1_sigrho_TTZ_x->SetStats(0);
1104 h1_sigrho_TTZ_x->SetXTitle(
"#sigma_{#rho}[mm]");
1106 sprintf(hname,
"h1_sigrho_TTZ_y");
1107 h1_sigrho_TTZ_y = (TH1F *)gROOT->FindObject(hname);
1108 if(h1_sigrho_TTZ_y)
delete h1_sigrho_TTZ_y;
1109 h1_sigrho_TTZ_y =
new TH1F(hname,
"",200,0.0,10.0);
1110 h1_sigrho_TTZ_y->SetStats(0);
1111 h1_sigrho_TTZ_y->SetXTitle(
"#sigma_{#rho}[mm]");
1114 h1_NEvent =
new TH1F(
"h1_NEvent",
";",13,0,13);
1115 h1_TimeSt =
new TH1F(
"h1_TimeSt",
";",2,0,2);
1117 h1_vertex_tr1 =
new TH1F(
"h1_vertex_tr1",
";d_{min}[mm]",200,-1.,99.);
1118 h1_vertex_tr2 =
new TH1F(
"h1_vertex_tr2",
";d_{min}[mm]",200,-1.,99.);
1119 h2_vertex =
new TH2F(
"h2_vertex",
";d_{min}[mm];d_{min}[mm]",200,-1.,100.,200,-1.,99.);
1142 Int_t EventType=fEvt->GetRecoEvent()->GetEventType();
1158 for(
int ch = 0; ch<16; ch++) hit[ch] = 0;
1159 for(imes=0;imes<esize;imes++) {
1165 if(hit[3] && hit[4] && hit[5] && hit[6]){
1172 Int_t ntr_y= fEvt->GetRecoEvent()->GetNtracksYEvt();
1175 h1NTrackY->Fill(ntr_y);
1188 harpodccmap = fEvt->GetDccMap(ndet);
1189 if(!harpodccmap)
continue;
1190 for(Int_t i=0;i<511;i++){
1192 for(Int_t j=0;j<288;j++){
1193 Double_t q = harpodccmap->
GetData(j,i);
1194 if(ndet==0 &&q>0) h1_Qpix_x->Fill(q);
1195 if(ndet==1 &&q>0) h1_Qpix_y->Fill(q);
1200 if(ndet==0) h1_Q_time_x->Fill(i+1,charge);
1201 if(ndet==1) h1_Q_time_y->Fill(i+1,charge);
1204 for(Int_t j=0;j<288;++j)
1207 for(Int_t i=0;i<511;++i){
1208 Double_t q = harpodccmap->
GetData(j,i);
1213 if(ndet==0) h1_Q_channel_x->Fill(j+1,charge);
1214 if(ndet==1) h1_Q_channel_y->Fill(j+1,charge);
1221 Double_t t0= 600.,x0=400.,y0=400., t0x=600.,t0y=600.,t1x=-1, t2x=-1, t1y=-1,t2y=-1, x1=-1,y1=-1,x2=-1,q0x=-1,q0y=-1,q1x=-1,q1y=-1,q2x=-1,q2y=-1,t0x3=0.,t0y3=0.,x30=0,y30=0.;
1222 Int_t tmin = 600,
tmax = -10, xmin = 400, xmax = -10, ymin = 400, ymax = -10;
1228 Int_t nCl = clArray->GetEntries();
1229 for(Int_t icl = 0; icl<nCl; icl++){
1231 Double_t q = cluster->
GetQ();
1233 Double_t mean = cluster->
GetMean();
1237 Double_t sig = cluster->
GetSig();
1243 if(plane==0 &&idcluster<0) nclusternx++;
1244 if(plane==1 &&idcluster<0) nclusterny++;
1247 if(Index<tmin) tmin = Index;
1253 if(Index<t0) t0=Index;
1257 if( plane == 0 && Index<xmin) xmin = Index;
1258 if( plane == 0 && Index>xmax) xmax = Index;
1259 if( plane == 1 && Index<ymin) ymin = Index;
1260 if( plane == 1 && Index>ymax) ymax = Index;
1265 h1_QCcluster_x->Fill(q);
1266 h1_IndexCcluster_x->Fill(ind);
1267 h1_WidthCcluster_x->Fill(width);
1268 h1_SigCcluster_x->Fill(sig);
1269 h1_MeanCcluster_x->Fill(mean);
1272 h1_QTcluster_x->Fill(q);
1273 h1_IndexTcluster_x->Fill(ind);
1274 h1_WidthTcluster_x->Fill(width);
1275 h1_SigTcluster_x->Fill(sig);
1276 h1_MeanTcluster_x->Fill(mean);
1286 h1_QCcluster_y->Fill(q);
1287 h1_IndexCcluster_y->Fill(ind);
1288 h1_WidthCcluster_y->Fill(width);
1289 h1_SigCcluster_y->Fill(sig);
1290 h1_MeanCcluster_y->Fill(mean);
1293 h1_QTcluster_y->Fill(q);
1294 h1_IndexTcluster_y->Fill(ind);
1295 h1_WidthTcluster_y->Fill(width);
1296 h1_SigTcluster_y->Fill(sig);
1297 h1_MeanTcluster_y->Fill(mean);
1308 h1NClusterNX->Fill(nclusternx);
1309 h1NClusterNY->Fill(nclusterny);
1313 for(Int_t icl = 0; icl<nCl; icl++){
1315 Double_t q = cluster->
GetQ();
1317 Double_t mean = cluster->
GetMean();
1321 if(plane==0 && type==1) {
1322 if(ind-t0x==0) q0x=q;
1335 if(plane==1 && type ==1){
1337 if(ind-t0y==0) q0y=q;
1352 t0x3=(t0x*q0x+t1x*q1x+t2x*q2x)/(q0x+q1x+q2x);
1353 x30=(x0*q0x+x1*q1x+x2*q2x)/(q0x+q1x+q2x);
1361 t0y3=(t0y*q0y+t1y*q1y+t2y*q2y)/(q0y+q1y+q2y);
1362 y30=(y0*q0y+y1*q1y+x2*q2y)/(q0y+q1y+q2y);
1373 if(t0<380&& t0>110) {
1377 if(x30<174&& x30>114) h1x3d->Fill(x30);
1378 if(y30<174&& y30>114) h1y3d->Fill(y30);
1381 if(x30<174&&x30>114) {
1382 if(t0x3<380&& t0x3>110) {
1383 h2xz3n->Fill(t0x3-250,x30-143.5);
1386 if(y30<174&& y30>114) {
1387 if(t0y3<380&& t0y3>110) {
1388 h2yz3n->Fill(t0y3-250,y30-143.5);
1391 h2xy3n->Fill(x30-143.5,y30-143.5);
1399 fAlignmentZ=(fAlignmentZx+fAlignmentZy)/2;
1405 h1_tmin->Fill(tmin);
1406 h1_tmax->Fill(
tmax);
1407 h1_xmin->Fill(xmin);
1408 h1_ymin->Fill(ymin);
1409 h1_xmax->Fill(xmax);
1410 h1_ymax->Fill(ymax);
1411 h1_dtime->Fill(
tmax-tmin);
1414 if(t0<380&& t0>110) {
1418 if(x30<174&& x30>114) h1xd->Fill(x30);
1419 if(y30<174&& y30>114) h1yd->Fill(y30);
1421 if(x30<174&&x30>114) {
1422 if(t0x3<380&& t0x3>110) {
1423 h2xz->Fill(t0x3,x30);
1424 h2xzn->Fill(t0x3-250,x30-143.5);
1427 alignmentx->SetPoint(1,t0x3,x30);
1429 if(y30<174&& y30>114) {
1430 if(t0y3<380&& t0y3>110) {
1431 h2yz->Fill(t0y3,y30);
1432 h2yzn->Fill(t0y3-250,y30-143.5);
1435 h2xyn->Fill(x30-143.5,y30-143.5);
1437 alignmenty->SetPoint(1,t0y3,y30);
1442 Int_t nTr = trArray->GetEntries();
1446 for(Int_t itr = 0; itr<nTr; itr++)
1451 if(plane ==0) h1_sigrho_gamma_x->Fill(sigrho);
1452 if(plane ==1) h1_sigrho_gamma_y->Fill(sigrho);
1457 for(Int_t itr = 0; itr<nTr; itr++)
1462 if(plane ==0) h1_sigrho_TTZ_x->Fill(sigrho);
1463 if(plane ==1) h1_sigrho_TTZ_y->Fill(sigrho);
1469 if(TTZType==1) fNormTTz++;
1475 for(Int_t itr = 0; itr<nTr; itr++)
1480 Double_t rho = track->
GetMrho();
1487 Int_t nclustertrack = track-> GetNclusterTrack();
1492 if(plane==0&& IsTTZ==1){
1495 if(plane==1&& IsTTZ==1){
1500 if(plane==0) h1NClusterX->Fill(nclustertrack);
1501 if(plane==1) h1NClusterY->Fill(nclustertrack);
1504 h1_theta_x->Fill(theta);
1505 h1_sigtheta_x->Fill(sigtheta);
1506 h1_rho_x->Fill(rho);
1507 h1_sigrho_x->Fill(sigrho);
1508 h1_TypeTrack_x->Fill(typetrack);
1509 h1_angleTrack_x->Fill(angletrack);
1513 h1_theta_y->Fill(theta);
1514 h1_sigtheta_y->Fill(sigtheta);
1515 h1_rho_y->Fill(rho);
1516 h1_sigrho_y->Fill(sigrho);
1517 h1_TypeTrack_y->Fill(typetrack);
1518 h1_angleTrack_y->Fill(angletrack);
1520 double pi=TMath::Pi();
1522 for(Int_t icl = 0; icl<nCl; icl++){
1527 Double_t q = cluster->
GetQ();
1534 if(angletrack>pi/2) qn=-q*cos(angletrack);
1535 else qn=q*cos(angletrack);
1537 if(plane!=0 && plane !=1)
continue;
1540 if(plane==0 && type == 0 &&idcluster>-1) h1_QcAssoc_x->Fill(q);
1541 if(plane==0 && type == 1 &&idcluster>-1) h1_QtAssoc_x->Fill(q);
1542 if(plane==1 && type == 0 &&idcluster>-1) h1_QcAssoc_y->Fill(q);
1543 if(plane==1 && type == 1 &&idcluster>-1) h1_QtAssoc_y->Fill(q);
1544 if(plane==0 && type == 0 &&idcluster<0) h1_QcNAssoc_x->Fill(q);
1545 if(plane==0 && type == 1 &&idcluster<0) h1_QtNAssoc_x->Fill(q);
1546 if(plane==1 && type == 0 &&idcluster<0) h1_QcNAssoc_y->Fill(q);
1547 if(plane==1 && type == 1 &&idcluster<0) h1_QtNAssoc_y->Fill(q);
1549 if(plane==0 && type==1 &&idcluster>-1) h1_Qassoc_time_x->Fill(ind,q);
1550 if(plane==1 && type==1 &&idcluster>-1) h1_Qassoc_time_y->Fill(ind,q);
1551 if(plane==0 && type==1) h1_QtAssocN_x->Fill(qn);
1552 if(plane==1 && type==1) h1_QtAssocN_y->Fill(qn);
1556 if(plane==0&& IsTTZ==1){
1557 if(type==1 &&idcluster==itr)
1558 h1_QtAssocN_time_x->Fill(ind,qn);
1562 if(plane==1&& IsTTZ==1){
1563 if(type==1 &&idcluster==itr)
1564 h1_QtAssocN_time_y->Fill(ind,qn);
1567 if(plane==0 &&type==0 && sigrho<2 &&IsTTZ==1) h1_QtAssocN_channel_x->Fill(ind,q*sin(angletrack));
1568 if(plane==1 &&type==0 && sigrho<2 &&IsTTZ==1) h1_QtAssocN_channel_y->Fill(ind,q*sin(angletrack));
1569 if(plane==0 &&type==1 && sigrho<2 &&IsTTZ==1){
1570 h2_QtAssocN_time_x->Fill(ind,qn);
1571 if(ind<450 && ind>90) h2_Qprof_x->Fill(ind,qn);
1574 if(plane==1 &&type==1 && sigrho<1.5 && IsTTZ==1){
1575 h2_QtAssocN_time_y->Fill(ind,qn);
1576 if(ind<450 && ind>90) h2_Qprof_y->Fill(ind,qn);
1582 if(type==0&& IsTTZ==1 &&idcluster==itr){
1583 rlambda = (cluster->
GetMean()-511/2)*sin(theta) - (cluster->
GetIndex()-288/2)*cos(theta);
1584 fXT = rho*cos(theta) +rlambda*sin(theta) + 511/2;
1585 fXC = rho*sin(theta)+rlambda*cos(theta) + 288/2;
1587 fXdT = cluster->
GetMean() -fXT;
1589 if(type==1&& IsTTZ==1 &&idcluster==itr){
1590 rlambda = (cluster->
GetIndex()-511/2)*sin(theta) - (cluster->
GetMean()-288/2)*cos(theta);
1591 fXT = rho*cos(theta) +rlambda*sin(theta) + 511/2;
1592 fXC = rho*sin(theta)+rlambda*cos(theta) + 288/2;
1593 fXdC = cluster->
GetMean() - fXC;
1598 if(fXdC<30&&fXdC>-30)
1600 h1_distortion_dc_x->Fill(fXdC);
1601 h2_distortion_dc_t_x->Fill(fXT,fXdC);
1602 h2_distortion_dc_c_x->Fill(fXC,fXdC);
1603 h2_prof_dc_c_x->Fill(fXC,fXdC);
1604 if(fXT>100 &&fXT<440)
1605 h2_prof_dc_t_x->Fill(fXT,fXdC);
1609 h1_distortion_dt_x->Fill(fXdT);
1610 h2_distortion_dt_t_x->Fill(fXT,fXdT);
1611 h2_distortion_dt_c_x->Fill(fXC,fXdT);
1612 if(fXT>100 &&fXT<440)
1613 h2_prof_dt_t_x->Fill(fXT,fXdT);
1614 h2_prof_dt_c_x->Fill(fXC,fXdT);
1622 if(type==0&& IsTTZ==1 &&idcluster==itr) {
1623 rlambda = (cluster->
GetMean()-511/2)*sin(theta) - (cluster->
GetIndex()-288/2)*cos(theta);
1624 fYT = rho*cos(theta) +rlambda*sin(theta) + 511/2;
1625 fYC = rho*sin(theta)+rlambda*cos(theta) + 288/2;
1627 fYdT = cluster->
GetMean() -fYT;
1629 if(type==1 && IsTTZ==1 &&idcluster==itr){
1630 rlambda = (cluster->
GetIndex()-511/2)*sin(theta) - (cluster->
GetMean()-288/2)*cos(theta);
1631 fYT = rho*cos(theta) +rlambda*sin(theta) + 511/2;
1632 fYC = rho*sin(theta)+rlambda*cos(theta) + 288/2;
1633 fYdC = cluster->
GetMean() - fYC;
1637 if(fYdC<30&&fYdC>-30){
1638 h1_distortion_dc_y->Fill(fYdC);
1639 h2_distortion_dc_t_y->Fill(fYT,fYdC);
1640 h2_distortion_dc_c_y->Fill(fYC,fYdC);
1641 if(fYT>100&&fYT<440)
1642 h2_prof_dc_t_y->Fill(fYT,fYdC);
1643 h2_prof_dc_c_y->Fill(fYC,fYdC);
1645 if(fYdT<2&&fYdT>-2){
1646 h1_distortion_dt_y->Fill(fYdT);
1647 h2_distortion_dt_t_y->Fill(fYT,fYdT);
1648 h2_distortion_dt_c_y->Fill(fYC,fYdT);
1649 if(fYT>100&&fYT<440)
1650 h2_prof_dt_t_y->Fill(fYT,fYdT);
1651 h2_prof_dt_c_y->Fill(fYC,fYdT);
1657 char commentname[1000];
1658 sprintf(commentname,
"Evt %ld",fEvt->GetHeader()->GetEvtNo());
1663 Int_t nTr3d = tr3dArray->GetEntries();
1665 Double_t tr1dx=-1,tr1dy=-1,tr1dxz=600,tr1dyz=600,tr1fx=-1,tr1fy=-1,tr1fxz=-1,tr1fyz=-1;
1667 Double_t tr2dx=-1,tr2dy=-1,tr2dxz=600,tr2dyz=600,tr2fx=-1,tr2fy=-1,tr2fxz=-1,tr2fyz=-1;
1670 Int_t nMatch = matchArray->GetEntries();
1671 for(Int_t i=0;i<nMatch;i++){
1676 for(Int_t icl = 0; icl<nCl; icl++){
1681 Double_t meanX = cluster->
GetMean();
1694 Double_t meanX = cluster->
GetMean();
1709 Double_t meanY = cluster->
GetMean();
1721 Double_t meanY = cluster->
GetMean();
1736 for(Int_t itr=0;itr<nTr3d;itr++){
1739 Double_t doca=track3d->
GetDoca();
1744 Double_t px = track3d->
GetPx();
1745 Double_t py = track3d->
GetPy();
1746 Double_t pz = track3d->
GetPz();
1748 Double_t Aopen = track3d->
GetAopen();
1753 if(poca_z>110 &&poca_z<380)
1755 if(poca_x<174&& poca_x>114) h1Poca_x->Fill(poca_x);
1756 if(poca_y<174&& poca_y>114) h1Poca_y->Fill(poca_y);
1757 h1Poca_z->Fill(poca_z);
1758 h2Poca_xy->Fill(poca_x,poca_y);
1759 if(poca_x<174&& poca_x>114) h2Poca_xz->Fill(poca_z,poca_x);
1760 if(poca_y<174&& poca_y>114) h2Poca_yz->Fill(poca_z,poca_y);
1770 h1Azimutal->Fill(Aazimutal);
1771 h1AOpen->Fill(Aopen);
1775 if(tr1dxz<600 && tr1dyz<600 &&tr2dxz<600 && tr2dyz<600 &&tr1fxz>0 && tr1fyz>0 && tr2fxz>0 && tr2fyz>0){
1776 Double_t disd1 = sqrt((poca_x-tr1dx)*(poca_x-tr1dx)+(poca_y-tr1dy)*(poca_y-tr1dy)+(poca_z-tr1dxz)*(poca_z-tr1dxz));
1777 Double_t disf1 = sqrt((poca_x-tr1fx)*(poca_x-tr1fx)+(poca_y-tr1fy)*(poca_y-tr1fy)+(poca_z-tr1fxz)*(poca_z-tr1fxz));
1778 Double_t disd2 = sqrt((poca_x-tr2dx)*(poca_x-tr2dx)+(poca_y-tr2dy)*(poca_y-tr2dy)+(poca_z-tr2dxz)*(poca_z-tr2dxz));
1779 Double_t disf2 = sqrt((poca_x-tr2fx)*(poca_x-tr2fx)+(poca_y-tr2fy)*(poca_y-tr2fy)+(poca_z-tr2fxz)*(poca_z-tr2fxz));
1780 Double_t dmin1, dmin2;
1781 if(disd1<disf1) dmin1= disd1;
1783 if(disd2<disf2) dmin2= disd2;
1786 h1_vertex_tr1->Fill(dmin1);
1787 h1_vertex_tr2->Fill(dmin2);
1788 h2_vertex->Fill(dmin1,dmin2);
1798 Int_t triggerType = -1;
1805 ftriggerType=triggerType;
1810 if(nEvents%100 == 0)
1811 cout << nEvents << endl;
1832 helen->Fill(esize+0.5);
1834 for(
int ch = 0; ch<16; ch++) hit[ch] = 0;
1835 for(imes=0;imes<esize;imes++) {
1840 int iadc = m[imes].getCharge();
1841 int ig = m[imes].getGain();
1843 int its = m[imes].getTimeStamp();
1844 int iramp = m[imes].getTRamp();
1845 int iftime = m[imes].getFTime();
1847 heprof->Fill(ch + 0.5);
1848 hadc[ig]->Fill(iadc + 0.5);
1850 htvse->Fill(ievnum + 0.5, its + 0.5);
1851 hramp->Fill(iramp + 0.5, iftime + 0.5);
1852 hPmm2->SetBinContent(ch+1,iadc);
1853 hPmm2Spectrum2D->Fill(ch,iadc);
1855 if ( (imes == 0) && (itsold != -1) )
1857 itdiff = its - itsold;
1862 htdiff->Fill(itdiff + 0.5);
1863 htdiff2->Fill(itdiff + 0.5);
1868 for(
int ch = 0; ch<16; ch++){
1869 int ch2 = ch%2 ? ch+1 : ch-1;
1872 hPmm2Missed->Fill(ch);
1873 hPmm2Triggered->Fill(ch);
1877 for(
int ch1 = 0; ch1<16; ch1++){
1878 for(
int ch2 = 0; ch2<16; ch2++){
1880 if(hit[ch1] && hit[ch2]){
1881 hPmm2Coincidence->Fill(ch1,ch2);
1887 for(Int_t ch = 0; ch<16; ch++) hPmm2->SetBinContent(ch+1,-1);
1895 Int_t ntr_x= fEvt->GetRecoEvent()->GetNtracksXEvt();
1896 h1NTrackX->Fill(ntr_x);
1900 ULong_t TempsX0 = 0;
1903 ULong_t TempsX = fEvt->GetTimeStamp(0);
1907 TempsX0=fEvt->GetTimeStamp(0);
1911 TimeSt = (TempsX - TempsX0)/100000000;
1914 HarpoMonitorEventType eventType = E_OTHER;
1915 Int_t EventType=fEvt->GetRecoEvent()->GetEventType();
1917 if(EventType==0) eventType = E_EMPTY;
1918 if(EventType==1) eventType = E_DEPOT;
1920 if(EventType==3) eventType = E_TRAVERSING;
1921 if(EventType==4) eventType = E_CREATED;
1922 if(EventType==5) eventType = E_CONTAINED;
1923 if(EventType==6) eventType = E_TWOTR_GAMMA;
1924 if(EventType==7) eventType = E_TWOTR_DELTA;
1925 if(EventType==8) eventType = E_TWOTR_OTHER;
1926 if(EventType==9) eventType = E_SHOWER;
1927 if(EventType==10) eventType = E_OTHER;
1930 if(EventType==0) NEventEmpty++;
1931 if(EventType==1) NEventDEPOSIT++;
1933 if(EventType==3) NEventTT ++;
1934 if(EventType==4) NEventTCR++;
1935 if(EventType==5) NEventTCN++;
1936 if(EventType==6) NEventGAMMA++;
1937 if(EventType==7) NEventDELTA++;
1938 if(EventType==8) NEvent2TOTHER ++;
1939 if(EventType==9) NEventSHOWER++;
1940 if(EventType==10) NEventOTHER++;
1942 HarpoMonitorEventType eventTTZ = E_NOTTZ;
1944 if(EventTTZ==1) eventTTZ = E_TTZ;
1945 if(EventTTZ==1) NEventTTZ++;
1948 h1_NEvent->SetBinContent(0,NEvent);
1949 h1_NEvent->SetBinContent(1,NEventEmpty);
1950 h1_NEvent->SetBinContent(2,NEventDEPOSIT);
1951 h1_NEvent->SetBinContent(3,NEventTTZ);
1952 h1_NEvent->SetBinContent(4,NEventTT);
1953 h1_NEvent->SetBinContent(5,NEventTCR);
1954 h1_NEvent->SetBinContent(6,NEventTCN);
1955 h1_NEvent->SetBinContent(7,NEventGAMMA);
1956 h1_NEvent->SetBinContent(8,NEventDELTA);
1957 h1_NEvent->SetBinContent(9,NEvent2TOTHER);
1958 h1_NEvent->SetBinContent(10,NEventSHOWER);
1959 h1_NEvent->SetBinContent(11,NEventOTHER);
1960 h1_TimeSt->SetBinContent(1,TimeSt);
2077 Int_t triggerType = -1;
2087 hTriggerCreated->Fill(triggerType);
2088 fNcreated[triggerType+1]++;
2091 hTriggerTraversing->Fill(triggerType);
2092 fNtraversing[triggerType+1]++;
2095 hTriggerEmpty->Fill(triggerType);
2096 fNempty[triggerType+1]++;
2099 hTriggerShower->Fill(triggerType);
2100 fNshower[triggerType+1]++;
2103 hTriggerOther->Fill(triggerType);
2104 fNother[triggerType+1]++;
2108 hTriggerContained->Fill(triggerType);
2109 fNcontained[triggerType+1]++;
2112 hTriggerDepot->Fill(triggerType);
2113 fNdepot[triggerType+1]++;
2116 hTriggerTwoTrGamma->Fill(triggerType);
2117 fNtwotrgamma[triggerType+1]++;
2120 hTriggerTwoTrDelta->Fill(triggerType);
2121 fNtwotrdelta[triggerType+1]++;
2124 hTriggerTwoTrOther->Fill(triggerType);
2125 fNtwotrother[triggerType+1]++;
2134 hTriggerTTZ->Fill(triggerType);
2135 fNtraversing[triggerType+1]++;
2180 Int_t size = vect->GetSize();
2181 Double_t truncMean = 0;
2182 Int_t* index =
new Int_t[size];
2183 TMath::Sort(size,vect->GetArray(),index,kFALSE);
2184 Int_t t = 0, tLow, tHigh;
2187 while(vect->At(index[t])<10&&t<size-1) t++;
2188 tLow = TMath::FloorNint(t + (size - t)*tl);
2189 tHigh = TMath::FloorNint(t + (size - t)*th);
2191 for(Int_t tind = tLow; tind<tHigh; tind++) truncMean += vect->At(index[tind]);
2193 return truncMean/(tHigh-tLow);
2203 alignmentx->Write();
2204 alignmenty->Write();
2218 hPmm2Missed->Write();
2219 hPmm2Triggered->Write();
2220 hPmm2Spectrum2D->Write();
2221 hPmm2Coincidence->Write();
2230 h1_Qassoc_time_x->Write();
2231 h1_Qassoc_time_y->Write();
2235 h1_Q_time_x->Write();
2236 h1_Q_channel_x->Write();
2239 h1_QTcluster_x->Write();
2240 h1_QCcluster_x->Write();
2241 h1_SigTcluster_x->Write();
2242 h1_SigCcluster_x->Write();
2243 h1_WidthTcluster_x->Write();
2244 h1_WidthCcluster_x->Write();
2245 h1_IndexTcluster_x->Write();
2246 h1_IndexCcluster_x->Write();
2247 h1_MeanTcluster_x->Write();
2248 h1_MeanCcluster_x->Write();
2250 h1_theta_x->Write();
2252 h1_sigtheta_x->Write();
2253 h1_sigrho_x->Write();
2254 h1_QcAssoc_x->Write();
2255 h1_QcNAssoc_x->Write();
2256 h1_QtAssoc_x->Write();
2257 h1_QtNAssoc_x->Write();
2258 h1_TypeTrack_x->Write();
2259 h1_angleTrack_x->Write();
2263 h1_Q_time_y->Write();
2264 h1_Q_channel_y->Write();
2267 h1_QTcluster_y->Write();
2268 h1_QCcluster_y->Write();
2270 h1_SigTcluster_y->Write();
2271 h1_SigCcluster_y->Write();
2272 h1_WidthTcluster_y->Write();
2273 h1_WidthCcluster_y->Write();
2274 h1_IndexTcluster_y->Write();
2275 h1_IndexCcluster_y->Write();
2276 h1_MeanTcluster_y->Write();
2277 h1_MeanCcluster_y->Write();
2279 h1_theta_y->Write();
2281 h1_sigtheta_y->Write();
2282 h1_sigrho_y->Write();
2283 h1_QcAssoc_y->Write();
2284 h1_QcNAssoc_y->Write();
2285 h1_QtAssoc_y->Write();
2286 h1_QtNAssoc_y->Write();
2287 h1_TypeTrack_y->Write();
2288 h1_angleTrack_y->Write();
2290 h2_distortion_dc_t_x->Write();
2291 h2_distortion_dc_c_x->Write();
2292 h2_distortion_dt_t_x->Write();
2293 h2_distortion_dt_c_x->Write();
2294 h1_distortion_dt_x->Write();
2295 h1_distortion_dc_x->Write();
2297 h2_distortion_dc_t_y->Write();
2298 h2_distortion_dc_c_y->Write();
2299 h2_distortion_dt_t_y->Write();
2300 h2_distortion_dt_c_y->Write();
2301 h1_distortion_dt_y->Write();
2302 h1_distortion_dc_y->Write();
2304 h1_QtAssocN_x->Write();
2306 h1_QtAssocN_time_x->Scale(1./fNormTTzX);
2307 h1_QtAssocN_time_x->Write();
2308 h1_QtAssocN_y->Write();
2310 h1_QtAssocN_time_y->Scale(1./fNormTTzY);
2311 h1_QtAssocN_time_y->Write();
2312 h1_QtAssocN_channel_x->Write();
2313 h1_QtAssocN_channel_y->Write();
2317 hTriggerCreated->Write();
2318 hTriggerEmpty->Write();
2319 hTriggerTraversing->Write();
2320 hTriggerShower->Write();
2321 hTriggerOther->Write();
2323 hTriggerContained->Write();
2324 hTriggerDepot->Write();
2325 hTriggerTwoTrGamma->Write();
2326 hTriggerTwoTrDelta->Write();
2327 hTriggerTwoTrOther->Write();
2328 hTriggerTTZ->Write();
2330 hTriggerType->Write();
2331 h2_QtAssocN_time_x->Write();
2332 h2_QtAssocN_time_y->Write();
2334 h2_prof_dc_t_x->Write();
2335 h2_prof_dc_c_x->Write();
2336 h2_prof_dt_t_x->Write();
2337 h2_prof_dt_c_x->Write();
2338 h2_prof_dc_t_y->Write();
2339 h2_prof_dc_c_y->Write();
2340 h2_prof_dt_t_y->Write();
2341 h2_prof_dt_c_y->Write();
2342 h2_Qprof_x->Write();
2343 h2_Qprof_y->Write();
2368 h1Azimutal->Write();
2372 h1NClusterX->Write();
2373 h1NClusterY->Write();
2374 h1NClusterNX->Write();
2375 h1NClusterNY->Write();
2386 h1_sigrho_gamma_x->Write();
2387 h1_sigrho_gamma_y->Write();
2388 h1_sigrho_TTZ_x->Write();
2389 h1_sigrho_TTZ_y->Write();
2391 h1NTrackXTest->Write();
2394 h1_vertex_tr1->Write();
2395 h1_vertex_tr2->Write();
TClonesArray * GetHoughTracksArray()
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
Object containing the reconstruction information for one event (with array of HarpoRecoClusters Harpo...
Matching object, containing matched track number, and quality info.
TClonesArray * GetMatchingArray()
void FillHistogramsTrigger()
void Save(char *mode=NULL)
void print()
Ovreloaded medod whic do all job.
Cluster object, containing position, charge and quality information.
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
Pmm2MesVect * GetMesurements()
Return pointer to decoded data.
Int_t GetIdClusterTrack()
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
A class store HARPO raw PMM2 event buffer and header. End provide access metods to the row data...
virtual const EventHeader_t * GetHeader() const
void FillHistograms()
Redefine empty default.
Double_t TruncMean(TArrayD *vect, Double_t tl, Double_t th)
Basic HARPO Event Analysis code. "Offline monitoring".
const ULong_t gkNDetectors
TClonesArray * GetReco3DArray()
A list of all mesurements in one Event for Pmm2 v2 card The class is place holder for all unpacked me...
void FillHistogramsPMM2()
HarpoRecoTracks object, obtained with Hough tracking method.
TClonesArray * GetClustersArray()
R__EXTERN HarpoDetSet * gHDetSet