BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMwpcTrackFinder.h
Go to the documentation of this file.
1// Author: Vasilisa Lenivenko <vasilisa@jinr.ru> 2018-07-18
2
3////////////////////////////////////////////////////////////////////////////////
4// //
5// BmnMwpcTrackFinder //
6// //
7// Vasilisa Lenivenko and Vladimir Palchik //
8// The algorithm serves for searching for track segments //
9// in the MWPC of the BM@N experiment //
10// //
11////////////////////////////////////////////////////////////////////////////////
12
13#ifndef BMNMWPCTRACKFINDER_H
14#define BMNMWPCTRACKFINDER_H
15
16#include "BmnEnums.h"
17#include "BmnMath.h"
18#include "BmnMwpcGeometrySRC.h"
19#include "BmnMwpcHit.h"
20#include "BmnMwpcTrack.h"
21#include "FairTask.h"
22#include "TH1D.h"
23#include "TH2D.h"
24
25#include <TClonesArray.h>
26#include <TMath.h>
27#include <TString.h>
28#include <fstream>
29#include <iostream>
30#include <sstream>
31#include <vector>
32
33using namespace std;
34using namespace TMath;
35
36class BmnMwpcTrackFinder : public FairTask
37{
38 public:
40 BmnMwpcTrackFinder(Bool_t isExp, Int_t runPeriod, Int_t runNumber);
42 virtual InitStatus Init();
43 virtual void Exec(Option_t* opt);
44 virtual void Finish();
45
46 struct MC_points
47 {
48 Double_t x2[6] = {-999., -999., -999., -999., -999., -999.};
49 Double_t y2[6] = {-999., -999., -999., -999., -999., -999.};
50 Double_t z2[6] = {-999., -999., -999., -999., -999., -999.};
51 Double_t x3[6] = {-999., -999., -999., -999., -999., -999.};
52 Double_t y3[6] = {-999., -999., -999., -999., -999., -999.};
53 Double_t z3[6] = {-999., -999., -999., -999., -999., -999.};
54
55 Bool_t xWas2 = 0;
56 Bool_t uWas2 = 0;
57 Bool_t vWas2 = 0;
58 Bool_t xWas3 = 0;
59 Bool_t uWas3 = 0;
60 Bool_t vWas3 = 0;
61
62 Double_t param[4] = {999., 999., 999., 999.};
63 Double_t param2[4] = {999., 999., 999., 999.};
64 Double_t param3[4] = {999., 999., 999., 999.};
65 Int_t Np2 = 0;
66 Int_t Np3 = 0;
67 Int_t Np = 0;
68 Int_t Id = -1;
69 };
70
71 private:
73 Bool_t fDebug = 0;
74 UInt_t fEventNo; // event counter
77
78 TString fInputBranchName;
79 TString fInputBranchNameHit;
80 TString fOutputBranchName;
81 TString fOutputFileName;
82
83 /** Input array of MWPC hits **/
84 TClonesArray* fBmnMwpcSegmentsArray; //!
85 TClonesArray* fBmnHitsArray; //!
86 /** Output array of MWPC tracks **/
87 TClonesArray* fBmnMwpcTracksArray; //!
88
89 BmnMwpcGeometrySRC* fMwpcGeo; //!
90 TList fList;
91
96
102 TH2D* hNtrpc_mc_vs_reco; //!
105
108 Int_t kBig;
112 TVector3* ChCent; //!
113 vector<MC_points> vec_points;
119 Float_t* kZmid; //!
120 Float_t* ZCh; //!
121 Float_t** kZ_loc; //!
123
124 Float_t** z_gl; //!
125 Float_t** shift; //!
126 Float_t** shift_pair; //!
127
133
134 Float_t dw;
141
142 Int_t** kPln; //!
143 Float_t* sigm2; //!
144 Float_t** sigma_delta; //!
145 Int_t* ipl; //!
146 Double_t** matrA; //!
147 Double_t** matrb; //!
148 Double_t** Amatr; //!
149 Double_t** bmatr; //!
150
151 Double_t*** par_ab_Ch; //!
152 Double_t*** par_ab_pair; //!
153 Double_t**** sigma2_pair; //!
154 Double_t*** XVU_Ch; //!
155 Double_t*** Clust_Ch; //!
158 Double_t** Chi2_ndf_Ch; //!
159 Int_t** ind_best_pair; //!
160 Int_t** ind_best_Ch; //!
161 Int_t** Nhits_match; //!
162 Int_t* Nbest_pair; //!
163 Int_t* Nbest_Ch; //!
164 Int_t** Nhits_Ch; //!
165 Int_t** Nhits_pair; //!
166
167 void ReadSegments(Double_t***, Int_t**, Double_t**, Int_t*, Double_t***, Double_t***, vector<MC_points>&);
171 Int_t*,
172 Double_t***,
173 Float_t*,
174 Int_t**,
175 Int_t*,
176 Double_t**,
177 Double_t***,
178 Int_t**,
179 Int_t**);
181 Int_t*,
182 Double_t***,
183 Float_t*,
184 Int_t**,
185 Int_t*,
186 Double_t**,
187 Double_t***,
188 Int_t**,
189 Int_t**);
191 Float_t**,
192 Float_t*,
193 Int_t*,
194 Int_t**,
195 Double_t***,
196 Double_t**,
197 Double_t***,
198 Double_t***,
199 Int_t**,
200 Int_t**,
201 Int_t**,
202 Double_t****);
209 void MCefficiencyCalculation(vector<MC_points>&, Int_t*, Double_t***);
211
212 const int kMaxMC = 100;
213
215};
216
217#endif
bool Bool_t
int Int_t
unsigned int UInt_t
float Float_t
short Short_t
double Double_t
const char Option_t
#define ClassDef(name, id)
vector< TH1D * > hoccupancyXm
void FillFreeCoefVector(Int_t, Double_t *, Double_t ***, Int_t, Float_t **, Double_t *, Int_t *)
vector< TH1D * > hChi2_ndf_Ch
vector< TH1D * > hpar_Bx_pair
TClonesArray * fBmnHitsArray
vector< TH1D * > Eff_Ch
vector< TH1D * > Nomin_Ch
vector< TH1D * > hpar_Ax_pair
vector< TH1D * > hpar_Ax_Ch
void SegmentMatching(Int_t, Int_t *, Double_t ***, Float_t *, Int_t **, Int_t *, Double_t **, Double_t ***, Int_t **, Int_t **)
TClonesArray * fBmnMwpcTracksArray
Output array of MWPC tracks.
virtual InitStatus Init()
vector< TH1D * > hY_in_target_pair
vector< TH1D * > hpar_Ay_pair
virtual void Exec(Option_t *opt)
vector< TH1D * > hdX_pair
vector< TH2D * > hAx_bx_in_target_pair
vector< TH1D * > hChi2_ndf_pair
vector< TH2D * > hY_X_in_target_pair
vector< TH1D * > hoccupancyUm
vector< TH1D * > hdAy_pair
vector< TH1D * > Denom_Ch
vector< TH1D * > hdY_pair
vector< TH2D * > hYvsX_pair
vector< TH2D * > hAy_by_in_target_pair
virtual void Finish()
void PrepareArraysToProcessEvent()
TClonesArray * fBmnMwpcSegmentsArray
Input array of MWPC hits.
vector< TH1D * > hpar_phi_pair
void PairMatching(Int_t *, Double_t ***, Float_t *)
void TracksStoring(Int_t *, Double_t ***, Double_t **, Int_t **, Double_t ****)
void SegmentMatchingAfterTarget(Int_t, Int_t *, Double_t ***, Float_t *, Int_t **, Int_t *, Double_t **, Double_t ***, Int_t **, Int_t **)
vector< MC_points > vec_points
vector< TH1D * > hpar_By_Ch
virtual ~BmnMwpcTrackFinder()
vector< TH1D * > hoccupancyVm
BmnMwpcGeometrySRC * fMwpcGeo
vector< TH1D * > hoccupancyUp
void ReadSegments(Double_t ***, Int_t **, Double_t **, Int_t *, Double_t ***, Double_t ***, vector< MC_points > &)
vector< TH1D * > hX_in_target_pair
vector< TH1D * > hpar_By_pair
vector< TH1D * > hNbest_pair
vector< TH1D * > hpar_Ay_Ch
vector< TH1D * > hoccupancyVp
void InverseMatrix(Double_t **, Double_t **)
void SegmentParamAlignment(Int_t, Int_t *, Double_t ***, Float_t **)
vector< TH1D * > hpar_theta_pair
vector< TH1D * > hoccupancyXp
vector< TH1D * > hdAx_pair
void SegmentFit(Int_t, Float_t **, Float_t *, Int_t *, Int_t **, Double_t ***, Double_t **, Double_t ***, Double_t ***, Int_t **, Int_t **, Int_t **, Double_t ****)
vector< TH1D * > hChi2_match_pair
BmnMwpcTrackFinder(Bool_t isExp, Int_t runPeriod, Int_t runNumber)
void StraightByTwoPoints(Double_t ***, Int_t *, Double_t ***, Int_t *, Float_t *, Double_t **, Int_t *)
void FillFitMatrix(Int_t, Double_t **, Float_t **, Double_t *, Int_t *)
void MCefficiencyCalculation(vector< MC_points > &, Int_t *, Double_t ***)
vector< TH1D * > hpar_Bx_Ch
void FillEfficiency(Int_t, Double_t ***, Int_t **, Int_t, Int_t, Float_t, Float_t)
Define enumerations used in tracking.
Definition json.hpp:4446