CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/CgemMdcCombAlg/CgemMdcCombAlg-00-00-08/CgemMdcCombAlg/CgemMdcCombAlg.h
Go to the documentation of this file.
1#ifndef CGEMMDCCOMBALG_H
2#define CGEMMDCCOMBALG_H
3#include "GaudiKernel/Algorithm.h"
4#include "CgemRecEvent/RecCgemCluster.h"
5#include "CgemRecEvent/RecCgemSegment.h"
6#include "McTruth/McParticle.h"
7
8#include "VertexFit/IVertexDbSvc.h"
9#include "GaudiKernel/NTuple.h"
10#include "GaudiKernel/INTupleSvc.h"
11#include "KalFitAlg/helix/Helix.h"
12#include "CLHEP/Geometry/Point3D.h"
13#include "CLHEP/Matrix/Vector.h"
14
15#include "TROOT.h"
16#include "TObjArray.h"
17#include "TH1F.h"
18#include "TProfile.h"
19#include "TFile.h"
20#include "TFolder.h"
21#include "TMinuit.h"
22#include "TGraph.h"
23
24#include <vector>
25
26#include <string>
27
28using namespace std;
29
30class CgemMdcCombAlg:public Algorithm {
31public:
32 CgemMdcCombAlg(const std::string& name, ISvcLocator* pSvcLocator);
33 StatusCode execute();
34 StatusCode initialize();
35 StatusCode finalize();
36
37private:
38 int m_debug, m_combineTracking, m_dropHot, m_keepBadTdc, m_keepUnmatch;
39 int m_prodNT;
40 int unSegNum;
41 int unTrkNum;
42 int EvInWindow;
43 int EvOutWindow;
44
45 int m_evt, m_run;
46
47 StatusCode exe_v1();
48 StatusCode exe_v2();
49
50 void getMcPar();
51
52
53 double GetSigChisq(double x, double y, double err);
54 double GetTotChisq(double seg[5], double trk[5], double err[15]);
55 double GetWindowChisq(double pt, double a0, double a1, double a2, double a3);
56 double GetWindowChisq(double pt, vector<double> Pt, vector<double> w_p);
57 double GetWindowChisq(double pt, int i_par);
58
59 void printMdcTrk();
60
61 vector<double> m_dr_par;
62 vector<double> m_phi0_par;
63 vector<double> m_kappa_par;
64 vector<double> m_dz_par;
65 vector<double> m_tanl_par;
66
67 vector<double> m_Pt;
68 vector<double> m_w_dr;
69 vector<double> m_w_phi0;
70 vector<double> m_w_kappa;
71 vector<double> m_w_dz;
72 vector<double> m_w_tanl;
73
74 TGraph* mg_mean_dr;
75 TGraph* mg_mean_phi0;
76 TGraph* mg_mean_kappa;
77 TGraph* mg_mean_dz;
78 TGraph* mg_mean_tanL;
79 TGraph* mg_sig_dr;
80 TGraph* mg_sig_phi0;
81 TGraph* mg_sig_kappa;
82 TGraph* mg_sig_dz;
83 TGraph* mg_sig_tanL;
84 int m_nPt;
85
86 double Chi2Match(double delta, double pt, int iPar);
87
88 vector<double> mv_Pt;
89 vector<double> mv_mean_dr;
90 vector<double> mv_mean_phi0;
91 vector<double> mv_mean_kappa;
92 vector<double> mv_mean_dz;
93 vector<double> mv_mean_tanL;
94 vector<double> mv_sig_dr;
95 vector<double> mv_sig_phi0;
96 vector<double> mv_sig_kappa;
97 vector<double> mv_sig_dz;
98 vector<double> mv_sig_tanL;
99 vector<double> mv_matchChi2Cut;
100
101
102
103 NTuple::Tuple* match_ntuple;
104 NTuple::Item<long> evt;
105 NTuple::Item<long> run;
106 NTuple::Item<double> costhetaMC;
107 NTuple::Item<double> phiMC;
108 NTuple::Item<int> pdgMC;
109 NTuple::Item<double> truth_dr;
110 NTuple::Item<double> truth_dz;
111 NTuple::Item<double> truth_phi0;
112 NTuple::Item<double> truth_kappa;
113 NTuple::Item<double> truth_tanl;
114 NTuple::Item<long> match_nsegment;
115 NTuple::Item<long> track_size;
116 NTuple::Array<int> CgemSegMatched;
117 NTuple::Array<double> dr_avg;
118 NTuple::Array<double> dz_avg;
119 NTuple::Array<double> tanL_avg;
120 NTuple::Item<long> segment_size;
121 NTuple::Array<int> match_failed;
122 NTuple::Array<double> match_dr_chisq;
123 NTuple::Array<double> match_dz_chisq;
124 NTuple::Array<double> match_phi0_chisq;
125 NTuple::Array<double> match_kappa_chisq;
126 NTuple::Array<double> match_tanl_chisq;
127 NTuple::Array<double> match_IsTruth;
128 NTuple::Array<double> track_dr;
129 NTuple::Array<double> track_dz;
130 NTuple::Array<double> track_phi0;
131 NTuple::Array<double> track_kappa;
132 NTuple::Array<double> track_tanl;
133 NTuple::Array<double> track_dr_err;
134 NTuple::Array<double> track_dz_err;
135 NTuple::Array<double> track_phi0_err;
136 NTuple::Array<double> track_kappa_err;
137 NTuple::Array<double> track_tanl_err;
138 NTuple::Array<double> seg_dr;
139 NTuple::Array<double> seg_dz;
140 NTuple::Array<double> seg_phi0;
141 NTuple::Array<double> seg_kappa;
142 NTuple::Array<double> seg_tanl;
143 NTuple::Array<double> seg_dr_err;
144 NTuple::Array<double> seg_dz_err;
145 NTuple::Array<double> seg_phi0_err;
146 NTuple::Array<double> seg_kappa_err;
147 NTuple::Array<double> seg_tanl_err;
148 NTuple::Array<double> track[5];
149
150};
151
152
153#endif /* CGEMMDCCOMBALG_H */
154
CgemMdcCombAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize()
StatusCode finalize()
StatusCode execute()