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"
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"
30#include "McTruth/MdcMcHit.h"
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);
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);
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);
55 int m_trackNum_Mc_set;
61 std::vector<float> m_peakCellNum;
65 std::string m_pdtFile;
80 uint32_t m_getDigiFlag;
87 std::string m_configFile;
89 HepPDT::ParticleDataTable* m_particleTable;
103 bool m_combineTracking;
104 std::vector<float> m_helixHitsSigma;
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;
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;
148 NTuple::Item<int> m_cosCut;
150 NTuple::Item<int> m_maxCount;
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;
162 NTuple::Item<double> m_x_circle;
163 NTuple::Item<double> m_y_circle;
164 NTuple::Item<double> m_r;
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;
174 NTuple::Array<double> m_pt;
175 NTuple::Array<double> m_pt2;
176 NTuple::Array<double> m_pz;
177 NTuple::Array<double> m_pxyz;
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;
186 NTuple::Array<int> m_nHitAxialSignal_select;
187 NTuple::Array<int> m_2d_nFit;
188 NTuple::Array<int> m_3d_nFit;
190 NTuple::Item<int> m_nFitSucess;
192 NTuple::Item<int> m_zStereoNum;
193 NTuple::Array<double> m_zStereo;
194 NTuple::Array<double> m_l;
197 double m_truthPos[43][288][3];
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;
MdcHoughFinder(const std::string &name, ISvcLocator *pSvcLocator)