CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemCosmicRayQA.h
Go to the documentation of this file.
1#ifndef CGEMCOSMICRAYQA
2#define CGEMCOSMICRAYQA
3
4
11
12/* #include "RealizationSvc/RealizationSvc.h"
13#include "RealizationSvc/IRealizationSvc.h"
14#include <vector>
15#include <string>
16#include "TFile.h"
17#include "TTree.h"
18#include "TString.h"
19#include "Identifier/Identifier.h"
20#include "TH1F.h"
21*/
22#include "TFile.h"
23#include "TTree.h"
24#include "TH1.h"
25#include "TH1F.h"
26#include "TH1D.h"
27#include "TF1.h"
28#include "TH2.h"
29#include "TH2F.h"
30#include "TH2D.h"
31#include "TArc.h"
32#include "TLine.h"
33#include "TCanvas.h"
34#include "TGraph2D.h"
35#include <Math/Functor.h>
36#include <TPolyLine3D.h>
37#include <Math/Vector3D.h>
38#include <Fit/Fitter.h>
39
40class IDataProviderSvc;
41
42#define MAXNOFTRACKS 3
43#define MAXNOFCLUSTERS 500 // HACK THIS 10000
44
45#define MAXNOFHITS 2400
46#define MAXNOFFITPOINT 4
47#define MAXNOFLAYER 2
48#define MAXNOFSHEET 2
49// stripID
50#define MAXNOFSTRIP_L1_x 856
51#define MAXNOFSTRIP_L1_v 1174
52#define MAXNOFSTRIP_L2_x 630
53#define MAXNOFSTRIP_L2_v 1077
54// strip max length
55#define MAXLENGTH_L1_x 532
56#define MAXLENGTH_L2_x 690
57#define MAXLENGTH_L1_v 532/TMath::Cos(TMath::DegToRad()*46.6877)
58#define MAXLENGTH_L2_v 690/TMath::Cos(TMath::DegToRad()*31.0337)
59
60#define MIN_PHI -180
61#define MIN_Z -500
62#define CHI_MIN 0
63#define ANG_MIN 0
64
65#define MAX_PHI 180
66#define MAX_Z 500
67#define CHI_MAX 10
68#define ANG_MAX 90
69
70#define MAX_PHI_BIN 4
71#define MAX_Z_BIN 5
72#define CHI_BIN 10
73#define ANG_BIN 9
74
75#define PHI_STEP 90
76#define Z_STEP 200
77
78// -----------------------------------------------------------------------
79class CgemCosmicRayQA : public Algorithm{
80public:
81 // Constructor
82 CgemCosmicRayQA(const std::string& name, ISvcLocator* pSvcLocator);
84 // Executable
85 StatusCode initialize();
86 StatusCode execute ();
87 StatusCode finalize ();
88
89 bool read_file(TString name);
90 void define_output();
91 void define_hit_histo();
94 void define_track_histo();
95 //
99
100 void fill_hit_histo();
103 void fill_track_histo();
104 //
107
108
109 int find_closest_exp_cluster2d(double fphi, double fz);
110 bool apply_cuts();
111
112 void analyze();
113 void histo_cosmetics();
114
115private:
116
117 // A data server
118 IDataProviderSvc* m_evtSvc;
119
120 CgemLUTReader *lutreader;
121 string lutfile;
122
123 CgemGeoReadoutPlane *anode;
124 double anode_mid_gap_L1;
125 double anode_mid_gap_L2;
126
127 ICgemGeomSvc *m_SvcCgem;
128 CgemMidDriftPlane* middleplane;
129 CgemGeoAlign* alignment;
130
131 double minDigiTime ;
132 double maxDigiTime;
133 double select_size;
134 double cut_chi2;
135 double cut_ene_L1_x;
136 double cut_ene_L1_v;
137 double cut_ene_L2_x;
138 double cut_ene_L2_v;
139 bool align_flag;
140
141 double anode_mid_gap_radius[3];
142
143 string filename;
144 TFile *input;
145 TFile *output;
146 TTree *tree;
147
148 // hit
149 int event;
150 int nhit;
151 int hit_strip[MAXNOFHITS];
152 int hit_view[MAXNOFHITS];
153 int hit_layer[MAXNOFHITS];
154 int hit_sheet[MAXNOFHITS];
155 double hit_length[MAXNOFHITS];
156 int hit_channel[MAXNOFHITS];
157 int hit_roc[MAXNOFHITS];
158 int hit_feb[MAXNOFHITS];
159 int hit_tiger[MAXNOFHITS];
160 int hit_chip[MAXNOFHITS];
161 double hit_t[MAXNOFHITS];
162 double hit_q[MAXNOFHITS];
163 int hit_quality[MAXNOFHITS];
164 int hit_selgooddigi[MAXNOFHITS];
165
166 // cluster
167 int ncluster;
168 int ncluster_1d;
169 int ncluster_2d;
170 int ncluster_2d_L1_S1;
171 int ncluster_2d_L2_S1;
172 int ncluster_2d_L2_S2;
173 int ncluster_1d_L1_S1_x;
174 int ncluster_1d_L2_S1_x;
175 int ncluster_1d_L2_S2_x;
176 int ncluster_1d_L1_S1_v;
177 int ncluster_1d_L2_S1_v;
178 int ncluster_1d_L2_S2_v;
179
180 // 1D cluster
181 double cluster_1d_t[MAXNOFCLUSTERS];
182 double cluster_1d_q[MAXNOFCLUSTERS];
183 double cluster_1d_r[MAXNOFCLUSTERS];
184 double cluster_1d_phi[MAXNOFCLUSTERS];
185 double cluster_1d_v[MAXNOFCLUSTERS];
186 double cluster_1d_v_cc[MAXNOFCLUSTERS];
187 double cluster_1d_phi_cc[MAXNOFCLUSTERS];
188 double cluster_1d_v_tpc[MAXNOFCLUSTERS];
189 double cluster_1d_phi_tpc[MAXNOFCLUSTERS];
190 double cluster_1d_a_tpc[MAXNOFCLUSTERS];
191 double cluster_1d_b_tpc[MAXNOFCLUSTERS];
192 int cluster_1d_layerid[MAXNOFCLUSTERS];
193 int cluster_1d_sheetid[MAXNOFCLUSTERS];
194 int cluster_1d_view[MAXNOFCLUSTERS];
195 int cluster_1d_ID[MAXNOFCLUSTERS];
196 int cluster_1d_strip1[MAXNOFCLUSTERS];
197 int cluster_1d_strip2[MAXNOFCLUSTERS];
198 int cluster_1d_size[MAXNOFCLUSTERS];
199 int cluster_1d_hitindex[MAXNOFCLUSTERS][50];
200
201 // 2D cluster
202 double cluster_2d_t[MAXNOFCLUSTERS];
203 double cluster_2d_q[MAXNOFCLUSTERS];
204 double cluster_2d_r[MAXNOFCLUSTERS];
205 double cluster_2d_phi[MAXNOFCLUSTERS];
206 double cluster_2d_z[MAXNOFCLUSTERS];
207 double cluster_2d_z_cc[MAXNOFCLUSTERS];
208 double cluster_2d_phi_cc[MAXNOFCLUSTERS];
209 double cluster_2d_z_tpc[MAXNOFCLUSTERS];
210 double cluster_2d_phi_tpc[MAXNOFCLUSTERS];
211 int cluster_2d_layerid[MAXNOFCLUSTERS];
212 int cluster_2d_sheetid[MAXNOFCLUSTERS];
213 int cluster_2d_view[MAXNOFCLUSTERS];
214 int cluster_2d_ID[MAXNOFCLUSTERS];
215 int cluster_2d_idx[MAXNOFCLUSTERS];
216 int cluster_2d_idv[MAXNOFCLUSTERS];
217 int cluster_2d_highest[MAXNOFCLUSTERS];
218
219 // track
220 double track_dr;
221 double track_phi0;
222 double track_dz;
223 double track_tanL;
224 double track_chi2;
225 int track_nfitpoint;
226 int track_clusterid[MAXNOFFITPOINT];
227 int track_layerid[MAXNOFFITPOINT];
228 int track_sheetid[MAXNOFFITPOINT];
229 int track_test_layerid;
230 int track_test_sheetid;
231 double track_xpoca_glo;
232 double track_ypoca_glo;
233 double track_zpoca_glo;
234 double track_x1top_glo;
235 double track_y1top_glo;
236 double track_z1top_glo;
237 double track_phi1top_loc;
238 double track_v1top_loc;
239 double track_x1bot_glo;
240 double track_y1bot_glo;
241 double track_z1bot_glo;
242 double track_phi1bot_loc;
243 double track_v1bot_loc;
244
245 double track_x2top_glo;
246 double track_y2top_glo;
247 double track_z2top_glo;
248 double track_phi2top_loc;
249 double track_v2top_loc;
250 double track_x2bot_glo;
251 double track_y2bot_glo;
252 double track_z2bot_glo;
253 double track_phi2bot_loc;
254 double track_v2bot_loc;
255
256 // Intersection angles
257 // L1
258 double ang_xy_L1;
259 double ang_yz_L1;
260 // L2
261 double ang_xy_L2;
262 double ang_yz_L2;
263
264 // histograms ---------------------------------------
265 // HIT
266 // nof hits
267 // x
268 TH1F *h_nofhit_L1_S1_x;
269 TH1F *h_nofhit_L1_S2_x;
270 TH1F *h_nofhit_L2_S1_x;
271 TH1F *h_nofhit_L2_S2_x;
272 // v
273 TH1F *h_nofhit_L1_S1_v;
274 TH1F *h_nofhit_L2_S1_v;
275 TH1F *h_nofhit_L2_S2_v;
276
277 // charge
278 // x
279 TH1F *h_hit_charge_L1_S1_x;
280 TH1F *h_hit_charge_L1_S2_x;
281 TH1F *h_hit_charge_L2_S1_x;
282 TH1F *h_hit_charge_L2_S2_x;
283 // v
284 TH1F *h_hit_charge_L1_S1_v;
285 TH1F *h_hit_charge_L2_S1_v;
286 TH1F *h_hit_charge_L2_S2_v;
287 // time
288 // x
289 TH1F *h_hit_time_L1_S1_x;
290 TH1F *h_hit_time_L1_S2_x;
291 TH1F *h_hit_time_L2_S1_x;
292 TH1F *h_hit_time_L2_S2_x;
293 // v
294 TH1F *h_hit_time_L1_S1_v;
295 TH1F *h_hit_time_L2_S1_v;
296 TH1F *h_hit_time_L2_S2_v;
297
298 // charge vs strip ID
299 // x
300 TH2F *h_hit_charge_vs_strip_L1_S1_x;
301 TH2F *h_hit_charge_vs_strip_L1_S2_x;
302 TH2F *h_hit_charge_vs_strip_L2_S1_x;
303 TH2F *h_hit_charge_vs_strip_L2_S2_x;
304 // v
305 TH2F *h_hit_charge_vs_strip_L1_S1_v;
306 TH2F *h_hit_charge_vs_strip_L2_S1_v;
307 TH2F *h_hit_charge_vs_strip_L2_S2_v;
308 // time vs strip ID
309 // x
310 TH2F *h_hit_time_vs_strip_L1_S1_x;
311 TH2F *h_hit_time_vs_strip_L1_S2_x;
312 TH2F *h_hit_time_vs_strip_L2_S1_x;
313 TH2F *h_hit_time_vs_strip_L2_S2_x;
314 // v
315 TH2F *h_hit_time_vs_strip_L1_S1_v;
316 TH2F *h_hit_time_vs_strip_L2_S1_v;
317 TH2F *h_hit_time_vs_strip_L2_S2_v;
318
319 // charge vs time
320 // x
321 TH2F *h_hit_charge_vs_time_L1_S1_x;
322 TH2F *h_hit_charge_vs_time_L1_S2_x;
323 TH2F *h_hit_charge_vs_time_L2_S1_x;
324 TH2F *h_hit_charge_vs_time_L2_S2_x;
325 // v
326 TH2F *h_hit_charge_vs_time_L1_S1_v;
327 TH2F *h_hit_charge_vs_time_L2_S1_v;
328 TH2F *h_hit_charge_vs_time_L2_S2_v;
329
330 // charge vs length
331 // v
332 TH2F *h_hit_charge_vs_length_L1_S1_v;
333 TH2F *h_hit_charge_vs_length_L2_S1_v;
334 TH2F *h_hit_charge_vs_length_L2_S2_v;
335
336 // HIT IN TIME WINDOW
337 TH1F *h_hit_in_time_charge_L1_S1_x;
338 TH1F *h_hit_in_time_charge_L1_S2_x;
339 TH1F *h_hit_in_time_charge_L2_S1_x;
340 TH1F *h_hit_in_time_charge_L2_S2_x;
341 // v
342 TH1F *h_hit_in_time_charge_L1_S1_v;
343 TH1F *h_hit_in_time_charge_L2_S1_v;
344 TH1F *h_hit_in_time_charge_L2_S2_v;
345
346 // count on each strip
347 // x
348 TH1F *h_hit_in_time_strip_L1_S1_x;
349 TH1F *h_hit_in_time_strip_L1_S2_x;
350 TH1F *h_hit_in_time_strip_L2_S1_x;
351 TH1F *h_hit_in_time_strip_L2_S2_x;
352 // v
353 TH1F *h_hit_in_time_strip_L1_S1_v;
354 TH1F *h_hit_in_time_strip_L2_S1_v;
355 TH1F *h_hit_in_time_strip_L2_S2_v;
356
357 // charge vs strip ID
358 // x
359 TH2F *h_hit_in_time_charge_vs_strip_L1_S1_x;
360 TH2F *h_hit_in_time_charge_vs_strip_L1_S2_x;
361 TH2F *h_hit_in_time_charge_vs_strip_L2_S1_x;
362 TH2F *h_hit_in_time_charge_vs_strip_L2_S2_x;
363 // v
364 TH2F *h_hit_in_time_charge_vs_strip_L1_S1_v;
365 TH2F *h_hit_in_time_charge_vs_strip_L2_S1_v;
366 TH2F *h_hit_in_time_charge_vs_strip_L2_S2_v;
367
368 // CLUSTER 1d
369 // nof cluster 1d
370 // x
371 TH1F *h_nofcluster1d_L1_S1_x;
372 TH1F *h_nofcluster1d_L1_S2_x;
373 TH1F *h_nofcluster1d_L2_S1_x;
374 TH1F *h_nofcluster1d_L2_S2_x;
375 // v
376 TH1F *h_nofcluster1d_L1_S1_v;
377 TH1F *h_nofcluster1d_L2_S1_v;
378 TH1F *h_nofcluster1d_L2_S2_v;
379
380 // cl. size
381 // x
382 TH1F *h_cluster1d_size_L1_S1_x;
383 TH1F *h_cluster1d_size_L1_S2_x;
384 TH1F *h_cluster1d_size_L2_S1_x;
385 TH1F *h_cluster1d_size_L2_S2_x;
386 // v
387 TH1F *h_cluster1d_size_L1_S1_v;
388 TH1F *h_cluster1d_size_L2_S1_v;
389 TH1F *h_cluster1d_size_L2_S2_v;
390
391 // charge vs phi (x view)
392 TH2F *h_cluster1d_charge_vs_phi_L1_S1_x;
393 TH2F *h_cluster1d_charge_vs_phi_L1_S2_x;
394 TH2F *h_cluster1d_charge_vs_phi_L2_S1_x;
395 TH2F *h_cluster1d_charge_vs_phi_L2_S2_x;
396
397 // cherge vs v (v view)
398 TH2F *h_cluster1d_charge_vs_v_L1_S1_v;
399 TH2F *h_cluster1d_charge_vs_v_L2_S1_v;
400 TH2F *h_cluster1d_charge_vs_v_L2_S2_v;
401
402 // charge of cluster used in the fit (x view)
403 TH1F *h_cluster1d_charge_fitted_L1_S1_x;
404 TH1F *h_cluster1d_charge_fitted_L1_S2_x;
405 TH1F *h_cluster1d_charge_fitted_L2_S1_x;
406 TH1F *h_cluster1d_charge_fitted_L2_S2_x;
407
408 // charge of cluster used in the fit (v view)
409 TH1F *h_cluster1d_charge_fitted_L1_S1_v;
410 TH1F *h_cluster1d_charge_fitted_L1_S2_v;
411 TH1F *h_cluster1d_charge_fitted_L2_S1_v;
412 TH1F *h_cluster1d_charge_fitted_L2_S2_v;
413
414 // CLUSTER 2d
415 // nof cluster 2d
416 TH1F *h_nofcluster2d_L1_S1;
417 TH1F *h_nofcluster2d_L1_S2;
418 TH1F *h_nofcluster2d_L2_S1;
419 TH1F *h_nofcluster2d_L2_S2;
420
421 // total cl. size
422 TH1F *h_cluster2d_size_L1_S1;
423 TH1F *h_cluster2d_size_L1_S2;
424 TH1F *h_cluster2d_size_L2_S1;
425 TH1F *h_cluster2d_size_L2_S2;
426
427 // charge vs phi
428 TH2F *h_cluster2d_charge_vs_phi_L1_S1;
429 TH2F *h_cluster2d_charge_vs_phi_L1_S2;
430 TH2F *h_cluster2d_charge_vs_phi_L2_S1;
431 TH2F *h_cluster2d_charge_vs_phi_L2_S2;
432
433 // cherge vs z
434 TH2F *h_cluster2d_charge_vs_z_L1_S1;
435 TH2F *h_cluster2d_charge_vs_z_L1_S2;
436 TH2F *h_cluster2d_charge_vs_z_L2_S1;
437 TH2F *h_cluster2d_charge_vs_z_L2_S2;
438
439 // z vs phi
440 TH2F *h_cluster2d_z_vs_phi_L1_S1;
441 TH2F *h_cluster2d_z_vs_phi_L1_S2;
442 TH2F *h_cluster2d_z_vs_phi_L2_S1;
443 TH2F *h_cluster2d_z_vs_phi_L2_S2;
444
445 // CLUSTER 1d SELECTED
446 // charge
447 TH1F *h_cluster1d_charge_selected_L1_S1_x;
448 TH1F *h_cluster1d_charge_selected_L1_S2_x;
449 TH1F *h_cluster1d_charge_selected_L2_S1_x;
450 TH1F *h_cluster1d_charge_selected_L2_S2_x;
451 TH1F *h_cluster1d_charge_selected_L1_S1_v;
452 TH1F *h_cluster1d_charge_selected_L1_S2_v;
453 TH1F *h_cluster1d_charge_selected_L2_S1_v;
454 TH1F *h_cluster1d_charge_selected_L2_S2_v;
455
456 // cl. size
457 TH1F *h_cluster1d_size_selected_L1_S1_x;
458 TH1F *h_cluster1d_size_selected_L1_S2_x;
459 TH1F *h_cluster1d_size_selected_L2_S1_x;
460 TH1F *h_cluster1d_size_selected_L2_S2_x;
461 TH1F *h_cluster1d_size_selected_L1_S1_v;
462 TH1F *h_cluster1d_size_selected_L1_S2_v;
463 TH1F *h_cluster1d_size_selected_L2_S1_v;
464 TH1F *h_cluster1d_size_selected_L2_S2_v;
465
466 // CLUSTER 2d SELECTED
467 TH1F *h_cluster2d_charge_selected_L1_S1;
468 TH1F *h_cluster2d_charge_selected_L1_S2;
469 TH1F *h_cluster2d_charge_selected_L2_S1;
470 TH1F *h_cluster2d_charge_selected_L2_S2;
471
472 // TRACK
473 // nof fitted tracks
474 TH1F *h_noftrack;
475
476 // chi2 distro
477 TH1F *h_track_chi2;
478
479 // xpoca, ypoca, zpoca distro
480 TH1F *h_track_xpoca;
481 TH1F *h_track_ypoca;
482 TH1F *h_track_zpoca;
483
484 // TEST PLANE
485 // residual in phi
486 TH1F *h_test_residual_rphi;
487 TH1F *h_test_residual_rphi_tpc;
488
489 // residual in phi vs chi2
490 TH2F *h_test_res_rphi_vs_chi2;
491 TH2F *h_test_res_rphi_vs_chi2_tpc;
492
493 // residual in z
494 TH1F *h_test_residual_z;
495 TH1F *h_test_residual_z_tpc;
496
497 // residual in z vs chi2
498 TH2F *h_test_res_z_vs_chi2;
499 TH2F *h_test_res_z_vs_chi2_tpc;
500
501 // TRACKER
502 // residual in phi
503 TH1F *h_residual_rphi_L1_S1;
504 TH1F *h_residual_rphi_L1_S2;
505 TH1F *h_residual_rphi_L2_S1;
506 TH1F *h_residual_rphi_L2_S2;
507
508 TH2F *h_res_rphi_vs_chi2_L1_S1;
509 TH2F *h_res_rphi_vs_chi2_L1_S2;
510 TH2F *h_res_rphi_vs_chi2_L2_S1;
511 TH2F *h_res_rphi_vs_chi2_L2_S2;
512
513 // TPC residual in phi
514 TH1F *h_residual_rphi_L1_S1_tpc;
515 TH1F *h_residual_rphi_L1_S2_tpc;
516 TH1F *h_residual_rphi_L2_S1_tpc;
517 TH1F *h_residual_rphi_L2_S2_tpc;
518
519 TH2F *h_res_rphi_vs_chi2_L1_S1_tpc;
520 TH2F *h_res_rphi_vs_chi2_L1_S2_tpc;
521 TH2F *h_res_rphi_vs_chi2_L2_S1_tpc;
522 TH2F *h_res_rphi_vs_chi2_L2_S2_tpc;
523
524 // residual in z
525 TH1F *h_residual_z_L1_S1;
526 TH1F *h_residual_z_L1_S2;
527 TH1F *h_residual_z_L2_S1;
528 TH1F *h_residual_z_L2_S2;
529
530 TH2F *h_res_z_vs_chi2_L1_S1;
531 TH2F *h_res_z_vs_chi2_L1_S2;
532 TH2F *h_res_z_vs_chi2_L2_S1;
533 TH2F *h_res_z_vs_chi2_L2_S2;
534
535 // TPC residual in z
536 TH1F *h_residual_z_L1_S1_tpc;
537 TH1F *h_residual_z_L1_S2_tpc;
538 TH1F *h_residual_z_L2_S1_tpc;
539 TH1F *h_residual_z_L2_S2_tpc;
540
541 TH2F *h_res_z_vs_chi2_L1_S1_tpc;
542 TH2F *h_res_z_vs_chi2_L1_S2_tpc;
543 TH2F *h_res_z_vs_chi2_L2_S1_tpc;
544 TH2F *h_res_z_vs_chi2_L2_S2_tpc;
545
546 // signal
547 TH1F *h_signal_charge_2d;
548 TH1F *h_signal_charge_1d_x;
549 TH1F *h_signal_charge_1d_v;
550 TH1F *h_signal_size_1d_x;
551 TH1F *h_signal_size_1d_v;
552
553 TH1F *h_signal_charge_2d_chi2cut;
554 TH1F *h_signal_charge_1d_x_chi2cut;
555 TH1F *h_signal_charge_1d_v_chi2cut;
556 TH1F *h_signal_size_1d_x_chi2cut;
557 TH1F *h_signal_size_1d_v_chi2cut;
558
559 // background
560 TH1F *h_background_charge_2d;
561 TH1F *h_background_charge_1d_x;
562 TH1F *h_background_charge_1d_v;
563 TH1F *h_background_size_1d_x;
564 TH1F *h_background_size_1d_v;
565
566 // efficiencies
567 TH1F *h_eff_vs_phi;
568 TH1F *h_eff_vs_z;
569
570 TH2F *h_eff_vs_phi_vs_z;
571
572 TH2F *h_eff_vs_phi_vs_chi2;
573 TH2F *h_eff_vs_z_vs_chi2;
574
575 // Resolution vs Chi2 Plots
576 TH1F *h_resolution_rphi_vs_chi2;
577 TH1F *h_resolution_rphi_tpc_vs_chi2;
578
579 TH1F *h_resolution_z_vs_chi2;
580 TH1F *h_resolution_z_tpc_vs_chi2;
581
582 // Incident Angles
583 TH2F *h_test_residual_rphi_vs_angxy_L1_cc;
584 TH2F *h_test_residual_rphi_vs_angxy_L1_tpc;
585 TH2F *h_test_residual_rphi_vs_angxy_L2_cc;
586 TH2F *h_test_residual_rphi_vs_angxy_L2_tpc;
587
588 TH1F *h_resolution_vs_ang_xy_L1;
589 TH1F *h_resolution_vs_ang_xy_L2;
590 TH1F *h_resolution_tpc_vs_ang_xy_L1;
591 TH1F *h_resolution_tpc_vs_ang_xy_L2;
592
593 // for analysis --------------------------
594 int nfittedtrack;
595 int nchi2;
596 int nstopped;
597 int nvalidtrack;
598 int ninside;
599 int noutside;
600 int nentries_residual_rphi;
601 double mean_residual_rphi;
602 double sigma_residual_rphi;
603 int nentries_residual_z;
604 double mean_residual_z;
605 double sigma_residual_z;
606
607 // For Efficiency
608 int n_validtrack_phi_arr[MAX_PHI_BIN];
609 int n_insidetrack_phi_arr[MAX_PHI_BIN];
610
611 int n_validtrack_z_arr[MAX_Z_BIN];
612 int n_insidetrack_z_arr[MAX_Z_BIN];
613
614 int n_validtrack_phi_chi2_mat[CHI_BIN][MAX_PHI_BIN];
615 int n_insidetrack_phi_chi2_mat[CHI_BIN][MAX_PHI_BIN];
616
617 int n_validtrack_phi_z_mat[MAX_PHI_BIN][MAX_Z_BIN];
618 int n_insidetrack_phi_z_mat[MAX_PHI_BIN][MAX_Z_BIN];
619
620 int n_validtrack_z_chi2_mat[CHI_BIN][MAX_Z_BIN];
621 int n_insidetrack_z_chi2_mat[CHI_BIN][MAX_Z_BIN];
622
623 double chi2_cut_arr[CHI_BIN];
624
625 int test_l;
626 int test_ml;
627 int test_mh;
628 int test_h;
629 int test_p;
630
631 //
632
633 std::vector< double > vector_test_residual_rphi;
634 std::vector< double > vector_test_residual_z;
635 std::vector< double > vector_test_charge;
636 std::vector< double > vector_test_charge_x;
637 std::vector< double > vector_test_charge_v;
638
639 std::vector< double > vector_test_phi;
640 std::vector< double > vector_test_z;
641 std::vector< double > vector_chi2;
642
643 std::vector< int > vector_test_size_x;
644 std::vector< int > vector_test_size_v;
645 std::vector< int > vector_test_clusterid;
646 std::vector< int > vector_test_idx;
647 std::vector< int > vector_test_idv;
648
649
650
651};
652#endif
#define MAXNOFFITPOINT
#define CHI_BIN
#define MAXNOFCLUSTERS
#define MAX_PHI_BIN
#define MAX_Z_BIN
#define MAXNOFHITS
CgemCosmicRayQA(const std::string &name, ISvcLocator *pSvcLocator)
void define_cluster_selected_histo()
int find_closest_exp_cluster2d(double fphi, double fz)
StatusCode initialize()
void define_cluster1d_from_fit_histo()
StatusCode finalize()
bool read_file(TString name)