BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcHoughFinder/MdcHoughFinder/MdcHoughFinder.h
Go to the documentation of this file.
1#ifndef MDCHOUGHFINDER_H
2#define MDCHOUGHFINDER_H
3#include "GaudiKernel/NTuple.h"
4#include "GaudiKernel/INTupleSvc.h"
5#include "MdcGeomSvc/IMdcGeomSvc.h"
6#include "MdcGeomSvc/MdcGeoWire.h"
7#include "MdcGeomSvc/MdcGeoLayer.h"
8#include "RawDataProviderSvc/IRawDataProviderSvc.h"
9#include "RawDataProviderSvc/RawDataProviderSvc.h"
10#include "GaudiKernel/Algorithm.h"
11#include <string>
12#include "TH2D.h"
13
14#include "GaudiKernel/Algorithm.h"
15#include "CLHEP/Alist/AList.h"
16#include "MdcGeom/MdcDetector.h"
17#include "BField/BField.h"
18#include "MdcRecEvent/RecMdcTrack.h"
19#include "MdcRecEvent/RecMdcHit.h"
20#include "TrkBase/TrkRecoTrk.h"
21#include "MdcTrkRecon/MdcTrack.h"
22#include "TrkFitter/TrkContextEv.h"
23#include "MdcCalibFunSvc/MdcCalibFunSvc.h"
24#include "RawDataProviderSvc/RawDataProviderSvc.h"
25#include "GaudiKernel/NTuple.h"
26#include "MdcUtilitySvc/MdcUtilitySvc.h"
27#include "MdcPrintSvc/MdcPrintSvc.h"
28#include "HepPDT/ParticleDataTable.hh"
29//#include "Identifier/Identifier.h"
30#include "McTruth/MdcMcHit.h"
31class MdcHoughFinder:public Algorithm {
32 public:
33 MdcHoughFinder(const std::string& name, ISvcLocator* pSvcLocator);
34 StatusCode initialize();
35 StatusCode execute();
36 StatusCode finalize();
37 StatusCode beginRun();
38 private:
39 int GetMcInfo();
40 int digiToHots(TrkRecoTrk* newTrack,vector<bool> vec_truthHit);
41 int digiToHots2(TrkRecoTrk* newTrack,vector<bool> vec_truthHit);
42 double CFtrans(double x,double y);
43 int SlantId(int layer);
44 int LeastSquare(int n,int nselecthit_axial,vector<double> n_x,vector<double> n_y, vector<int> n_slant,vector<int> n_layer,vector<bool> vec_truthHit,double &d0,double &phi0, double &omega);
45 int Zposition(int n,vector<int> n_slant,double x_cirtemp,double y_cirtemp,double r_temp,vector<double> n_x_east,vector<double> n_x_west,vector<double> n_y_east,vector<double> n_y_west,vector<double> n_z_east,vector<double> n_z_west,vector<int> n_layer,vector<int> n_wire,vector<double> n_z,vector<double>& z_stereo_aver,vector<double>& l,vector<bool> vec_truthHit);
46
47 void Linefit(int z_stereoNum,vector<double> z_stereo_aver,vector<double> l, double& tanl,double& z0);
48 void Multi_array(int binX,int binY);
49 //void FillCells(int n,int binX,int binY,vector<double> vec_u,vector<double> vec_v,vector<int> vec_layer,vector<int> vec_wire);
50 void FillCells(TH2D *h1,int n,int binX,int binY,vector<double> vec_u,vector<double> vec_v,vector<int> vec_layer,vector<int> vec_wire,vector< vector <int> >& countij,vector< vector < vector<int> > >& vec_selectNum,vector< vector < vector<int> > >& vec_selectHit);
51 void RhoTheta(int numCross,int m_nHit,vector<double> vec_u,vector<double> vec_v,vector<double>& vec_rho,vector<double>& vec_theta,vector< vector<int> >& vec_hitNum);
52 void FillHist(TH2D *h1,vector<double> vec_u,vector<double> vec_v,int m_nHit,vector< vector < vector<int> > > vec_selectNum);
53 void FillRhoTheta(TH2D *h1 ,vector<double> vec_theta,vector<double> vec_rho,int numCross);
54
55 int m_trackNum_Mc_set;
56 int m_method;
57 int m_debug;
58 int m_data;
59 int m_binx;
60 int m_biny;
61 std::vector<float> m_peakCellNum;
62 int m_ndev;
63 double m_fpro;
64 double m_hit_pro;
65 std::string m_pdtFile;
66 bool m_pickHits;
67
68 double m_bunchT0;
69 int t_eventNum;
70 int t_runNum;
71 double t_maxP;
72 double t_minP;
73 int binX;
74 int binY;
75
76 double dz_mc;
77 double tanl_mc;
78 int track_fit;
79
80 uint32_t m_getDigiFlag;
81 int m_maxMdcDigi;
82 bool m_keepBadTdc;
83 bool m_dropHot;
84 bool m_keepUnmatch;
85 int m_minMdcDigi;
86
87 std::string m_configFile;
88 const MdcDetector* m_gm;
89 HepPDT::ParticleDataTable* m_particleTable;
90 TrkContextEv* m_context;
91 BField* m_bfield;
92 const MdcCalibFunSvc* m_mdcCalibFunSvc;
93
94 RawDataProviderSvc* m_rawDataProviderSvc;
95 MdcGeomSvc* m_mdcGeomSvc;
96 int t_eventNo;
97 int m_nEvtSuccess;
98 IMagneticFieldSvc* m_pIMF;
99 double t_t0Truth;
100 double t_nTrkMC;
101 int m_pid;
102 int nfailure;
103 bool m_combineTracking;
104 std::vector<float> m_helixHitsSigma;
105
106 NTuple::Tuple* ntuplehit;
107 NTuple::Array<int> m_hitCol;
108 NTuple::Array<int> m_layerNhit;
109 NTuple::Array<int> m_hitSignal;
110 NTuple::Array<int> m_layer;
111 NTuple::Array<int> m_cell;
112 NTuple::Array<int> m_layer_Mc;
113 NTuple::Array<int> m_cell_Mc;
114 NTuple::Array<double> m_x_east;
115 NTuple::Array<double> m_y_east;
116 NTuple::Array<double> m_x_west;
117 NTuple::Array<double> m_y_west;
118 NTuple::Array<double> m_z_east;
119 NTuple::Array<double> m_z_west;
120 NTuple::Array<double> m_x;
121 NTuple::Array<double> m_y;
122 NTuple::Array<double> m_z;
123 NTuple::Array<double> m_u;
124 NTuple::Array<double> m_v;
125 NTuple::Array<double> m_rho;
126 NTuple::Array<double> m_theta;
127 NTuple::Array<double> m_p;
128 NTuple::Array<int> m_slant;
129
130 //NTuple::Array<double> m_z_stereo;
131 //NTuple::Array<double> m_z_num;
132
133 // test the first layer in hough space
134 //NTuple::Item<int> m_nLayerNum;
135 //NTuple::Array<double> m_layer1X;
136 //NTuple::Array<double> m_layer1Y;
137 //NTuple::Array<double> m_layer1U;
138 //NTuple::Array<double> m_layer1V;
139
140 NTuple::Item<int> m_eventNum;
141 NTuple::Item<int> m_runNum;
142 NTuple::Item<int> m_nCross;
143 NTuple::Item<int> m_nHit;
144 NTuple::Item<int> m_nHit_Mc;
145 // NTuple::Item<int> m_stereohit;
146 // NTuple::Item<int> m_failure;
147 //NTuple::Item<int> m_3d_nFitFailure;
148 NTuple::Item<int> m_cosCut;
149
150 NTuple::Item<int> m_maxCount;
151
152 NTuple::Item<int> m_npeak;
153 NTuple::Array<double> m_peakWidth;
154 NTuple::Array<double> m_peakHigh;
155 NTuple::Array<double> m_peakArea;
156 NTuple::Item<double> m_areaLeast;
157 NTuple::Item<double> m_areaLeastNum;
158 NTuple::Item<double> m_areaSelectHit;
159 NTuple::Item<double> m_areaSelectHit_signal;
160
161
162 NTuple::Item<double> m_x_circle;
163 NTuple::Item<double> m_y_circle;
164 NTuple::Item<double> m_r;
165
166 NTuple::Item<int> m_trackNum_Mc;
167 NTuple::Item<int> m_trackNum;
168 NTuple::Array<double> m_d0;
169 NTuple::Array<double> m_phi0;
170 NTuple::Array<double> m_omega;
171 NTuple::Array<double> m_z0;
172 NTuple::Array<double> m_tanl;
173
174 NTuple::Array<double> m_pt;
175 NTuple::Array<double> m_pt2;
176 NTuple::Array<double> m_pz;
177 NTuple::Array<double> m_pxyz;
178
179 NTuple::Array<int> m_nFitFailure;
180 NTuple::Item<int> m_nHitSignal;
181 NTuple::Item<int> m_nHitAxial;
182 NTuple::Item<int> m_nHitAxialSignal;
183 NTuple::Array<int> m_nHitSelect;
184 NTuple::Array<int> m_nHitSignal_select;
185 //NTuple::Array<int> m_nHitAxialSelect;
186 NTuple::Array<int> m_nHitAxialSignal_select;
187 NTuple::Array<int> m_2d_nFit;
188 NTuple::Array<int> m_3d_nFit;
189
190 NTuple::Item<int> m_nFitSucess;
191
192 NTuple::Item<int> m_zStereoNum;
193 NTuple::Array<double> m_zStereo;
194 NTuple::Array<double> m_l;
195
196
197 double m_truthPos[43][288][3];
198
199
200 NTuple::Item<double> m_pidTruth;
201 NTuple::Item<double> m_costaTruth;
202 NTuple::Item<double> m_phi0Truth;
203 NTuple::Item<double> m_drTruth;
204 NTuple::Item<double> m_dzTruth;
205 NTuple::Item<double> m_ptTruth;
206 NTuple::Item<double> m_pzTruth;
207 NTuple::Item<double> m_pTruth;
208 NTuple::Item<double> m_qTruth;
209
210 };
211#endif
const Int_t n
Double_t x[10]
StatusCode execute()
StatusCode initialize()
StatusCode beginRun()
StatusCode finalize()