1#ifndef CGEMSEGMENTRECALG_H
2#define CGEMSEGMENTRECALG_H
3#include "GaudiKernel/Algorithm.h"
4#include "CgemRecEvent/RecCgemCluster.h"
5#include "CgemRecEvent/RecCgemSegment.h"
6#include "McTruth/McParticle.h"
8#include "VertexFit/IVertexDbSvc.h"
9#include "GaudiKernel/NTuple.h"
10#include "GaudiKernel/INTupleSvc.h"
38 void getVertex(HepVector a, HepSymMatrix Ea,
double& vr,
double& vz);
47 int m_checkSingleTrkMC;
54 vector<int> mVec_idXVClu[3];
55 vector<double> mVec_phiClu[3];
56 vector<int> mVec_idXClu[3];
57 vector<double> mVec_ZClu[3];
58 vector<int> mVec_idVClu[3];
69 int N_cluster, N_strip, N_XV_cluster, N_hit, N_flag3, N_sim_strip, N_trk, N_N21, N_N23, N_sim_N21, N_sim_N23, N_OutRange;
70 int N_PiL2, N_PiE0, N_PiM7, N_Seg, N_Match, N_Event, N_3cluster;
71 int N_nonPi, N_ErrMat, N_CrossMat, N_OtherPar4, N_OtherPar3, N_OtherPar, N_inTrk3, N_InTrk, N_outTrk;
72 int N_4cluster, N_Match_hit, N_Match_all_hit;
81 map<int , RecCgemSegment*> m_seg_map;
82 map<int , RecCgemSegment*>::iterator m_seg_map_it;
84 vector<double> m_z_slope;
85 vector<double> m_z_Par1;
86 vector<double> m_z_Par2;
87 vector<double> m_z_Par3;
88 double m_z_nSigma, m_z_bound;
89 double m_phi_slope, m_phi_nSigma, m_phi_bound;
90 vector<double> m_phi_3Par;
91 vector<double> m_phi_4Par;
101 int t_motheridx[100];
102 double t_costhetaMC[100];
120 std::string m_postfix;
123 NTuple::Tuple* cgem_ntuple;
124 NTuple::Item<long> cgem_run;
125 NTuple::Item<long> cgem_evt;
127 NTuple::Item<long> cgem_ncluster;
128 NTuple::Item<long> cgem_XV_ncluster;
129 NTuple::Item<int> cgem_test_nStrip;
130 NTuple::Item<int> cgem_Num21;
131 NTuple::Item<int> cgem_Num23;
133 NTuple::Array<int> cgem_nStrip;
134 NTuple::Array<int> cgem_nStrip_flagb;
135 NTuple::Array<int> cgem_XV_clusterid ;
136 NTuple::Array<int> cgem_XV_flag ;
137 NTuple::Array<int> cgem_XV_layerID ;
138 NTuple::Array<int> cgem_clusterid ;
139 NTuple::Array<int> cgem_layerid ;
140 NTuple::Array<int> cgem_sheetid ;
141 NTuple::Array<int> cgem_flag ;
142 NTuple::Array<double> cgem_energydeposit ;
143 NTuple::Array<double> cgem_recphi ;
144 NTuple::Array<double> cgem_recv ;
145 NTuple::Array<double> cgem_recZ ;
146 NTuple::Array<int> cgem_clusterflag_first;
147 NTuple::Array<int> cgem_clusterflag_second;
148 NTuple::Array<int> cgem_ident_ID;
149 NTuple::Array<int> cgem_strip_type;
150 NTuple::Array<int> cgem_strip_ID;
151 NTuple::Array<int> cgem_layer_ID;
152 NTuple::Array<int> cgem_sheet_ID;
154 NTuple::Array<int> cgem_IsTruth21;
155 NTuple::Array<int> cgem_IsTruth23;
156 NTuple::Array<int> cgem_hit_size1;
157 NTuple::Array<int> cgem_hit_id1;
158 NTuple::Array<int> cgem_hit_size2;
159 NTuple::Array<int> cgem_hit_id2;
160 NTuple::Array<int> cgem_hit_size3;
161 NTuple::Array<int> cgem_hit_id3;
162 NTuple::Array<double> cgem_deltaPhi21;
163 NTuple::Array<double> cgem_deltaZ21;
164 NTuple::Array<double> cgem_deltaPhi23;
165 NTuple::Array<double> cgem_deltaZ23;
166 NTuple::Array<double> cgem_pdg21;
167 NTuple::Array<double> cgem_pdg23;
171 NTuple::Item<int> m_mc_nHit;
173 NTuple::Item<int> mc_test_nStrip;
174 NTuple::Item<int> m_mc_Num21;
175 NTuple::Item<int> m_mc_Num23;
176 NTuple::Item<int> m_mc_Num1;
177 NTuple::Item<int> m_mc_Num3;
179 NTuple::Array<double> m_mc_deltaPhi21;
180 NTuple::Array<double> m_mc_deltaZ21;
181 NTuple::Array<int> m_mc_PDG21;
182 NTuple::Array<int> m_mc_hit_ID1;
183 NTuple::Array<int> m_mc_hit_ID2;
184 NTuple::Array<int> m_mc_hit_ID3;
185 NTuple::Array<int> m_mc_hit_PDG21;
186 NTuple::Array<int> m_mc_Track21;
187 NTuple::Array<double> m_mc_deltaPhi23;
188 NTuple::Array<double> m_mc_deltaZ23;
189 NTuple::Array<int> m_mc_PDG23;
190 NTuple::Array<int> m_mc_hit_PDG23;
191 NTuple::Array<int> m_mc_Track23;
192 NTuple::Array<int> m_mc_nStrip;
193 NTuple::Array<int> m_mc_nStripB;
194 NTuple::Array<int> m_mc_ID_track;
195 NTuple::Array<int> m_mc_ID_layer;
196 NTuple::Array<int> m_mc_pdg_code;
197 NTuple::Array<int> m_mc_ID_parent;
198 NTuple::Array<double> m_mc_E_deposit;
199 NTuple::Array<double> m_mc_XYZ_pre_X;
200 NTuple::Array<double> m_mc_XYZ_pre_Y;
201 NTuple::Array<double> m_mc_XYZ_pre_Z;
202 NTuple::Array<double> m_mc_XYZ_post_X;
203 NTuple::Array<double> m_mc_XYZ_post_Y;
204 NTuple::Array<double> m_mc_XYZ_post_Z;
205 NTuple::Array<double> m_mc_P_pre_X;
206 NTuple::Array<double> m_mc_P_pre_Y;
207 NTuple::Array<double> m_mc_P_pre_Z;
208 NTuple::Array<double> m_mc_P_post_X;
209 NTuple::Array<double> m_mc_P_post_Y;
210 NTuple::Array<double> m_mc_P_post_Z;
211 NTuple::Array<double> m_mc_rec_v;
212 NTuple::Array<double> m_mc_rec_phi;
213 NTuple::Array<double> m_mc_rec_z;
214 NTuple::Array<int> m_mc_ident_ID;
215 NTuple::Array<int> m_mc_strip_type;
216 NTuple::Array<int> m_mc_strip_ID;
217 NTuple::Array<int> m_mc_layer_ID;
218 NTuple::Array<int> m_mc_sheet_ID;
220 NTuple::Item<int> m_mc_nTrk;
221 NTuple::Array<int> m_mc_pidTruth;
222 NTuple::Array<int> m_mc_motheridx;
223 NTuple::Array<double> m_mc_costaTruth;
224 NTuple::Array<double> m_mc_phiTruth;
225 NTuple::Array<double> m_mc_Final_vrTruth;
226 NTuple::Array<double> m_mc_Final_vzTruth;
227 NTuple::Array<double> m_mc_vrTruth;
228 NTuple::Array<double> m_mc_vzTruth;
229 NTuple::Array<double> m_mc_pxTruth;
230 NTuple::Array<double> m_mc_pyTruth;
231 NTuple::Array<double> m_mc_pzTruth;
232 NTuple::Array<double> m_mc_ptTruth;
233 NTuple::Array<double> m_mc_pTruth;
234 NTuple::Array<double> m_mc_qTruth;
235 NTuple::Array<double> m_mc_rateTrk;
236 NTuple::Array<double> m_mc_rateTruth;
240 NTuple::Tuple* cut_ntuple;
241 NTuple::Item<int> cut_Num;
242 NTuple::Array<int> cut_IsTruth21;
243 NTuple::Array<int> cut_IsTruth23;
244 NTuple::Array<int> cut_pdg21;
245 NTuple::Array<int> cut_pdg23;
246 NTuple::Array<double> cut_deltaPhi21;
247 NTuple::Array<double> cut_deltaZ21;
248 NTuple::Array<double> cut_deltaPhi23;
249 NTuple::Array<double> cut_deltaZ23;
CgemSegmentRecAlg(const std::string &name, ISvcLocator *pSvcLocator)
void getVertex(HepVector a, HepSymMatrix Ea, double &vr, double &vz)
bool InZAr(double x, double y)
bool InPhiAr(double x, double y)