13#ifndef BMNMWPCTRACKFINDER_H
14#define BMNMWPCTRACKFINDER_H
25#include <TClonesArray.h>
45 virtual void Exec(Option_t* opt);
49 Double_t
x2[6] = {-999., -999.,-999.,-999.,-999.,-999.};
50 Double_t
y2[6] = {-999., -999.,-999.,-999.,-999.,-999.};
51 Double_t
z2[6] = {-999., -999.,-999.,-999.,-999.,-999.};
52 Double_t
x3[6] = {-999., -999.,-999.,-999.,-999.,-999.};
53 Double_t
y3[6] = {-999., -999.,-999.,-999.,-999.,-999.};
54 Double_t
z3[6] = {-999., -999.,-999.,-999.,-999.,-999.};
63 Double_t
param[4] = {999., 999., 999., 999.};
64 Double_t
param2[4] = {999., 999., 999., 999.};
65 Double_t
param3[4] = {999., 999., 999., 999.};
79 TString fInputBranchName;
80 TString fInputBranchNameHit;
81 TString fOutputBranchName;
82 TString fOutputFileName;
85 TClonesArray* fBmnMwpcSegmentsArray;
86 TClonesArray* fBmnHitsArray;
88 TClonesArray* fBmnMwpcTracksArray;
93 vector<TH1D*> hpar_Ax_Ch, hpar_Bx_Ch, hpar_Ay_Ch, hpar_By_Ch, hChi2_match_pair, hChi2_ndf_Ch, hpar_Ax_pair, hpar_Bx_pair, hpar_Ay_pair, hpar_By_pair, hpar_theta_pair, hpar_phi_pair,
94 Nomin_Ch, Denom_Ch, Eff_Ch, hX_in_target_pair, hY_in_target_pair, hdX_pair, hdY_pair, hdAx_pair, hdAy_pair,
95 hoccupancyXp, hoccupancyUp, hoccupancyVp,hoccupancyXm, hoccupancyUm, hoccupancyVm, hNbest_pair, hChi2_ndf_pair;
97 vector<TH2D*> hAx_bx_in_target_pair, hAy_by_in_target_pair, hY_X_in_target_pair, hYvsX_pair ;
98 TH1D *hdX_target, *hdY_target, *hX_in_target, *hY_in_target, *hdAx_target, *hdAy_target, *hChi2_m_target, *hdX_pair01_inZpair1, *hdY_pair01_inZpair1,
99 *hdX_pair_1,*hdY_pair_1,*hdAx_pair_1,*hdAy_pair_1,*hChi2m_pair_1,*hXv_pair_1 ,*hYv_pair_1,
101 *hDen_mctr, *hNum_mctr, *hEff_mctr,
102 *hdAx_tr_mc, *hdX_tr_mc, *hdAy_tr_mc, *hdY_tr_mc, *hNtrpc_reco, *hNtrpc_mc;
103 TH2D *hNtrpc_mc_vs_reco;
104 TH2D *hAx_bx_in_target, *hAy_by_in_target, *hY_X_in_target, *hdX_pair01_vs_x1, *hdY_pair01_vs_y1, *htheta_p1vsp0, *hChi2best_Chi2fake_after_target, *hChi2best_Chi2fake_before_target, *hYvsX_mc_pair;
113 vector<MC_points> vec_points;
115 Double_t ktarget_region;
116 Double_t ktarget_regionY;
122 Float_t *kZ_midle_pair;
126 Float_t **shift_pair;
144 Float_t **sigma_delta;
151 Double_t ***par_ab_Ch;
152 Double_t ***par_ab_pair;
153 Double_t****sigma2_pair;
155 Double_t ***Clust_Ch;
156 Double_t **Chi2_match_pair;
157 Double_t **Chi2_ndf_pair;
158 Double_t **Chi2_ndf_Ch;
159 Int_t **ind_best_pair;
167 void ReadSegments(Double_t ***, Int_t **, Double_t **, Int_t *, Double_t ***, Double_t ***, vector<MC_points>&);
168 void PrepareArraysToProcessEvent();
169 void SegmentParamAlignment(Int_t, Int_t *, Double_t ***, Float_t **);
170 void SegmentMatching(Int_t,Int_t *, Double_t ***, Float_t *, Int_t **, Int_t *,Double_t **,Double_t ***, Int_t **, Int_t **);
171 void SegmentMatchingAfterTarget(Int_t,Int_t *, Double_t ***, Float_t *, Int_t **, Int_t *,Double_t **,Double_t ***, Int_t **, Int_t **);
172 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 ****);
173 void FillFitMatrix(Int_t, Double_t** , Float_t** , Double_t* , Int_t*);
174 void FillFreeCoefVector(Int_t, Double_t*, Double_t***, Int_t, Float_t**, Double_t*, Int_t*);
175 void InverseMatrix(Double_t**, Double_t**);
176 void PairMatching( Int_t *, Double_t ***, Float_t *);
177 void FillEfficiency(Int_t, Double_t ***, Int_t **, Int_t, Int_t, Float_t, Float_t);
178 void StraightByTwoPoints(Double_t ***, Int_t *, Double_t ***, Int_t *, Float_t *, Double_t **, Int_t *);
179 void MCefficiencyCalculation(vector<MC_points>&, Int_t *, Double_t ***);
180 void TracksStoring(Int_t *, Double_t ***, Double_t **, Int_t **, Double_t****);
182 const int kMaxMC = 100;
virtual InitStatus Init()
virtual void Exec(Option_t *opt)
virtual ~BmnMwpcTrackFinder()
BmnMwpcTrackFinder(Bool_t isExp, Int_t runPeriod, Int_t runNumber)
Define enumerations used in tracking.