BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDchTrackFinder.h
Go to the documentation of this file.
1// Author: Pavel Batyuk (VBLHEP) <pavel.batyuk@jinr.ru> 2017-01-21
2
3////////////////////////////////////////////////////////////////////////////////
4// //
5// BmnDchTrackFinder //
6// //
7// Implementation of an algorithm developed by //
8// N.Voytishin and V.Paltchik (LIT) //
9// to the BmnRoot software //
10// //
11// The algorithm serves for searching for track segments //
12// in the Drift Chambers of the BM@N experiment //
13// //
14////////////////////////////////////////////////////////////////////////////////
15
16#ifndef BMNDCHTRACKFINDER_H
17#define BMNDCHTRACKFINDER_H 1
18
19#include "BmnDchDigit.h"
20#include "BmnDchHit.h"
21#include "BmnDchHitProducer.h"
22#include "BmnDchTrack.h"
23#include "BmnMath.h"
24#include "FairMCPoint.h"
25#include "FairTask.h"
26#include "FairTrackParam.h"
27#include "TH1F.h"
28#include "TH2F.h"
29#include "TProfile.h"
30
31#include <TClonesArray.h>
32#include <TMath.h>
33#include <TNamed.h>
34#include <TString.h>
35#include <TVector2.h>
36#include <fstream>
37
38using namespace std;
39using namespace TMath;
40
41class BmnDchTrackFinder : public FairTask
42{
43 public:
47
48 virtual InitStatus Init();
49 virtual void Exec(Option_t* opt);
50 virtual void Finish();
51
53
54 private:
55 void initHists();
56
59 Int_t N;
63 UInt_t fEventNo; // event counter
64 Bool_t isInitialized = false;
65
69
71 /** Input array **/
74
75 /** Output arrays **/
79
82
83 Int_t nChambers; // dch1 or dch2
84 Int_t nWires; // corresponding to the found v(0), u(1), y(2), x(3)-pairs
85 Int_t nLayers; // a(0) or b(1)
86 Int_t nSegmentsMax; // Max. number of found segments to store
87
88 Double_t t_dc[4][16]; //[time interval][plane number]
89 Double_t pol_par_dc[3][5][16]; //[polinom number][param number][plane number]
90 Double_t scaling[16]; //[plane number]
91
92 Double_t scale; // scaling for transfer function coeffs
93
94 Double_t z_loc[8]; // z local xa->vb (cm)
95 Double_t z_glob[16]; // z global dc 1 & dc 2 (cm)
96 Double_t Z_dch1; // z coord in the middle of dch1
97 Double_t Z_dch2; // z coord in the middle of dch2
99 Z_dch_mid; // z coord between the two chambers, this z is considered the global z for the matched dch-segment
102
107
112
113 Bool_t* has7DC; //!
114
116
117 Double_t** x_global; //!
118 Double_t** y_global; //!
119 Double_t** Chi2; //!
120
121 Int_t** SegMCId; //!
122 Int_t** SegMCIdCount; //!
123
124 Double_t*** v; //!
125 Double_t*** u; //!
126 Double_t*** y; //!
127 Double_t*** x; //!
128 Int_t*** vId; //!
129 Int_t*** uId; //!
130 Int_t*** yId; //!
131 Int_t*** xId; //!
132 Double_t*** v_time; //!
133 Double_t*** u_time; //!
134 Double_t*** y_time; //!
135 Double_t*** x_time; //!
136 Double_t*** v_Single; //!
137 Double_t*** u_Single; //!
138 Double_t*** y_Single; //!
139 Double_t*** x_Single; //!
140 Int_t*** v_SingleId; //!
141 Int_t*** u_SingleId; //!
142 Int_t*** y_SingleId; //!
143 Int_t*** x_SingleId; //!
144 Double_t*** sigm_v; //!
145 Double_t*** sigm_u; //!
146 Double_t*** sigm_y; //!
147 Double_t*** sigm_x; //!
148 Double_t*** Sigm_v_single; //!
149 Double_t*** Sigm_u_single; //!
150 Double_t*** Sigm_y_single; //!
151 Double_t*** Sigm_x_single; //!
152 Double_t*** params; //!
153 Double_t*** params_sigmas; //!
154 Int_t*** rhId_segment; //!
155 Double_t*** rh_segment; //!
158
159 Int_t* nSegments; //!
160 Int_t** pairs; //!
161 Int_t** segment_size; //!
162 Int_t*** singles; //!
163
164 Double_t* x_mid; //! x glob of matched segment in the z situated between the two DCH chambers
165 Double_t* y_mid; //! y glob of matched segment in the z situated between the two DCH chambers
166 Int_t* pairID; //! segments numbers that were matche into global track in form of 1000 * (DC1_segIt + 1) +
167 //! DC@_segIt + 1
168 Int_t* nhits; //! total number of hits from the two segments that were matched
169 Double_t* aX; //! x slope of the matched segment
170 Double_t* aY; //! y slope of the matched segment
171 Double_t* imp; //! reconstructed particle trajectory momentum
172 Double_t* leng; //! the distance from z = 0 to the global point of the matched segment
173 Double_t* Chi2_match; //! chi2 of the matched seg
174
176
177 // added
179 TH1D* Ntrack1; //!
180 TH1D* Ntrack2; //!
181
182 TH2F* hXvsAx; //!
199 TH1F* haX2_aX1; //!
200 TH1F* haY2_aY1; //!
203 TH1F* haX2_aX1m; //!
204 TH1F* haY2_aY1m; //!
205 TH1F* hX1_X2_glob_m; //!
206 TH1F* hY1_Y2_glob_m; //!
207 TH1F* hx1Da_Db; //!
208 TH1F* hx2Da_Db; //!
209 TH1F* hy1Da_Db; //!
210 TH1F* hy2Da_Db; //!
211 TH1F* hu1Da_Db; //!
212 TH1F* hu2Da_Db; //!
213 TH1F* hv1Da_Db; //!
214 TH1F* hv2Da_Db; //!
215 TH1F* hx1Da_Db_best; //!
216 TH1F* hx2Da_Db_best; //!
217 TH1F* hy1Da_Db_best; //!
218 TH1F* hy2Da_Db_best; //!
219 TH1F* hu1Da_Db_best; //!
220 TH1F* hu2Da_Db_best; //!
221 TH1F* hv1Da_Db_best; //!
222 TH1F* hv2Da_Db_best; //!
223 TH1F* haX1; //!
224 TH1F* haY1; //!
225 TH1F* haX2; //!
226 TH1F* haY2; //!
227 TH1F* hx1; //!
228 TH1F* hy1; //!
229 TH1F* hx2; //!
230 TH1F* hy2; //!
231 TH1F* hX; //!
232 TH1F* hY; //!
233 TH1F* haX; //!
234 TH1F* haY; //!
235 TH2F* hlocXY1; //!
236 TH2F* hlocXY2; //!
237 TH1F* hSlot_1xa_time; //!
238 TH1F* hSlot_1xb_time; //!
239 TH1F* hXDC1_atZ0; //!
240 TH1F* hYDC1_atZ0; //!
241 TH1F* hXDC2_atZ0; //!
242 TH1F* hYDC2_atZ0; //!
259
260 TH1F* hResidx1a; //!
261 TH1F* hResidy1a; //!
262 TH1F* hResidu1a; //!
263 TH1F* hResidv1a; //!
264 TH1F* hResidx2a; //!
265 TH1F* hResidy2a; //!
266 TH1F* hResidu2a; //!
267 TH1F* hResidv2a; //!
268 TH1F* hResidx1b; //!
269 TH1F* hResidy1b; //!
270 TH1F* hResidu1b; //!
271 TH1F* hResidv1b; //!
272 TH1F* hResidx2b; //!
273 TH1F* hResidy2b; //!
274 TH1F* hResidu2b; //!
275 TH1F* hResidv2b; //!
276
277 TH1F* hResidx1a_0p1; //!
278 TH1F* hResidy1a_0p1; //!
279 TH1F* hResidu1a_0p1; //!
280 TH1F* hResidv1a_0p1; //!
281 TH1F* hResidx2a_0p1; //!
282 TH1F* hResidy2a_0p1; //!
283 TH1F* hResidu2a_0p1; //!
284 TH1F* hResidv2a_0p1; //!
285
294
303
304 TH1F* hResidx1b_0p1; //!
305 TH1F* hResidy1b_0p1; //!
306 TH1F* hResidu1b_0p1; //!
307 TH1F* hResidv1b_0p1; //!
308 TH1F* hResidx2b_0p1; //!
309 TH1F* hResidy2b_0p1; //!
310 TH1F* hResidu2b_0p1; //!
311 TH1F* hResidv2b_0p1; //!
312
321
330
331 TH1F* hPullsx1a_0p1; //!
332 TH1F* hPullsy1a_0p1; //!
333 TH1F* hPullsu1a_0p1; //!
334 TH1F* hPullsv1a_0p1; //!
335 TH1F* hPullsx2a_0p1; //!
336 TH1F* hPullsy2a_0p1; //!
337 TH1F* hPullsu2a_0p1; //!
338 TH1F* hPullsv2a_0p1; //!
339
348
357
358 TH1F* hPullsx1b_0p1; //!
359 TH1F* hPullsy1b_0p1; //!
360 TH1F* hPullsu1b_0p1; //!
361 TH1F* hPullsv1b_0p1; //!
362 TH1F* hPullsx2b_0p1; //!
363 TH1F* hPullsy2b_0p1; //!
364 TH1F* hPullsu2b_0p1; //!
365 TH1F* hPullsv2b_0p1; //!
366
375
384
385 TH1F* hAx1_loc; //!
386 TH1F* hAy1_loc; //!
387 TH1F* hAu1_loc; //!
388 TH1F* hAv1_loc; //!
389 TH1F* hAx2_loc; //!
390 TH1F* hAy2_loc; //!
391 TH1F* hAu2_loc; //!
392 TH1F* hAv2_loc; //!
393
394 TH1F* hAx12_loc; //!
395 TH1F* hAy12_loc; //!
396 TH1F* hAu12_loc; //!
397 TH1F* hAv12_loc; //!
398 TH1F* hAx122loc; //!
399 TH1F* hAy122loc; //!
400 TH1F* hAu122loc; //!
401 TH1F* hAv122loc; //!
402
403 TH1F* hXm_Xe_loc; //!
404 TH1F* hYm_Ye_loc; //!
405 TH1F* hUm_Ue_loc; //!
406 TH1F* hVm_Ve_loc; //!
413
414 TH1F* hUvsXV1; //!
415 TH1F* hYvsXV1; //!
416 TH1F* hUvsXV2; //!
417 TH1F* hYvsXV2; //!
418 TH1D* NGtracks; //!
419 TH1F* hChi2ndf_dc1; //!
420 TH1F* hChi2ndf_dc2; //!
421 TH1F* hSegSize_dc1; //!
422 TH1F* hSegSize_dc2; //!
423 TH1F* hChi2Matched; //!
424 TH1F* hP; //!
425 TH1F* hNomin1; //!
426 TH1F* hDenom1; //!
427 TH1F* hNomin2; //!
428 TH1F* hDenom2; //!
429
430 TH1F* hEff1; //!
431 TH1F* hEff2; //!
436 // end
437
451 Int_t,
452 Int_t,
453 Int_t,
454 Int_t,
455 Int_t,
456 Int_t,
457 Int_t,
458 Int_t,
459 Double_t**,
460 Double_t**,
461 Double_t**,
462 Double_t**,
463 Int_t**,
464 Int_t**,
465 Int_t**,
466 Int_t**,
467 Double_t**,
468 Double_t**,
469 Double_t**,
470 Double_t**,
471 Double_t**,
472 Double_t**,
473 Double_t**,
474 Double_t**,
475 Double_t**,
476 Int_t**,
477 Double_t**,
478 Double_t**,
479 Double_t**,
480 Double_t**,
481 Int_t**,
482 Int_t**,
483 Double_t**,
484 Double_t**);
486 Int_t,
487 Int_t,
488 Int_t,
489 Int_t,
490 Int_t,
491 Int_t,
492 Int_t,
493 Int_t,
494 Double_t**,
495 Double_t**,
496 Double_t**,
497 Double_t**,
498 Int_t**,
499 Int_t**,
500 Int_t**,
501 Int_t**,
502 Double_t**,
503 Double_t**,
504 Double_t**,
505 Double_t**,
506 Double_t**,
507 Double_t**,
508 Double_t**,
509 Double_t**,
510 Double_t**,
511 Int_t**,
512 Double_t**,
513 Double_t**,
514 Double_t**,
515 Double_t**,
516 Int_t**,
517 Int_t**,
518 Double_t**,
519 Double_t**);
521 TString,
522 Int_t,
523 Int_t,
524 Int_t,
525 Double_t*,
526 Double_t*,
527 Double_t*,
528 Double_t*,
529 Bool_t*,
530 Bool_t*,
531 Double_t**,
532 Double_t**,
533 Double_t**);
535 TString,
536 TString,
537 Int_t,
538 Int_t,
539 Double_t*,
540 Double_t*,
541 Bool_t*,
542 Double_t**,
543 Double_t**);
545 TString,
546 Int_t,
547 Int_t,
548 Int_t,
549 Double_t*,
550 Double_t*,
551 Double_t*,
552 Double_t*,
553 Int_t*,
554 Int_t*,
555 Bool_t*,
556 Bool_t*,
557 Double_t**,
558 Int_t**,
559 Double_t**,
560 Double_t**);
562 TString,
563 TString,
564 Int_t,
565 Int_t,
566 Double_t*,
567 Double_t*,
568 Int_t*,
569 Bool_t*,
570 Double_t**,
571 Int_t**,
572 Double_t**);
574
576};
577
578#endif
bool Bool_t
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
void FindSegmentTrackMCId(Int_t, Int_t **, Double_t *, Int_t *, Int_t *)
void CreateDchTrack(Int_t, Double_t *, Double_t **, Int_t *, Double_t **, Double_t **, Double_t **, Int_t *, Int_t *)
TList fhList
chi2 of the matched seg
void FillPlaneResiduals(Int_t, Int_t *, Double_t **, Double_t **, Double_t **, Double_t *)
BmnDchTrackFinder(Int_t, Int_t, Bool_t)
TClonesArray * fBmnDchDigitsArray
Input array.
Double_t * y_mid
x glob of matched segment in the z situated between the two DCH chambers
TClonesArray * fDchHits
Output arrays.
Int_t ReconstructionSingleMC(Int_t, TString, TString, Int_t, Int_t, Double_t *, Double_t *, Int_t *, Bool_t *, Double_t **, Int_t **, Double_t **)
void PrepareArraysToProcessEvent()
Double_t pol_par_dc[3][5][16]
Double_t *** Sigm_y_single
Int_t * nhits
segments numbers that were matche into global track in form of 1000 * (DC1_segIt + 1) + DC_segIt + 1
Bool_t FitDchSegments(Int_t, Int_t *, Double_t **, Double_t **, Double_t **, Double_t *, Double_t *, Double_t *)
void FillSegmentParametersSigmas(Int_t, Double_t **, Double_t **, Double_t *, Double_t **)
Double_t *** rh_sigm_segment
Double_t * aX
total number of hits from the two segments that were matched
TClonesArray * fDchSegments
void CompareDaDb(Double_t, Double_t &, Double_t &)
Int_t ReconstructionMC(Int_t, TString, Int_t, Int_t, Int_t, Double_t *, Double_t *, Double_t *, Double_t *, Int_t *, Int_t *, Bool_t *, Bool_t *, Double_t **, Int_t **, Double_t **, Double_t **)
void SegmentsToBeMatched()
void SelectLongestAndBestSegments(Int_t, Int_t *, Double_t **, Double_t *)
void SetTransferFunction(TString name)
void CompareDaDb(Double_t, Double_t &)
Double_t * aY
x slope of the matched segment
virtual ~BmnDchTrackFinder()
Double_t CalculateResidual(Int_t, Int_t, Double_t **, Double_t **)
Double_t * leng
reconstructed particle trajectory momentum
Int_t ReconstructionSingle(Int_t, TString, TString, Int_t, Int_t, Double_t *, Double_t *, Bool_t *, Double_t **, Double_t **)
Int_t BuildUVSegments(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Double_t **, Double_t **, Double_t **, Double_t **, Int_t **, Int_t **, Int_t **, Int_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Int_t **, Double_t **, Double_t **, Double_t **, Double_t **, Int_t **, Int_t **, Double_t **, Double_t **)
Double_t CalculateResidualMatch(Int_t, Int_t, Int_t, Double_t ***, Double_t ***)
Double_t *** Sigm_x_single
virtual void Finish()
virtual void Exec(Option_t *opt)
Int_t Reconstruction(Int_t, TString, Int_t, Int_t, Int_t, Double_t *, Double_t *, Double_t *, Double_t *, Bool_t *, Bool_t *, Double_t **, Double_t **, Double_t **)
Double_t t_dc[4][16]
Double_t *** Sigm_u_single
TClonesArray * fDchTracks
Double_t *** params_sigmas
virtual InitStatus Init()
Double_t *** rh_segment_time
Double_t *** Sigm_v_single
TClonesArray * fBmnHitsArray
Int_t BuildXYSegments(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Double_t **, Double_t **, Double_t **, Double_t **, Int_t **, Int_t **, Int_t **, Int_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Double_t **, Int_t **, Double_t **, Double_t **, Double_t **, Double_t **, Int_t **, Int_t **, Double_t **, Double_t **)
Double_t * imp
y slope of the matched segment
Int_t * pairID
y glob of matched segment in the z situated between the two DCH chambers
Double_t * Chi2_match
the distance from z = 0 to the global point of the matched segment
Definition json.hpp:4446